this shit is it

This commit is contained in:
2023-07-04 09:08:25 +02:00
parent 1ca6b3d036
commit 7d506625bd
15 changed files with 45 additions and 32 deletions

View File

@@ -127,10 +127,11 @@ class Exchange():
# calculate price for complete order fullfilment
prev=amount
amount=int(amount)
price=round(price)
if amount<1:
# invalid order
return None
full_price=round(price*amount,2)
full_price=round(price*amount)
# Move resources into escrow
@@ -294,11 +295,11 @@ class Exchange():
#data["step"]=step
data["tstep"]=timepoint
data["instrm"]=instrm
data["best_ask"]=0
data["best_bid"]=0
data["total_demand"]=0
data["total_supply"]=0
data["market_rate"]=0
data["best_ask"]=None
data["best_bid"]=None
data["total_demand"]=None
data["total_supply"]=None
data["market_rate"]=None
localStepDB[instrm]=data
## add best ask/best bid