Skip to content

docs(examples): add Go Account get balance example - #9700

Open
alia-bitgo wants to merge 1 commit into
masterfrom
aliaaamir/caas-get-balance-example
Open

docs(examples): add Go Account get balance example#9700
alia-bitgo wants to merge 1 commit into
masterfrom
aliaaamir/caas-get-balance-example

Conversation

@alia-bitgo

@alia-bitgo alia-bitgo commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds go-account-get-balance.ts — fetches per-currency balances via GET /api/prime/trading/v1/accounts/{accountId}/balances
  • Passes includeUnsettledInAvailable as a query param to the API (configurable via INCLUDE_UNSETTLED_IN_AVAILABLE env var) to control whether unsettled trading balance is included in the available figure, matching the API's own semantics instead of computing it client-side
  • README updated with script entry, optional env var docs, and run commands

Test plan

  • Run OFC_WALLET_ID=<id> npx tsx go-account-get-balance.ts and verify balance table prints correctly
  • Run with INCLUDE_UNSETTLED_IN_AVAILABLE=true and verify available figure reflects unsettled balance
  • Verify README renders correctly

Linear: CAAS-2572

🤖 Generated with Claude Code

@alia-bitgo
alia-bitgo requested a review from a team as a code owner September 9, 2026 18:47
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
alia-bitgo force-pushed the aliaaamir/caas-get-balance-example branch from e923aa5 to e31b0e6 Compare September 9, 2026 19:12
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.

1 participant