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

FIX: fix OnNew event must be called before OnFilled #1751

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Conversation

lanphan
Copy link
Contributor

@lanphan lanphan commented Sep 20, 2024

For some special case like IOC order is filled immediately, current code caused OnFilled event is called before OnNew event.
In order to fix it, I update the position of b.EmitNew(order) to guarantee OnNew event is always called before OnFilled event.

@bbgokarma-bot
Copy link

Welcome back! @lanphan, This pull request may get 206 BBG.

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 24.11%. Comparing base (271eafa) to head (2a767ab).
Report is 19 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1751      +/-   ##
==========================================
- Coverage   24.11%   24.11%   -0.01%     
==========================================
  Files         615      617       +2     
  Lines       37544    37569      +25     
==========================================
+ Hits         9055     9060       +5     
- Misses      27691    27711      +20     
  Partials      798      798              
Files with missing lines Coverage Δ
pkg/bbgo/activeorderbook.go 26.31% <100.00%> (+0.29%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37106c3...2a767ab. Read the comment docs.

@c9s c9s changed the title fix OnNew event must be called before OnFilled FIX: fix OnNew event must be called before OnFilled Sep 26, 2024
@c9s c9s merged commit 6e19777 into c9s:main Sep 26, 2024
5 checks passed
@bbgokarma-bot
Copy link

Hi @lanphan,

Well done! 216 BBG has been sent to your polygon wallet. Please check the following tx:

https://polygonscan.com/tx/0x5f41564d69899f311d6dbbcf723de20e118e0335022e9d897b45addc2ccc46bc

Thank you for your contribution!

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

Successfully merging this pull request may close these issues.

3 participants