Skip to main content
Glama

My account balances

get_my_balances
Read-onlyIdempotent

Equity, free margin, used margin and open profit or loss on every exchange account the user connected (Hyperliquid, Bybit, Binance, OKX, sandbox), and the total. Use to report balances or to compare free margin across exchanges. Not needed before opening: size_position reads equity itself. Not for positions (use get_my_positions). No inputs. Amounts in USD (USDC / USDT count as USD). Next: get_my_positions.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_my_balances"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
venuesYesOne entry per connected venue
deprecationNoPresent only while this tool is deprecated: replacement, removal_date, changelog
total_equityYesSum of equity on every connected venue, USD (play money and exchange accounts together; see total_equity_by_book)
total_equity_by_bookYesEquity per book, USD: sandbox (the built-in play money) and real (exchange accounts, demo or live); risk limits count each book apart

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / $defs / VenueBalance / properties / total_assets_usd / description
      Previous value: -"Every coin in the exchange account at full market value, USD (Bybit's 'total assets', OKX's totalEq): before the collateral haircut, so above equity when coins other than the stablecoin are collateral; shown only, never counted"New value: +"Every coin in the exchange account at full market value, USD (Bybit's 'total assets', OKX's totalEq): before the collateral haircut, so above equity when coins other than the stablecoin are collateral; equals equity on a venue that holds only its settlement coin; shown only, never counted"
  2. Changed1 schema field changed
    • addedOutput schema / $defs / VenueBalance / properties / total_assets_usd
      Added value: +{
      +  "default": 0,
      +  "description": "Every coin in the exchange account at full market value, USD (Bybit's 'total assets', OKX's totalEq): before the collateral haircut, so above equity when coins other than the stablecoin are collateral; shown only, never counted",
      +  "type": "number"
      +}
  3. Changed4 schema fields changed
    • changedOutput schema / $defs / VenueBalance / properties / available_margin / description
      Previous value: -"Margin free for new positions, USD"New value: +"Margin free for new positions, USD, as the exchange reports it"
    • changedOutput schema / $defs / VenueBalance / properties / equity / description
      Previous value: -"Account equity, USD: the settlement stablecoin only (its balance plus open profit or loss), which margins the perpetuals; risk limits are shares of this"New value: +"Account equity, USD: the margin the exchange itself counts for the perpetuals (Bybit unified account: margin balance, collateral coins at their haircut plus open profit or loss; OKX: adjusted equity in multi-currency mode, else the USDT line); risk limits are shares of this"
    • changedOutput schema / $defs / VenueBalance / properties / other_assets_usd / description
      Previous value: -"Other coins in the same exchange account (e.g. a demo account's gifted BTC), USD; shown only, never counted as equity or by any limit"New value: +"Coins in the same exchange account that are not margin (collateral switched off, or OKX single-currency mode), USD; shown only, never counted"
    • changedOutput schema / $defs / VenueBalance / properties / used_margin / description
      Previous value: -"Margin held by open positions, USD"New value: +"Initial margin held by open positions and orders, USD"
  4. Changed2 schema fields changed
    • changedOutput schema / $defs / VenueBalance / properties / equity / description
      Previous value: -"Account equity, USD: the whole account as the exchange values it, every coin held"New value: +"Account equity, USD: the settlement stablecoin only (its balance plus open profit or loss), which margins the perpetuals; risk limits are shares of this"
    • addedOutput schema / $defs / VenueBalance / properties / other_assets_usd
      Added value: +{
      +  "default": 0,
      +  "description": "Other coins in the same exchange account (e.g. a demo account's gifted BTC), USD; shown only, never counted as equity or by any limit",
      +  "type": "number"
      +}
  5. Changed6 schema fields changed
    • addedOutput schema / $defs / VenueBalance / properties / book
      Added value: +{
      +  "description": "sandbox (play money) or real (an exchange account, demo or live)",
      +  "type": "string"
      +}
    • changedOutput schema / $defs / VenueBalance / properties / equity / description
      Previous value: -"Account equity, USD"New value: +"Account equity, USD: the whole account as the exchange values it, every coin held"
    • changedOutput schema / $defs / VenueBalance / required
      Previous value: -[
      -  "venue",
      -  "currency",
      -  "equity",
      -  "available_margin",
      -  "used_margin",
      -  "unrealized_pnl"
      -]New value: +[
      +  "venue",
      +  "book",
      +  "currency",
      +  "equity",
      +  "available_margin",
      +  "used_margin",
      +  "unrealized_pnl"
      +]
    • changedOutput schema / properties / total_equity / description
      Previous value: -"Sum of equity on every connected venue, USD"New value: +"Sum of equity on every connected venue, USD (play money and exchange accounts together; see total_equity_by_book)"
    • addedOutput schema / properties / total_equity_by_book
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Equity per book, USD: sandbox (the built-in play money) and real (exchange accounts, demo or live); risk limits count each book apart",
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "total_equity",
      -  "venues"
      -]New value: +[
      +  "total_equity",
      +  "total_equity_by_book",
      +  "venues"
      +]
  6. Added

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile needs no restating. The description adds behavior the annotations cannot: it takes no inputs, spans all connected venues including sandbox, and normalizes USDC/USDT to USD. Only venue-availability failure modes or rate-limit behavior are left unstated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The metric list is front-loaded in the first sentence and the routing/exclusion clauses follow efficiently. It is telegraphic but readable; 'Not for positions (use get_my_positions)' and 'Next: get_my_positions' overlap slightly, costing a bit of economy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description need not describe return structure, and with zero parameters and full annotation coverage there is little else to disclose. Currency normalization, venue coverage and sibling routing fill the remaining gaps, so an agent can call this correctly without further information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Zero parameters, so the baseline is 4; the description explicitly confirms 'No inputs,' removing any ambiguity about whether an account selector is required. The added note that amounts are USD with USDC/USDT counted as USD is return-value context rather than parameter meaning, so it does not push the score higher.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the exact metrics returned (equity, free margin, used margin, open P/L), the scope (every connected exchange account, enumerated as Hyperliquid, Bybit, Binance, OKX, sandbox) plus the total. That is a specific resource with explicit coverage, clearly separable from get_my_positions and get_my_trade_history.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives positive usage (report balances, compare free margin across exchanges), an explicit exclusion (not needed before opening because size_position reads equity itself), a sibling redirect for positions (get_my_positions), and a suggested next step. When-to-use, when-not-to-use and the alternative are all stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources