adshao / go-binance

A Go SDK for Binance API
MIT License
1.48k stars 663 forks source link

feat: Implement RateLimitService #417

Closed bynil closed 1 year ago

bynil commented 1 year ago

Add RateLimitService to query trade limitations. Ref: https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#query-current-order-count-usage-trade

For compatibility, I didn't alter field types in ExchangeInfoService. https://github.com/adshao/go-binance/blob/f3bd66ee84caca1dd0e69e517d34319e145790a6/v2/delivery/exchange_info_service.go#L43-L49

tanakachitsamba commented 1 year ago

Can someone with write access review this pull request please

adshao commented 1 year ago

rerun the CI

codecov[bot] commented 1 year ago

Codecov Report

Merging #417 (aec179a) into master (f3bd66e) will increase coverage by 0.00%. The diff coverage is 73.33%.

@@           Coverage Diff           @@
##           master     #417   +/-   ##
=======================================
  Coverage   70.25%   70.25%           
=======================================
  Files          75       76    +1     
  Lines        6992     7007   +15     
=======================================
+ Hits         4912     4923   +11     
- Misses       1568     1570    +2     
- Partials      512      514    +2     
Impacted Files Coverage Δ
v2/rate_limit_service.go 69.23% <69.23%> (ø)
v2/client.go 81.40% <100.00%> (+0.11%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Rbasarat commented 1 year ago

Hi!

When will this be released in a new version?

adshao commented 1 year ago

Hi!

When will this be released in a new version?

Hi @Rbasarat , I've pushed a new tag v2.3.9, let me know if there is any problem.

Rbasarat commented 1 year ago

Hi! When will this be released in a new version?

Hi @Rbasarat , I've pushed a new tag v2.3.9, let me know if there is any problem.

Hi @adshao Thanks for the quick reply!! When I try to update I get the following error go: downloading github.com/adshao/go-binance/v2 v2.3.9 go: github.com/adshao/go-binance/v2@v2.3.9: verifying module: github.com/adshao/go-binance/v2@v2.3.9: reading https://sum.golang.org/lookup/github.com/adshao/go-binance/v2@v2.3.9: 404 Not Found server response: not found: github.com/adshao/go-binance/v2@v2.3.9: invalid version: unknown revision v2.3.9

adshao commented 1 year ago

Hi! When will this be released in a new version?

Hi @Rbasarat , I've pushed a new tag v2.3.9, let me know if there is any problem.

Hi @adshao Thanks for the quick reply!! When I try to update I get the following error go: downloading github.com/adshao/go-binance/v2 v2.3.9 go: github.com/adshao/go-binance/v2@v2.3.9: verifying module: github.com/adshao/go-binance/v2@v2.3.9: reading https://sum.golang.org/lookup/github.com/adshao/go-binance/v2@v2.3.9: 404 Not Found server response: not found: github.com/adshao/go-binance/v2@v2.3.9: invalid version: unknown revision v2.3.9

You should use github.com/adshao/go-binance v2.3.9 instead of github.com/adshao/go-binance/v2 v2.3.9

Rbasarat commented 1 year ago

You should use github.com/adshao/go-binance v2.3.9 instead of github.com/adshao/go-binance/v2 v2.3.9

That worked thanks very much!!