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

# Get exchange connection status

> Return whether a wallet has a live exchange connection.

Whether the wallet has a live connection to this exchange. Not connected is a
200 with `connected: false`, not an error — poll it to drive the connect
button.


## OpenAPI

````yaml api/openapi.json GET /v1/exchange/{exchange}
openapi: 3.1.0
info:
  description: Fiat-to-USDC onramp API. The URL prefix (`/v1`) is the version contract.
  license:
    identifier: LicenseRef-Proprietary
    name: Proprietary
  title: Calm API
  version: v1
servers:
  - description: Production
    url: https://api.calmtreasury.xyz
  - description: Sandbox
    url: https://api.sandbox.calmtreasury.xyz
security: []
paths:
  /v1/exchange/{exchange}:
    get:
      summary: Get exchange connection status
      description: >-
        Returns the connection status for an exchange. Not-connected is a 200
        with `connected: false` — poll this to drive the connect UI.
      operationId: getExchange
      parameters:
        - in: path
          name: exchange
          required: true
          schema:
            enum:
              - coinbase
            type: string
        - in: query
          name: wallet
          required: true
          schema:
            pattern: ^0x[a-fA-F0-9]{40}$
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  connected:
                    type: boolean
                  connected_at:
                    format: date-time
                    type:
                      - string
                      - 'null'
                  exchange:
                    type: string
                  id:
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    type:
                      - string
                      - 'null'
                required:
                  - id
                  - exchange
                  - connected
                  - connected_at
                type: object
          description: The connection status.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            Bad Request — `error.code` includes: generic_invalid_request,
            generic_validation_error, publishable_key_missing,
            unsupported_exchange, validation_error.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Unauthorized — `error.code` includes: invalid_publishable_key.'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Forbidden — `error.code` includes: origin_not_allowed.'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Too Many Requests — `error.code` includes: rate_limited.'
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            Bad Gateway — `error.code` includes:
            apikey_insufficient_permissions, exchange_provider_error,
            generic_internal_server_error, generic_unauthorized,
            wallet_invalid_credentials.
      security:
        - publishableKey: []
components:
  schemas:
    Error:
      properties:
        error:
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  securitySchemes:
    publishableKey:
      description: Publishable key identifying the calling app.
      in: header
      name: x-calm-publishable-key
      type: apiKey

````