{
  "openapi": "3.0.0",
  "info": {
    "description": "B2B REST API for exchangers and merchants: trading, deposits, withdrawals, webhooks.\n\n## Authentication\n\nEvery request must include two headers:\n\n| Header | Format | Where to get it |\n|---|---|---|\n| `X-API-Key` | UUID | EIDEX dashboard → API section |\n| `X-API-Secret` | 64 hex characters | Issued once when the key is created — save it immediately |\n\nThe key is created in the dashboard and starts working **after approval by an EIDEX administrator**. Requests with an unapproved or revoked key are rejected.\n\nThe panel on the right: pick a server, paste your API key — it is auto-filled into all request examples (curl, Python, Node.js and others).\n\n> **Try-It on the production docs (`eidex.io/docs`) is read-only** (balance, tickers, order status, addresses). Write operations (create order, withdraw) from the public page are blocked — run them from your own integration, on your server. On the dev docs (`dev.eidex.io/docs`) Try-It is full and hits the test contour.\n\n## Quick start\n\n1. Create an API key in the dashboard and wait for approval.\n2. Check access with a balance request: `GET /balances`.\n3. Set up webhooks to receive deposit and withdrawal notifications without polling.\n\n## Error format\n\nAll errors are returned in a single JSON format with an HTTP 4xx/5xx code — the structure is described in **Models → errorResponse**. Successful responses always come with 200/201.\n\n## Webhooks\n\nFor deposit and withdrawal events EIDEX sends HTTP notifications to your URL — see the **Webhooks** section. This is more reliable and faster than periodic API polling.",
    "title": "EIDEX Merchant API",
    "contact": {},
    "version": "1.0"
  },
  "paths": {
    "/address/release": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Releases a previously reserved deposit address. Status \"completed\" — the order is done; \"free\" — the address returns to the pool.",
        "tags": [
          "Address Pool"
        ],
        "summary": "Release address",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/merchant.releaseAddressRequest"
              }
            }
          },
          "description": "Параметры освобождения",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.ReleaseAddressResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/address/reserve": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Reserves a deposit address for a nonce (exchanger order identifier). Idempotent by nonce — a repeat call with the same nonce returns the same address.",
        "tags": [
          "Address Pool"
        ],
        "summary": "Reserve address",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/merchant.reserveAddressRequest"
              }
            }
          },
          "description": "Параметры резервирования",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.ReserveAddressResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/balances": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Returns a list of all assets with available and reserved balance.",
        "tags": [
          "Balances"
        ],
        "summary": "Get balances",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.BalancesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/deposit-address": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Returns an existing deposit address for the given network. If none exists, creates a new one.",
        "tags": [
          "Deposits"
        ],
        "summary": "Get deposit address",
        "parameters": [
          {
            "description": "Сеть блокчейна",
            "name": "network",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "TRON",
                "BTC",
                "ETH",
                "BSC",
                "POLYGON",
                "ARBITRUM",
                "OPTIMISM",
                "SOL",
                "AVALANCHE",
                "BASE",
                "ZKSYNC",
                "LINEA",
                "XRP",
                "TON",
                "XMR"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.DepositAddressResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/deposit-addresses": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Returns all merchant deposit addresses across all networks.",
        "tags": [
          "Deposits"
        ],
        "summary": "List deposit addresses",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.DepositAddressesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/order": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Creates a trading order (MARKET or LIMIT). Requires the TRADING permission. The Idempotency-Key header is required.",
        "tags": [
          "Trading"
        ],
        "summary": "Create order",
        "parameters": [
          {
            "description": "Ключ идемпотентности (UUID, max 256 символов)",
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/merchant.CreateOrderRequest"
              }
            }
          },
          "description": "Параметры ордера",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.OrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав (TRADING)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Idempotency-Key уже использован с другим телом",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/order/{id}": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Returns order details by its ID.",
        "tags": [
          "Trading"
        ],
        "summary": "Get order",
        "parameters": [
          {
            "description": "ID ордера (UUID)",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.OrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/order/{id}/cancel": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Cancels an active order. Requires the TRADING permission.",
        "tags": [
          "Trading"
        ],
        "summary": "Cancel order",
        "parameters": [
          {
            "description": "ID ордера (UUID)",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.OrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав (TRADING)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/orders": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Returns a list of orders with cursor pagination. Optional filter by trading pair.",
        "tags": [
          "Trading"
        ],
        "summary": "List orders",
        "parameters": [
          {
            "description": "Количество записей (1-100, по умолчанию 20)",
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Курсор для следующей страницы (из поля next_cursor)",
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Фильтр по торговой паре (например BTCUSDT)",
            "name": "pair",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.ListOrdersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/tickers": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Returns current tickers for all available trading pairs (price, volume, 24h change).",
        "tags": [
          "Market Data"
        ],
        "summary": "Get tickers",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.TickersResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Returns all registered merchant webhook endpoints.",
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhooks",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.ListWebhooksResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Registers a webhook endpoint to receive event notifications (deposits, withdrawals). Returns a secret for signature verification.",
        "tags": [
          "Webhooks"
        ],
        "summary": "Create webhook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/merchant.createWebhookRequest"
              }
            }
          },
          "description": "URL и список событий",
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.CreateWebhookResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}": {
      "delete": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Deletes a webhook endpoint by ID.",
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete webhook",
        "parameters": [
          {
            "description": "ID вебхук-эндпоинт",
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.DeleteWebhookResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/withdraw": {
      "post": {
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "ApiSecretAuth": []
          }
        ],
        "description": "Creates a cryptocurrency withdrawal to the specified address. Requires the WITHDRAW permission. The Idempotency-Key header is required.",
        "tags": [
          "Withdrawals"
        ],
        "summary": "Create withdrawal",
        "parameters": [
          {
            "description": "Ключ идемпотентности (UUID, max 256 символов)",
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/merchant.CreateWithdrawRequest"
              }
            }
          },
          "description": "Параметры вывода",
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.WithdrawResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Недостаточно прав (WITHDRAW)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Idempotency-Key уже использован с другим телом",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/merchant.errorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://eidex.io/api/merchant/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "description": "API Key (UUID) — получите в личном кабинете EIDEX.",
        "type": "apiKey",
        "name": "X-API-Key",
        "in": "header"
      },
      "ApiSecretAuth": {
        "description": "Secret Key (64 hex) — выдаётся при создании API-ключа.",
        "type": "apiKey",
        "name": "X-API-Secret",
        "in": "header"
      }
    },
    "schemas": {
      "merchant.AddressItem": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "is_testnet": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "network": {
            "type": "string"
          }
        }
      },
      "merchant.BalanceItem": {
        "type": "object",
        "properties": {
          "asset": {
            "description": "тикер актива, напр. \"USDT\"",
            "type": "string"
          },
          "free": {
            "description": "доступный баланс (decimal-строка)",
            "type": "string"
          },
          "reserved": {
            "description": "зарезервировано (decimal-строка)",
            "type": "string"
          }
        }
      },
      "merchant.BalancesResponse": {
        "type": "object",
        "properties": {
          "balances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/merchant.BalanceItem"
            }
          }
        }
      },
      "merchant.CreateOrderRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "description": "количество base asset",
            "type": "string"
          },
          "pair": {
            "description": "\"BTCUSDT\" или \"BTC/USDT\"",
            "type": "string"
          },
          "price": {
            "description": "цена (для LIMIT)",
            "type": "string"
          },
          "side": {
            "description": "\"BUY\" | \"SELL\"",
            "type": "string"
          },
          "type": {
            "description": "\"MARKET\" | \"LIMIT\"",
            "type": "string"
          }
        }
      },
      "merchant.CreateWebhookResponse": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "integer"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "id": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "merchant.CreateWithdrawRequest": {
        "type": "object",
        "properties": {
          "address": {
            "description": "адрес получателя",
            "type": "string"
          },
          "amount": {
            "description": "сумма",
            "type": "string"
          },
          "asset": {
            "description": "\"BTC\", \"USDT\", \"ETH\", ...",
            "type": "string"
          },
          "memo": {
            "description": "опционально (для XRP, TON и т.д.)",
            "type": "string"
          },
          "network": {
            "description": "\"TRON\", \"BTC\", \"ETH\", \"BSC\", ...",
            "type": "string"
          }
        }
      },
      "merchant.DeleteWebhookResponse": {
        "type": "object",
        "properties": {
          "status": {
            "description": "\"deleted\"",
            "type": "string"
          }
        }
      },
      "merchant.DepositAddressResponse": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "is_testnet": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "network": {
            "description": "имя сети, напр. \"TRON\"",
            "type": "string"
          }
        }
      },
      "merchant.DepositAddressesResponse": {
        "type": "object",
        "properties": {
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/merchant.AddressItem"
            }
          }
        }
      },
      "merchant.ListOrdersResponse": {
        "type": "object",
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "description": "курсор следующей страницы, если has_more",
            "type": "string"
          },
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/merchant.OrderResponse"
            }
          }
        }
      },
      "merchant.ListWebhooksResponse": {
        "type": "object",
        "properties": {
          "webhooks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/merchant.WebhookItem"
            }
          }
        }
      },
      "merchant.OrderResponse": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string"
          },
          "created_at": {
            "description": "unix seconds",
            "type": "integer"
          },
          "fee": {
            "type": "string"
          },
          "fee_asset": {
            "type": "string"
          },
          "filled_amount": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "pair": {
            "type": "string"
          },
          "price": {
            "type": "string"
          },
          "side": {
            "description": "BUY|SELL",
            "type": "string"
          },
          "status": {
            "description": "NEW|PARTIALLY_FILLED|FILLED|CANCELLED|REJECTED",
            "type": "string"
          },
          "type": {
            "description": "MARKET|LIMIT",
            "type": "string"
          },
          "updated_at": {
            "description": "unix seconds",
            "type": "integer"
          }
        }
      },
      "merchant.ReleaseAddressResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        }
      },
      "merchant.ReserveAddressResponse": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "network": {
            "type": "string"
          },
          "nonce": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "merchant.TickerItem": {
        "type": "object",
        "properties": {
          "high_24h": {
            "type": "string"
          },
          "last_price": {
            "type": "string"
          },
          "low_24h": {
            "type": "string"
          },
          "pair": {
            "description": "\"BTCUSDT\"",
            "type": "string"
          },
          "price_change_24h": {
            "type": "string"
          },
          "price_change_percent": {
            "type": "string"
          },
          "volume_24h": {
            "type": "string"
          }
        }
      },
      "merchant.TickersResponse": {
        "type": "object",
        "properties": {
          "tickers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/merchant.TickerItem"
            }
          }
        }
      },
      "merchant.WebhookItem": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "integer"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "failure_count": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "is_active": {
            "type": "boolean"
          },
          "last_triggered_at": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "merchant.WithdrawResponse": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "asset": {
            "type": "string"
          },
          "cancel_token": {
            "type": "string"
          },
          "created_at": {
            "description": "unix seconds",
            "type": "integer"
          },
          "network": {
            "type": "string"
          },
          "status": {
            "description": "PENDING|PROCESSING|COMPLETED|FAILED|CANCELLED",
            "type": "string"
          },
          "tx_hash": {
            "type": "string"
          },
          "withdraw_id": {
            "type": "string"
          }
        }
      },
      "merchant.createWebhookRequest": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "url": {
            "type": "string"
          }
        }
      },
      "merchant.errorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "merchant.releaseAddressRequest": {
        "type": "object",
        "properties": {
          "address": {
            "description": "адрес для освобождения",
            "type": "string"
          },
          "status": {
            "description": "\"completed\" или \"free\"",
            "type": "string"
          }
        }
      },
      "merchant.reserveAddressRequest": {
        "type": "object",
        "properties": {
          "network": {
            "description": "\"TRON\", \"BTC\", \"ETH\", \"BSC\"",
            "type": "string"
          },
          "nonce": {
            "description": "ID заявки обменника, например \"order_12345\"",
            "type": "string"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Balances",
      "description": "Available merchant balances by asset."
    },
    {
      "name": "Market Data",
      "description": "Tickers and market data."
    },
    {
      "name": "Deposits",
      "description": "Deposit addresses for funding."
    },
    {
      "name": "Address Pool",
      "description": "Reserve and release deposit addresses for a specific deal."
    },
    {
      "name": "Trading",
      "description": "Create, cancel and view orders."
    },
    {
      "name": "Withdrawals",
      "description": "Withdraw funds to external addresses."
    },
    {
      "name": "Webhooks",
      "description": "Notifications about deposits and withdrawals to your URL."
    }
  ]
}
