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

feature: add forceOrder api for binance to show liquid info #1232

Merged
merged 3 commits into from Oct 5, 2023

Conversation

zenixls2
Copy link
Collaborator

@zenixls2 zenixls2 commented Jul 14, 2023

Show the forced liquidation event from binance.

@bbgokarma-bot
Copy link

Welcome back! @zenixls2, This pull request may get 322 BBG.

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 331 BBG

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 336 BBG

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 341 BBG

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 354 BBG

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 376 BBG

@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Merging #1232 (590e164) into main (8f40478) will decrease coverage by 0.08%.
Report is 39 commits behind head on main.
The diff coverage is 7.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1232      +/-   ##
==========================================
- Coverage   20.86%   20.78%   -0.08%     
==========================================
  Files         556      558       +2     
  Lines       39621    39779     +158     
==========================================
+ Hits         8265     8269       +4     
- Misses      30757    30910     +153     
- Partials      599      600       +1     
Files Coverage Δ
pkg/risk/riskcontrol/circuit_break.go 77.77% <100.00%> (ø)
pkg/types/stream.go 0.00% <ø> (ø)
pkg/exchange/binance/convert.go 5.02% <0.00%> (-0.05%) ⬇️
pkg/exchange/binance/stream.go 0.00% <0.00%> (ø)
pkg/exchange/binance/stream_callbacks.go 0.00% <0.00%> (ø)
pkg/types/standardstream_callbacks.go 0.00% <0.00%> (ø)
pkg/exchange/binance/parse.go 19.51% <0.00%> (-0.95%) ⬇️

... and 17 files 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 cf31796...590e164. Read the comment docs.

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 386 BBG

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 391 BBG

@zenixls2
Copy link
Collaborator Author

@c9s Tested in the futures: true environment.

INFO {BTCUSDT SELL LIMIT IOC 0.002 26143.31 26246.4 FILLED 2023-09-26 16:39:52.135 +0900 JST} strategy=skeleton
INFO {"e":"forceOrder","E":1695714031883,"o":{"s":"BTCUSDT","S":"SELL","o":"LIMIT","f":"IOC","q":"0.115","p":"26142.12","ap":"26245.10","X":"FILLED","l":"0.115","z":"0.115","T":1695714031881}} exchange=binance

log dumped from modified skeleton.

@zenixls2 zenixls2 changed the title WIP: feature: add forceOrder api for binance to show liquid info feature: add forceOrder api for binance to show liquid info Sep 26, 2023
@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 404 BBG

@zenixls2
Copy link
Collaborator Author

zenixls2 commented Oct 5, 2023

@c9s ready to be merged.

@@ -530,6 +533,63 @@ func parseDepthEvent(val *fastjson.Value) (*DepthEvent, error) {
return depth, err
}

type ForceOrderEventInner struct {
Symbol string `json:"s"`
TradeTime int64 `json:"T"`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can use types.MillisecondTime here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 423 BBG

@c9s c9s merged commit e01d89d into c9s:main Oct 5, 2023
2 of 4 checks passed
@bbgokarma-bot
Copy link

Hi @zenixls2,

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

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

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.

None yet

4 participants