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

Added support for getting the non-zero balances of an account #603

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

mdawar
Copy link
Contributor

@mdawar mdawar commented Aug 6, 2024

This pull request adds the function OmitZeroBalances on GetAccountService to set the omitZeroBalances query parameter on the request.

Docs: https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-endpoints

By default all the balances will be returned, this param makes the API return the non zero balances of an account only.

Usage:

apiKey := os.Getenv("API_KEY")
secretKey := os.Getenv("SECRET_KEY")

client := binance.NewClient(apiKey, secretKey)

account, err := client.NewGetAccountService().OmitZeroBalances(true).Do(context.TODO())

@xyq-c-cpp xyq-c-cpp merged commit d45dcb3 into ccxt:master Aug 7, 2024
2 checks passed
@mdawar mdawar deleted the balances branch August 7, 2024 06:51
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.

2 participants