docs(examples): add Go Account get balance example - #9700
Merged
Conversation
Adds go-account-get-balance.ts which fetches per-currency balances via GET /api/prime/trading/v1/accounts/{accountId}/balances. Passes includeUnsettledInAvailable as a query param to the API to control whether unsettled trading balance is included in the available balance (default: false), per the API's own semantics rather than computing it client-side. README updated with script entry, optional env var, and run commands. TICKET: CAAS-2572
alia-bitgo
force-pushed
the
aliaaamir/caas-get-balance-example
branch
from
September 9, 2026 19:12
e923aa5 to
e31b0e6
Compare
mukeshsp
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
go-account-get-balance.ts— fetches per-currency balances viaGET /api/prime/trading/v1/accounts/{accountId}/balancesincludeUnsettledInAvailableas a query param to the API (configurable viaINCLUDE_UNSETTLED_IN_AVAILABLEenv var) to control whether unsettled trading balance is included in the available figure, matching the API's own semantics instead of computing it client-sideTest plan
OFC_WALLET_ID=<id> npx tsx go-account-get-balance.tsand verify balance table prints correctlyINCLUDE_UNSETTLED_IN_AVAILABLE=trueand verify available figure reflects unsettled balanceLinear: CAAS-2572
🤖 Generated with Claude Code