dyn4mik3 / OrderBook

Matching Engine for Limit Order Book
Other
361 stars 116 forks source link

the order has no symbol #18

Open lfjbb opened 3 years ago

lfjbb commented 3 years ago

For a limit order

quote = { 'type' : 'limit', 'side' : 'bid', 'quantity' : 6, 'price' : 108.2, 'trade_id' : 001 }

it maybe : quote = { 'type' : 'limit', ‘symbol': 'GOOG' 'side' : 'bid', 'quantity' : 6, 'price' : 108.2, 'trade_id' : 001 }

if want to cancel a order by order_id, we need to know the symbol then find the orderbook which is not efficient, we may need a OrderBooks class. which has a global order_map, and many orderbook