c9s / bbgo

The modern cryptocurrency trading bot framework written in Go.
https://bbgo.finance
GNU Affero General Public License v3.0
1.18k stars 284 forks source link

FEATURE: [okx] fix queryTrades and queryOrderTrade api #1501

Closed bailantaotao closed 8 months ago

bailantaotao commented 8 months ago

The previous implementation result is unexpected, so i fix something and make it consistent with other exchange implementations.

bbgokarma-bot commented 8 months ago

Welcome back! @bailantaotao, This pull request may get 473 BBG.

bbgokarma-bot commented 8 months ago

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

codecov[bot] commented 8 months ago

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (cee61c1) 21.70% compared to head (11506fb) 21.75%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/c9s/bbgo/pull/1501/graphs/tree.svg?width=650&height=150&src=pr&token=ZT7I56OV8K&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin)](https://app.codecov.io/gh/c9s/bbgo/pull/1501?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin) ```diff @@ Coverage Diff @@ ## main #1501 +/- ## ========================================== + Coverage 21.70% 21.75% +0.05% ========================================== Files 606 606 Lines 44118 44127 +9 ========================================== + Hits 9576 9602 +26 + Misses 33847 33830 -17 Partials 695 695 ``` | [Files](https://app.codecov.io/gh/c9s/bbgo/pull/1501?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin) | Coverage Δ | | |---|---|---| | [pkg/exchange/okex/convert.go](https://app.codecov.io/gh/c9s/bbgo/pull/1501?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin#diff-cGtnL2V4Y2hhbmdlL29rZXgvY29udmVydC5nbw==) | `26.46% <100.00%> (+7.35%)` | :arrow_up: | | [...ge/okex/okexapi/get\_transaction\_history\_request.go](https://app.codecov.io/gh/c9s/bbgo/pull/1501?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin#diff-cGtnL2V4Y2hhbmdlL29rZXgvb2tleGFwaS9nZXRfdHJhbnNhY3Rpb25faGlzdG9yeV9yZXF1ZXN0Lmdv) | `0.00% <ø> (ø)` | | | [pkg/exchange/okex/exchange.go](https://app.codecov.io/gh/c9s/bbgo/pull/1501?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin#diff-cGtnL2V4Y2hhbmdlL29rZXgvZXhjaGFuZ2UuZ28=) | `0.00% <0.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/c9s/bbgo/pull/1501?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/c9s/bbgo/pull/1501?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin). Last update [cee61c1...11506fb](https://app.codecov.io/gh/c9s/bbgo/pull/1501?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yo-An+Lin).
bbgokarma-bot commented 8 months ago

Hi @bailantaotao,

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

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

Thank you for your contribution!