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

GateIO: Fix GetFuturesContractDetails for Deliveries and minor other fixes #1766

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

gbjk
Copy link
Collaborator

@gbjk gbjk commented Jan 4, 2025

GateIO

  • 🐛 🚨 Fix GetFuturesContractDetails for Deliveries
    Was returning the product of all the contracts, so 1444 instead of 38 contracts.
    Doesn't touch anything else around this; Futures asset split coming separately
  • Rename GetPersonalTradingHistory to GetMyTradingHistory
  • Remove duplicate DeliveryTradingHistory
  • Rename GetMyPersonalTradingHistory to GetMyFuturesTradingHistory
  • Rename GateIOGetPersonalTradingHistory to GetMySpotTradingHistory
  • Rename GetSingleContract and GetSingleDeliveryContracts
  • Fix GetOpenInterest returning asset.ErrNotEnabled

Linter

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested

  • go test ./... -race
  • golangci-lint run
  • GetFuturesContractDetails

Was returning the product of all the contracts, so 1444 instead of 38
contracts.
@gbjk gbjk added bug review me This pull request is ready for review labels Jan 4, 2025
@gbjk gbjk self-assigned this Jan 4, 2025
@gbjk gbjk force-pushed the bugfix/gateio_GetFuturesContractDetails branch from 282c54b to cb7b226 Compare January 4, 2025 09:28
Copy link

codecov bot commented Jan 4, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 14 lines in your changes missing coverage. Please review.

Project coverage is 37.40%. Comparing base (50448ec) to head (f21d447).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
exchanges/gateio/gateio.go 36.36% 7 Missing ⚠️
exchanges/gateio/gateio_wrapper.go 81.48% 5 Missing ⚠️
engine/rpcserver.go 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1766      +/-   ##
==========================================
+ Coverage   37.37%   37.40%   +0.03%     
==========================================
  Files         415      415              
  Lines      178627   178336     -291     
==========================================
- Hits        66760    66715      -45     
+ Misses     104089   103847     -242     
+ Partials     7778     7774       -4     
Files with missing lines Coverage Δ
currency/pairs.go 96.25% <ø> (ø)
exchanges/btse/btse_wrapper.go 43.77% <100.00%> (ø)
exchanges/gateio/gateio_types.go 65.71% <ø> (ø)
exchanges/subscription/template.go 97.70% <100.00%> (ø)
engine/rpcserver.go 39.81% <0.00%> (ø)
exchanges/gateio/gateio_wrapper.go 39.97% <81.48%> (-0.18%) ⬇️
exchanges/gateio/gateio.go 13.91% <36.36%> (ø)

... and 14 files with indirect coverage changes

gbjk added 2 commits January 5, 2025 10:43
Using wrong error for pair not enabled
Especially fixes GetSingleContract, which seems misleading to not say
Futures.
There's a load of `GetSingle*` here that should probably also be fixed,
but these two justified a dyno
@gbjk gbjk force-pushed the bugfix/gateio_GetFuturesContractDetails branch from dcf0c6c to 77569e5 Compare January 5, 2025 08:13
@gbjk gbjk changed the title GateIO: Fix GetFuturesContractDetails for Deliveries GateIO: Fix GetFuturesContractDetails for Deliveries and minor other fixes Jan 5, 2025
@gbjk gbjk force-pushed the bugfix/gateio_GetFuturesContractDetails branch from 77569e5 to e0ceb88 Compare January 5, 2025 08:20
@gbjk gbjk force-pushed the bugfix/gateio_GetFuturesContractDetails branch from e0ceb88 to ba00163 Compare January 5, 2025 11:16
Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

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

Thanks!

exchanges/gateio/gateio_wrapper.go Show resolved Hide resolved
.golangci.yml Outdated Show resolved Hide resolved
.golangci.yml Outdated Show resolved Hide resolved
It's been a year, and I'm still getting caught out by govet demanding I
don't shadow a var I was deliberately shadowing.
Made worse by an increase in clashes with stylecheck when they both want
opposite things on the same line.
@gbjk gbjk force-pushed the bugfix/gateio_GetFuturesContractDetails branch from c19f66c to f21d447 Compare January 6, 2025 01:38
Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

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

tACK!

@gbjk gbjk mentioned this pull request Jan 6, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug review me This pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants