MCPcopy Create free account
hub / github.com/ccxt/ccxt / aggregate

Method aggregate

python/ccxt/base/exchange.py:1266–1271  ·  view source on GitHub ↗
(bidasks)

Source from the content-addressed store, hash-verified

1264
1265 @staticmethod
1266 def aggregate(bidasks):
1267 ordered = {}
1268 for price, volume, *_ in bidasks:
1269 if volume > 0:
1270 ordered[price] = ordered.get(price, 0) + volume
1271 return [[price, volume] for price, volume in ordered.items()]
1272
1273
1274 @staticmethod

Callers 7

fetch_l2_order_bookMethod · 0.95
test_aggregateFunction · 0.95
fetch_l2_order_bookMethod · 0.95
testAggregateFunction · 0.95
fetchL2OrderBookMethod · 0.95
parse_ws_bid_askMethod · 0.45
parseWsBidAskMethod · 0.45

Calls 1

getMethod · 0.45

Tested by 1

test_aggregateFunction · 0.76