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

# Add an exchange account

> Add an exchange account to exchanges. 

Note: This endpoint currently only supports the following exchanges `INDEPENDENT_RESERVE`,`BIT`, `BITHUMB`, `BITSO`, `CRYPTOCOM`, `BYBIT_V2`, `WHITEBIT`, `HITBTC`, `GEMINI`, `HUOBI`, `GATEIO`, `COINHAKO`, `BULLISH`, `BITGET`, and `LUNO`

To add an exchange account, please use the following [guide](https://developers.fireblocks.com/docs/add-an-exchange-account).




## OpenAPI

````yaml https://docs.fireblocks.com/api/v1/swagger.yaml post /exchange_accounts
openapi: 3.0.0
info:
  title: Fireblocks API
  description: >
    Fireblocks provides a suite of applications to manage digital asset
    operations and a complete development platform to build your business on the
    blockchain.


    - Visit our website for more information: [Fireblocks
    Website](https://fireblocks.com)

    - Visit our developer docs: [Fireblocks
    DevPortal](https://developers.fireblocks.com)
  version: 1.6.2
  contact:
    email: developers@fireblocks.com
servers:
  - url: https://api.fireblocks.io/v1
    description: Fireblocks Production Environment Base URL
  - url: https://sandbox-api.fireblocks.io/v1
    description: Fireblocks Sandbox Environment Base URL
security: []
paths:
  /exchange_accounts:
    post:
      tags:
        - Exchange accounts
      summary: Add an exchange account
      description: >
        Add an exchange account to exchanges. 


        Note: This endpoint currently only supports the following exchanges
        `INDEPENDENT_RESERVE`,`BIT`, `BITHUMB`, `BITSO`, `CRYPTOCOM`,
        `BYBIT_V2`, `WHITEBIT`, `HITBTC`, `GEMINI`, `HUOBI`, `GATEIO`,
        `COINHAKO`, `BULLISH`, `BITGET`, and `LUNO`


        To add an exchange account, please use the following
        [guide](https://developers.fireblocks.com/docs/add-an-exchange-account).
      operationId: addExchangeAccount
      parameters:
        - $ref: '#/components/parameters/X-Idempotency-Key'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddExchangeAccountRequest'
      responses:
        '201':
          description: An Exchange Account identifier object
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddExchangeAccountResponse'
        default:
          $ref: '#/components/responses/Error'
      x-codeSamples:
        - lang: TypeScript
          source: >-
            const response:
            Promise<FireblocksResponse<AddExchangeAccountResponse>> =
            fireblocks.exchangeAccounts.addExchangeAccount(exchangeAccountsApiAddExchangeAccountRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<AddExchangeAccountResponse>> response
            =
            fireblocks.exchangeAccounts().addExchangeAccount(addExchangeAccountRequest,
            idempotencyKey);
        - lang: Python
          source: >-
            response =
            fireblocks.exchange_accounts.add_exchange_account(add_exchange_account_request,
            idempotency_key);
components:
  parameters:
    X-Idempotency-Key:
      name: Idempotency-Key
      in: header
      description: >-
        A unique identifier for the request. If the request is sent multiple
        times with the same idempotency key, the server will return the same
        response as the first request. The idempotency key is valid for 24
        hours.
      required: false
      schema:
        type: string
  schemas:
    AddExchangeAccountRequest:
      type: object
      properties:
        exchangeType:
          $ref: '#/components/schemas/ExchangeType'
        name:
          type: string
          description: Display name of the exchange account
        creds:
          description: Encrypted credentials
          type: string
        key:
          description: Api key of the exchange
          type: string
        mainAccountId:
          description: Optional - main account id of the exchange
          type: string
      required:
        - exchangeType
        - name
    AddExchangeAccountResponse:
      type: object
      properties:
        id:
          description: Exchange account's identifier
          type: string
        name:
          type: string
          description: Display name of the exchange account
        exchangeType:
          $ref: '#/components/schemas/ExchangeType'
    ExchangeType:
      description: Exchange account's type
      type: string
      enum:
        - INDEPENDENT_RESERVE
        - ENCLAVE_MARKETS
        - BIT
        - COINFLEX
        - KUCOIN
        - PXS
        - LIQUID
        - BITHUMB
        - BITFINEX
        - BITSO
        - BITSTAMP
        - KRAKEN
        - KRAKENINTL
        - BINANCE
        - BINANCEUS
        - CRYPTOCOM
        - BYBIT_V2
        - COINBASEPRO
        - COINBASEPRIME
        - COINBASEINTERNATIONAL
        - WHITEBIT
        - COINBASEEXCHANGE
        - KORBIT
        - HITBTC
        - GEMINI
        - CIRCLE
        - BITMEX
        - HUOBI
        - DERIBIT
        - OKCOIN_V5
        - OKEX
        - COINMETRO
        - GATEIO
        - SCRYPT
        - COINHAKO
        - LIGHTBIT
        - BULLISH
        - CANVAS_CONNECT
        - BITGET
        - LUNO
        - BIT_GENERA
        - TRANSFERO
    ErrorSchema:
      type: object
      properties:
        message:
          type: string
        code:
          type: number
  headers:
    X-Request-ID:
      schema:
        type: string
      description: >-
        Unique ID correlated to the API request. Please provide it in any
        support ticket you create or on Github issues related to Fireblocks SDKs
  responses:
    Error:
      description: Error Response
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSchema'

````