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

# Update a limit order

> Change the limit price, amount, expiry, slippage or gas price of a pending limit order.

`PATCH /limit-order/{id}` changes the limit price, amount, expiry, slippage or gas price of a `pending` order and returns the updated order. Send only the fields you change. The maker doesn't sign again: the pair signature covers the maker and the two tokens, not these fields.

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). The body holds one or more of `priceTrigger` and `price` (the same value), `amount`, `expired`, `slippage` and `gasPrice`, all as strings. Update only orders whose `status` is `pending`. An empty body, or a field the schema doesn't define, returns `400 VALIDATION_ERROR`. So does a field Olympex sets, such as `status`, `txHash` or `reasonFail`, or an `expired` that isn't a 13-digit millisecond timestamp in the future and at most 365 days ahead. If the order is no longer `pending` when the update arrives, the call returns `409 CONFLICT` and changes nothing. An ID that doesn't exist, is malformed or belongs to another API key returns `404 NOT_FOUND`. To change the tokens, the chain or the maker, cancel the order with `DELETE /limit-order/{id}` and create a new one. `PATCH` is safe to repeat.

## Fields you can change

| Field | Send |
| - | - |
| `priceTrigger`, `price` | The new limit price, in units of `outTokenAddress` per 1 `inTokenAddress`, as a decimal string. Send both, with the same value. A `PATCH` with only `priceTrigger` leaves `price` unchanged. |
| `amount` | The new amount of `inTokenAddress` to sell, as a human-readable decimal string. Keep the allowance in step. |
| `expired` | The new expiry: a Unix timestamp in milliseconds, as a 13-digit string, in the future and at most 365 days ahead. Any other value returns `400 VALIDATION_ERROR`. |
| `slippage` | The new maximum slippage, in percent, as a string. `"1"` is 1%. |
| `gasPrice` | The chain's current gas price in gwei, as a decimal string. Olympex stores it with the order. It isn't a cap: neither the API nor the order contract enforces it, and the gas cost the maker reimburses is the execution transaction's gas used times its actual gas price, converted to `inTokenAddress`. |

To change the tokens, the chain or the maker, [cancel the order](/api-reference/limit-orders/cancel-limit-order) and [create a new one](/api-reference/limit-orders/create-limit-order). Fields that Olympex sets, such as `status`, `txHash` and `reasonFail`, return `400 VALIDATION_ERROR`. Responses return `amount`, `price` and `priceTrigger` as JSON numbers.

## Update pending orders only

Read the order with [`GET /limit-order/{id}`](/api-reference/limit-orders/get-limit-order) first, and update it only while its `status` is `pending`. At `executing` or `submitted`, Olympex is already executing the order.

Olympex applies the update only while the order is `pending`. Otherwise, including when execution starts between your read and the update, the call returns `409 CONFLICT` and changes nothing: read the order again.

`PATCH` is safe to repeat: after a timeout, sign the same body again and resend it.

## Keep the allowance in step with the amount

The maker's allowance to the Olympex order contract must cover `amount` plus the execution gas cost in `inTokenAddress`, summed over every open limit order and active DCA strategy that sells the same token on the same chain. [How much to approve](/concepts/order-authorization#how-much-to-approve) shows how to estimate the gas cost and add up the total.

<Warning>
  Raise the allowance before you raise `amount`: Olympex can't execute an order that the allowance doesn't cover. When you lower `amount`, lower the allowance too, to what your open orders still need.
</Warning>

<RequestExample>
  ```bash cURL theme={null}
  # Move the limit price of a pending order to 4300 USDC per WETH.
  # Needs openssl, curl and OLYMPEX_API_KEY_ID, OLYMPEX_SECRET_KEY, OLYMPEX_PASSPHRASE.
  ORDER_ID='afc47108-d059-473c-b2e1-5f2ca7951466' # from POST /limit-order
  METHOD=PATCH
  ENDPOINT="/limit-order/$ORDER_ID"
  QUERY=''
  BODY='{"price":"4300","priceTrigger":"4300"}'
  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 { olympexRequest } from "./sign-request.ts"; // /authentication/sign-requests

  type LimitOrder = { id: string; status: string; price: number; priceTrigger: number };

  const orderId = "afc47108-d059-473c-b2e1-5f2ca7951466"; // from POST /limit-order

  const current = await olympexRequest<LimitOrder>("GET", `/limit-order/${orderId}`);
  if (current.status !== "pending") throw new Error(`The order is ${current.status}; only pending orders can change`);

  const updated = await olympexRequest<LimitOrder>("PATCH", `/limit-order/${orderId}`, {
    priceTrigger: "4300", // USDC per 1 WETH
    price: "4300", // the same value as priceTrigger
  });
  console.log(updated.priceTrigger); // 4300, as a number
  ```

  ```python Python theme={null}
  from sign_request import olympex_request  # /authentication/sign-requests

  order_id = "afc47108-d059-473c-b2e1-5f2ca7951466"  # from POST /limit-order

  current = olympex_request("GET", f"/limit-order/{order_id}")
  if current["status"] != "pending":
      raise RuntimeError(f'The order is {current["status"]}; only pending orders can change')

  updated = olympex_request("PATCH", f"/limit-order/{order_id}", {
      "priceTrigger": "4300",  # USDC per 1 WETH
      "price": "4300",  # the same value as priceTrigger
  })
  print(updated["priceTrigger"])  # 4300, as a number
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "id": "afc47108-d059-473c-b2e1-5f2ca7951466",
      "accountTo": "0x1E67cb01969D79B2B895179e4A07D24a839dBb52",
      "chainId": 137,
      "gasPrice": "35",
      "inTokenAddress": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",
      "outTokenAddress": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
      "slippage": "1",
      "tokenASymbol": "ETH",
      "tokenBSymbol": "USDC",
      "amount": 0.5,
      "price": 4300,
      "priceTrigger": 4300,
      "expired": "1791302400000",
      "txHash": "",
      "status": "pending",
      "reasonFail": [],
      "attemptNumber": 0,
      "allowance": "",
      "estimateGas": "",
      "effectivePriceGas": "",
      "createdAt": "2026-09-29T16:01:22.237Z",
      "updatedAt": "2026-09-29T16:01:23.231Z",
      "deletedAt": ""
    },
    "meta": {
      "requestId": "EeARAhqxIAMEJEA=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 400 Empty body theme={null}
  {
    "success": false,
    "error": {
      "code": "VALIDATION_ERROR",
      "message": "Invalid request body",
      "details": [
        {
          "field": "",
          "message": "At least one field is required"
        }
      ]
    },
    "meta": {
      "requestId": "EdjeqhHTIAMEb-w=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 404 Not found theme={null}
  {
    "success": false,
    "error": {
      "code": "NOT_FOUND",
      "message": "Limit order not found",
      "details": []
    },
    "meta": {
      "requestId": "EdjeXjypoAMEbrQ=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 409 Not pending theme={null}
  {
    "success": false,
    "error": {
      "code": "CONFLICT",
      "message": "Limit order can only be modified while pending (current status: cancelled)",
      "details": []
    },
    "meta": {
      "requestId": "E7ejBgHzIAMEZlA=",
      "version": "v1",
      "accountType": "integrator",
      "apiKeyId": "00000000-0000-4000-8000-000000000000"
    }
  }
  ```

  ```json 403 Gateway theme={null}
  {
    "message": "Forbidden"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml api-reference/openapi.json PATCH /limit-order/{id}
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:
  /limit-order/{id}:
    patch:
      tags:
        - Limit orders
      summary: Update a limit order
      description: >-
        Changes the price, amount, expiry, slippage or gas price of a `pending`
        order. Send only the fields you change. To change the tokens, the chain
        or the maker, cancel the order and create a new one. If the order isn't
        `pending`, or Olympex starts executing it while the request runs, the
        call returns `409` and changes nothing.
      operationId: updateLimitOrder
      parameters:
        - name: id
          in: path
          required: true
          description: Limit order ID, as returned when it was created.
          schema:
            type: string
          example: afc47108-d059-473c-b2e1-5f2ca7951466
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LimitOrderUpdateRequest'
      responses:
        '200':
          description: The updated order.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitOrderSuccessResponse'
              example:
                success: true
                data:
                  id: afc47108-d059-473c-b2e1-5f2ca7951466
                  accountTo: '0x1E67cb01969D79B2B895179e4A07D24a839dBb52'
                  chainId: 137
                  gasPrice: '35'
                  inTokenAddress: '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619'
                  outTokenAddress: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
                  slippage: '1'
                  tokenASymbol: ETH
                  tokenBSymbol: USDC
                  amount: 0.5
                  price: 4300
                  priceTrigger: 4300
                  expired: '1791302400000'
                  txHash: ''
                  status: pending
                  reasonFail: []
                  attemptNumber: 0
                  allowance: ''
                  estimateGas: ''
                  effectivePriceGas: ''
                  createdAt: '2026-09-29T16:01:22.237Z'
                  updatedAt: '2026-09-29T16:01:23.231Z'
                  deletedAt: ''
                meta:
                  requestId: EeARAhqxIAMEJEA=
                  version: v1
                  accountType: integrator
                  apiKeyId: 00000000-0000-4000-8000-000000000000
        '400':
          description: >-
            The body failed validation. An empty body, an unknown field, a field
            Olympex sets (such as `status` or `txHash`) or an invalid `expired`
            is rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: VALIDATION_ERROR
                  message: Invalid request body
                  details:
                    - field: ''
                      message: At least one field is required
                meta:
                  requestId: EdjeqhHTIAMEb-w=
                  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: >-
            No limit order with this ID belongs to your API key (`NOT_FOUND`).
            IDs of other API keys return the same error. An unknown path or
            method also returns `NOT_FOUND`, with a message that names the
            method and path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound:
                  summary: Unknown limit order
                  value:
                    success: false
                    error:
                      code: NOT_FOUND
                      message: Limit order not found
                      details: []
                    meta:
                      requestId: EdjeXjypoAMEbrQ=
                      version: v1
                      accountType: integrator
                      apiKeyId: 00000000-0000-4000-8000-000000000000
                unknownRoute:
                  summary: Unknown path or method
                  value:
                    success: false
                    error:
                      code: NOT_FOUND
                      message: No route for GET /api/v1/quote
                      details: []
                    meta:
                      requestId: E7edogG4IAMEPYA=
                      version: v1
        '409':
          description: >-
            The order isn't `pending` (`CONFLICT`): it is executing, submitted,
            completed, failed or already cancelled, or Olympex started executing
            it while the request ran. Nothing changed. Read the order with `GET
            /limit-order/{id}`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: CONFLICT
                  message: >-
                    Limit order can only be modified while pending (current
                    status: cancelled)
                  details: []
                meta:
                  requestId: E7ejBgHzIAMEZlA=
                  version: v1
                  accountType: integrator
                  apiKeyId: 00000000-0000-4000-8000-000000000000
        '500':
          description: >-
            Olympex could not complete the request (`INTERNAL_ERROR`), or the
            gateway could not get a response (`{"message":"Internal Server
            Error"}`), which also happens on the first request after a quiet
            period. Retry with backoff.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/GatewayError'
              example:
                success: false
                error:
                  code: INTERNAL_ERROR
                  message: Unexpected internal error
                  details: []
                meta:
                  requestId: EdkejhzjIAMEPfg=
                  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:
    LimitOrderUpdateRequest:
      type: object
      properties:
        accountTo:
          type: string
          minLength: 1
          description: >-
            Changing it breaks the order's signature or pair. Cancel the order
            and create a new one instead.
          readOnly: true
        chainId:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 9007199254740991
          readOnly: true
          description: >-
            Changing it breaks the order's signature or pair. Cancel the order
            and create a new one instead.
        gasPrice:
          type: string
          minLength: 1
          description: >-
            New gas price, in gwei, as a decimal string. Olympex stores it with
            the order, but execution uses the chain's gas price at that moment,
            so it isn't a cap.
        inTokenAddress:
          type: string
          minLength: 1
          description: >-
            Changing it breaks the order's signature or pair. Cancel the order
            and create a new one instead.
          readOnly: true
        outTokenAddress:
          type: string
          minLength: 1
          description: >-
            Changing it breaks the order's signature or pair. Cancel the order
            and create a new one instead.
          readOnly: true
        slippage:
          type: string
          minLength: 1
          description: New maximum slippage, in percent, as a decimal string.
        tokenASymbol:
          type: string
          minLength: 1
          description: >-
            Changing it breaks the order's signature or pair. Cancel the order
            and create a new one instead.
          readOnly: true
        tokenBSymbol:
          type: string
          minLength: 1
          description: >-
            Changing it breaks the order's signature or pair. Cancel the order
            and create a new one instead.
          readOnly: true
        amount:
          anyOf:
            - type: string
            - type: number
          description: >-
            New amount of `inTokenAddress` to sell, human-readable. Keep your
            token allowance in step with it.
        price:
          anyOf:
            - type: string
            - type: number
          description: >-
            New copy of the limit price. Send the same value as `priceTrigger`:
            a PATCH with only `priceTrigger` leaves `price` unchanged.
        priceTrigger:
          anyOf:
            - type: string
            - type: number
          description: 'New limit price: units of `outTokenAddress` per 1 `inTokenAddress`.'
        expired:
          type: string
          description: >-
            New expiry, with the same rules as on create: a 13-digit Unix
            timestamp in milliseconds, in the future and at most 365 days ahead.
            Any other value returns `400 VALIDATION_ERROR`.
        signature:
          type: string
          readOnly: true
          description: >-
            Changing it breaks the order's signature or pair. Cancel the order
            and create a new one instead.
        pair:
          type: string
          readOnly: true
          description: Set by Olympex. Don't send it.
        provider:
          type: string
          readOnly: true
          description: Set by Olympex. Don't send it.
      additionalProperties: false
      description: >-
        Send only the fields you change, and only while the order is `pending`:
        otherwise the call returns `409`. At least one field is required. Fields
        Olympex sets, such as `status`, `txHash` and `reasonFail`, return `400
        VALIDATION_ERROR`. To cancel, use `DELETE /limit-order/{id}`.
      example:
        priceTrigger: '4300'
        price: '4300'
    LimitOrderSuccessResponse:
      type: object
      required:
        - success
        - data
        - meta
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          $ref: '#/components/schemas/LimitOrder'
        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
    LimitOrder:
      type: object
      description: A limit order. Olympex can add fields; ignore the ones you don't use.
      required:
        - id
        - accountTo
        - chainId
        - inTokenAddress
        - outTokenAddress
        - tokenASymbol
        - tokenBSymbol
        - amount
        - price
        - priceTrigger
        - expired
        - slippage
        - gasPrice
        - status
        - txHash
        - reasonFail
        - attemptNumber
        - createdAt
        - updatedAt
        - deletedAt
      properties:
        id:
          type: string
          format: uuid
          description: Order ID.
        accountTo:
          type: string
          description: Maker wallet, as sent when the order was created.
        chainId:
          type: integer
          description: Chain ID.
        inTokenAddress:
          type: string
          description: Token sold, as sent.
        outTokenAddress:
          type: string
          description: Token bought, as sent.
        tokenASymbol:
          type: string
          description: >-
            Symbol of the token sold, possibly normalized (`WETH` becomes
            `ETH`).
        tokenBSymbol:
          type: string
          description: Symbol of the token bought, possibly normalized.
        amount:
          type: number
          description: Amount of the token sold, human-readable.
        price:
          type: number
          description: Copy of the limit price. `0` when it wasn't sent.
        priceTrigger:
          type: number
          description: 'Limit price: units of the token bought per 1 token sold.'
        expired:
          type: string
          description: 'Expiry as sent: a Unix timestamp in milliseconds.'
        slippage:
          type: string
          description: Maximum slippage, in percent.
        gasPrice:
          type: string
          description: >-
            Gas price, in gwei, as sent. Olympex stores it with the order, but
            execution uses the chain's gas price at that moment, so it isn't a
            cap.
        status:
          type: string
          enum:
            - pending
            - executing
            - submitted
            - completed
            - cancelled
            - failed
          description: >-
            `pending`: waiting for the price. `executing` and `submitted`:
            Olympex is executing it. `completed`: executed, see `txHash`.
            `cancelled`: cancelled. `failed`: execution failed, see
            `reasonFail`. Treat any other value as not final.
        txHash:
          type: string
          description: >-
            Execution transaction hash on `chainId`. Empty until the order
            executes.
        reasonFail:
          type: array
          items:
            type: string
          description: Why execution failed, when it did. Empty otherwise.
        attemptNumber:
          type: integer
          description: How many times Olympex has tried to execute the order.
        allowance:
          type: string
          description: >-
            Informational, reserved for Olympex: you can't set it. Usually an
            empty string.
        estimateGas:
          type: string
          description: >-
            Informational, reserved for Olympex: you can't set it. Usually an
            empty string.
        effectivePriceGas:
          type: string
          description: >-
            Informational, reserved for Olympex: you can't set it. Usually an
            empty string.
        createdAt:
          type: string
          format: date-time
          description: When the order was created (ISO 8601, UTC).
        updatedAt:
          type: string
          format: date-time
          description: When the order last changed (ISO 8601, UTC).
        deletedAt:
          type: string
          description: >-
            When the order was cancelled with `DELETE` (ISO 8601, UTC). An empty
            string until then.
    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.