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

# Get cross-chain transfer status

> Track a cross-chain transfer from the source transaction to delivery on the destination chain.

`POST /tx-status` returns the status of a cross-chain transfer, as reported by the provider that executes it. Call it after you broadcast the transaction from a cross-chain [`POST /swap`](/api-reference/swap/build-swap), and poll until the status is final. For the on-chain result of a transaction itself, including a single-chain swap or the source transaction of a transfer, use [`GET /transactions/{hash}`](/api-reference/transactions/get-transaction).

Signed endpoint. Send `Content-Type: application/json`, the canonical JSON body, and the four headers `x-api-key-id`, `x-value-info`, `x-passphrase` and `x-signature` described in [Sign requests](/authentication/sign-requests). Body: `hash` (the source-chain transaction hash), `chainId` (the source chain ID, as an integer) and `dexHash` (lowercase, from the cross-chain `POST /swap` response). `status` holds the provider's own value: `SUCCESS`, `DONE`, `success` and `Success` mean success; `FAILURE`, `FAILED`, `failed`, `REFUND`, `Reverted`, `FROM_FAILURE` and `INVALID` mean failure; anything else means in progress. `500 TX_STATUS_ERROR` means the status is unknown: keep polling with backoff. It also persists, and never clears, when `hash`, `chainId` or `dexHash` doesn't identify a transfer.

## Request body

| Field | Value |
| - | - |
| `hash` | Hash of the transaction you broadcast on the source chain. |
| `chainId` | Source chain ID as an integer, for example `137`. A string such as `"137"` returns `400 VALIDATION_ERROR`. |
| `dexHash` | The `dexHash` from the cross-chain `POST /swap` response, in lowercase. It identifies the provider. |

<Tip>
  Store `dexHash` with the transaction hash as soon as you broadcast. `POST /swap` is the only response that carries it, and every status call needs both.
</Tip>

## Read the status

`status` and `detailStatus` are the provider's own values, and different providers spell the same outcome differently. Compare `status` against these exact values:

| Outcome | `status` values | What to do |
| - | - | - |
| Success | `SUCCESS`, `DONE`, `success`, `Success` | Stop polling. The transfer completed. `toTxHash` and `toAmount` appear when the provider reports them. |
| Failure | `FAILURE`, `FAILED`, `failed`, `REFUND`, `Reverted`, `FROM_FAILURE`, `INVALID` | Stop polling and show `detailStatus`. Check the source transaction in a block explorer, and contact [partners@olympex.io](mailto:partners@olympex.io) with `meta.requestId` if you need help. |
| In progress | Any other value | Keep polling. |

`detailStatus` is the provider's sub-status or message. Display it, but don't branch on it.

| Response field | Meaning |
| - | - |
| `fromChainId`, `toChainId` | Source and destination chain IDs, as integers. |
| `fromTxHash`, `toTxHash` | Source and destination transaction hashes. `toTxHash` appears once the provider knows it. |
| `fromAmount`, `toAmount` | Amounts sent and received, passed through from the provider without conversion. Check the unit before you do arithmetic with them. |
| `fromTokenAddress`, `toTokenAddress` | Source and destination token addresses. |
| `bridgeHash` | A transfer identifier from the provider. Depending on the provider it can equal the source or the destination transaction hash. |
| `errorMsg` | Always `null` in a `200` response. When the provider reports an error message, the endpoint returns `500 TX_STATUS_ERROR` instead (see the Note below). Display `detailStatus`, not `errorMsg`. |

`status`, `detailStatus`, `fromChainId` and `toChainId` are always present. The other fields appear when the provider reports them.

## Poll until the status is final

1. **Confirm the source transaction first.** Read its receipt from your RPC, or poll [`GET /transactions/{hash}`](/api-reference/transactions/get-transaction). If it reverted, nothing left the source chain, so there is nothing to poll.
2. **Poll with backoff**, for example every 15 to 30 seconds. Sign every attempt again: nonces are single-use, and the reference clients sign each call for you.
3. **Keep polling through `500 TX_STATUS_ERROR`**, other `5xx` responses and network errors. Stop on a `4xx`: fix the request instead of retrying it unchanged. The exception is a gateway `401` or `403`: sign again once with a new nonce, and if that fails too, stop and check your credentials and server clock.
4. **Set a deadline** that fits your product. When it passes without a final status, check the source transaction in a block explorer and contact [partners@olympex.io](mailto:partners@olympex.io) with `meta.requestId` and the transaction hash.

<Note>
  `500 TX_STATUS_ERROR` doesn't mean the transfer failed. It means the status is unknown: it's expected right after broadcast, and it's also returned for some transfers the provider marks failed. Treat it as "not yet known" until your deadline. The same error comes back, and never clears, when `hash`, `chainId` or `dexHash` doesn't identify a transfer: for example the destination chain ID sent instead of the source chain ID, or a `dexHash` that isn't lowercase. If it persists, check all three values against your broadcast transaction and the `POST /swap` response.
</Note>

[Track a swap to finality](/guides/track-a-swap-to-finality) covers the full flow, and [Cross-chain mechanics](/concepts/cross-chain-mechanics) explains what happens between the two chains.

The examples below poll with a deadline and throw when it passes. For a production poller that adds jitter and returns `unknown` at your cap instead of throwing, use `waitForTransfer` from [Track a swap to finality](/guides/track-a-swap-to-finality). The `200` response example is illustrative.

<RequestExample>
  ```bash cURL theme={null}
  # Status of a cross-chain transfer. Replace hash with your source-chain transaction hash
  # and dexHash with the value from the cross-chain POST /swap response.
  # Needs openssl, curl and OLYMPEX_API_KEY_ID, OLYMPEX_SECRET_KEY, OLYMPEX_PASSPHRASE.
  METHOD=POST
  ENDPOINT=/tx-status
  QUERY=''
  BODY='{"chainId":137,"dexHash":"0x6c2142a4113d1a2ef94717109dd5ac71f69439465f95a170fb9cf0f56d76ad7c","hash":"0x5f2b0a3c3e8f9d1b7a6c4e2d0f8b6a4c2e0d8f6b4a2c0e8d6f4b2a0c8e6d4f2b"}'
  TS="${OLYMPEX_TIMESTAMP:-$(date +%s)}"
  NONCE="${OLYMPEX_NONCE:-$(openssl rand -hex 12)}"
  BODY_HASH="$(printf '%s' "$BODY" | openssl dgst -sha256 -binary | openssl base64 -A | tr '+/' '-_' | tr -d '=')"
  VALUE_INFO="$(printf '%s\n%s\n%s' "$TS" "$NONCE" "$BODY_HASH")"
  MESSAGE="$(printf 'OLPX-HMAC-SHA256-V2\n%s\n%s\n%s\n%s\n%s\n%s' "$TS" "$NONCE" "$METHOD" "/api/v1$ENDPOINT" "$QUERY" "$BODY_HASH")"
  curl -sS -X "$METHOD" "https://api-rest.olympex.io/api/v1$ENDPOINT${QUERY:+?$QUERY}" \
    -H "content-type: application/json" \
    -H "x-api-key-id: $OLYMPEX_API_KEY_ID" \
    -H "x-value-info: $(printf '%s' "$VALUE_INFO" | openssl base64 -A)" \
    -H "x-passphrase: $OLYMPEX_PASSPHRASE" \
    -H "x-signature: $(printf '%s' "$MESSAGE" | openssl dgst -sha256 -hmac "$OLYMPEX_SECRET_KEY" -binary | od -An -v -tx1 | tr -d ' \n')" \
    --data-raw "$BODY"
  ```

  ```ts TypeScript theme={null}
  import { OlympexApiError, olympexRequest } from "./sign-request.ts"; // /authentication/sign-requests

  type TxStatus = { status: string; detailStatus: string; toTxHash?: string | null; toAmount?: string };
  type TxStatusBody = { hash: string; chainId: number; dexHash: string };

  const SUCCESS = new Set(["SUCCESS", "DONE", "success", "Success"]);
  const FAILURE = new Set(["FAILURE", "FAILED", "failed", "REFUND", "Reverted", "FROM_FAILURE", "INVALID"]);
  const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));

  // Polls until the provider reports a final status or the deadline (epoch ms) passes.
  const pollTransferStatus = async (body: TxStatusBody, deadline: number): Promise<TxStatus> => {
    let signedAgain = false;
    for (let delay = 15_000; Date.now() + delay < deadline; delay = Math.min(delay * 2, 30_000)) {
      await sleep(delay);
      try {
        const transfer = await olympexRequest<TxStatus>("POST", "/tx-status", body); // signs each attempt with a new nonce
        if (SUCCESS.has(transfer.status) || FAILURE.has(transfer.status)) return transfer;
      } catch (error) {
        if (error instanceof OlympexApiError && error.status < 500) {
          // A gateway 401 or 403 gets one new signature. Any other 4xx won't fix itself.
          const gatewayAuth = error.code === "HTTP_401" || error.code === "HTTP_403";
          if (!gatewayAuth || signedAgain) throw error;
          signedAgain = true;
        }
        // TX_STATUS_ERROR, other 5xx and network errors: the status is unknown yet, so keep polling.
      }
    }
    throw new Error("No final status before the deadline. Check a block explorer, then contact support.");
  };

  const transfer = await pollTransferStatus(
    {
      hash: "0x5f2b0a3c3e8f9d1b7a6c4e2d0f8b6a4c2e0d8f6b4a2c0e8d6f4b2a0c8e6d4f2b", // your source-chain transaction
      chainId: 137, // source chain ID
      dexHash: "0x6c2142a4113d1a2ef94717109dd5ac71f69439465f95a170fb9cf0f56d76ad7c", // from POST /swap
    },
    Date.now() + 30 * 60_000, // pick a deadline that fits your routes
  );
  console.log(SUCCESS.has(transfer.status) ? "delivered" : "failed", transfer.status, transfer.toTxHash ?? transfer.detailStatus);
  ```

  ```python Python theme={null}
  import time

  import requests

  from sign_request import OlympexApiError, olympex_request  # /authentication/sign-requests

  SUCCESS = {"SUCCESS", "DONE", "success", "Success"}
  FAILURE = {"FAILURE", "FAILED", "failed", "REFUND", "Reverted", "FROM_FAILURE", "INVALID"}


  def poll_transfer_status(body, deadline):
      """Poll until the provider reports a final status or the deadline (time.monotonic()) passes."""
      delay = 15
      signed_again = False
      while time.monotonic() + delay < deadline:
          time.sleep(delay)
          delay = min(delay * 2, 30)
          try:
              transfer = olympex_request("POST", "/tx-status", body)  # signs each attempt with a new nonce
          except OlympexApiError as error:
              if error.status < 500:
                  # A gateway 401 or 403 gets one new signature. Any other 4xx won't fix itself.
                  if error.code not in ("HTTP_401", "HTTP_403") or signed_again:
                      raise
                  signed_again = True
              continue  # TX_STATUS_ERROR or another 5xx: the status is unknown yet
          except requests.RequestException:
              continue  # network error: try again
          if transfer["status"] in SUCCESS or transfer["status"] in FAILURE:
              return transfer
      raise TimeoutError("No final status before the deadline. Check a block explorer, then contact support.")


  transfer = poll_transfer_status(
      {
          "hash": "0x5f2b0a3c3e8f9d1b7a6c4e2d0f8b6a4c2e0d8f6b4a2c0e8d6f4b2a0c8e6d4f2b",  # your source-chain transaction
          "chainId": 137,  # source chain ID
          "dexHash": "0x6c2142a4113d1a2ef94717109dd5ac71f69439465f95a170fb9cf0f56d76ad7c",  # from POST /swap
      },
      deadline=time.monotonic() + 30 * 60,  # pick a deadline that fits your routes
  )
  print("delivered" if transfer["status"] in SUCCESS else "failed", transfer["status"], transfer.get("toTxHash") or transfer["detailStatus"])
  ```
</RequestExample>

<ResponseExample>
  ```json 200 (illustrative) theme={null}
  {
    "success": true,
    "data": {
      "fromChainId": 137,
      "toChainId": 1,
      "fromTxHash": "0x5f2b0a3c3e8f9d1b7a6c4e2d0f8b6a4c2e0d8f6b4a2c0e8d6f4b2a0c8e6d4f2b",
      "toTxHash": "0x8e1d4c7b2a9f6e3d0c5b8a7f4e1d2c9b6a3f0e7d4c1b8a5f2e9d6c3b0a7f4e1d",
      "fromAmount": "10000000",
      "toAmount": "9985000",
      "fromTokenAddress": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
      "toTokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "bridgeHash": "0x8e1d4c7b2a9f6e3d0c5b8a7f4e1d2c9b6a3f0e7d4c1b8a5f2e9d6c3b0a7f4e1d",
      "errorMsg": null,
      "status": "SUCCESS",
      "detailStatus": "SUCCESS"
    },
    "meta": {
      "requestId": "ENWRgDn5IAMEMEw=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": {
      "code": "VALIDATION_ERROR",
      "message": "Invalid request body",
      "details": [
        {
          "field": "hash",
          "message": "Invalid input: expected string, received undefined"
        },
        {
          "field": "chainId",
          "message": "Invalid input: expected number, received undefined"
        },
        {
          "field": "dexHash",
          "message": "Invalid input: expected string, received undefined"
        }
      ]
    },
    "meta": {
      "requestId": "E7sKGjSOIAMEVMg=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 403 Gateway theme={null}
  {
    "message": "Forbidden"
  }
  ```

  ```json 500 theme={null}
  {
    "success": false,
    "error": {
      "code": "TX_STATUS_ERROR",
      "message": "Unexpected transaction status handler error",
      "details": [
        {
          "message": "Could not retrieve transaction status"
        }
      ]
    },
    "meta": {
      "requestId": "ENUmOj8JoAMEMsw=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml api-reference/openapi.json POST /tx-status
openapi: 3.0.3
info:
  title: Olympex REST API
  version: 1.0.0
  description: >-
    Aggregated swap quotes and transactions, limit orders and DCA strategies on
    EVM chains, plus the chain and token catalog. Every response uses the same
    envelope, except the API gateway's own responses (`{"message": …}`): `401`
    or `403` when the signed headers are missing or rejected, `429` when it
    throttles requests, and `500` or `503` when it can't get a response from
    Olympex in time. Chain IDs are integers on every endpoint. Signed endpoints
    require four signed headers; see [Sign
    requests](https://docs.olympex.io/authentication/sign-requests).
  termsOfService: https://docs.olympex.io/legal/terms
  contact:
    name: Olympex partnerships
    email: partners@olympex.io
    url: https://docs.olympex.io
servers:
  - url: https://api-rest.olympex.io/api/v1
    description: Olympex REST API v1
security: []
tags:
  - name: Accounts
    description: Create API credentials.
  - name: Quotes
    description: Aggregated single-chain and cross-chain quotes.
  - name: Swap
    description: Unsigned transaction calldata for a quoted route.
  - name: TxStatus
    description: Track a cross-chain transfer after you broadcast it.
  - name: Transactions
    description: On-chain status of a transaction you broadcast.
  - name: Chains and tokens
    description: Enabled chains and the tokens listed on each.
  - name: Limit orders
    description: Orders that Olympex executes when the market reaches your price.
  - name: DCA
    description: Strategies that buy a token in equal orders over time.
  - name: Docs
    description: Machine-readable API description.
paths:
  /tx-status:
    post:
      tags:
        - TxStatus
      summary: Get cross-chain transfer status
      description: >-
        Returns the status of a cross-chain transfer from the provider that
        executed it. `status` and `detailStatus` are the provider's own values.
        A `500 TX_STATUS_ERROR` shortly after broadcast, or for a transfer the
        provider reports as failed, means the status is not available yet: keep
        polling with backoff. Fields beyond status, detailStatus, fromChainId
        and toChainId are passed through from the provider when it reports them.
        For the on-chain receipt of a transaction, including the source
        transaction of a transfer, use `GET /transactions/{hash}`.
      operationId: getTransactionStatus
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TxStatusRequest'
            example:
              chainId: 137
              dexHash: >-
                0x6c2142a4113d1a2ef94717109dd5ac71f69439465f95a170fb9cf0f56d76ad7c
              hash: >-
                0x5f2b0a3c3e8f9d1b7a6c4e2d0f8b6a4c2e0d8f6b4a2c0e8d6f4b2a0c8e6d4f2b
      responses:
        '200':
          description: Transfer status.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TxStatusSuccessResponse'
              examples:
                completed:
                  summary: Completed transfer (illustrative)
                  value:
                    success: true
                    data:
                      fromChainId: 137
                      toChainId: 1
                      fromTxHash: >-
                        0x5f2b0a3c3e8f9d1b7a6c4e2d0f8b6a4c2e0d8f6b4a2c0e8d6f4b2a0c8e6d4f2b
                      toTxHash: >-
                        0x8e1d4c7b2a9f6e3d0c5b8a7f4e1d2c9b6a3f0e7d4c1b8a5f2e9d6c3b0a7f4e1d
                      fromAmount: '10000000'
                      toAmount: '9985000'
                      fromTokenAddress: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
                      toTokenAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7'
                      bridgeHash: >-
                        0x8e1d4c7b2a9f6e3d0c5b8a7f4e1d2c9b6a3f0e7d4c1b8a5f2e9d6c3b0a7f4e1d
                      errorMsg: null
                      status: SUCCESS
                      detailStatus: SUCCESS
                    meta:
                      requestId: ENWRgDn5IAMEMEw=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
        '400':
          description: >-
            The body failed validation. `error.details` lists each field and why
            it failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: VALIDATION_ERROR
                  message: Invalid request body
                  details:
                    - field: hash
                      message: 'Invalid input: expected string, received undefined'
                    - field: chainId
                      message: 'Invalid input: expected number, received undefined'
                    - field: dexHash
                      message: 'Invalid input: expected string, received undefined'
                meta:
                  requestId: E7sKGjSOIAMEVMg=
                  version: v1
                  accountType: integrator
                  apiKeyId: 00000000-0000-4000-8000-000000000000
        '401':
          description: >-
            A signing header is missing. The gateway answers with
            `{"message":"Unauthorized"}` before your request reaches Olympex;
            the handler answers with the `UNAUTHORIZED` envelope when the
            authorizer context is missing.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GatewayError'
                  - $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Unauthorized
        '403':
          description: >-
            Authentication failed: unknown key, wrong passphrase, invalid
            signature, timestamp outside the ±300 s window, reused nonce, or
            inactive account (gateway `{"message":"Forbidden"}`). The handler
            answers with the `FORBIDDEN` envelope when the body does not match
            the signed `bodyHash`.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/GatewayError'
                  - $ref: '#/components/schemas/ErrorResponse'
              examples:
                gateway:
                  summary: Signature rejected by the gateway
                  value:
                    message: Forbidden
                bodyHash:
                  summary: Body does not match the signed hash
                  value:
                    success: false
                    error:
                      code: FORBIDDEN
                      message: Invalid body hash
                      details: []
                    meta:
                      requestId: ENXGDhsXIAMEMEw=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
        '404':
          description: >-
            Unknown path or wrong method (`NOT_FOUND`). `error.message` names
            the method and path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: NOT_FOUND
                  message: No route for GET /api/v1/quote
                  details: []
                meta:
                  requestId: E7edogG4IAMEPYA=
                  version: v1
        '500':
          description: >-
            Olympex could not complete the request (`TX_STATUS_ERROR` or
            `INTERNAL_ERROR`), or the gateway could not get a response
            (`{"message":"Internal Server Error"}`), for example after a timeout
            of about 30 seconds. Retry with backoff.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/GatewayError'
              example:
                success: false
                error:
                  code: TX_STATUS_ERROR
                  message: Unexpected transaction status handler error
                  details:
                    - message: Could not retrieve transaction status
                meta:
                  requestId: ENUmOj8JoAMEMsw=
                  version: v1
                  accountType: integrator
                  apiKeyId: 00000000-0000-4000-8000-000000000000
        '503':
          description: >-
            The gateway could not get a response in time (the integration
            timeout is about 30 seconds) or the service is briefly unavailable.
            Returned by the gateway. Retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
              example:
                message: Service Unavailable
      security:
        - ApiKeyId: []
          ValueInfo: []
          Passphrase: []
          Signature: []
components:
  schemas:
    TxStatusRequest:
      type: object
      required:
        - hash
        - chainId
        - dexHash
      properties:
        hash:
          type: string
          minLength: 1
          description: Hash of the transaction you broadcast on the source chain.
        chainId:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 9007199254740991
          description: Source chain ID as an integer, for example `137`.
        dexHash:
          type: string
          minLength: 1
          description: >-
            The `dexHash` returned by the cross-chain `POST /swap`, in lowercase
            hex. It identifies the provider.
    TxStatusSuccessResponse:
      type: object
      required:
        - success
        - data
        - meta
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          $ref: '#/components/schemas/TxStatus'
        meta:
          $ref: '#/components/schemas/Meta'
    ErrorResponse:
      type: object
      required:
        - success
        - error
        - meta
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          $ref: '#/components/schemas/ErrorBody'
        meta:
          $ref: '#/components/schemas/Meta'
    GatewayError:
      type: object
      required:
        - message
      description: >-
        Returned by the API gateway itself: `401` or `403` when the signed
        headers are missing or rejected, `429` when it throttles requests, and
        `500` or `503` when it can't get a response from Olympex in time. It has
        no `success`, `error` or `meta`.
      properties:
        message:
          type: string
          example: Forbidden
    TxStatus:
      type: object
      required:
        - toChainId
        - fromChainId
        - detailStatus
        - status
      properties:
        status:
          type: string
          description: >-
            Provider status. Success: `SUCCESS`, `DONE`, `success`, `Success`.
            Failure: `FAILURE`, `FAILED`, `failed`, `REFUND`, `Reverted`,
            `FROM_FAILURE`, `INVALID`. Anything else: still in progress.
        detailStatus:
          type: string
          description: Provider sub-status or message. Display only.
        fromChainId:
          type: integer
          description: Source chain ID.
        toChainId:
          type: integer
          description: Destination chain ID.
        fromTxHash:
          type: string
          description: Source-chain transaction hash.
        toTxHash:
          type: string
          nullable: true
          description: Destination-chain transaction hash, once known.
        fromAmount:
          type: string
          description: Amount sent, as the provider reports it.
        toAmount:
          type: string
          description: Amount received once known, as the provider reports it.
        fromTokenAddress:
          type: string
        toTokenAddress:
          type: string
        bridgeHash:
          type: string
          nullable: true
          description: Provider's transfer identifier.
        errorMsg:
          type: string
          nullable: true
          description: >-
            Always empty or null in a 200 response: provider errors are returned
            as 500 TX_STATUS_ERROR instead.
    Meta:
      type: object
      required:
        - requestId
        - version
      properties:
        requestId:
          type: string
          description: Unique ID for this request. Include it when you contact support.
        version:
          type: string
          default: v1
          description: API version that served the request.
        accountType:
          type: string
          description: >-
            Account type resolved by the signature check, for example
            `integrator`. Present when the request was authenticated; absent on
            the `404` for an unknown path or method.
        apiKeyId:
          type: string
          format: uuid
          description: >-
            The API key ID that signed the request. Present when the request was
            authenticated; absent on the `404` for an unknown path or method.
    ErrorBody:
      type: object
      required:
        - code
        - message
        - details
      properties:
        code:
          type: string
          description: >-
            Machine-readable error code. `VALIDATION_ERROR` (400),
            `UNAUTHORIZED` (401), `FORBIDDEN` (403), `NOT_FOUND` (404, also for
            an unknown path or method), `CONFLICT` (409), `NO_ROUTE` (422), and
            for 500: `QUOTE_ERROR`, `CROSS_CHAIN_QUOTE_ERROR`, `SWAP_ERROR`,
            `CROSS_CHAIN_SWAP_ERROR`, `SUPPORT_CHAIN_ERROR`,
            `ENABLED_CHAINS_ERROR`, `TOKEN_LIST_ERROR`, `TX_STATUS_ERROR`,
            `INTERNAL_ERROR`. Olympex can add codes: handle an unknown code by
            its HTTP status.
        message:
          type: string
          description: Human-readable summary. Don't parse it.
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      additionalProperties: true
      description: >-
        Validation errors carry `field` and `message`; other errors carry
        `message` only.
      properties:
        field:
          type: string
          description: >-
            Dot path of the invalid field, for example `params.chainId`. Empty
            for the top level.
        message:
          type: string
  securitySchemes:
    ApiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: >-
        Your API key ID (UUID). See [Sign
        requests](https://docs.olympex.io/authentication/sign-requests).
    ValueInfo:
      type: apiKey
      in: header
      name: x-value-info
      description: >-
        Base64 of `timestamp + "\n" + nonce + "\n" + bodyHash`, where
        `timestamp` is Unix seconds, `nonce` is 24 new hexadecimal characters
        and `bodyHash` is the unpadded base64url SHA-256 of the canonical body.
    Passphrase:
      type: apiKey
      in: header
      name: x-passphrase
      description: Your account passphrase. Treat it like the secret key.
    Signature:
      type: apiKey
      in: header
      name: x-signature
      description: >-
        Lowercase hex HMAC-SHA256 (signature v2), keyed with your secret key
        string (UTF-8, not decoded), of seven lines joined with `\n`, with no
        trailing newline: `OLPX-HMAC-SHA256-V2`, `timestamp`, `nonce`, the
        uppercase method, `path`, `canonicalQuery` and `bodyHash`. `path` is the
        request path including `/api/v1`, without the query string, for example
        `/api/v1/limit-order/<id>`. `canonicalQuery` is the query parameters
        decoded (`+` is a space), sorted by key and then by value, re-encoded
        per RFC 3986 and joined with `&`, or the empty string when there is no
        query. Headers signed for one request are rejected on any other. See
        [Sign requests](https://docs.olympex.io/authentication/sign-requests).

````

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