# Balances

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/account/balances:
    get:
      summary: Balances
      deprecated: false
      description: >-
        Returns the balance details for the account the token acts on (the main
        account or a subaccount).


        `account_equity`, `margin_used` and `margin_available` are expressed in
        USD, the collateral currency for futures. If balances cannot be
        retrieved from the exchange, the response contains an empty `balances`
        array and `"0"` for the account totals.


        **Required API scope:** any valid API key. This endpoint is
        rate-limited.


        This endpoint takes no query parameters. Unknown query parameters are
        rejected with `400 UNEXPECTED_PARAMETERS`.
      tags:
        - One Trading Public REST API/Trading
        - trading
      parameters: []
      responses:
        '200':
          x-apidog-name: Success
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  account_id:
                    type: string
                    format: uuid
                    x-apidog-mock: 50034b63-9607-4801-810a-6ab00d185eca
                    description: The account the balances belong to.
                  account_equity:
                    type: string
                    x-apidog-mock: '171.83539848'
                    description: Account equity in USD, as a decimal string.
                  margin_available:
                    type: string
                    x-apidog-mock: '171.83539848'
                    description: >-
                      `account_equity` minus `margin_used`, in USD, as a decimal
                      string.
                  margin_used:
                    type: string
                    x-apidog-mock: '0'
                    description: >-
                      Margin used by open futures positions and orders, in USD,
                      as a decimal string.
                  balances:
                    type: array
                    items:
                      $ref: '#/components/schemas/Balance'
                x-apidog-orders:
                  - account_id
                  - account_equity
                  - margin_available
                  - margin_used
                  - balances
                required:
                  - account_id
                  - account_equity
                  - margin_available
                  - margin_used
                  - balances
                x-apidog-ignore-properties: []
              example:
                account_id: 50034b63-9607-4801-810a-6ab00d185eca
                account_equity: '171.83539848'
                margin_available: '171.83539848'
                margin_used: '0'
                balances:
                  - currency_code: USDC
                    available: '50.5359915'
                    locked: '0'
                    time: '2026-01-19T10:35:32.227Z'
                  - currency_code: SOL
                    available: '0.22381479'
                    locked: '0'
                    time: '2026-01-19T10:35:32.227Z'
                  - currency_code: USD
                    available: '23.19951955'
                    locked: '0'
                    time: '2026-01-19T10:35:32.227Z'
                  - currency_code: USDT
                    available: '0'
                    locked: '0'
                    time: '2026-01-19T10:35:32.227Z'
                  - currency_code: BTC
                    available: '0.00015998'
                    locked: '0'
                    time: '2026-01-19T10:35:32.227Z'
                  - currency_code: EUR
                    available: '85.80718666'
                    locked: '0'
                    time: '2026-01-19T10:35:32.227Z'
                  - currency_code: SUI
                    available: '10.93207'
                    locked: '0'
                    time: '2026-01-19T10:35:32.227Z'
                  - currency_code: XRP
                    available: '0'
                    locked: '0'
                    time: '2026-01-19T10:35:32.227Z'
          headers: {}
        '400':
          description: >-
            Invalid request. `UNEXPECTED_PARAMETERS` when any query parameter is
            sent.
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: UNEXPECTED_PARAMETERS
                error_message: 'Unsupported parameter: currency_code. Allowed: '
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: >-
            Unauthorized. The token was accepted by the gateway but rejected by
            the endpoint: `UNAUTHORIZED`, or `INVALID_REQUEST_SIGNATURE` when
            the API key requires signed requests and the signature is missing or
            invalid.
          content:
            application/json:
              schema: *ref_0
              examples:
                '3':
                  summary: Unauthorized
                  value:
                    error: UNAUTHORIZED
                    error_message: Unauthorized access
                '4':
                  summary: Invalid signature
                  value:
                    error: INVALID_REQUEST_SIGNATURE
                    error_message: The request signature is missing or invalid
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: >-
            Forbidden. Either the gateway rejected the token
            (`{"message":"Forbidden"}`), or the endpoint denied the request,
            e.g. `PERMISSION_DENIED` (API key lacks the required scope, or
            account not permitted) or `EXCHANGE_ACCOUNT_NOT_PROVISIONED`.
          content:
            application/json:
              schema:
                oneOf:
                  - *ref_0
                  - $ref: '#/components/schemas/GatewayError'
              examples:
                '5':
                  summary: Gateway
                  value:
                    message: Forbidden
                '6':
                  summary: Permission denied
                  value:
                    error: PERMISSION_DENIED
                    error_message: Permission denied
                '7':
                  summary: Not provisioned
                  value:
                    error: EXCHANGE_ACCOUNT_NOT_PROVISIONED
                    error_message: >-
                      The account is authenticated but has no exchange account
                      yet
          headers: {}
          x-apidog-name: Forbidden
        '429':
          description: >-
            Rate limit exceeded. Limits are per account holder per minute: 600
            (retail), 2,000 (institutional), 10,000 (market maker).
          content:
            application/json:
              schema: *ref_0
              example:
                error: TOO_MANY_REQUESTS
                error_message: Too many requests
          headers: {}
          x-apidog-name: ''
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema: *ref_0
              example:
                error: SERVER_ERROR
                error_message: An internal server error occurred
          headers: {}
          x-apidog-name: Server Error
      security: []
      x-apidog-folder: One Trading Public REST API/Trading
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/349694/apis/api-3612089-run
components:
  schemas:
    Balance:
      type: object
      properties:
        currency_code:
          type: string
          description: Currency of the balance
        available:
          type: string
          description: The amount of the currency available to trade or withdraw
        locked:
          type: string
          description: The amount of the currency locked in orders
        time:
          type: string
          description: >-
            Time the response was generated (current server time, ISO 8601). It
            is not the time the balance last changed.
          format: date-time
      x-apidog-orders:
        - currency_code
        - available
        - locked
        - time
      required:
        - currency_code
        - available
        - locked
        - time
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    ErrorResponse:
      type: object
      description: >-
        Error body. `error` is a machine-readable code (e.g.
        `INVALID_INSTRUMENT_CODE`) on most endpoints; a few older endpoints
        return a human-readable message in `error` instead and omit
        `error_message`.
      properties:
        error:
          type: string
          description: Error code (or, on older endpoints, a human-readable message).
        error_message:
          type: string
          description: >-
            Human-readable detail. Present on endpoints that return an error
            code in `error`.
      required:
        - error
      x-apidog-orders:
        - error
        - error_message
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    GatewayError:
      type: object
      description: >-
        Returned by the API gateway itself when the bearer token is missing,
        invalid, expired or revoked, or the calling IP is not on the API key's
        allowlist.
      properties:
        message:
          type: string
          enum:
            - Forbidden
            - Unauthorized
      required:
        - message
      x-apidog-orders:
        - message
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
  securitySchemes:
    bearerAuth:
      type: bearer
      scheme: bearer
      description: >-
        API key issued to the account holder, sent as `Authorization: Bearer
        <token>`. The key must hold the `SUBACCOUNT_TRANSFER` scope.
    bearer:
      type: bearer
      scheme: bearer
servers:
  - url: https://api.onetrading.com/fast
    description: Production Env
security: []

```