mschneider / solcpp

A fast Solana and Mango Markets C++ SDK
Other
40 stars 13 forks source link

Example orderbook subscribe sol #18

Closed papadpickle closed 2 years ago

papadpickle commented 2 years ago

this example subscribes to SOL perp market on-chain events for bids, asks and fill. following info is logged at each update of each orderbook as well as fill event:

note: in case no fill event received before an orderbook update, the latest trade will be empty. maybe there is a way to get the last traded price, in that case we can add that in future.

additions:

minor improvements:

papadpickle commented 2 years ago

macos complaining.. will check it and raise another pr.