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

# Get balance

> What you can spend on new orders right now.



## OpenAPI

````yaml api-reference/openapi.json GET /portfolio/balance
openapi: 3.1.0
info:
  title: updown Trade API
  version: 1.0.0
  description: >-
    Public REST API. Market data needs no key; `/account` (and order entry, when
    it ships) takes an API key. Prices are dollar strings on the 1¢ grid, counts
    are contract strings, times are epoch ms. Generated from packages/protocol —
    do not edit by hand.
servers:
  - url: https://api.updown.fast/trade-api/v1
    description: production
security: []
paths:
  /portfolio/balance:
    get:
      summary: Get balance
      description: What you can spend on new orders right now.
      operationId: getBalance
      responses:
        '200':
          description: Your buying power.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceResponse'
        '400':
          description: Invalid request (code BAD_REQUEST).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No API key, or one that isn't valid (code UNAUTHORIZED).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The key lacks the permission, or the account can't trade yet (code
            FORBIDDEN).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited (code RATE_LIMITED); wait `Retry-After` seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The book could not be read (code EXCHANGE_UNAVAILABLE); retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    BalanceResponse:
      type: object
      properties:
        balance:
          type: object
          properties:
            buying_power:
              type: string
            server_time_ms:
              type: integer
              minimum: 0
              maximum: 9007199254740991
              description: Epoch milliseconds (UTC).
          required:
            - buying_power
            - server_time_ms
          additionalProperties: false
      required:
        - balance
      additionalProperties: false
    Error:
      type: object
      properties:
        code:
          type: string
          enum:
            - BAD_REQUEST
            - NOT_FOUND
            - SERIES_NOT_FOUND
            - MARKET_NOT_FOUND
            - METHOD_NOT_ALLOWED
            - RATE_LIMITED
            - UNAUTHORIZED
            - FORBIDDEN
            - ORDER_NOT_FOUND
            - IDEMPOTENCY_CONFLICT
            - ACCOUNT_BUSY
            - MARKET_NOT_OPEN
            - INSUFFICIENT_BALANCE
            - LIMIT_EXCEEDED
            - POST_ONLY_CROSS
            - SELF_TRADE
            - TRADING_PAUSED
            - ORDER_REJECTED
            - INTERNAL_ERROR
            - EXCHANGE_UNAVAILABLE
        message:
          type: string
        details:
          type: string
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An API key from your account: `Authorization: Bearer
        udk_<live|test>_<id>_<secret>`.

````

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