> ## 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.

# Create Settlement for a Trader

> Create settlement for a trader.
Learn more about Fireblocks Off Exchange in the following [guide](https://developers.fireblocks.com/docs/off-exchange).
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.



## OpenAPI

````yaml https://docs.fireblocks.com/api/v1/swagger.yaml post /off_exchange/settlements/trader
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:
  /off_exchange/settlements/trader:
    post:
      tags:
        - Off exchanges
      summary: Create Settlement for a Trader
      description: >-
        Create settlement for a trader.

        Learn more about Fireblocks Off Exchange in the following
        [guide](https://developers.fireblocks.com/docs/off-exchange).

        Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
      operationId: settleOffExchangeTrades
      parameters:
        - $ref: '#/components/parameters/X-Idempotency-Key'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SettlementRequestBody'
      responses:
        '201':
          description: A settlement object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettlementResponse'
        default:
          $ref: '#/components/responses/Error'
      x-codeSamples:
        - lang: TypeScript
          source: >-
            const response: Promise<FireblocksResponse<SettlementResponse>> =
            fireblocks.offExchanges.settleOffExchangeTrades(offExchangesApiSettleOffExchangeTradesRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<SettlementResponse>> response =
            fireblocks.offExchanges().settleOffExchangeTrades(settlementRequestBody,
            idempotencyKey);
        - lang: Python
          source: >-
            response =
            fireblocks.off_exchanges.settle_off_exchange_trades(settlement_request_body,
            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:
    SettlementRequestBody:
      type: object
      properties:
        mainExchangeAccountId:
          type: string
    SettlementResponse:
      type: object
      properties:
        id:
          type: string
        initiator:
          type: string
        exchangeReply:
          type: string
        fireblocksInitiatedTransactions:
          type: object
        exchangeRequestedTransactions:
          $ref: '#/components/schemas/ExchangeSettlementTransactionsResponse'
    ExchangeSettlementTransactionsResponse:
      type: object
      properties:
        toExchange:
          type: array
          items:
            $ref: '#/components/schemas/ToExchangeTransaction'
        toCollateral:
          type: array
          items:
            $ref: '#/components/schemas/ToCollateralTransaction'
    ErrorSchema:
      type: object
      properties:
        message:
          type: string
        code:
          type: number
    ToExchangeTransaction:
      type: object
      properties:
        assetId:
          type: string
        amount:
          type: string
        dstAddress:
          type: string
        dstTag:
          type: string
          description: optional
    ToCollateralTransaction:
      type: object
      properties:
        asset:
          type: string
        amount:
          type: string
        srcAddress:
          type: string
        srcTag:
          type: string
          description: optional
        fee:
          type: string
          description: optional
  responses:
    Error:
      description: Error Response
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSchema'
  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

````