-
Notifications
You must be signed in to change notification settings - Fork 762
Feature: Add VIP Loan API Support #694
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!!
I left some comments and also if possible I'd add a file for integrations tests
| return s | ||
| } | ||
|
|
||
| func (s *VipLoanInterestRateHistoryService) Do(ctx context.Context) (*VipLoanInterestRateHistoryResponse, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would seperate each service into it's own file to keep consistent with the repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to spilt these apis into 3 file like market data, user information and trade? I think split them into 12 files will be too much files
| @@ -0,0 +1,590 @@ | |||
| package binance | |||
|
|
|||
| import ( | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd seperate to have one test file per service to keep consistent with the repo
| // ----- end simple earn service ----- | ||
|
|
||
| // ----- vip loan service ----- | ||
| func (c *Client) NewVipLoanService() *VipLoanService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd list here all the services
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds VIP Loan API support by introducing a new service constructor in the client.
- Adds NewVipLoanService to instantiate the VipLoanService
- Includes inline comments to demarcate the VIP loan service section
This feature is documented by VIP Loan
Notice: some of the result types is inconsistent with the document, so we use the actual type returned by binance API instead of the example response in the document, for example: CollateralData have 9 ranks instead of the 3 in document, and InterestRate & InterestRateHistory is using string timestamp instead of int