GeminiGemini
SandboxGet API key
  • Crypto Trading
  • Prediction Markets
  • SDKs & Tools
Changelog
Gemini Crypto Exchange LogoGemini Crypto Exchange Logo

© 2026 Gemini Space Station, Inc.

Overview
TypeScript SDK
    QuickstartAuthenticationWebSocketError HandlingPatterns & Recipes
    API Reference
      Overview
      Market Data
      Trading
      Prediction Markets
      Account Services
        Balances & AccountAddresses & DepositsWithdrawals & TransfersBankingStakingOAuth Token Revocation
      Clearing & Instant
      PerpetualsMarginWebSocket
    Deep Dives
Account Services

TypeScript SDK — Account Services: Balances & Account

Account details, balances, roles, and account management. All methods are on client.accountServices.

See the API specifications for full request/response schemas and the authentication guide for setup.

Methods

getAccountDetail

POST /v1/account · Authenticated

Returns details about the authenticated account including name, type, and associated users.

Code
const detail = await client.accountServices.getAccountDetail({}); console.log(detail.account?.accountName); // e.g. "Primary" console.log(detail.memo_reference_code); // wire memo reference code

This is a POST mutation — never automatically retried. The empty object {} is required — the SDK adds transport fields (nonce, request) automatically.

getAvailableBalances

POST /v1/balances · Authenticated

Returns the available balances for each currency in your account. The account field is required in the generated TypeScript type. The response is a bare array of Balance objects.

Code
const balances = await client.accountServices.getAvailableBalances({ account: "primary", }); for (const entry of balances) { // entry.amount and entry.available are numbers, not strings console.log(`${entry.currency}: ${entry.available} available`); }

Tip: amount and available are numbers (not strings). Other fields like availableForWithdrawal, pendingWithdrawal, and pendingDeposit are also numbers. The _timestamp field is an ISO 8601 string for staleness detection — see Data Types.

getNotionalBalances

POST /v1/notionalbalances/{currency} · Authenticated

Returns balances denominated in the specified fiat currency. Uses the { path, body } input pattern because the currency is a URL path parameter.

Code
const balances = await client.accountServices.getNotionalBalances({ path: { currency: "usd" }, body: {}, }); for (const entry of balances) { console.log(`${entry.currency}: ${entry.amountNotional} USD`); }

Tip: The path.currency selects the denomination (e.g. "usd", "gbp", "eur"). Notional values (amountNotional, availableNotional, availableForWithdrawalNotional) are decimal strings.

getRoles

POST /v1/roles · Authenticated

Returns the roles assigned to the API key making the request.

Code
const roles = await client.accountServices.getRoles({}); console.log(roles.isTrader); // boolean console.log(roles.isFundManager); // boolean console.log(roles.isAuditor); // boolean

listAccountsInGroup

POST /v1/account/list · Authenticated

Lists all accounts in the master group. Useful for multi-account setups. The response is a bare array.

Code
const accounts = await client.accountServices.listAccountsInGroup({}); for (const acct of accounts) { console.log(`${acct.name} (${acct.account}) — ${acct.status}`); }

Tip: The timestamp field in the request body accepts bigint or number.

createNewAccount

POST /v1/account/create · Authenticated

Creates a new sub-account within your account group. The request body is validated client-side.

Code
const result = await client.accountServices.createNewAccount({ name: "strategy-2", type: "exchange", }); console.log(result.account); // e.g. "strategy-2" console.log(result.type); // "exchange" or "custody"

This is a POST mutation — never automatically retried. Account creation is idempotent by name — creating an account with an existing name returns the existing account.

renameAccount

POST /v1/account/rename · Authenticated

Renames a sub-account. The request body is validated client-side — the SDK checks field types before sending.

Code
const result = await client.accountServices.renameAccount({ account: "my-account", newName: "primary-trading", });

This is a POST mutation — never automatically retried. If the request fails mid-flight you should confirm the rename status before retrying.

What's next

  • Addresses & Deposits — deposit addresses and approved address management
  • Withdrawals & Transfers — moving funds out or between accounts
  • Data Types — why balances are numbers and timestamps may be bigint
  • Error Handling — handling API errors
Last modified on August 14, 2026
Rewards & RebatesAddresses & Deposits
On this page
  • Methods
    • getAccountDetail
    • getAvailableBalances
    • getNotionalBalances
    • getRoles
    • listAccountsInGroup
    • createNewAccount
    • renameAccount
  • What's next
TypeScript
TypeScript
TypeScript
TypeScript
TypeScript
TypeScript
TypeScript