adding some basic exchange

This commit is contained in:
2023-01-22 14:46:05 +01:00
parent 841b49caec
commit 3a421ceb34
5 changed files with 188 additions and 1 deletions

13
main.py
View File

@@ -0,0 +1,13 @@
from lightmatchingengine.lightmatchingengine import LightMatchingEngine,Side,Trade,Order
from econ.exchange import Exchange
cx=Exchange()
cx.add_to_account(0,"balance",1500)
cx.add_to_account(1,"food",50)
cx.add_to_account(2,"food",50)
order_1=cx.submit_order(1,"food",50,2,side=Side.SELL)
order_2=cx.submit_order(2,"food",50,1,side=Side.SELL)
order_3=cx.submit_order(0,"food",100,2,Side.BUY)
print("help")