Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match orderbook logic for orders inserted into orderbook #10

Open
nikhilsaraf opened this issue Mar 25, 2024 · 1 comment
Open

Match orderbook logic for orders inserted into orderbook #10

nikhilsaraf opened this issue Mar 25, 2024 · 1 comment

Comments

@nikhilsaraf
Copy link

Is there any orderbook matching logic included?

if I add an ask at price = 100.0 (volume = 5.0) and a bid at price 101.0 (volume = 9.0) then I'd expect that these offers would "cross" and the orderbook would have remaining 1 bid order at price = 101.0 with volume = 4.0 along with one trade which is a sell at price = 100.0 for volume = 5.0

Can you please comment on whether "matching" an orderbook is part of the scope of this project?

@mutalisk999
Copy link

if I add an ask at price = 100.0 (volume = 5.0) and a bid at price 101.0 (volume = 9.0) then I'd expect
that these offers would "cross" and the orderbook would have remaining 1 bid order at price = 101.0 
with volume = 4.0 along with one trade which is a sell at price = 100.0 for volume = 5.0

In order book trading systems, this is very common trading logic.
In the case of crossings, the price of the pending order in the order book will be the final price.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants