> ## Documentation Index
> Fetch the complete documentation index at: https://docs.struct.to/llms.txt
> Use this file to discover all available pages before exploring further.

# Trader balances

> Returns current token balances for a trader wallet.

```bash theme={null}
curl "https://staging-api.struct.to/v1/trader/{address}/balances?chain=robinhood&chain_id=4663&fields=short" \
  -H "X-API-Key: YOUR_API_KEY"
```

```json Response (Long) theme={null}
[
  {
    "mint": "0x39dBED3a2bd333467115dE45665cC57F813C4571",
    "symbol": "PONS",
    "name": "Pons",
    "balance": 1250.5,
    "decimals": 18,
    "price_usd": 0.09664868619,
    "balance_usd": 120770.48,
    "image_url": "https://cdn.example.com/pons.png",
    "token_program": "erc20"
  }
]
```

```jsonc Response (Short) theme={null}
[
  {
    "m": "0x39dBED3a2bd333467115dE45665cC57F813C4571",
    "sy": "PONS",
    "n": "Pons",
    "b": 1250.5,
    "d": 18,
    "pu": 0.09664868619,
    "bu": 120770.48,
    "i": "https://cdn.example.com/pons.png",
    "tp": "erc20"
  }
]
```


## OpenAPI

````yaml onchain-openapi.json GET /trader/{address}/balances
openapi: 3.1.0
info:
  title: Struct On-chain API
  description: >-
    RESTful API for token market data, discovery, holders, audits, and trader
    analytics across supported chains. Pass `fields=short` or header
    `x-field-names: short` for abbreviated keys. HTTP defaults to `long`. Token
    candlesticks, token trades and wallet batch trades also support
    `fields=array` for typed positional rows.
  version: 1.0.0
servers:
  - url: https://staging-api.struct.to/v1
    description: Staging
security:
  - ApiKey: []
paths:
  /trader/{address}/balances:
    get:
      tags:
        - Trader
      summary: Trader balances
      description: Returns current token balances for a trader wallet.
      operationId: get_trader_balances
      parameters:
        - name: chain
          in: query
          description: Chain name. Required unless `chain_id` is provided.
          required: false
          schema:
            type: string
          example: robinhood
        - name: chain_id
          in: query
          description: Chain id. Required unless `chain` is provided. Use `-1` for Solana.
          required: false
          schema:
            type: integer
            format: int64
          example: 4663
        - name: address
          in: path
          description: Trader wallet address.
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: Max token balances per page, capped at 100.
          required: false
          schema:
            type: integer
            minimum: 0
        - name: pagination_key
          in: query
          description: Pagination key from a previous response's pagination.pagination_key.
          required: false
          schema:
            type: string
        - name: show_native
          in: query
          description: Include native SOL balance when available.
          required: false
          schema:
            type: boolean
        - name: x-field-names
          in: header
          required: false
          description: >-
            Select long (full) or short (abbreviated) field names. HTTP defaults
            to `long`. Takes precedence over `fields`. See [Response
            Format](/api-reference/response-format#long-and-short-field-names).
          schema:
            type: string
            enum:
              - long
              - short
            default: long
          example: short
        - name: fields
          in: query
          required: false
          description: >-
            Same as `x-field-names`. Use `long` or `short`. HTTP defaults to
            `long`. Ignored when the header is set. `field_names` is accepted as
            an alias.
          schema:
            type: string
            enum:
              - long
              - short
            default: long
          example: short
      responses:
        '200':
          description: Current trader balances
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalancesData'
              examples:
                long:
                  summary: Response (Long)
                  value:
                    - mint: '0x39dBED3a2bd333467115dE45665cC57F813C4571'
                      symbol: PONS
                      name: Pons
                      balance: 1250.5
                      decimals: 18
                      price_usd: 0.09664868619
                      balance_usd: 120770.48
                      image_url: https://cdn.example.com/pons.png
                      token_program: erc20
                short:
                  summary: Response (Short)
                  value:
                    - m: '0x39dBED3a2bd333467115dE45665cC57F813C4571'
                      sy: PONS
                      'n': Pons
                      b: 1250.5
                      d: 18
                      pu: 0.09664868619
                      bu: 120770.48
                      i: https://cdn.example.com/pons.png
                      tp: erc20
        '400':
          description: Validation error.
components:
  schemas:
    BalancesData:
      type: array
      items:
        $ref: '#/components/schemas/TokenBalance'
    TokenBalance:
      type: object
      required:
        - mint
        - balance
        - decimals
        - token_program
      properties:
        mint:
          type: string
        symbol:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        balance:
          type: number
          format: double
        decimals:
          type: integer
          format: int32
          minimum: 0
        price_usd:
          type:
            - number
            - 'null'
          format: double
        balance_usd:
          type:
            - number
            - 'null'
          format: double
        image_url:
          type:
            - string
            - 'null'
        token_program:
          type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Secret API key (`sk_*`) or JWT public key (`pk_jwt_*`).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.