exporting to mongo is now even better then befor
This commit is contained in:
+10
-3
@@ -38,10 +38,17 @@ class MongoExporter():
|
||||
for transaction in step:
|
||||
transaction["step"]=i
|
||||
c[cmt].insert_one(transaction)
|
||||
#c[cma].insert_many(market.asks)
|
||||
# c[cmb].insert_many(market.bids)
|
||||
|
||||
for com,asks in market.asks.items():
|
||||
for ask in asks:
|
||||
ask["commodity"]=com
|
||||
c[cma].insert_one(ask)
|
||||
for com,bids in market.bids.items():
|
||||
for bid in bids:
|
||||
bid["commodity"]=com
|
||||
c[cmb].insert_one(bid)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user