openapi: 3.1.0
info:
  title: ArandixBit API
  version: '2026-10-22'
  summary: Exchange REST API (accounts, spot, Convert, wallets), B2B partner API, webhooks and market-data WebSocket.
  description: "## Overview\n\nThe ArandixBit API gives programmatic access to the ArandixBit exchange:\nbalances and statements,\
    \ spot trading on the internal order book, Convert\n(instant crypto/fiat conversion), USDT and crypto withdrawals, PIX\
    \ (BRL)\ndeposits, webhooks, a public market-data WebSocket and the B2B partner\n(white-label) API for operating customer\
    \ sub-accounts.\n\n| | |\n|---|---|\n| Base URL (sandbox) | `https://api-sandbox.arandixbit.com` — fictitious balances,\
    \ no real money |\n| WebSocket | `wss://stream.arandixbit.com/v1/ws` |\n| Format | JSON over HTTPS (UTF-8). Request bodies\
    \ are `application/json`. |\n| Time | All timestamps are UTC, RFC 3339 (`2026-10-08T12:00:00Z`) unless a field says epoch\
    \ milliseconds. |\n| Support | support@arandix.com — always include the `X-Request-Id` of the failing response. |\n\n\
    ## Sandbox and production access\n\nThis public reference targets the **sandbox**: fictitious balances, no real\nmoney\
    \ and no external providers (PIX, crypto networks and payouts are not\nconnected). Build and test your whole integration\
    \ there.\n\n| | |\n|---|---|\n| API | `https://api-sandbox.arandixbit.com` |\n| Web app | `https://sandbox.arandixbit.com`\
    \ |\n| Money | Fictitious (`POST /v1/sandbox/faucet`) |\n| KYC / KYB | Self-approved for testing (`POST /v1/sandbox/kyc/approve`)\
    \ |\n| B2B partner | Self-activated (`POST /v1/sandbox/partner/activate`) |\n\n- **Production access is private.** The\
    \ production endpoint and production\n  API keys are shown only inside the dashboard of your production account\n  (Settings\
    \ → API), after sign-in. The contract is the same as in this\n  reference; only the base URL and the keys change.\n- **No\
    \ shared or demo credentials exist.** Each developer creates their own\n  account in the sandbox web app, enables two-factor\
    \ authentication and\n  creates API keys in **their own account** (Settings → API keys).\n  ArandixBit never sends passwords\
    \ or API secrets by e-mail or chat.\n- Accounts, keys and webhooks are **separate per environment**: a sandbox\n  key\
    \ never works outside the sandbox.\n- To test B2B: create an account, fill in the business (KYB) profile,\n  call `POST\
    \ /v1/sandbox/kyc/approve`, then `POST /v1/sandbox/partner/activate`.\n  Sub-accounts get test KYC and fictitious balances\
    \ through\n  `POST /v1/partner/customers/{cid}/sandbox/kyc/approve` and\n  `POST /v1/partner/customers/{cid}/sandbox/faucet`.\n\
    - `GET /v1/sandbox/status` confirms you are calling the sandbox. Every\n  `/sandbox/` operation answers `404` outside\
    \ it.\n- The market-data WebSocket (`wss://stream.arandixbit.com/v1/ws`) is a\n  public, read-only price stream (no account,\
    \ no keys) shared by all\n  environments.\n- **Withdrawals** (`POST /v1/mexc/withdrawals`) run the production flow\n \
    \ (2FA or a `wallet.withdraw` key with IP list, limits, fee quote, debit,\n  tracking, refund) against a local simulated\
    \ provider — nothing reaches a\n  blockchain. Success settles in about 20 s with a fictitious `txid`.\n  Test destinations\
    \ on EVM networks (ETH, USDT on BSC/ETH/MATIC), by the\n  ending of the address: `…fa11ed` fails on-chain (full refund),\n\
    \  `…deadbeef` is rejected by the provider (full refund), `…c0ffee` stays\n  in manual review (amount held).\n- **Convert**\
    \ settles against fictitious house liquidity, refilled every\n  10 minutes. Conversions involving fiat still wait for\
    \ staff approval.\n- **Webhooks**: create a test receiver with\n  `POST /v1/sandbox/webhook-inboxes`, register its `url`\
    \ as a webhook\n  endpoint and read exactly what arrived (headers incl. `X-ARX-Signature`,\n  raw body, status returned)\
    \ with `GET …/{id}/requests`. Set\n  `respond_status` (for example `503`) to exercise retries.\n- Sandbox data has no\
    \ value and may be reset.\n\nEvery operation in this document declares `x-arx-auth`, the credential it\nrequires: a scope\
    \ (for example `spot.trade`), `session` (interactive login\nonly), `public` (no authentication) or `admin:<permission>`\
    \ (staff panel,\nmarked `x-internal: true`; not available to customers).\n\nEvery response carries an `X-Request-Id` header.\
    \ If you send your own\n`X-Request-Id` it is echoed back, which makes it easy to correlate your logs\nwith ours.\n\n##\
    \ Authentication & request signing\n\nEvery scoped operation accepts **either** of two credentials:\n\n1. **Session**\
    \ — `Authorization: Bearer <access token>` obtained by logging\n   in to the web or mobile app. A session has every permission\
    \ of its own\n   user; scopes only restrict API keys.\n2. **Signed API key** — three headers on every request:\n\n| Header\
    \ | Value |\n|---|---|\n| `X-ARX-APIKEY` | Public key id (`arxb_…`), shown in the key list. |\n| `X-ARX-TIMESTAMP` | Current\
    \ time as Unix epoch in **milliseconds**. Must be within **±10 seconds** of the server clock. |\n| `X-ARX-SIGNATURE` |\
    \ Lower-case hex `HMAC-SHA256(secret, timestamp + METHOD + path_with_query + body)`. |\n\nThe signed string is the exact\
    \ concatenation, with no separators, of:\n\n- the timestamp string you send in `X-ARX-TIMESTAMP`;\n- the upper-case HTTP\
    \ method (`GET`, `POST`, `PATCH`, `DELETE`);\n- the request path **including the query string exactly as sent**\n  (for\
    \ example `/v1/spot/orders?client_order_id=bot-42`);\n- the raw request body bytes (empty string when there is no body).\n\
    \  Bodies larger than 64 KiB are not accepted with API keys.\n\nSign the exact bytes you put on the wire: serialize the\
    \ JSON body once,\nsign that string and send the same string.\n\n**Python**\n\n```python\nimport hashlib, hmac, json,\
    \ os, time\nimport requests\n\nAPI = os.environ.get(\"ARX_API\", \"https://api-sandbox.arandixbit.com\")  # sandbox first\n\
    KEY_ID = os.environ[\"ARX_KEY_ID\"]   # public id (arxb_…)\nSECRET = os.environ[\"ARX_SECRET\"]   # shown once at creation\
    \ — keep it in a secret store\n\ndef call(method, path, body=None):\n    raw = \"\" if body is None else json.dumps(body,\
    \ separators=(\",\", \":\"))\n    ts = str(int(time.time() * 1000))\n    payload = ts + method.upper() + path + raw\n\
    \    sig = hmac.new(SECRET.encode(), payload.encode(), hashlib.sha256).hexdigest()\n    headers = {\"X-ARX-APIKEY\": KEY_ID,\
    \ \"X-ARX-TIMESTAMP\": ts, \"X-ARX-SIGNATURE\": sig}\n    if raw:\n        headers[\"Content-Type\"] = \"application/json\"\
    \n    return requests.request(method, API + path, data=raw or None, headers=headers, timeout=10)\n\nprint(call(\"GET\"\
    , \"/v1/balances\").json())\nprint(call(\"POST\", \"/v1/spot/orders\", {\n    \"symbol\": \"BTC/USDT\", \"side\": \"buy\"\
    , \"type\": \"limit\",\n    \"price\": 62450120000, \"amount\": 150000, \"client_order_id\": \"bot-42\",\n}).json())\n\
    ```\n\n**Node.js (18+)**\n\n```js\nimport crypto from \"node:crypto\";\n\nconst API = process.env.ARX_API ?? \"https://api-sandbox.arandixbit.com\"\
    ; // sandbox first\nconst KEY_ID = process.env.ARX_KEY_ID; // public id (arxb_…)\nconst SECRET = process.env.ARX_SECRET;\n\
    \nasync function call(method, path, body) {\n  const raw = body === undefined ? \"\" : JSON.stringify(body);\n  const\
    \ ts = Date.now().toString();\n  const sig = crypto.createHmac(\"sha256\", SECRET)\n    .update(ts + method.toUpperCase()\
    \ + path + raw).digest(\"hex\");\n  const headers = { \"X-ARX-APIKEY\": KEY_ID, \"X-ARX-TIMESTAMP\": ts, \"X-ARX-SIGNATURE\"\
    : sig };\n  if (raw) headers[\"Content-Type\"] = \"application/json\";\n  const res = await fetch(API + path, { method,\
    \ headers, body: raw || undefined });\n  return res.json();\n}\n```\n\n### Clock synchronization\n\nRequests whose timestamp\
    \ is more than 10 seconds away from the server clock\nare rejected with `401 timestamp_out_of_window`. The error includes\
    \ the\nserver clock so you can resynchronize without another call:\n\n```json\n{\"error\": {\"code\": \"timestamp_out_of_window\"\
    ,\n           \"message\": \"timestamp outside the 10s window — sync your clock\",\n           \"details\": {\"server_time\"\
    : \"1791460800123\", \"recv_window_ms\": \"10000\"}}}\n```\n\nYou can also call `GET /v1/public/time` (no authentication,\
    \ never cached)\nand keep an offset: `offset = server_time - local_now`, then sign with\n`local_now + offset`. Running\
    \ NTP on your servers is strongly recommended.\n\n### Key rules\n\n- **Anti-replay:** the same signature is accepted only\
    \ once. For\n  state-changing requests this holds across all server instances.\n  Retrying a request means signing it\
    \ again with a fresh timestamp.\n- **IP allow-list:** a key may be bound to up to 20 IPv4/IPv6 addresses.\n  Calls from\
    \ other addresses get `403 forbidden`.\n- **Missing scope:** `403 api_key_scope_required` with `details.scope`.\n- **Expiry:**\
    \ keys without an IP allow-list expire after 90 days\n  (`401 api_key_expired`); they can be renewed for another 90 days\
    \ during\n  the last 5 days (`POST /v1/me/api-keys/{id}/renew`). Keys with an IP\n  allow-list do not expire. An expired\
    \ key cannot be edited — create a\n  new one.\n- **Security events:** changing the password, 2FA or passkeys revokes all\n\
    \  existing keys. Blocked or inactive accounts cannot authenticate.\n- **Staff accounts** never use API keys (`403 staff_api_keys_forbidden`).\n\
    - Keys are created only from an interactive session with 2FA enabled,\n  password and TOTP code. The secret is returned\
    \ **once**.\n- Up to 30 active keys per account.\n\n## Scopes\n\n| Scope | Grants |\n|---|---|\n| `account.read` | Balances,\
    \ portfolio, plan limits, fees, unified history and statement. Default scope of a new key. |\n| `spot.read` | Spot symbols,\
    \ order book, trades and your orders. |\n| `spot.trade` | Create and cancel spot orders. |\n| `convert.read` | Convert\
    \ currencies, quotes and your conversions. |\n| `convert.execute` | Execute and cancel conversions. |\n| `wallet.read`\
    \ | Deposits (including creating USDT deposit orders and PIX charges), withdrawal lists, whitelist, withdrawal quotes.\
    \ |\n| `wallet.withdraw` | Create and cancel crypto withdrawals. **Requires an IP allow-list and 2FA on the account.**\
    \ Only to whitelisted addresses whose cooldown has elapsed; no interactive 2FA code (the key itself was created with 2FA).\
    \ |\n| `webhooks` | Manage webhook endpoints, deliveries and secrets. |\n| `partner.customers.read` | Partner: list and\
    \ read sub-accounts and their KYC status. |\n| `partner.customers.write` | Partner: create sub-accounts. |\n| `partner.kyc`\
    \ | Partner: issue Sumsub WebSDK tokens for a sub-account. |\n| `partner.wallet.read` | Partner: sub-account balances,\
    \ history, statement, deposits, withdrawals and whitelist. |\n| `partner.convert` | Partner: quote and execute Convert\
    \ for a sub-account. |\n| `partner.wallet.withdraw` | Partner: whitelist addresses and withdraw for a sub-account. **API\
    \ key with IP allow-list only.** |\n| `partner.earn.read` | Partner: Earn products and a sub-account's Earn positions.\
    \ |\n| `partner.earn.write` | Partner: open Earn positions, withdraw released yield and exit positions for a sub-account.\
    \ |\n\n`partner.*` scopes are available only to approved partner accounts.\n\n### Sub-account restricted keys (partners)\n\
    \nA partner can create, from its own session with 2FA, a key restricted to\none of its sub-accounts (`POST /v1/me/api-keys`\
    \ with `customer_id`). Such a\nkey:\n\n- accepts only customer scopes (`account.read`, `spot.*`, `convert.*`,\n  `wallet.*`,\
    \ `webhooks`); requesting `partner.*` returns\n  `400 api_key_customer_scope`;\n- acts **as the sub-account** on every\
    \ customer route (balances,\n  statement, orders, Convert, deposits, webhooks, …), never as the partner;\n- may call `/v1/partner/customers/{cid}/…`\
    \ routes that declare\n  `x-arx-restricted-scope`, using that customer scope, and only with\n  `{cid}` equal to its own\
    \ sub-account (any other `{cid}` → `404`);\n- can never read the partner's own balances or history, other\n  sub-accounts,\
    \ create sub-accounts, or manage keys or the partnership\n  (`403 api_key_customer_restricted`);\n- is revoked automatically\
    \ when the sub-account is unlinked or the\n  partnership is revoked;\n- is limited to 5 active keys per sub-account (outside\
    \ the partner's\n  30-key limit).\n\n## Rate limits\n\n| Limit | Scope | Default |\n|---|---|---|\n| API key requests\
    \ | per key, sliding 60 s window, counted after a valid signature | 600 / min |\n| Failed API key authentications | per\
    \ client IP | 60 / min |\n| Sensitive session/creation endpoints (key management, deposit creation, withdrawals) | per\
    \ client IP | 20 / min |\n| Convert quotes | per account / per IP | 60 / min / 180 / min |\n| Public endpoints (`/v1/public/*`)\
    \ | per client IP | 120 / min |\n| Webhook test deliveries | per account | 5 / min |\n\nEvery response to a request authenticated\
    \ with an API key carries:\n\n- `X-RateLimit-Limit` — requests allowed per window;\n- `X-RateLimit-Remaining` — requests\
    \ left in the current window;\n- `X-RateLimit-Reset` — Unix time (seconds) when the oldest request leaves the window.\n\
    \nWhen a limit is exceeded the API answers `429 rate_limited` with a\n`Retry-After` header (seconds). Back off for at\
    \ least that long; repeated\nviolations do not extend the window but waste your quota.\n\n## Errors\n\nErrors always use\
    \ the same envelope:\n\n```json\n{\"error\": {\"code\": \"insufficient_funds\", \"message\": \"insufficient available\
    \ USDT balance\", \"details\": {}}}\n```\n\n- `code` is **stable** and machine-readable — branch on it, never on the message.\n\
    - `message` is human-readable and localized: send `X-Lang` or\n  `Accept-Language` with `es` (default), `pt`, `en` or\
    \ `gn` (Guarani).\n  The `code` never changes with the language.\n- `details` (optional) is a flat object of strings —\
    \ for validation errors\n  it maps each invalid field to a hint; other errors use it for context\n  (`scope`, `server_time`,\
    \ `limit_usd_minor`, …).\n\nThe complete list of codes, with HTTP status and meaning, is in the\ntop-level `x-arx-error-codes`\
    \ extension of this document.\n\n| Status | Meaning |\n|---|---|\n| 400 | Malformed request or invalid parameter (`bad_request`\
    \ and specific codes). |\n| 401 | Missing/invalid credentials, bad signature, replayed request, clock skew. |\n| 403 |\
    \ Authenticated but not allowed (scope, KYC, IP, account state). |\n| 404 | Not found — also returned for resources that\
    \ belong to another account. |\n| 409 | State conflict (already cancelled, idempotency, duplicate). |\n| 422 | Business\
    \ rule refused the request (limits, funds, whitelist). |\n| 429 | Rate limited — see `Retry-After`. |\n| 5xx | Temporary\
    \ problem on our side or at a provider; safe to retry with backoff (use an `Idempotency-Key` for POSTs). |\n\n## Units\n\
    \nMonetary amounts are **integers in minor units** of their currency. The\nnumber of decimals (the *exponent*) is returned\
    \ next to the value\n(`exponent`, `base_exp`, `quote_exp`, `from_exp`, `to_exp`, …).\n\n| Currency | Exponent | 1 unit\
    \ in minor units |\n|---|---|---|\n| USDT, USDC | 6 | `1000000` |\n| BTC, ETH | 8 | `100000000` |\n| BRL | 2 | `100` |\n\
    | PYG | 0 | `1` |\n\n- Spot `price` is expressed in **quote minor units per one whole base\n  unit**: BTC/USDT at 62,450.12\
    \ USDT is `62450120000`; `amount` is in base\n  minor units (0.0015 BTC = `150000`).\n- Fields ending in `_usd_minor`\
    \ are US dollar cents (`250000` = 2,500.00 USD).\n- Fields ending in `_bps` are basis points (100 bps = 1 %).\n- A few\
    \ display-only fields are decimal strings (`net_amount`, `fee`,\n  `fee_usd`, `pay_amount`) or floats (`price_usd`, `value_usd`,\
    \ candles).\n  Never use floats for accounting.\n\n## Idempotency\n\nState-changing `POST` operations accept an optional\
    \ `Idempotency-Key`\nheader (1–100 characters, `^[A-Za-z0-9_.:-]{1,100}$`; malformed →\n`400 idempotency_key_invalid`).\
    \ Use a fresh UUID per logical operation and\nreuse it on every retry of that operation. Keys are scoped to the\nauthenticated\
    \ account (for a sub-account restricted key, the sub-account).\nEach operation documents the `Idempotency-Key` parameter;\
    \ there are two\nmodes.\n\n**Stored-response mode** (24 hours) — spot orders and cancellations,\nConvert cancellation,\
    \ PIX/fiat/USDT deposit creation, webhook endpoint\ncreation and sub-account creation:\n\n- Same key + same request (method,\
    \ path with query, SHA-256 of the body)\n  → the stored response is replayed byte-for-byte with the response\n  header\
    \ `Idempotent-Replayed: true`. The operation does **not** run again.\n- Same key + a different request → `409 idempotency_key_reused`.\n\
    - Same key while the first request is still executing →\n  `409 idempotency_request_in_progress`; retry after a short\
    \ delay.\n- Only `2xx` and `4xx` responses are stored (except `429`). `5xx` and\n  `429` responses are not stored, so\
    \ retrying with the **same** key is safe.\n- Keys expire after 24 hours.\n\n**Permanent mode** — `POST /v1/convert`, `POST\
    \ /v1/usdt/withdrawals`,\n`POST /v1/mexc/withdrawals` and the partner sub-account Convert and USDT\nwithdrawal operations:\n\
    \n- The key must be **8–100 characters** (shorter → `400 bad_request` with\n  `details.idempotency_key`).\n- The key is\
    \ de-duplicated permanently (no expiry): a retry returns the\n  **same** conversion (`replayed: true` in the body) or\
    \ withdrawal\n  (`duplicate: true`), with the header `Idempotent-Replayed: true`.\n- Same key with different data → `409\
    \ idempotency_conflict`.\n- A concurrent retry while the first request is still executing →\n  `409 idempotency_request_in_progress`.\n\
    - Convert also accepts the key in the body field `idempotency_key`\n  (the body wins over the header).\n\n## Pagination\n\
    \n- Cursor endpoints (`/v1/history`, `/v1/statement`,\n  `/v1/partner/customers`, and their sub-account variants) return\n\
    \  `next_cursor`. Pass it back as `cursor` with the **same filters** to get\n  the next page; `null` means there are no\
    \ more pages. Cursors are opaque.\n- `limit` sets the page size (see each operation for default and maximum).\n- `GET\
    \ /v1/statement?format=csv` returns the next cursor in the\n  `X-Next-Cursor` response header instead of the body.\n-\
    \ Other list endpoints return the most recent items (typically 50 or 100)\n  without pagination; use `/v1/history` or\
    \ `/v1/statement` for full history.\n\n## WebSocket market stream\n\nEndpoint: **`wss://stream.arandixbit.com/v1/ws`**\
    \ (dedicated stream\nservice, no authentication, public market data only).\n\nChannels (`<SYM>` is `BTC-USDT`; `BTCUSDT`\
    \ and `BTC/USDT` are also accepted\nwhen subscribing):\n\n| Channel | Data |\n|---|---|\n| `ticker.<SYM>` | `symbol`,\
    \ `last_price`, `best_bid`, `best_ask` (quote minor units), `base_exp`, `quote_exp`, `ref_price_usd`, `change_24h` |\n\
    | `book.<SYM>[@N]` | Top N price levels, N ∈ 5, 10, 20, 50 (default 20; `@50` currently returns at most 20 levels) |\n\
    | `trades.<SYM>` | New trades: `id`, `price`, `amount`, `quote_amount`, `taker_side`, `created_at` |\n\nClient → server\
    \ (JSON text frames, max 4 KiB):\n\n```json\n{\"op\": \"subscribe\", \"channels\": [\"ticker.BTC-USDT\", \"book.BTC-USDT@5\"\
    , \"trades.BTC-USDT\"]}\n{\"op\": \"unsubscribe\", \"channels\": [\"trades.BTC-USDT\"]}\n{\"op\": \"ping\"}\n```\n\nServer\
    \ → client:\n\n```json\n{\"op\": \"subscribed\", \"channels\": [\"ticker.BTC-USDT\", \"book.BTC-USDT@5\"]}\n{\"channel\"\
    : \"book.BTC-USDT@5\", \"type\": \"snapshot\", \"ts\": 1791460800123,\n \"data\": {\"symbol\": \"BTC/USDT\", \"depth\"\
    : 5, \"base_exp\": 8, \"quote_exp\": 6,\n          \"bids\": [{\"price\": 62450120000, \"amount\": 150000}], \"asks\"\
    : [{\"price\": 62460000000, \"amount\": 98000}]}}\n{\"op\": \"pong\"}\n{\"op\": \"error\", \"code\": \"unknown_channel\"\
    , \"message\": \"unknown channel: book.FOO-BAR\"}\n```\n\nA newly subscribed channel receives a `snapshot`, then `update`\
    \ messages\n(about every 1–2 s). In-band error codes: `bad_message`, `unknown_channel`,\n`subscription_limit`.\n\nLimits:\
    \ 10 connections per IP, 50 subscriptions per connection, 100 client\nframes (data or control) per 10 s. The server pings\
    \ every 25 s and closes\nconnections with no client frame for 60 s — send `{\"op\":\"ping\"}` every\n25–30 s. Slow consumers\
    \ whose send queue fills up are disconnected with\nclose code 1008; reconnect and resubscribe.\n\n## Webhooks\n\nRegister\
    \ HTTPS endpoints with `POST /v1/webhooks/endpoints` and choose the\nevent types (see the `webhooks` section for every\
    \ payload). Each delivery\nis a `POST` with a JSON body:\n\n```json\n{\"id\": \"00000000-0000-4000-8000-000000000901\"\
    , \"type\": \"deposit.credited\",\n \"created_at\": \"2026-10-08T12:00:00Z\", \"api_version\": \"2026-10-07\",\n \"data\"\
    : {\"id\": \"00000000-0000-4000-8000-000000000301\", \"rail\": \"usdt\", \"currency\": \"USDT\",\n          \"network\"\
    : \"USDTTRC20\", \"amount\": 250000000, \"exponent\": 6, \"status\": \"credited\"}}\n```\n\n**Signature.** `X-ARX-Signature:\
    \ t=<unix seconds>,v1=<hex>` where\n`v1 = HMAC-SHA256(endpoint_secret, \"<t>.\" + raw_body)`. Each endpoint has\nits own\
    \ secret (`whsec_…`, shown once at creation or rotation). Verify with\na constant-time comparison and reject `t` older\
    \ than 5 minutes:\n\n```python\nimport hashlib, hmac, time\n\ndef verify(secret: str, header: str, raw_body: bytes) ->\
    \ bool:\n    parts = dict(p.split(\"=\", 1) for p in header.split(\",\"))\n    t, v1 = parts.get(\"t\", \"\"), parts.get(\"\
    v1\", \"\")\n    if not t.isdigit() or abs(time.time() - int(t)) > 300:\n        return False\n    mac = hmac.new(secret.encode(),\
    \ t.encode() + b\".\" + raw_body, hashlib.sha256).hexdigest()\n    return hmac.compare_digest(mac, v1)\n```\n\n**Delivery\
    \ rules.**\n\n- Respond with any `2xx` within 10 seconds; anything else is a failure.\n- Redirects are never followed\
    \ (`redirect_not_allowed`).\n- Retries with exponential backoff for about 24 hours — 11 attempts:\n  immediately, then\
    \ after 30 s, 1 min, 5 min, 15 min, 30 min, 1 h, 2 h,\n  4 h, 8 h and 8 h. After that the delivery is `failed` and can\
    \ be resent.\n- **De-duplicate** on `X-ARX-Event-Id` (equal to the payload `id`); it is\n  the same across retries and\
    \ manual resends. Deliveries may arrive out of\n  order.\n- After 50 consecutive failures the endpoint is disabled and\
    \ the owner is\n  emailed; re-enable it with `PATCH … {\"active\": true}`.\n- URLs must be `https`, port 443 or 8443,\
    \ with a public hostname; internal\n  and reserved IP addresses are blocked, also at connection time.\n- Every attempt\
    \ records a stable `error_code` (`dns_unresolved`,\n  `blocked_address`, `connect_timeout`, `tls_error`, `http_status`,\n\
    \  `redirect_not_allowed`, `body_too_large`, `secret_unavailable`,\n  `invalid_url`, `other`) next to the free-text `error`;\
    \ automate on the code.\n\n**Sub-accounts.** A sub-account (its session or a key restricted to it)\ncan register its own\
    \ endpoints, which receive only its own events (never\n`partner.*`). Partner endpoints receive sub-account events when\
    \ created\nwith `include_customers: true`; those payloads include `customer_id`.\nAn event of one account is never delivered\
    \ to another account's endpoint.\n\n## Statement\n\n`GET /v1/statement` returns the ledger lines of the account: deposits\n\
    (crypto/PIX), withdrawals, conversions, spot trades, fees (`fee`, on their\nown line), reversals and MED (`reversal`),\
    \ adjustments, internal\ntransfers, payments, P2P, Earn and rewards. Each line has the date, type,\ncurrency, signed amount\
    \ in minor units, the wallet balance after the line\nand a reference. The sum of the lines equals the balance change for\
    \ the\nperiod. Lines never include data of another account or internal costs.\n`format=csv` returns CSV (comma-separated,\
    \ UTF-8) with `X-Next-Cursor`.\n\n## Versioning & changelog\n\n- The API is versioned in the path (`/v1`). Within `v1`,\
    \ changes are\n  **additive only**: new endpoints, new optional parameters, new response\n  fields, new enum values, new\
    \ error codes and new webhook event types.\n  Clients must ignore unknown fields and tolerate unknown enum values.\n-\
    \ Breaking changes would be released under a new path version with prior\n  notice.\n- `info.version` is the date of the\
    \ last change to this reference. Webhook\n  payloads carry their own `api_version`.\n- The release history is in the top-level\
    \ `x-arx-changelog` extension.\n\n## CORS\n\nBrowsers may send `Authorization`, `Content-Type`, `X-Request-Id`,\n`X-Lang`\
    \ and `Idempotency-Key`. Exposed response headers:\n`Idempotent-Replayed`, `X-Request-Id`, `X-RateLimit-Limit`,\n`X-RateLimit-Remaining`,\
    \ `X-RateLimit-Reset`, `Retry-After`,\n`X-Next-Cursor`, `Content-Disposition`. Never put an API secret in\nbrowser or\
    \ mobile code — sign requests on your server.\n"
  termsOfService: https://arandixbit.com/legal/termos
  license:
    name: Proprietary
    url: https://arandixbit.com/legal/termos
  contact:
    name: ArandixBit API Support
    email: support@arandix.com
    url: https://arandixbit.com/api
servers:
- url: https://api-sandbox.arandixbit.com
  description: Sandbox — fictitious balances, no real money
security: []
tags:
- name: Market
  description: Public market data, server time and the market-data WebSocket. No authentication.
- name: Account
  description: Balances, portfolio, plan limits, fees, unified history and ledger statement (`account.read`).
- name: Spot
  description: Spot trading on the ArandixBit order book (`spot.read` / `spot.trade`). Trading requires approved KYC.
- name: Convert
  description: Instant conversions between crypto and fiat (`convert.read` / `convert.execute`). Conversions involving fiat
    wait for staff approval.
- name: Wallet
  description: Deposits (USDT, on-chain, fiat, PIX), withdrawals (crypto, including USDT, via `POST /v1/mexc/withdrawals`)
    and the withdrawal whitelist (`wallet.read` / `wallet.withdraw`).
- name: Webhooks
  description: Webhook endpoints, delivery logs, test events and secret rotation (`webhooks`).
- name: Keys
  description: API key management. Interactive session only — keys cannot manage keys.
- name: Partner
  description: 'B2B / white-label API for approved partners: create and operate customer sub-accounts (`partner.*`).'
- name: Sandbox
  description: 'Sandbox-only self-service: test KYC/KYB approval, B2B activation and fictitious balances. Every operation
    answers `404` in production.'
paths:
  /v1/public/time:
    get:
      operationId: getServerTime
      summary: Get server time
      description: 'Current server time, for synchronizing the clock used in `X-ARX-TIMESTAMP`

        (signed requests must be within ±10 s). No authentication; limited per IP;

        never cached (`Cache-Control: no-store`).

        '
      tags:
      - Market
      x-arx-auth: public
      security: []
      responses:
        '200':
          description: Server time.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerTime'
              example:
                server_time: 1791460800123
                iso: '2026-10-08T12:00:00.123Z'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/public/local-quotes:
    get:
      operationId: getLocalQuotes
      summary: Get local currency quotes
      description: 'Reference, buying and selling prices of the local currency pairs (USDT/PYG, BRL/PYG, USDT/BRL).

        No authentication; limited per IP; the answer can be up to 30 s old. A conversion or Paraguay

        payout quote is the price that applies to an order.

        '
      tags:
      - Market
      x-arx-auth: public
      security: []
      responses:
        '200':
          description: Quotes.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  quotes:
                    type: array
                    items:
                      type: object
                      properties:
                        symbol:
                          type: string
                        base:
                          type: string
                        quote:
                          type: string
                        reference:
                          type: number
                          description: Reference price, in quote units per one base unit.
                        source:
                          type: string
                          enum:
                          - operator
                          - market
                        bid:
                          type:
                          - number
                          - 'null'
                          description: 'PYG pairs: the price at which the house buys the base currency from you. Other pairs:
                            best bid of the internal book.'
                        ask:
                          type:
                          - number
                          - 'null'
                          description: 'PYG pairs: the price at which the house sells the base currency to you. Other pairs:
                            best ask of the internal book.'
                        mid:
                          type:
                          - number
                          - 'null'
                        change_pct_24h:
                          type:
                          - number
                          - 'null'
                          description: Change of the reference in 24 hours; null until there is a sample from 24 hours ago.
                  updated_at:
                    type: string
                    format: date-time
              example:
                quotes:
                - symbol: USDT/PYG
                  base: USDT
                  quote: PYG
                  reference: 6300
                  source: operator
                  bid: 6100
                  ask: 6600
                  mid: 6350
                  change_pct_24h: null
                updated_at: '2026-11-05T12:00:00Z'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/public/markets:
    get:
      operationId: listReferenceTickers
      summary: List reference tickers
      description: USD reference tickers for the main crypto assets (display prices from an external reference feed, not the
        ArandixBit order book).
      tags:
      - Market
      x-arx-auth: public
      security: []
      responses:
        '200':
          description: Tickers.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  tickers:
                    type: array
                    items:
                      $ref: '#/components/schemas/Ticker'
              example:
                tickers:
                - symbol: BTC
                  name: Bitcoin
                  price: 62450.12
                  change_24h: 1.84
                  high_24h: 62990.0
                  low_24h: 61020.5
                  volume_24h: 28150000000.0
                  market_cap: 1230000000000.0
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/public/fees:
    get:
      operationId: listPublicFees
      summary: List fees
      description: Active fees (basis points with min/max in minor units) and VIP tiers, exactly as configured. Cached for
        5 minutes.
      tags:
      - Market
      x-arx-auth: public
      security: []
      responses:
        '200':
          description: Fees and tiers.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  fees:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        bps:
                          type: integer
                        min_minor:
                          type: integer
                        max_minor:
                          type: integer
                  tiers:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        label:
                          type: string
                        min_volume_usd_minor:
                          type: integer
                        rank:
                          type: integer
              example:
                fees:
                - key: spot.maker
                  bps: 100
                  min_minor: 0
                  max_minor: 0
                - key: spot.taker
                  bps: 100
                  min_minor: 0
                  max_minor: 0
                tiers:
                - name: regular
                  label: Regular
                  min_volume_usd_minor: 0
                  rank: 0
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/public/plans:
    get:
      operationId: listPublicPlans
      summary: List plans, limits and fees
      description: 'Verification levels (plans) with their limits (USD cents, `0` = unlimited), Convert

        fees, spot fees and the crypto withdrawal fee rule per network (fixed, or

        cost-plus: live network cost + `markup_usd`, between `min_usd` and `max_usd`).

        Cached for 60 s; limited per IP.

        '
      tags:
      - Market
      x-arx-auth: public
      security: []
      responses:
        '200':
          description: Plans.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  updated_at:
                    type: string
                    format: date-time
                  generated_at:
                    type: string
                    format: date-time
                  plans:
                    type: array
                    items:
                      type: object
                      properties:
                        level:
                          type: string
                        label:
                          type: string
                        rank:
                          type: integer
                        limits:
                          type: object
                          additionalProperties:
                            type: integer
                        convert_fee_bps:
                          type: object
                          properties:
                            crypto:
                              type: integer
                            fiat:
                              type: integer
                        convert_enabled:
                          type: boolean
                        withdraw_enabled:
                          type: boolean
                  spot:
                    type: object
                    properties:
                      maker_bps:
                        type: integer
                      taker_bps:
                        type: integer
                  convert:
                    type: object
                    properties:
                      pyg:
                        type: string
                        enum:
                        - integration
                        - available
                  withdraw_fees:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                      quote_ttl_sec:
                        type: integer
                      networks:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
              example:
                updated_at: '2026-10-07T09:30:00Z'
                generated_at: '2026-10-08T12:00:00Z'
                plans:
                - level: verified
                  label: Verified
                  rank: 1
                  limits:
                    deposit_daily_usd_minor: 1000000
                    deposit_monthly_usd_minor: 5000000
                    withdraw_daily_usd_minor: 1000000
                    withdraw_monthly_usd_minor: 5000000
                    max_tx_usd_minor: 1000000
                    convert_crypto_daily_usd_minor: 2500000
                    convert_crypto_monthly_usd_minor: 25000000
                    convert_fiat_daily_usd_minor: 2500000
                    convert_fiat_monthly_usd_minor: 25000000
                  convert_fee_bps:
                    crypto: 50
                    fiat: 150
                  convert_enabled: true
                  withdraw_enabled: true
                spot:
                  maker_bps: 100
                  taker_bps: 100
                convert:
                  pyg: integration
                withdraw_fees:
                  enabled: true
                  quote_ttl_sec: 30
                  networks:
                  - key: dc:USDTTRC20
                    coin: USDT
                    network: USDTTRC20
                    name: TRON (TRC-20)
                    mode: fixed
                    fee_usd: '1.50'
                    estimated_fee_usd: '1.50'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/public/verify:
    get:
      operationId: verifyOfficialChannel
      summary: Verify an official channel
      description: 'Anti-phishing check: tells whether a website, email address or phone number

        (WhatsApp) is an official ArandixBit channel. The query is normalized (host without

        scheme/path/`www.`, lower-case email, digits-only phone) and look-alike domains are

        reported as not official. Limited per IP.

        '
      tags:
      - Market
      x-arx-auth: public
      security: []
      parameters:
      - name: q
        in: query
        description: URL/domain, email address or phone number.
        required: true
        schema:
          type: string
          maxLength: 200
        example: arandixbit.com
      responses:
        '200':
          description: Verification result.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  query:
                    type: string
                    description: Normalized query.
                  official:
                    type: boolean
                  kind:
                    type: string
                    enum:
                    - domain
                    - email
                    - phone
                    - unknown
                  label:
                    type:
                    - string
                    - 'null'
                    description: Name of the official channel when `official` is true.
              example:
                query: arandixbit.com
                official: true
                kind: domain
                label: ArandixBit website
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/public/symbols:
    get:
      operationId: listPublicSymbols
      summary: List spot symbols (public)
      description: Same data and format as `GET /v1/spot/symbols`, without authentication. Cached for 1 s; limited per IP.
      tags:
      - Market
      x-arx-auth: public
      security: []
      responses:
        '200':
          description: Symbols and fees.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpotSymbols'
              example:
                symbols:
                - symbol: BTC/USDT
                  base: BTC
                  quote: USDT
                  base_exp: 8
                  quote_exp: 6
                - symbol: ETH/USDT
                  base: ETH
                  quote: USDT
                  base_exp: 8
                  quote_exp: 6
                - symbol: USDT/BRL
                  base: USDT
                  quote: BRL
                  base_exp: 6
                  quote_exp: 2
                maker_bps: 100
                taker_bps: 100
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/public/book:
    get:
      operationId: getPublicOrderBook
      summary: Get order book (public)
      description: Aggregated spot order book, same format as `GET /v1/spot/book` (no order or user data). Cached for 1 s
        per symbol and depth; limited per IP.
      tags:
      - Market
      x-arx-auth: public
      security: []
      parameters:
      - $ref: '#/components/parameters/SpotSymbol'
      - name: depth
        in: query
        description: Levels per side.
        schema:
          type: integer
          enum:
          - 5
          - 10
          - 20
          default: 20
      responses:
        '200':
          description: Order book.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Book'
              example:
                symbol: BTC/USDT
                bids:
                - price: 62450120000
                  amount: 150000
                - price: 62440000000
                  amount: 820000
                asks:
                - price: 62460000000
                  amount: 98000
                - price: 62475500000
                  amount: 1200000
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/public/trades:
    get:
      operationId: listPublicTrades
      summary: List recent trades (public)
      description: Recent spot trades, same format as `GET /v1/spot/trades` (no order or user data). Cached for 1 s per symbol
        and limit; limited per IP.
      tags:
      - Market
      x-arx-auth: public
      security: []
      parameters:
      - $ref: '#/components/parameters/SpotSymbol'
      - name: limit
        in: query
        description: Number of trades (1–40).
        schema:
          type: integer
          minimum: 1
          maximum: 40
          default: 40
      responses:
        '200':
          description: Recent trades.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  symbol:
                    type: string
                  trades:
                    type: array
                    items:
                      $ref: '#/components/schemas/Trade'
              example:
                symbol: BTC/USDT
                trades:
                - id: 00000000-0000-4000-8000-000000001101
                  symbol: BTC/USDT
                  price: 62450120000
                  amount: 150000
                  quote_amount: 93675180
                  taker_side: buy
                  created_at: '2026-10-08T12:00:03Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/public/candles/{symbol}:
    parameters:
    - name: symbol
      in: path
      description: Base asset, optionally with the `USDT` suffix (`BTC`, `BTCUSDT`, `BTC-USDT`).
      required: true
      schema:
        type: string
        maxLength: 12
      example: BTC
    get:
      operationId: listPublicCandles
      summary: List reference candles
      description: OHLCV candles against USDT from the reference feed (display prices). Cached for 60 s; limited per IP.
      tags:
      - Market
      x-arx-auth: public
      security: []
      parameters:
      - name: interval
        in: query
        description: Candle interval.
        schema:
          type: string
          enum:
          - 15m
          - 1h
          - 4h
          - 1d
          default: 1h
      - name: limit
        in: query
        description: Number of candles (values above 120 are capped).
        schema:
          type: integer
          minimum: 1
          maximum: 120
          default: 60
      responses:
        '200':
          description: Candles, oldest first.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  symbol:
                    type: string
                  interval:
                    type: string
                  source:
                    type: string
                    const: reference
                  candles:
                    type: array
                    items:
                      $ref: '#/components/schemas/Candle'
              example:
                symbol: BTCUSDT
                interval: 1h
                source: reference
                candles:
                - time: 1791457200
                  open: 62310.5
                  high: 62520.0
                  low: 62280.1
                  close: 62450.12
                  volume: 412.83
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/ws:
    get:
      operationId: connectMarketStream
      summary: Market-data WebSocket
      description: 'Public market-data stream (RFC 6455 upgrade), served by the dedicated stream service at

        **`wss://stream.arandixbit.com/v1/ws`**. No authentication. Subscribe to

        `ticker.<SYM>`, `book.<SYM>[@N]` and `trades.<SYM>`; keep the connection alive with

        `{"op":"ping"}` every 25–30 s. See *WebSocket market stream* in the introduction for

        the message formats and limits.


        A plain HTTP request returns `426 websocket_required`; too many connections from the

        IP returns `429`; server at capacity returns `503 ws_capacity`.

        '
      tags:
      - Market
      x-arx-auth: public
      security: []
      servers:
      - url: wss://stream.arandixbit.com
        description: Public market-data stream (read-only, shared by all environments)
      parameters:
      - name: Upgrade
        in: header
        description: Must be `websocket`.
        required: true
        schema:
          type: string
          const: websocket
      - name: Sec-WebSocket-Version
        in: header
        description: Must be `13`.
        required: true
        schema:
          type: string
          const: '13'
      - name: Sec-WebSocket-Key
        in: header
        description: Random base64 nonce (RFC 6455).
        required: true
        schema:
          type: string
      responses:
        '101':
          description: Switching Protocols — the WebSocket connection is open.
        '426':
          $ref: '#/components/responses/UpgradeRequired'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/balances:
    get:
      operationId: getBalances
      summary: Get balances
      description: 'Balances of every currency and wallet (`funding`, `spot`, `p2p`, `earn`) in minor

        units. A `funding` balance exists for every listed currency (zero when unused).

        `held` is reserved by open orders, pending withdrawals or conversions.

        '
      tags:
      - Account
      x-arx-auth: account.read
      security:
      - bearerAuth: []
      - arxKey:
        - account.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Balances.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  balances:
                    type: array
                    items:
                      $ref: '#/components/schemas/Balance'
              example:
                balances:
                - currency: USDT
                  kind: funding
                  exponent: 6
                  balance: 1250000000
                  held: 501500000
                  available: 748500000
                - currency: USDT
                  kind: spot
                  exponent: 6
                  balance: 300000000
                  held: 93675180
                  available: 206324820
                - currency: BTC
                  kind: spot
                  exponent: 8
                  balance: 2500000
                  held: 0
                  available: 2500000
                - currency: BRL
                  kind: funding
                  exponent: 2
                  balance: 1534250
                  held: 0
                  available: 1534250
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/portfolio:
    get:
      operationId: getPortfolio
      summary: Get portfolio value
      description: Aggregated holdings per currency with an indicative USD valuation. USD values are floats for display only.
      tags:
      - Account
      x-arx-auth: account.read
      security:
      - bearerAuth: []
      - arxKey:
        - account.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Portfolio.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_usd:
                    type: number
                  funding_usd:
                    type: number
                  spot_usd:
                    type: number
                  assets:
                    type: array
                    items:
                      $ref: '#/components/schemas/PortfolioAsset'
                    description: Sorted by value, largest first.
              example:
                total_usd: 3268.04
                funding_usd: 1530.56
                spot_usd: 1737.48
                assets:
                - currency: USDT
                  balance: 1550000000
                  held: 595175180
                  exponent: 6
                  price_usd: 1.0
                  value_usd: 1550.0
                  pct: 47.43
                - currency: BTC
                  balance: 2500000
                  held: 0
                  exponent: 8
                  price_usd: 62450.12
                  value_usd: 1561.25
                  pct: 47.77
                - currency: BRL
                  balance: 1534250
                  held: 0
                  exponent: 2
                  price_usd: 0.1021
                  value_usd: 156.65
                  pct: 4.79
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/me/limits:
    get:
      operationId: getAccountLimits
      summary: Get plan limits and usage
      description: "Verification level, plan limits and current usage, all in USD cents (`0` = unlimited).\n\n- `deposit`:\
        \ plan deposit limit with usage and remaining amount. `daily` is a rolling\n  24 h window, `monthly` the calendar\
        \ month (UTC). Usage counts pending and credited\n  fiat deposits plus credited crypto deposits. The limit is **enforced\
        \ on fiat\n  deposits only** (`409 deposit_limit_exceeded`); on-chain crypto deposits are never\n  refused, only flagged.\n\
        - `convert`: Convert allowance per class (`crypto`, `fiat`).\n- `limits`: the raw plan limits; `usage`: withdrawal\
        \ and deposit usage today and in\n  the last 30 days.\n"
      tags:
      - Account
      x-arx-auth: account.read
      security:
      - bearerAuth: []
      - arxKey:
        - account.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Limits.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  level:
                    type: string
                    enum:
                    - unverified
                    - verified
                    - plus
                    - vip
                  plan:
                    type: string
                  convert:
                    $ref: '#/components/schemas/ConvertLimits'
                  deposit:
                    type: object
                    properties:
                      level:
                        type: string
                      plan:
                        type: string
                      daily:
                        $ref: '#/components/schemas/UsageWindow'
                      monthly:
                        $ref: '#/components/schemas/UsageWindow'
                      windows:
                        type: object
                        additionalProperties:
                          type: string
                      enforced:
                        type: string
                        const: fiat
                      counts:
                        type: array
                        items:
                          type: string
                      crypto_note:
                        type: string
                  limits:
                    type: object
                    additionalProperties: true
                    description: Plan limits (`*_usd_minor`, `*_fee_bps`).
                  usage:
                    type: object
                    properties:
                      withdraw_daily_usd_minor:
                        type: integer
                      withdraw_monthly_usd_minor:
                        type: integer
                      deposit_daily_usd_minor:
                        type: integer
                      deposit_monthly_usd_minor:
                        type: integer
              example:
                level: verified
                plan: Verified
                convert:
                  crypto:
                    class: crypto
                    level: verified
                    plan: Verified
                    max_tx_usd_minor: 1000000
                    fee_bps: 50
                    allowed: true
                    daily:
                      limit_usd_minor: 2500000
                      used_usd_minor: 10000
                      unlimited: false
                      remaining_usd_minor: 2490000
                    monthly:
                      limit_usd_minor: 25000000
                      used_usd_minor: 310000
                      unlimited: false
                      remaining_usd_minor: 24690000
                    windows:
                      daily: rolling_24h
                      monthly: calendar_month_utc
                  fiat:
                    class: fiat
                    level: verified
                    plan: Verified
                    max_tx_usd_minor: 1000000
                    fee_bps: 150
                    allowed: true
                    daily:
                      limit_usd_minor: 2500000
                      used_usd_minor: 10000
                      unlimited: false
                      remaining_usd_minor: 2490000
                    monthly:
                      limit_usd_minor: 25000000
                      used_usd_minor: 310000
                      unlimited: false
                      remaining_usd_minor: 24690000
                    windows:
                      daily: rolling_24h
                      monthly: calendar_month_utc
                deposit:
                  level: verified
                  plan: Verified
                  daily:
                    limit_usd_minor: 1000000
                    used_usd_minor: 9790
                    unlimited: false
                    remaining_usd_minor: 990210
                  monthly:
                    limit_usd_minor: 5000000
                    used_usd_minor: 125000
                    unlimited: false
                    remaining_usd_minor: 4875000
                  windows:
                    daily: rolling_24h
                    monthly: calendar_month_utc
                  enforced: fiat
                  counts:
                  - fiat_pending
                  - fiat_confirmed
                  - crypto_credited
                  crypto_note: crypto_never_refused_only_flagged
                limits:
                  level: verified
                  label: Verified
                  rank: 1
                  deposit_daily_usd_minor: 1000000
                  deposit_monthly_usd_minor: 5000000
                  withdraw_daily_usd_minor: 1000000
                  withdraw_monthly_usd_minor: 5000000
                  max_tx_usd_minor: 1000000
                  convert_crypto_daily_usd_minor: 2500000
                  convert_crypto_monthly_usd_minor: 25000000
                  convert_fiat_daily_usd_minor: 2500000
                  convert_fiat_monthly_usd_minor: 25000000
                  convert_crypto_fee_bps: 50
                  convert_fiat_fee_bps: 150
                  updated_at: '2026-10-07T09:30:00Z'
                usage:
                  withdraw_daily_usd_minor: 50150
                  withdraw_monthly_usd_minor: 50150
                  deposit_daily_usd_minor: 9790
                  deposit_monthly_usd_minor: 125000
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/me/fees:
    get:
      operationId: getAccountFees
      summary: Get applicable fees
      description: 'Fees that apply to the account right now — the same values the platform charges:

        Convert by plan (crypto and fiat), spot maker/taker and P2P. Accounts in a **fee

        group** (contract pricing; a partner''s sub-accounts inherit the partner''s group) also

        get `fee_group`, whose PIX, Convert, crypto and Paraguay-payout rates replace the

        plan''s. Percentages in `*_cbps` are hundredths of a basis point (1 % = 10000).

        '
      tags:
      - Account
      x-arx-auth: account.read
      security:
      - bearerAuth: []
      - arxKey:
        - account.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Fees in basis points.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountFees'
              example:
                tier: regular
                level: verified
                plan: Verified
                convert_bps: 50
                convert_crypto_bps: 50
                convert_fiat_bps: 150
                spot_maker_bps: 100
                spot_taker_bps: 100
                p2p_advertiser_bps: 25
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/history:
    get:
      operationId: listHistory
      summary: List unified history
      description: 'Deposits, withdrawals, conversions and spot trades of the account in one list,

        newest first, paginated by cursor. Default period: the last 90 days; maximum

        window 366 days.

        '
      tags:
      - Account
      x-arx-auth: account.read
      security:
      - bearerAuth: []
      - arxKey:
        - account.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/HistoryType'
      - $ref: '#/components/parameters/From'
      - $ref: '#/components/parameters/To'
      - $ref: '#/components/parameters/Cursor'
      - $ref: '#/components/parameters/HistoryLimit'
      responses:
        '200':
          description: One page of history.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                required:
                - items
                - next_cursor
                - from
                - to
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/HistoryItem'
                  next_cursor:
                    type:
                    - string
                    - 'null'
                    description: Cursor of the next page; `null` on the last page.
                  from:
                    type: string
                    format: date-time
                  to:
                    type: string
                    format: date-time
              example:
                items:
                - type: withdrawal
                  rail: mexc
                  id: 00000000-0000-4000-8000-000000000701
                  asset: USDT
                  amount: 500000000
                  exponent: 6
                  status: completed
                  created_at: '2026-10-08T12:00:00Z'
                  updated_at: '2026-10-08T12:05:00Z'
                  details:
                    network: TRX
                    txid: 0xexampletxid
                - type: deposit
                  rail: fiat
                  id: 00000000-0000-4000-8000-000000000401
                  asset: BRL
                  amount: 50000
                  exponent: 2
                  status: confirmed
                  created_at: '2026-10-07T09:30:00Z'
                  updated_at: '2026-10-07T09:30:00Z'
                  details:
                    method: pix
                next_cursor: MTc5MTQ2MDgwMDAwMDAwMDAwMHwwMDAwMDAwMC0wMDAwLTQwMDAtODAwMC0wMDAwMDAwMDA0MDE
                from: '2026-07-10T12:00:01Z'
                to: '2026-10-08T12:00:01Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/statement:
    get:
      operationId: getStatement
      summary: Get account statement
      description: 'Ledger lines of the account (session or `account.read` key; a sub-account

        restricted key reads its sub-account). Newest first, paginated by cursor.

        `limit` counts ledger entries: an entry with a fee produces two lines (the gross

        principal and a separate `fee` line). `format=csv` returns CSV with the next

        cursor in `X-Next-Cursor`. See *Statement* in the introduction.

        '
      tags:
      - Account
      x-arx-auth: account.read
      security:
      - bearerAuth: []
      - arxKey:
        - account.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/StatementTypeFilter'
      - $ref: '#/components/parameters/StatementCurrency'
      - $ref: '#/components/parameters/From'
      - $ref: '#/components/parameters/To'
      - $ref: '#/components/parameters/Cursor'
      - $ref: '#/components/parameters/StatementLimit'
      - $ref: '#/components/parameters/StatementFormat'
      responses:
        '200':
          description: One page of the statement (JSON or CSV).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            X-Next-Cursor:
              $ref: '#/components/headers/X-Next-Cursor'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementPage'
              example:
                lines:
                - id: '9184'
                  entry_id: 9184
                  tx_id: 00000000-0000-4000-8000-000000001001
                  date: '2026-10-08T12:00:03Z'
                  type: trade
                  rail: spot
                  wallet: spot
                  currency: USDT
                  exponent: 6
                  amount: -93675180
                  balance_after: 206324820
                  reference: spot_trade:00000000-0000-4000-8000-000000001101
                - id: '9183'
                  entry_id: 9183
                  tx_id: 00000000-0000-4000-8000-000000001002
                  date: '2026-10-08T12:00:00Z'
                  type: withdrawal
                  rail: mexc
                  wallet: funding
                  currency: USDT
                  exponent: 6
                  amount: -500000000
                  balance_after: 750000000
                  reference: rail_wd:00000000-0000-4000-8000-000000000701
                - id: 9183:fee
                  entry_id: 9183
                  tx_id: 00000000-0000-4000-8000-000000001002
                  date: '2026-10-08T12:00:00Z'
                  type: fee
                  wallet: funding
                  currency: USDT
                  exponent: 6
                  amount: -1500000
                  balance_after: 748500000
                  reference: rail_wd:00000000-0000-4000-8000-000000000701
                next_cursor: null
                from: '2026-07-10T12:00:01Z'
                to: '2026-10-08T12:00:01Z'
            text/csv:
              schema:
                type: string
                description: 'Columns: date,id,type,rail,wallet,currency,amount_minor,amount,balance_after_minor,balance_after,reference,tx_id'
              example: 'date,id,type,rail,wallet,currency,amount_minor,amount,balance_after_minor,balance_after,reference,tx_id

                2026-10-08T12:00:00Z,9183,withdrawal,mexc,funding,USDT,-500000000,-500.000000,750000000,750.000000,rail_wd:00000000-0000-4000-8000-000000000701,00000000-0000-4000-8000-000000001002

                '
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/spot/symbols:
    get:
      operationId: listSpotSymbols
      summary: List spot symbols
      description: Tradable symbols with base/quote exponents and the maker/taker fees actually charged.
      tags:
      - Spot
      x-arx-auth: spot.read
      security:
      - bearerAuth: []
      - arxKey:
        - spot.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Symbols and fees.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpotSymbols'
              example:
                symbols:
                - symbol: BTC/USDT
                  base: BTC
                  quote: USDT
                  base_exp: 8
                  quote_exp: 6
                - symbol: ETH/USDT
                  base: ETH
                  quote: USDT
                  base_exp: 8
                  quote_exp: 6
                - symbol: USDT/BRL
                  base: USDT
                  quote: BRL
                  base_exp: 6
                  quote_exp: 2
                maker_bps: 100
                taker_bps: 100
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/spot/book:
    get:
      operationId: getSpotOrderBook
      summary: Get order book
      description: Aggregated order book (20 levels per side). Prices in quote minor units per whole base unit; amounts in
        base minor units.
      tags:
      - Spot
      x-arx-auth: spot.read
      security:
      - bearerAuth: []
      - arxKey:
        - spot.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/SpotSymbol'
      responses:
        '200':
          description: Order book.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Book'
              example:
                symbol: BTC/USDT
                bids:
                - price: 62450120000
                  amount: 150000
                - price: 62440000000
                  amount: 820000
                asks:
                - price: 62460000000
                  amount: 98000
                - price: 62475500000
                  amount: 1200000
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/spot/trades:
    get:
      operationId: listSpotTrades
      summary: List recent trades
      description: The 40 most recent trades of a symbol, newest first.
      tags:
      - Spot
      x-arx-auth: spot.read
      security:
      - bearerAuth: []
      - arxKey:
        - spot.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/SpotSymbol'
      responses:
        '200':
          description: Recent trades.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  symbol:
                    type: string
                  trades:
                    type: array
                    items:
                      $ref: '#/components/schemas/Trade'
              example:
                symbol: BTC/USDT
                trades:
                - id: 00000000-0000-4000-8000-000000001101
                  symbol: BTC/USDT
                  price: 62450120000
                  amount: 150000
                  quote_amount: 93675180
                  taker_side: buy
                  created_at: '2026-10-08T12:00:03Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/spot/orders:
    get:
      operationId: listSpotOrders
      summary: List your orders
      description: 'Your 100 most recent spot orders, newest first. `open=1` returns only working

        orders. `client_order_id` looks up a single order by your id and returns a list

        with zero or one element.

        '
      tags:
      - Spot
      x-arx-auth: spot.read
      security:
      - bearerAuth: []
      - arxKey:
        - spot.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: open
        in: query
        description: Set to `1` to return only open orders (`pending`, `open`, `partial`).
        schema:
          type: string
          enum:
          - '1'
      - name: client_order_id
        in: query
        description: Return only the order with this `client_order_id` (0 or 1 result).
        schema:
          type: string
          pattern: ^[A-Za-z0-9_-]{1,36}$
      responses:
        '200':
          description: Orders.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      $ref: '#/components/schemas/SpotOrder'
              example:
                orders:
                - id: 00000000-0000-4000-8000-000000000201
                  user_id: 00000000-0000-4000-8000-000000000001
                  client_order_id: bot-42
                  symbol: BTC/USDT
                  side: buy
                  type: limit
                  price: 62450120000
                  amount: 150000
                  filled: 0
                  quote_filled: 0
                  status: open
                  created_at: '2026-10-08T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    post:
      operationId: createSpotOrder
      summary: Create an order
      description: 'Places a spot order. Requires approved KYC. Funds are reserved (`held`) in the

        `spot` wallet: the quote amount for buys (for market buys, the reference price

        plus 10 %), the base amount for sells.


        | `type` | Required fields | Behavior |

        |---|---|---|

        | `limit` | `price`, `amount` | Rests on the book until filled or cancelled. |

        | `market` | `amount` | Fills immediately against the book (or routed liquidity). |

        | `stop_limit` | `stop_price`, `price`, `amount` | Places a limit order when the last price crosses `stop_price`.
        |

        | `oco` | `price`, `stop_price`, `stop_limit_price`, `amount` | Take-profit limit + stop-limit; one cancels the other.
        |

        | `trailing_stop` | `trail_bps`, `amount` | Stop that follows the price at `trail_bps` distance. |


        Use `client_order_id` to tag the order with your own id: duplicates are rejected

        with `409 duplicate_client_order_id`; an invalid value returns `400 bad_request`

        with `details.client_order_id`. Combine it with `Idempotency-Key` for safe retries.


        A market order routed to external liquidity may answer `202 settlement_pending`

        (error envelope) when the trade executed but internal settlement is being

        reconciled; the balance is adjusted shortly.

        '
      tags:
      - Spot
      x-arx-auth: spot.trade
      security:
      - bearerAuth: []
      - arxKey:
        - spot.trade
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - symbol
              - side
              - type
              - amount
              properties:
                symbol:
                  type: string
                  description: Symbol from `/v1/spot/symbols`.
                  examples:
                  - BTC/USDT
                side:
                  type: string
                  enum:
                  - buy
                  - sell
                type:
                  type: string
                  enum:
                  - limit
                  - market
                  - stop_limit
                  - oco
                  - trailing_stop
                price:
                  type: integer
                  format: int64
                  description: Limit price in quote minor units per whole base unit. Required for `limit`, `stop_limit` and
                    `oco` (take-profit leg).
                amount:
                  type: integer
                  format: int64
                  description: Amount in base minor units (> 0).
                stop_price:
                  type: integer
                  format: int64
                  description: Trigger price (`stop_limit`, stop leg of `oco`).
                stop_limit_price:
                  type: integer
                  format: int64
                  description: Limit price of the stop leg of an `oco`.
                trail_bps:
                  type: integer
                  minimum: 10
                  maximum: 2000
                  description: Trailing distance for `trailing_stop` (10 = 0.1 %, 2000 = 20 %).
                client_order_id:
                  type: string
                  minLength: 1
                  maxLength: 36
                  pattern: ^[A-Za-z0-9_-]{1,36}$
                  description: Optional id of your choice, unique per account across all your orders. For `oco` it is stored
                    on the first leg.
            example:
              symbol: BTC/USDT
              side: buy
              type: limit
              price: 62450120000
              amount: 150000
              client_order_id: bot-42
      responses:
        '200':
          description: Order created. Conditional types also return every leg in `orders`.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                required:
                - order
                properties:
                  order:
                    $ref: '#/components/schemas/SpotOrder'
                  orders:
                    type: array
                    items:
                      $ref: '#/components/schemas/SpotOrder'
                    description: 'Conditional orders: every created leg (two for `oco`).'
              example:
                order:
                  id: 00000000-0000-4000-8000-000000000201
                  user_id: 00000000-0000-4000-8000-000000000001
                  client_order_id: bot-42
                  symbol: BTC/USDT
                  side: buy
                  type: limit
                  price: 62450120000
                  amount: 150000
                  filled: 0
                  quote_filled: 0
                  status: open
                  created_at: '2026-10-08T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/spot/orders/{id}/cancel:
    parameters:
    - name: id
      in: path
      description: Order id.
      required: true
      schema:
        type: string
        format: uuid
    post:
      operationId: cancelSpotOrder
      summary: Cancel an order
      description: 'Cancels an open order and releases its reserved funds. Cancelling one leg of an

        OCO cancels the other leg too. Returns `404 not_found` for unknown orders or

        orders of another account and `409 conflict` when the order is no longer open.

        '
      tags:
      - Spot
      x-arx-auth: spot.trade
      security:
      - bearerAuth: []
      - arxKey:
        - spot.trade
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      responses:
        '200':
          description: Cancelled order.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                required:
                - order
                properties:
                  order:
                    $ref: '#/components/schemas/SpotOrder'
              example:
                order:
                  id: 00000000-0000-4000-8000-000000000201
                  user_id: 00000000-0000-4000-8000-000000000001
                  client_order_id: bot-42
                  symbol: BTC/USDT
                  side: buy
                  type: limit
                  price: 62450120000
                  amount: 150000
                  filled: 0
                  quote_filled: 0
                  status: cancelled
                  created_at: '2026-10-08T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/spot/orders/by-client-id/{client_order_id}/cancel:
    parameters:
    - name: client_order_id
      in: path
      description: The `client_order_id` you set when creating the order.
      required: true
      schema:
        type: string
        pattern: ^[A-Za-z0-9_-]{1,36}$
      example: bot-42
    post:
      operationId: cancelSpotOrderByClientOrderId
      summary: Cancel an order by client order id
      description: 'Same as `POST /v1/spot/orders/{id}/cancel`, addressing the order by your

        `client_order_id`. `404 not_found` when no order of the account has that id;

        `409 conflict` when the order is no longer open.

        '
      tags:
      - Spot
      x-arx-auth: spot.trade
      security:
      - bearerAuth: []
      - arxKey:
        - spot.trade
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      responses:
        '200':
          description: Cancelled order.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                required:
                - order
                properties:
                  order:
                    $ref: '#/components/schemas/SpotOrder'
              example:
                order:
                  id: 00000000-0000-4000-8000-000000000201
                  user_id: 00000000-0000-4000-8000-000000000001
                  client_order_id: bot-42
                  symbol: BTC/USDT
                  side: buy
                  type: limit
                  price: 62450120000
                  amount: 150000
                  filled: 0
                  quote_filled: 0
                  status: cancelled
                  created_at: '2026-10-08T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/convert/pairs:
    get:
      operationId: listConvertPairs
      summary: List Convert currencies
      description: Currencies available to Convert (`active` or `integration`), plus the plan fees and allowances of the account.
      tags:
      - Convert
      x-arx-auth: convert.read
      security:
      - bearerAuth: []
      - arxKey:
        - convert.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Currencies, fees and limits.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  currencies:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                        exponent:
                          type: integer
                        kind:
                          type: string
                          enum:
                          - crypto
                          - fiat
                        status:
                          type: string
                          enum:
                          - active
                          - integration
                  fees:
                    type: object
                    properties:
                      level:
                        type: string
                      plan:
                        type: string
                      crypto_bps:
                        type: integer
                      fiat_bps:
                        type: integer
                  limits:
                    $ref: '#/components/schemas/ConvertLimits'
              example:
                currencies:
                - code: BTC
                  exponent: 8
                  kind: crypto
                  status: active
                - code: USDT
                  exponent: 6
                  kind: crypto
                  status: active
                - code: BRL
                  exponent: 2
                  kind: fiat
                  status: active
                - code: PYG
                  exponent: 0
                  kind: fiat
                  status: integration
                fees:
                  level: verified
                  plan: Verified
                  crypto_bps: 50
                  fiat_bps: 150
                limits:
                  crypto:
                    class: crypto
                    level: verified
                    plan: Verified
                    max_tx_usd_minor: 1000000
                    fee_bps: 50
                    allowed: true
                    daily:
                      limit_usd_minor: 2500000
                      used_usd_minor: 10000
                      unlimited: false
                      remaining_usd_minor: 2490000
                    monthly:
                      limit_usd_minor: 25000000
                      used_usd_minor: 310000
                      unlimited: false
                      remaining_usd_minor: 24690000
                    windows:
                      daily: rolling_24h
                      monthly: calendar_month_utc
                  fiat:
                    class: fiat
                    level: verified
                    plan: Verified
                    max_tx_usd_minor: 1000000
                    fee_bps: 150
                    allowed: true
                    daily:
                      limit_usd_minor: 2500000
                      used_usd_minor: 10000
                      unlimited: false
                      remaining_usd_minor: 2490000
                    monthly:
                      limit_usd_minor: 25000000
                      used_usd_minor: 310000
                      unlimited: false
                      remaining_usd_minor: 24690000
                    windows:
                      daily: rolling_24h
                      monthly: calendar_month_utc
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/convert/quote:
    get:
      operationId: getConvertQuote
      summary: Get a Convert quote
      description: 'Live quote: route (house liquidity, Pool ArandixBit or a mix; fiat legs for BRL/PYG), fee,

        spread, estimated and worst-case output, minimum amount and the plan allowance.

        The returned `quote_id` can be executed with `POST /v1/convert` until `expires_at`

        (about 15 s). Conversions involving PYG use the live exchange-house price: the buying price when you

        receive PYG and the selling price when you give PYG, plus your plan fee. With no selling price

        available, giving PYG answers `503 price_unavailable`. Limited to 60 quotes per minute per account.

        '
      tags:
      - Convert
      x-arx-auth: convert.read
      security:
      - bearerAuth: []
      - arxKey:
        - convert.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: from
        in: query
        description: Currency you pay.
        required: true
        schema:
          type: string
        example: USDT
      - name: to
        in: query
        description: Currency you receive.
        required: true
        schema:
          type: string
        example: BTC
      - name: amount
        in: query
        description: Amount of `from` in minor units.
        required: true
        schema:
          type: integer
          format: int64
          minimum: 1
        example: 100000000
      - name: min_receive
        in: query
        description: Optional minimum amount of `to` in minor units.
        schema:
          type: integer
          format: int64
          minimum: 0
      responses:
        '200':
          description: Quote.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertQuote'
              example:
                quote_id: 00000000-0000-4000-8000-000000000651
                expires_at: '2026-10-08T12:00:15Z'
                from: USDT
                to: BTC
                amount: 100000000
                from_exp: 6
                to_exp: 8
                route: house
                mode: house
                legs:
                - venue: house
                  from: USDT
                  to: BTC
                  in: 100000000
                  est_out: 159500
                  spread_bps: 20
                split:
                  house: 100000000
                  mexc: 0
                requires_approval: false
                fee_bps: 50
                fee: 801
                fee_level: verified
                fee_plan: Verified
                fee_class: crypto
                house_spread_bps: 20
                fiat_spread_bps: 0
                slippage_bps: 30
                est_in: 100000000
                est_out: 159500
                worst_out: 159021
                min_receive: 159021
                min_amount: 1000000
                rate: '0.0000159500'
                usd_minor: 10000
                limits:
                  class: crypto
                  level: verified
                  plan: Verified
                  max_tx_usd_minor: 1000000
                  fee_bps: 50
                  allowed: true
                  daily:
                    limit_usd_minor: 2500000
                    used_usd_minor: 10000
                    unlimited: false
                    remaining_usd_minor: 2490000
                  monthly:
                    limit_usd_minor: 25000000
                    used_usd_minor: 310000
                    unlimited: false
                    remaining_usd_minor: 24690000
                  windows:
                    daily: rolling_24h
                    monthly: calendar_month_utc
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    post:
      operationId: createConvertQuote
      summary: Get a Convert quote (JSON body)
      description: 'Live quote: route (house liquidity, Pool ArandixBit or a mix; fiat legs for BRL/PYG), fee,

        spread, estimated and worst-case output, minimum amount and the plan allowance.

        The returned `quote_id` can be executed with `POST /v1/convert` until `expires_at`

        (about 15 s). Conversions involving PYG use the live exchange-house price: the buying price when you

        receive PYG and the selling price when you give PYG, plus your plan fee. With no selling price

        available, giving PYG answers `503 price_unavailable`. Limited to 60 quotes per minute per account.

        '
      tags:
      - Convert
      x-arx-auth: convert.read
      security:
      - bearerAuth: []
      - arxKey:
        - convert.read
        arxTimestamp: []
        arxSignature: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConvertRequest'
            example:
              from: USDT
              to: BTC
              amount: 100000000
      responses:
        '200':
          description: Quote.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertQuote'
              example:
                quote_id: 00000000-0000-4000-8000-000000000651
                expires_at: '2026-10-08T12:00:15Z'
                from: USDT
                to: BTC
                amount: 100000000
                from_exp: 6
                to_exp: 8
                route: house
                mode: house
                legs:
                - venue: house
                  from: USDT
                  to: BTC
                  in: 100000000
                  est_out: 159500
                  spread_bps: 20
                split:
                  house: 100000000
                  mexc: 0
                requires_approval: false
                fee_bps: 50
                fee: 801
                fee_level: verified
                fee_plan: Verified
                fee_class: crypto
                house_spread_bps: 20
                fiat_spread_bps: 0
                slippage_bps: 30
                est_in: 100000000
                est_out: 159500
                worst_out: 159021
                min_receive: 159021
                min_amount: 1000000
                rate: '0.0000159500'
                usd_minor: 10000
                limits:
                  class: crypto
                  level: verified
                  plan: Verified
                  max_tx_usd_minor: 1000000
                  fee_bps: 50
                  allowed: true
                  daily:
                    limit_usd_minor: 2500000
                    used_usd_minor: 10000
                    unlimited: false
                    remaining_usd_minor: 2490000
                  monthly:
                    limit_usd_minor: 25000000
                    used_usd_minor: 310000
                    unlimited: false
                    remaining_usd_minor: 24690000
                  windows:
                    daily: rolling_24h
                    monthly: calendar_month_utc
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/convert:
    post:
      operationId: executeConvert
      summary: Execute a conversion
      description: "Executes a conversion from the `funding` wallet. Requires approved KYC. Plan limits\n(per conversion,\
        \ daily, monthly) apply.\n\n- **Crypto ↔ crypto** executes immediately → `200` with `status: completed` (or\n  `partial`).\n\
        - **Anything involving fiat** (BRL/PYG) is reserved and waits for staff approval\n  (four-eyes) → `202` with `status:\
        \ pending_approval`. On approval it is re-quoted\n  live and executed only if the result is not below `min_receive`.\
        \ You receive the\n  `convert.pending_approval`, `convert.completed` or `convert.rejected` webhooks.\n- `202` is also\
        \ returned while an execution is `executing` or under `review`.\n\nPass `quote_id` to execute at a recent quote, or\
        \ `min_receive` to bound slippage.\nIdempotent (permanent mode) by the `Idempotency-Key` header or the `idempotency_key`\n\
        body field (8–100 characters; the body wins): a retry returns the original\nconversion with `replayed: true` and the\
        \ header `Idempotent-Replayed: true`; the same\nkey with different data returns `409 idempotency_conflict`. Conversions\n\
        with PYG use the exchange-house buying price when you receive PYG and the selling price when you\ngive PYG; with no\
        \ selling price, giving PYG answers `503 price_unavailable`.\n"
      tags:
      - Convert
      x-arx-auth: convert.execute
      security:
      - bearerAuth: []
      - arxKey:
        - convert.execute
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConvertRequest'
            example:
              from: USDT
              to: BTC
              amount: 100000000
              quote_id: 00000000-0000-4000-8000-000000000651
      responses:
        '200':
          description: Executed.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertOrder'
              example:
                ok: true
                id: 00000000-0000-4000-8000-000000000601
                status: completed
                from: USDT
                to: BTC
                amount: 100000000
                from_exp: 6
                to_exp: 8
                route: house
                needs_approval: false
                min_receive: 158900
                filled_in: 100000000
                amount_out: 159500
                fee: 1611
                rate: 1.595e-05
                residual_currency: null
                residual_amount: 0
                error: null
                expires_at: null
                created_at: '2026-10-08T12:00:00Z'
                updated_at: '2026-10-08T12:00:03Z'
                legs:
                - venue: house
                  from: USDT
                  to: BTC
                  filled_in: 100000000
                  amount_out: 159500
                  status: filled
                limit_class: crypto
                usd_minor: 10000
                tx_id: 00000000-0000-4000-8000-000000000602
                in: 100000000
                out: 159500
                replayed: false
        '202':
          description: Pending approval (fiat) or still executing.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertOrder'
              example:
                ok: false
                id: 00000000-0000-4000-8000-000000000611
                status: pending_approval
                from: BRL
                to: USDT
                amount: 50000
                from_exp: 2
                to_exp: 6
                route: fiat
                needs_approval: true
                min_receive: 97500000
                filled_in: 0
                amount_out: 0
                fee: 0
                rate: 1.595e-05
                residual_currency: null
                residual_amount: 0
                error: null
                expires_at: '2026-10-09T12:00:00Z'
                created_at: '2026-10-08T12:00:00Z'
                updated_at: '2026-10-08T12:00:03Z'
                legs: []
                limit_class: fiat
                usd_minor: 9790
                tx_id: ''
                in: 0
                out: 0
                replayed: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/convert/orders:
    get:
      operationId: listConvertOrders
      summary: List your conversions
      description: Your 50 most recent conversions, newest first.
      tags:
      - Convert
      x-arx-auth: convert.read
      security:
      - bearerAuth: []
      - arxKey:
        - convert.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Conversions.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      $ref: '#/components/schemas/ConvertOrder'
              example:
                orders:
                - ok: true
                  id: 00000000-0000-4000-8000-000000000601
                  status: completed
                  from: USDT
                  to: BTC
                  amount: 100000000
                  from_exp: 6
                  to_exp: 8
                  route: house
                  needs_approval: false
                  min_receive: 158900
                  filled_in: 100000000
                  amount_out: 159500
                  fee: 1611
                  rate: 1.595e-05
                  residual_currency: null
                  residual_amount: 0
                  error: null
                  expires_at: null
                  created_at: '2026-10-08T12:00:00Z'
                  updated_at: '2026-10-08T12:00:03Z'
                  legs:
                  - venue: house
                    from: USDT
                    to: BTC
                    filled_in: 100000000
                    amount_out: 159500
                    status: filled
                  limit_class: crypto
                  usd_minor: 10000
                  tx_id: 00000000-0000-4000-8000-000000000602
                  in: 100000000
                  out: 159500
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/convert/orders/{id}:
    parameters:
    - name: id
      in: path
      description: Conversion id.
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: getConvertOrder
      summary: Get a conversion
      description: One of your conversions. Conversions of other accounts return `404`.
      tags:
      - Convert
      x-arx-auth: convert.read
      security:
      - bearerAuth: []
      - arxKey:
        - convert.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Conversion.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    $ref: '#/components/schemas/ConvertOrder'
              example:
                order:
                  ok: true
                  id: 00000000-0000-4000-8000-000000000601
                  status: completed
                  from: USDT
                  to: BTC
                  amount: 100000000
                  from_exp: 6
                  to_exp: 8
                  route: house
                  needs_approval: false
                  min_receive: 158900
                  filled_in: 100000000
                  amount_out: 159500
                  fee: 1611
                  rate: 1.595e-05
                  residual_currency: null
                  residual_amount: 0
                  error: null
                  expires_at: null
                  created_at: '2026-10-08T12:00:00Z'
                  updated_at: '2026-10-08T12:00:03Z'
                  legs:
                  - venue: house
                    from: USDT
                    to: BTC
                    filled_in: 100000000
                    amount_out: 159500
                    status: filled
                  limit_class: crypto
                  usd_minor: 10000
                  tx_id: 00000000-0000-4000-8000-000000000602
                  in: 100000000
                  out: 159500
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/convert/orders/{id}/cancel:
    parameters:
    - name: id
      in: path
      description: Conversion id.
      required: true
      schema:
        type: string
        format: uuid
    post:
      operationId: cancelConvertOrder
      summary: Cancel a pending conversion
      description: Cancels a conversion that is still `pending_approval` and releases the reserved amount. Already decided
        conversions return `409 not_pending`.
      tags:
      - Convert
      x-arx-auth: convert.execute
      security:
      - bearerAuth: []
      - arxKey:
        - convert.execute
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      responses:
        '200':
          description: Cancelled conversion.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    $ref: '#/components/schemas/ConvertOrder'
              example:
                order:
                  ok: false
                  id: 00000000-0000-4000-8000-000000000611
                  status: cancelled
                  from: BRL
                  to: USDT
                  amount: 50000
                  from_exp: 2
                  to_exp: 6
                  route: fiat
                  needs_approval: true
                  min_receive: 97500000
                  filled_in: 0
                  amount_out: 0
                  fee: 0
                  residual_currency: null
                  residual_amount: 0
                  error: null
                  expires_at: '2026-10-09T12:00:00Z'
                  created_at: '2026-10-08T12:00:00Z'
                  updated_at: '2026-10-08T12:05:00Z'
                  limit_class: fiat
                  usd_minor: 9790
                  tx_id: ''
                  in: 0
                  out: 0
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/rails/config:
    get:
      operationId: getRailsConfig
      summary: Get deposit and withdrawal rails
      description: 'Which deposit/withdrawal rails are enabled. Crypto deposits use a **fixed deposit

        address per account** (`mexc_deposit`: coins and networks — see

        `GET /v1/crypto/fixed-address`); crypto withdrawals, USDT included, go through

        `POST /v1/mexc/withdrawals` (`mexc_withdraw`). The legacy USDT order rail (`usdt`)

        is paused: `deposit_paused: true` and empty network lists. Disabled

        rails come back with `enabled: false` and empty lists.

        '
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Rails.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  custody_mode:
                    type: string
                  mainnet_rails:
                    type: boolean
                  onchain_crypto_deposit:
                    type: boolean
                  usdt:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                      deposit_networks:
                        type: array
                        items:
                          type: object
                          properties:
                            asset:
                              type: string
                            name:
                              type: string
                            family:
                              type: string
                      withdraw_networks:
                        type: array
                        items:
                          type: object
                          properties:
                            asset:
                              type: string
                            name:
                              type: string
                            family:
                              type: string
                      exponent:
                        type: integer
                      deposit_min:
                        type: integer
                      deposit_max:
                        type: integer
                      withdraw_min:
                        type: integer
                      error:
                        type: string
                      deposit_paused:
                        type: boolean
                  mexc_deposit:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                      min_usd:
                        type: number
                        description: Minimum deposit per transaction, in USD, on any coin (a confirmed deposit below it is
                          not credited).
                      networks:
                        type: array
                        items:
                          type: object
                          properties:
                            coin:
                              type: string
                            network:
                              type: string
                            family:
                              type: string
                            pool_full:
                              type: boolean
                              description: 'Present and `true` when this network has no address left for a new account: `GET
                                /v1/crypto/fixed-address` answers `503 crypto_deposit_network_full`. Accounts that already
                                have an address keep it.'
                            deposit_enabled:
                              type: boolean
                              description: False while the provider has deposits on this network suspended — do not show the
                                address.
                            coin_name:
                              type: string
                              description: Coin full name (for example `Tether`), when available.
                            confirmations:
                              type: integer
                              description: Network confirmations required before the deposit is credited (absent when unknown).
                            memo_required:
                              type: boolean
                              description: The network requires the memo/tag shown with the address — deposits without it
                                cannot be credited.
                            min_amount:
                              type: string
                              description: Minimum deposit in this coin (decimal text, rounded up) ≈ `min_usd` at the live
                                price; absent when no reliable live price.
                  mexc_withdraw:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                      networks:
                        type: array
                        items:
                          type: object
                          properties:
                            coin:
                              type: string
                            network:
                              type: string
                            family:
                              type: string
                            exponent:
                              type: integer
              example:
                custody_mode: thirdparty_mainnet
                mainnet_rails: true
                onchain_crypto_deposit: false
                usdt:
                  enabled: true
                  deposit_networks: []
                  withdraw_networks: []
                  exponent: 6
                  deposit_min: 10000000
                  deposit_max: 50000000000
                  withdraw_min: 10000000
                  deposit_paused: true
                mexc_deposit:
                  enabled: true
                  networks:
                  - coin: USDT
                    network: Tron(TRC20)
                    family: tron
                    deposit_enabled: true
                  - coin: USDT
                    network: BNB Smart Chain(BEP20)
                    family: evm
                    deposit_enabled: true
                mexc_withdraw:
                  enabled: true
                  networks:
                  - coin: BTC
                    network: BTC
                    family: bitcoin
                    exponent: 8
                  - coin: USDT
                    network: TRX
                    family: tron
                    exponent: 6
                  - coin: USDT
                    network: BSC
                    family: evm
                    exponent: 6
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/crypto/fixed-address:
    get:
      operationId: getFixedDepositAddress
      summary: Get your fixed deposit address
      description: 'Returns the account''s **fixed deposit address** for the coin and network (created on the

        first call, then always the same — like on large exchanges). No amount, no expiry: any

        deposit to it is credited automatically once the network/provider confirms it, exactly

        once per transaction, and fires the `deposit.credited` webhook (`rail: "mexc"`, with

        `txid` and `address`). Requires approved KYC. Networks come from

        `GET /v1/rails/config` → `mexc_deposit.networks`; unknown network → `400`; network with

        deposits suspended by the provider (`deposit_enabled: false`) → `503 crypto_deposit_network_suspended`;

        network that has no address left for a new account (`pool_full: true`) → `503 crypto_deposit_network_full`:

        offer another network. Temporary provider failure → `502 crypto_deposit_provider_unavailable`: retry.

        With an API key the limit is the key quota (`X-RateLimit-*`), not a limit per IP, so a partner can

        create addresses for many sub-accounts from one IP.

        '
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: coin
        in: query
        description: Coin.
        required: true
        schema:
          type: string
          examples:
          - USDT
      - name: network
        in: query
        description: Network name from `mexc_deposit.networks`.
        required: true
        schema:
          type: string
          examples:
          - Tron(TRC20)
      responses:
        '200':
          description: Fixed address.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  address:
                    type: object
                    required:
                    - coin
                    - network
                    - address
                    - warning
                    properties:
                      coin:
                        type: string
                      network:
                        type: string
                        description: Network name as listed in `mexc_deposit.networks`.
                      address:
                        type: string
                      memo:
                        type: string
                        description: Present only on networks that need a memo/tag — send it with every deposit.
                      warning:
                        type: string
                        description: Localized warning to show next to the address.
                      min_usd:
                        type: number
                        description: Smallest deposit credited, in USD, on any coin. A smaller confirmed deposit is not credited.
              example:
                address:
                  coin: USDT
                  network: Tron(TRC20)
                  address: TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE
                  warning: Send only USDT on the Tron(TRC20) network to this address. Another coin or network may lose the
                    funds.
                  min_usd: 10
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/crypto/fixed-deposits:
    get:
      operationId: listFixedAddressDeposits
      summary: List deposits to your fixed addresses
      description: 'Deposits received at the account''s fixed addresses (newest first, up to 50) and the

        addresses already assigned. `confirming` = seen on the network, not yet credited;

        `credited` = balance available; `rejected` = refused by the provider (never credited). `below_min` = confirmed but
        under the minimum deposit (`mexc_deposit.min_usd` in `/v1/rails/config`): not credited, support decides.

        '
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deposits and addresses.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposits:
                    type: array
                    items:
                      type: object
                      required:
                      - id
                      - coin
                      - network
                      - amount
                      - tx_id
                      - status
                      - created_at
                      properties:
                        id:
                          type: string
                          format: uuid
                        coin:
                          type: string
                        network:
                          type: string
                        amount:
                          type: string
                          description: Decimal amount received (text, never a float).
                        tx_id:
                          type: string
                          description: On-chain transaction hash.
                        status:
                          type: string
                          enum:
                          - confirming
                          - credited
                          - rejected
                          - below_min
                          description: '`below_min`: confirmed but under the minimum deposit — not credited; the amount stays
                            with the exchange and support decides (refund or release).'
                        created_at:
                          type: string
                          format: date-time
                        credited_at:
                          type:
                          - string
                          - 'null'
                          format: date-time
                  addresses:
                    type: array
                    items:
                      type: object
                      required:
                      - coin
                      - network
                      - address
                      - warning
                      properties:
                        coin:
                          type: string
                        network:
                          type: string
                          description: Network name as listed in `mexc_deposit.networks`.
                        address:
                          type: string
                        memo:
                          type: string
                          description: Present only on networks that need a memo/tag — send it with every deposit.
                        warning:
                          type: string
                          description: Localized warning to show next to the address.
                        min_usd:
                          type: number
                          description: Smallest deposit credited, in USD, on any coin. A smaller confirmed deposit is not
                            credited.
              example:
                deposits:
                - id: 00000000-0000-4000-8000-000000000611
                  coin: USDT
                  network: Tron(TRC20)
                  amount: '250'
                  tx_id: 7c2d1f0b9a8e7d6c5b4a39281706f5e4d3c2b1a09f8e7d6c5b4a3928170605f4
                  status: credited
                  created_at: '2026-10-08T12:00:00Z'
                  credited_at: '2026-10-08T12:00:00Z'
                addresses:
                - coin: USDT
                  network: Tron(TRC20)
                  address: TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE
                  warning: Send only USDT on the Tron(TRC20) network to this address. Another coin or network may lose the
                    funds.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/usdt/deposits:
    get:
      operationId: listUsdtDeposits
      summary: List USDT deposit orders
      description: Your USDT deposit orders (legacy order rail, paused), newest first.
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deposit orders.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposits:
                    type: array
                    items:
                      $ref: '#/components/schemas/USDTDeposit'
              example:
                deposits:
                - id: 00000000-0000-4000-8000-000000000301
                  asset: USDTTRC20
                  network_name: TRON (TRC-20)
                  amount: 250000000
                  status: open
                  pay_address: TXexampleAddressDoNotUse000000000000
                  pay_amount: '250.000000'
                  qr_payload: TXexampleAddressDoNotUse000000000000
                  expires_at: '2026-10-08T13:00:00Z'
                  created_at: '2026-10-08T12:00:00Z'
                  exponent: 6
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    post:
      operationId: createUsdtDeposit
      summary: Create a USDT deposit order
      description: '**Paused** (`503 usdt_deposit_paused`): use your fixed deposit address

        (`GET /v1/crypto/fixed-address`) instead. Kept for orders already open.


        Creates (or reuses an identical open) USDT deposit order and returns the address and

        the **exact** amount to send. Requires approved KYC. Credit happens automatically

        when the provider confirms the transfer (`deposit.credited` webhook).


        `200` = order open (`reused: true` when an identical open order was returned);

        `202` = order still being created at the provider — poll `GET /v1/usdt/deposits/{id}`.

        '
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - asset
              - amount
              properties:
                asset:
                  type: string
                  description: USDT network code from `/v1/rails/config`.
                  examples:
                  - USDTTRC20
                amount:
                  type: integer
                  format: int64
                  description: Amount in USDT minor units (6 decimals), between `deposit_min` and `deposit_max`.
            example:
              asset: USDTTRC20
              amount: 250000000
      responses:
        '200':
          description: Deposit order.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposit:
                    $ref: '#/components/schemas/USDTDeposit'
                  reused:
                    type: boolean
              example:
                deposit:
                  id: 00000000-0000-4000-8000-000000000301
                  asset: USDTTRC20
                  network_name: TRON (TRC-20)
                  amount: 250000000
                  status: open
                  pay_address: TXexampleAddressDoNotUse000000000000
                  pay_amount: '250.000000'
                  qr_payload: TXexampleAddressDoNotUse000000000000
                  expires_at: '2026-10-08T13:00:00Z'
                  created_at: '2026-10-08T12:00:00Z'
                  exponent: 6
                reused: false
        '202':
          description: Order being created at the provider.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposit:
                    $ref: '#/components/schemas/USDTDeposit'
                  reused:
                    type: boolean
              example:
                deposit:
                  id: 00000000-0000-4000-8000-000000000301
                  asset: USDTTRC20
                  network_name: TRON (TRC-20)
                  amount: 250000000
                  status: creating
                  created_at: '2026-10-08T12:00:00Z'
                  exponent: 6
                reused: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/usdt/deposits/{id}:
    parameters:
    - name: id
      in: path
      description: Deposit order id.
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: getUsdtDeposit
      summary: Get a USDT deposit order
      description: One of your USDT deposit orders.
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deposit order.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposit:
                    $ref: '#/components/schemas/USDTDeposit'
              example:
                deposit:
                  id: 00000000-0000-4000-8000-000000000301
                  asset: USDTTRC20
                  network_name: TRON (TRC-20)
                  amount: 250000000
                  status: credited
                  pay_address: TXexampleAddressDoNotUse000000000000
                  pay_amount: '250.000000'
                  qr_payload: TXexampleAddressDoNotUse000000000000
                  expires_at: '2026-10-08T13:00:00Z'
                  created_at: '2026-10-08T12:00:00Z'
                  exponent: 6
                  credited_amount: 250000000
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/usdt/withdrawals/quote:
    get:
      operationId: getUsdtWithdrawalQuote
      summary: Quote a USDT withdrawal
      description: 'Fee for a USDT withdrawal on a network (fixed per network or cost-plus). The returned

        `quote_id` locks the fee for `ttl_sec` seconds when passed to `POST /v1/usdt/withdrawals`.

        '
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: asset
        in: query
        description: USDT network code.
        required: true
        schema:
          type: string
        example: USDTTRC20
      - name: amount
        in: query
        description: Amount the destination receives, USDT minor units.
        required: true
        schema:
          type: integer
          format: int64
          minimum: 1
        example: 500000000
      responses:
        '200':
          description: Quote.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  quote:
                    $ref: '#/components/schemas/WithdrawalQuoteFee'
                  asset:
                    type: string
                  network_name:
                    type: string
              example:
                quote:
                  amount: 500000000
                  debit: 501500000
                  fee: 1500000
                  net_amount: '500.000000'
                  exponent: 6
                  fee_usd: '1.50'
                  fee_usd_minor: 150
                  fee_fixed: true
                  fee_mode: fixed
                  quote_id: 00000000-0000-4000-8000-000000000751
                  expires_at: '2026-10-08T12:00:30Z'
                  ttl_sec: 30
                asset: USDTTRC20
                network_name: TRON (TRC-20)
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/usdt/withdrawals:
    post:
      operationId: createUsdtWithdrawal
      summary: Withdraw USDT
      description: "**Moved** (`503 usdt_withdraw_moved`): USDT withdrawals now use `POST /v1/mexc/withdrawals` with `coin:\
        \ \"USDT\"`.\n\n**Rules**\n\n- With an API key (`wallet.withdraw`, IP allow-list required): only to an address on\n\
        \  the account whitelist whose security cooldown has elapsed\n  (`422 address_not_whitelisted` / `422 address_cooldown`);\
        \ no `code` needed.\n- With a session: `code` (TOTP) is required when 2FA is enabled.\n- Approved KYC, the 24 h security\
        \ lock after a password/2FA change\n  (`403 security_lock`), plan limits (per transaction, daily, monthly) and the\
        \ network\n  fee apply. Above the automatic threshold the withdrawal waits for four-eyes review\n  (`auto: false`),\
        \ with the amount reserved.\n- `amount` is what the destination receives; `debit = amount + fee`.\n- Fee protection:\
        \ send `quote_id` (from the quote endpoint) and/or `max_fee` (minor\n  units). If the current fee is higher, nothing\
        \ is debited and the API answers\n  `409 withdraw_fee_changed` with `details.fee`.\n- Idempotency (permanent mode):\
        \ send `Idempotency-Key` (8–100 characters). A retry\n  returns the **same** withdrawal with `duplicate: true` and\
        \ the header\n  `Idempotent-Replayed: true`, without time limit; the same key with different data\n  returns `409\
        \ idempotency_conflict`; a concurrent retry returns\n  `409 idempotency_request_in_progress`.\n"
      tags:
      - Wallet
      x-arx-auth: wallet.withdraw
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.withdraw
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - asset
              - amount
              - to_address
              properties:
                asset:
                  type: string
                  description: USDT network code.
                  examples:
                  - USDTTRC20
                amount:
                  type: integer
                  format: int64
                  description: Amount the destination receives, USDT minor units.
                to_address:
                  type: string
                  description: Destination address (validated for the network).
                code:
                  type: string
                  description: TOTP code — session only.
                quote_id:
                  type: string
                  format: uuid
                  description: Fee quote to honor.
                max_fee:
                  type: integer
                  format: int64
                  minimum: 0
                  description: Maximum fee you accept, minor units.
            example:
              asset: USDTTRC20
              amount: 500000000
              to_address: TXexampleAddressDoNotUse000000000000
              quote_id: 00000000-0000-4000-8000-000000000751
              max_fee: 2000000
      responses:
        '200':
          description: Withdrawal created (or the existing one for this key).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalCreated'
              example:
                withdrawal:
                  id: 00000000-0000-4000-8000-000000000701
                  rail: mexc
                  currency: USDT
                  network: TRX
                  network_name: TRON (TRC-20)
                  to_address: TXexampleAddressDoNotUse000000000000
                  amount: 500000000
                  debit: 501500000
                  net_amount: '500.000000'
                  fee: '1.500000'
                  fee_usd: '1.50'
                  fee_mode: fixed
                  status: queued
                  in_review: false
                  cancellable: true
                  created_at: '2026-10-08T12:00:00Z'
                auto: true
                note: Sending — the status will update shortly.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/mexc/withdrawals/quote:
    get:
      operationId: getMexcWithdrawalQuote
      summary: Quote a crypto withdrawal (Pool ArandixBit)
      description: Fee, minimum/maximum and memo support for a crypto withdrawal routed through the Pool ArandixBit (BTC,
        ETH, …).
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: coin
        in: query
        description: Coin, e.g. `BTC`.
        required: true
        schema:
          type: string
        example: BTC
      - name: network
        in: query
        description: Network as listed in `/v1/rails/config`.
        required: true
        schema:
          type: string
        example: BTC
      - name: amount
        in: query
        description: Amount the destination receives, minor units.
        required: true
        schema:
          type: integer
          format: int64
          minimum: 1
        example: 1000000
      responses:
        '200':
          description: Quote.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  quote:
                    $ref: '#/components/schemas/WithdrawalQuoteFee'
                  coin:
                    type: string
                  network:
                    type: string
              example:
                quote:
                  amount: 1000000
                  debit: 1005000
                  fee: 5000
                  net_amount: 1000000
                  min: 100000
                  exponent: 8
                  memo_supported: false
                  network_name: Bitcoin
                  fee_usd: '3.12'
                  fee_usd_minor: 312
                  fee_fixed: false
                  fee_mode: cost_plus
                  quote_id: 00000000-0000-4000-8000-000000000752
                  expires_at: '2026-10-08T12:00:30Z'
                  ttl_sec: 30
                coin: BTC
                network: BTC
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/mexc/withdrawals:
    post:
      operationId: createMexcWithdrawal
      summary: Withdraw crypto (Pool ArandixBit)
      description: "Withdraws a crypto asset routed through the Pool ArandixBit. Same rules as the USDT withdrawal.\n\n**Rules**\n\
        \n- With an API key (`wallet.withdraw`, IP allow-list required): only to an address on\n  the account whitelist whose\
        \ security cooldown has elapsed\n  (`422 address_not_whitelisted` / `422 address_cooldown`); no `code` needed.\n-\
        \ With a session: `code` (TOTP) is required when 2FA is enabled.\n- Approved KYC, the 24 h security lock after a password/2FA\
        \ change\n  (`403 security_lock`), plan limits (per transaction, daily, monthly) and the network\n  fee apply. Above\
        \ the automatic threshold the withdrawal waits for four-eyes review\n  (`auto: false`), with the amount reserved.\n\
        - `amount` is what the destination receives; `debit = amount + fee`.\n- Fee protection: send `quote_id` (from the\
        \ quote endpoint) and/or `max_fee` (minor\n  units). If the current fee is higher, nothing is debited and the API\
        \ answers\n  `409 withdraw_fee_changed` with `details.fee`.\n- Idempotency (permanent mode): send `Idempotency-Key`\
        \ (8–100 characters). A retry\n  returns the **same** withdrawal with `duplicate: true` and the header\n  `Idempotent-Replayed:\
        \ true`, without time limit; the same key with different data\n  returns `409 idempotency_conflict`; a concurrent\
        \ retry returns\n  `409 idempotency_request_in_progress`.\n"
      tags:
      - Wallet
      x-arx-auth: wallet.withdraw
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.withdraw
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - coin
              - network
              - amount
              - to_address
              properties:
                coin:
                  type: string
                network:
                  type: string
                amount:
                  type: integer
                  format: int64
                  description: Amount the destination receives, minor units.
                to_address:
                  type: string
                memo:
                  type: string
                  maxLength: 120
                  description: Destination tag/memo when the network supports it.
                code:
                  type: string
                  description: TOTP code — session only.
                quote_id:
                  type: string
                  format: uuid
                  description: Fee quote to honor.
                max_fee:
                  type: integer
                  format: int64
                  minimum: 0
                  description: Maximum fee you accept, minor units.
            example:
              coin: BTC
              network: BTC
              amount: 1000000
              to_address: bc1qexampleaddressdonotuse0000000000000
              quote_id: 00000000-0000-4000-8000-000000000752
              max_fee: 6000
      responses:
        '200':
          description: Withdrawal created (or the existing one for this key).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalCreated'
              example:
                withdrawal:
                  id: 00000000-0000-4000-8000-000000000702
                  rail: mexc
                  currency: BTC
                  network: BTC
                  network_name: Bitcoin
                  to_address: bc1qexampleaddressdonotuse0000000000000
                  amount: 1000000
                  debit: 1005000
                  net_amount: '0.01000000'
                  fee: '0.00005000'
                  fee_usd: '3.12'
                  fee_mode: cost_plus
                  status: queued
                  in_review: false
                  cancellable: true
                  created_at: '2026-10-08T12:00:00Z'
                auto: true
                note: Sending — the status will update shortly.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/rails/withdrawals:
    get:
      operationId: listRailWithdrawals
      summary: List crypto withdrawals (rails)
      description: Your 50 most recent crypto withdrawals (including legacy USDT order-rail withdrawals), newest first.
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: rail
        in: query
        description: Only withdrawals of this rail.
        schema:
          type: string
          enum:
          - dubaicash
          - mexc
      responses:
        '200':
          description: Withdrawals.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  withdrawals:
                    type: array
                    items:
                      $ref: '#/components/schemas/RailWithdrawal'
              example:
                withdrawals:
                - id: 00000000-0000-4000-8000-000000000701
                  rail: mexc
                  currency: USDT
                  network: TRX
                  network_name: TRON (TRC-20)
                  to_address: TXexampleAddressDoNotUse000000000000
                  amount: 500000000
                  debit: 501500000
                  net_amount: '500.000000'
                  fee: '1.500000'
                  fee_usd: '1.50'
                  fee_mode: fixed
                  status: completed
                  in_review: false
                  cancellable: false
                  created_at: '2026-10-08T12:00:00Z'
                  txid: 0xexampletxid
                  finished_at: '2026-10-08T12:05:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/rails/withdrawals/{id}/cancel:
    parameters:
    - name: id
      in: path
      description: Withdrawal id.
      required: true
      schema:
        type: string
        format: uuid
    post:
      operationId: cancelRailWithdrawal
      summary: Cancel a withdrawal
      description: Cancels a withdrawal that has not been sent yet (`pending_review` or `queued`) and releases the amount.
        Requires `wallet.withdraw` (a read-only key cannot cancel).
      tags:
      - Wallet
      x-arx-auth: wallet.withdraw
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.withdraw
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Cancelled withdrawal.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  withdrawal:
                    $ref: '#/components/schemas/RailWithdrawal'
              example:
                withdrawal:
                  id: 00000000-0000-4000-8000-000000000701
                  rail: mexc
                  currency: USDT
                  network: TRX
                  network_name: TRON (TRC-20)
                  to_address: TXexampleAddressDoNotUse000000000000
                  amount: 500000000
                  debit: 501500000
                  net_amount: '500.000000'
                  fee: '1.500000'
                  fee_usd: '1.50'
                  fee_mode: fixed
                  status: cancelled
                  in_review: false
                  cancellable: false
                  created_at: '2026-10-08T12:00:00Z'
                  finished_at: '2026-10-08T12:05:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/crypto/deposits:
    get:
      operationId: listOnchainDeposits
      summary: List on-chain deposits
      description: Your 50 most recent deposits detected on-chain (own custody), newest first.
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deposits.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposits:
                    type: array
                    items:
                      $ref: '#/components/schemas/OnchainDeposit'
              example:
                deposits:
                - id: 00000000-0000-4000-8000-000000000311
                  user_id: 00000000-0000-4000-8000-000000000001
                  network: BTC
                  txid: exampletxid0000000000000000000000000000000000000000000000000000
                  vout_index: 0
                  address: bc1qexampleaddressdonotuse0000000000000
                  amount: 2500000
                  confirmations: 3
                  status: credited
                  created_at: '2026-10-07T09:30:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/crypto/withdrawals:
    get:
      operationId: listOnchainWithdrawals
      summary: List on-chain withdrawals
      description: Your 50 most recent on-chain withdrawals (own custody), newest first.
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Withdrawals.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  withdrawals:
                    type: array
                    items:
                      $ref: '#/components/schemas/OnchainWithdrawal'
              example:
                withdrawals:
                - id: 00000000-0000-4000-8000-000000000711
                  user_id: 00000000-0000-4000-8000-000000000001
                  network: BTC
                  to_address: bc1qexampleaddressdonotuse0000000000000
                  amount: 1000000
                  status: broadcast
                  txid: exampletxid1111111111111111111111111111111111111111111111111111
                  created_at: '2026-10-07T09:30:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/crypto/whitelist:
    get:
      operationId: listWithdrawalWhitelist
      summary: List whitelisted addresses
      description: 'Withdrawal addresses on the account whitelist, with the security cooldown (hours)

        and whether the whitelist is enforced for session withdrawals. Addresses are added

        from the app (session); API-key withdrawals always require a whitelisted address.

        '
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Whitelist.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  addresses:
                    type: array
                    items:
                      $ref: '#/components/schemas/WhitelistAddress'
                  cooldown_hours:
                    type: integer
                  enforced:
                    type: boolean
              example:
                addresses:
                - id: 00000000-0000-4000-8000-000000000321
                  user_id: 00000000-0000-4000-8000-000000000001
                  network: dc:USDTTRC20
                  address: TXexampleAddressDoNotUse000000000000
                  label: cold wallet
                  active: true
                  added_at: '2026-10-01T10:00:00Z'
                cooldown_hours: 24
                enforced: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/fiat/deposits:
    get:
      operationId: listFiatDeposits
      summary: List fiat deposits
      description: Your 50 most recent fiat deposits. Pending deposits include their payment instructions (PIX code or receiving
        account).
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deposits.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposits:
                    type: array
                    items:
                      $ref: '#/components/schemas/FiatDeposit'
              example:
                deposits:
                - id: 00000000-0000-4000-8000-000000000401
                  user_id: 00000000-0000-4000-8000-000000000001
                  currency: BRL
                  amount: 50000
                  method: pix
                  status: pending
                  created_at: '2026-10-08T12:00:00Z'
                  auto: false
                  reference: '0000000000'
                  instructions_fields:
                  - label: Amount
                    value: R$ 500,00
                  instructions:
                    Amount: R$ 500,00
                  qr:
                    payload: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/fiat/withdrawals:
    get:
      operationId: listFiatWithdrawals
      summary: List fiat withdrawals
      description: Your 50 most recent fiat withdrawals.
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Withdrawals.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  withdrawals:
                    type: array
                    items:
                      $ref: '#/components/schemas/FiatWithdrawal'
              example:
                withdrawals:
                - id: 00000000-0000-4000-8000-000000000721
                  currency: BRL
                  amount: 120000
                  method: pix
                  destination:
                    pix_key: payee@example.com
                  status: paid
                  payment_ref: E00000000202610081200EXAMPLE
                  has_payment_proof: false
                  created_at: '2026-10-07T09:30:00Z'
                  reviewed_at: '2026-10-07T09:30:00Z'
                  paid_at: '2026-10-07T09:30:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/pix/deposits:
    get:
      operationId: listPixDeposits
      summary: List PIX deposits
      description: Your BRL PIX deposits (up to 100 most recent). Pending ones include their payment instructions (PIX code
        or receiving account) and the deposit `reference`.
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deposits.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposits:
                    type: array
                    items:
                      $ref: '#/components/schemas/FiatDeposit'
              example:
                deposits:
                - id: 00000000-0000-4000-8000-000000000401
                  user_id: 00000000-0000-4000-8000-000000000001
                  currency: BRL
                  amount: 50000
                  method: pix
                  status: pending
                  created_at: '2026-10-08T12:00:00Z'
                  auto: false
                  reference: '0000000000'
                  instructions_fields:
                  - label: Amount
                    value: R$ 500,00
                  instructions:
                    Amount: R$ 500,00
                  qr:
                    payload: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    post:
      operationId: createPixDeposit
      summary: Create a PIX deposit charge
      description: "Creates a BRL deposit by PIX. The credit goes **only** to the account in context. The `auto`\nfield of\
        \ the response tells which flow applies, and the flow can change without notice, so\nalways branch on it:\n\n**Automatic\
        \ charge (`auto: true`):** `qr.payload` is a PIX copy-and-paste code for the exact\namount. Pay it before `expires_at`;\
        \ the credit is automatic after the provider confirms the\npayment (`deposit.credited`). An identical open charge\
        \ can be returned again (`reused: true`).\nNo service fee, unless the account is in a fee group.\n\n**Manual confirmation\
        \ (no `auto` field):** the response carries the receiving account\n(`instructions_fields`), a unique `reference` and,\
        \ when available, a PIX QR of that account\n(`qr`), which may not include the amount. Pay by PIX from an account in\
        \ the same name and CPF/CNPJ\nas the KYC profile, then send the payment proof with `POST /v1/pix/deposits/{id}/proof`\
        \ or in the app; the team confirms the deposit (up to\n12 hours) and `deposit.credited` is sent. Fee 0,10% (minimum\
        \ R$ 1,00), deducted from the credited\namount. With no receiving account the response is `422 method_unavailable`.\n\
        \nThe sandbox has no PIX provider, so it never returns an automatic charge. A fee group can replace\nthe minimum and\
        \ the fee and can restrict PIX to certain hours.\n\nSame rules in both flows:\n\n- approved KYC of the receiving account;\
        \ the charge carries the name/document of that\n  account's KYC profile;\n- from R$ 10,00 (`422 pix_amount_out_of_range`\
        \ on an automatic charge,\n  `422 deposit_below_minimum` on a manual one) to R$ 500.000,00 per PIX\n  (`422 pix_amount_out_of_range`);\n\
        - valid for up to 24 hours; a manual deposit without proof expires after that;\n- up to 5 open charges (`429 pix_too_many_open`);\n\
        - R$ 5.000.000,00 per account per day (`409 pix_daily_limit_exceeded`);\n- plan deposit limit (`409 deposit_limit_exceeded`;\
        \ `details`: `window`, `level`,\n  `plan`, `limit_usd_minor`, `used_usd_minor`, `remaining_usd_minor`,\n  `amount_usd_minor`).\n\
        \nA PIX returned by the payer's bank or a MED claim produces `deposit.reversed`.\n"
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - amount
              properties:
                amount:
                  type: integer
                  format: int64
                  description: Amount in BRL cents.
            example:
              amount: 50000
      responses:
        '200':
          description: 'Automatic charge (`auto: true`): pay `qr.payload` before `expires_at`. Manual flow (no `auto` field):
            `instructions_fields`, `reference` and, when available, a PIX QR of the receiving account; send the payment proof
            in the app.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixDepositCreated'
              example:
                deposit:
                  id: 00000000-0000-4000-8000-000000000401
                  user_id: 00000000-0000-4000-8000-000000000001
                  currency: BRL
                  amount: 50000
                  method: pix
                  status: pending
                  created_at: '2026-10-08T12:00:00Z'
                  auto: true
                  reference: '0000000000'
                  instructions_fields:
                  - label: Amount
                    value: R$ 500,00
                  instructions:
                    Amount: R$ 500,00
                  qr:
                    payload: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
                  pix_copy_paste: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
                  pix_expires_at: '2026-10-09T12:00:00Z'
                reference: '0000000000'
                instructions:
                  Amount: R$ 500,00
                instructions_fields:
                - label: Amount
                  value: R$ 500,00
                qr:
                  payload: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
                auto: true
                expires_at: '2026-10-09T12:00:00Z'
                reused: false
                next: Pay the PIX code; the deposit is credited automatically after confirmation.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/pix/deposits/{id}/proof:
    parameters:
    - name: id
      in: path
      description: Deposit id.
      required: true
      schema:
        type: string
        format: uuid
    post:
      operationId: uploadPixDepositProof
      summary: Send the proof of a manual PIX deposit
      description: 'Sends the payment proof of a pending manual PIX deposit of your account, as

        `multipart/form-data` with the `file` field (JPEG, PNG or PDF, up to 10 MB). The team

        then confirms the deposit and `deposit.credited` is sent. Sign the exact bytes of the

        multipart body. Sub-accounts use `POST /v1/partner/customers/{cid}/pix/deposits/{id}/proof`.

        '
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              properties:
                file:
                  type: string
                  format: binary
                  description: JPEG, PNG or PDF, up to 10 MB.
      responses:
        '200':
          description: Proof attached.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
              example:
                status: comprovante anexado
        '400':
          description: Invalid id, missing `file`, unsupported type or file too large.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Deposit not found, already processed, or not a PIX deposit of your account.
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/pix/deposits/{id}:
    parameters:
    - name: id
      in: path
      description: Deposit id.
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: getPixDeposit
      summary: Get a PIX deposit
      description: One PIX deposit of the account in context; any other id returns `404`.
      tags:
      - Wallet
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deposit.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposit:
                    $ref: '#/components/schemas/FiatDeposit'
              example:
                deposit:
                  id: 00000000-0000-4000-8000-000000000401
                  user_id: 00000000-0000-4000-8000-000000000001
                  currency: BRL
                  amount: 50000
                  method: pix
                  status: confirmed
                  created_at: '2026-10-08T12:00:00Z'
                  auto: false
                  reference: '0000000000'
                  credited_amount: 50000
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/webhooks/events:
    get:
      operationId: listWebhookEventTypes
      summary: List webhook event types
      description: Event types available to the account (partner accounts also get `partner.*`), the payload version, the
        signature header and the retry schedule (seconds between attempts).
      tags:
      - Webhooks
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Event types.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  events:
                    type: array
                    items:
                      $ref: '#/components/schemas/EventType'
                  partner:
                    type: boolean
                    description: '`true` for approved partner accounts.'
                  api_version:
                    type: string
                  signature_header:
                    type: string
                  retry_schedule_seconds:
                    type: array
                    items:
                      type: integer
                    description: Wait before each retry after the first (immediate) attempt.
              example:
                events:
                - deposit.credited
                - withdrawal.sent
                - withdrawal.completed
                - withdrawal.failed
                - order.filled
                - convert.completed
                - convert.pending_approval
                - convert.rejected
                - kyc.status_changed
                - deposit.reversed
                - withdrawal.returned
                partner: false
                api_version: '2026-10-07'
                signature_header: X-ARX-Signature
                retry_schedule_seconds:
                - 30
                - 60
                - 300
                - 900
                - 1800
                - 3600
                - 7200
                - 14400
                - 28800
                - 28800
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/webhooks/endpoints:
    get:
      operationId: listWebhookEndpoints
      summary: List webhook endpoints
      description: Your webhook endpoints (secrets are never returned).
      tags:
      - Webhooks
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Endpoints.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  endpoints:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebhookEndpoint'
              example:
                endpoints:
                - id: 00000000-0000-4000-8000-000000000801
                  user_id: 00000000-0000-4000-8000-000000000001
                  url: https://hooks.example.com/arandixbit
                  description: production listener
                  events:
                  - deposit.credited
                  - withdrawal.completed
                  - withdrawal.failed
                  include_customers: false
                  active: true
                  consecutive_failures: 0
                  last_success_at: '2026-10-08T12:00:00Z'
                  created_at: '2026-10-07T09:30:00Z'
                  updated_at: '2026-10-07T09:30:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    post:
      operationId: createWebhookEndpoint
      summary: Create a webhook endpoint
      description: 'Registers an HTTPS endpoint for the chosen events (`"*"` = every available event).

        The URL must use `https`, port 443 or 8443, and a public hostname (checked against

        internal/reserved addresses). Up to 10 endpoints per account (25 for partners).

        Partners can set `include_customers: true` to also receive sub-account events.

        The signing `secret` (`whsec_…`) is returned **once**.

        '
      tags:
      - Webhooks
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - url
              - events
              properties:
                url:
                  type: string
                  format: uri
                  description: https URL, port 443/8443, public hostname.
                events:
                  type: array
                  items:
                    $ref: '#/components/schemas/EventType'
                  description: Event types to receive; `["*"]` = all.
                description:
                  type: string
                  maxLength: 120
                include_customers:
                  type: boolean
                  description: 'Partners: receive sub-account events too.'
            example:
              url: https://hooks.example.com/arandixbit
              events:
              - deposit.credited
              - withdrawal.completed
              - withdrawal.failed
              description: production listener
      responses:
        '201':
          description: Endpoint created. Store the secret now.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                required:
                - endpoint
                - secret
                properties:
                  endpoint:
                    $ref: '#/components/schemas/WebhookEndpoint'
                  secret:
                    type: string
                    description: Signing secret, shown once.
                  note:
                    type: string
              example:
                endpoint:
                  id: 00000000-0000-4000-8000-000000000801
                  user_id: 00000000-0000-4000-8000-000000000001
                  url: https://hooks.example.com/arandixbit
                  description: production listener
                  events:
                  - deposit.credited
                  - withdrawal.completed
                  - withdrawal.failed
                  include_customers: false
                  active: true
                  consecutive_failures: 0
                  created_at: '2026-10-07T09:30:00Z'
                  updated_at: '2026-10-07T09:30:00Z'
                secret: whsec_0123456789abcdef0123456789abcdef0123456789abcdef
                note: 'Save the secret now: it will not be shown again.'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/webhooks/endpoints/{id}:
    parameters:
    - name: id
      in: path
      description: Webhook endpoint id.
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: getWebhookEndpoint
      summary: Get a webhook endpoint
      description: One of your webhook endpoints.
      tags:
      - Webhooks
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Endpoint.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                required:
                - endpoint
                properties:
                  endpoint:
                    $ref: '#/components/schemas/WebhookEndpoint'
              example:
                endpoint:
                  id: 00000000-0000-4000-8000-000000000801
                  user_id: 00000000-0000-4000-8000-000000000001
                  url: https://hooks.example.com/arandixbit
                  description: production listener
                  events:
                  - deposit.credited
                  - withdrawal.completed
                  - withdrawal.failed
                  include_customers: false
                  active: true
                  consecutive_failures: 0
                  last_success_at: '2026-10-08T12:00:00Z'
                  created_at: '2026-10-07T09:30:00Z'
                  updated_at: '2026-10-07T09:30:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    patch:
      operationId: updateWebhookEndpoint
      summary: Update a webhook endpoint
      description: 'Changes the URL, events, description, `include_customers` or `active`.

        Re-activating (`active: true`) resets the failure counter. The URL is validated

        again (format and anti-SSRF DNS check) only when it changes.

        '
      tags:
      - Webhooks
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                events:
                  type: array
                  items:
                    $ref: '#/components/schemas/EventType'
                description:
                  type: string
                  maxLength: 120
                include_customers:
                  type: boolean
                active:
                  type: boolean
            example:
              active: true
              events:
              - deposit.credited
              - deposit.reversed
              - withdrawal.completed
              - withdrawal.failed
      responses:
        '200':
          description: Updated endpoint.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                required:
                - endpoint
                properties:
                  endpoint:
                    $ref: '#/components/schemas/WebhookEndpoint'
              example:
                endpoint:
                  id: 00000000-0000-4000-8000-000000000801
                  user_id: 00000000-0000-4000-8000-000000000001
                  url: https://hooks.example.com/arandixbit
                  description: production listener
                  events:
                  - deposit.credited
                  - deposit.reversed
                  - withdrawal.completed
                  - withdrawal.failed
                  include_customers: false
                  active: true
                  consecutive_failures: 0
                  last_success_at: '2026-10-08T12:00:00Z'
                  created_at: '2026-10-07T09:30:00Z'
                  updated_at: '2026-10-08T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    delete:
      operationId: deleteWebhookEndpoint
      summary: Delete a webhook endpoint
      description: Deletes the endpoint. Its pending deliveries are marked `failed`.
      tags:
      - Webhooks
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deleted.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ok'
              example:
                ok: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/webhooks/endpoints/{id}/rotate-secret:
    parameters:
    - name: id
      in: path
      description: Webhook endpoint id.
      required: true
      schema:
        type: string
        format: uuid
    post:
      operationId: rotateWebhookSecret
      summary: Rotate the signing secret
      description: Generates a new signing secret, effective immediately for new attempts. The new secret is returned once.
      tags:
      - Webhooks
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: New secret.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                required:
                - endpoint
                - secret
                properties:
                  endpoint:
                    $ref: '#/components/schemas/WebhookEndpoint'
                  secret:
                    type: string
              example:
                endpoint:
                  id: 00000000-0000-4000-8000-000000000801
                  user_id: 00000000-0000-4000-8000-000000000001
                  url: https://hooks.example.com/arandixbit
                  description: production listener
                  events:
                  - deposit.credited
                  - withdrawal.completed
                  - withdrawal.failed
                  include_customers: false
                  active: true
                  consecutive_failures: 0
                  last_success_at: '2026-10-08T12:00:00Z'
                  created_at: '2026-10-07T09:30:00Z'
                  updated_at: '2026-10-07T09:30:00Z'
                secret: whsec_fedcba9876543210fedcba9876543210fedcba9876543210
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/webhooks/endpoints/{id}/test:
    parameters:
    - name: id
      in: path
      description: Webhook endpoint id.
      required: true
      schema:
        type: string
        format: uuid
    post:
      operationId: testWebhookEndpoint
      summary: Send a test event
      description: Sends a `webhook.test` event to the endpoint right now and returns the result of the attempt. Limited to
        5 tests per minute per account (`429` with `Retry-After`).
      tags:
      - Webhooks
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Attempt result.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  delivery_id:
                    type: string
                    format: uuid
                  event_id:
                    type: string
                    format: uuid
                  ok:
                    type: boolean
                  status_code:
                    type: integer
                  latency_ms:
                    type: integer
                  error:
                    type: string
                    description: Free text — use `error_code`.
                  error_code:
                    $ref: '#/components/schemas/WebhookErrorCode'
                  response:
                    type: string
                    description: First 1 KiB of the response body.
              example:
                delivery_id: 00000000-0000-4000-8000-000000000851
                event_id: 00000000-0000-4000-8000-000000000901
                ok: false
                status_code: 500
                latency_ms: 184
                error: HTTP 500
                error_code: http_status
                response: internal error
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/webhooks/endpoints/{id}/deliveries:
    parameters:
    - name: id
      in: path
      description: Webhook endpoint id.
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: listWebhookDeliveries
      summary: List deliveries of an endpoint
      description: Delivery log of the endpoint, newest first, with the last attempt result.
      tags:
      - Webhooks
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: status
        in: query
        description: Only deliveries in this status.
        schema:
          type: string
          enum:
          - pending
          - sending
          - delivered
          - failed
      - name: limit
        in: query
        description: Maximum deliveries (default 50, maximum 200).
        schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
      responses:
        '200':
          description: Deliveries.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deliveries:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebhookDelivery'
              example:
                deliveries:
                - id: 00000000-0000-4000-8000-000000000851
                  event_id: 00000000-0000-4000-8000-000000000901
                  event_type: deposit.credited
                  event_data:
                    id: 00000000-0000-4000-8000-000000000301
                    rail: usdt
                    currency: USDT
                    network: USDTTRC20
                    amount: 250000000
                    exponent: 6
                    status: credited
                  endpoint_id: 00000000-0000-4000-8000-000000000801
                  endpoint_user_id: 00000000-0000-4000-8000-000000000001
                  status: delivered
                  attempts: 1
                  last_status_code: 200
                  last_latency_ms: 92
                  last_response: ok
                  delivered_at: '2026-10-08T12:00:03Z'
                  created_at: '2026-10-08T12:00:00Z'
                  updated_at: '2026-10-08T12:00:03Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/webhooks/deliveries/{id}/attempts:
    parameters:
    - name: id
      in: path
      description: Delivery id.
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: listWebhookDeliveryAttempts
      summary: List attempts of a delivery
      description: 'Every attempt of one delivery: HTTP status, latency, stable `error_code` and the truncated response.'
      tags:
      - Webhooks
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Attempts.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  attempts:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebhookAttempt'
              example:
                attempts:
                - attempt: 1
                  status_code: 503
                  latency_ms: 10004
                  error: timeout
                  error_code: connect_timeout
                  created_at: '2026-10-08T12:00:00Z'
                - attempt: 2
                  status_code: 200
                  latency_ms: 88
                  response: ok
                  created_at: '2026-10-08T12:00:40Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/webhooks/deliveries/{id}/resend:
    parameters:
    - name: id
      in: path
      description: Delivery id.
      required: true
      schema:
        type: string
        format: uuid
    post:
      operationId: resendWebhookDelivery
      summary: Resend a delivery
      description: Queues a delivered or failed delivery again with the same event id (`X-ARX-Event-Id`), so your de-duplication
        still applies.
      tags:
      - Webhooks
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Queued.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ok'
              example:
                ok: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/me/api-keys:
    get:
      operationId: listApiKeys
      summary: List API keys
      description: 'Lists the active API keys of the logged-in user (secrets are never returned),

        together with the account limits and the scopes that can be granted.

        Use `customer_id` to list only the keys restricted to one of your sub-accounts.

        '
      tags:
      - Keys
      x-arx-auth: session
      security:
      - bearerAuth: []
      parameters:
      - name: customer_id
        in: query
        description: Only keys restricted to this sub-account (partners).
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Keys and limits.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  keys:
                    type: array
                    items:
                      $ref: '#/components/schemas/APIKey'
                  max:
                    type: integer
                    description: Maximum active keys per account.
                  max_ips:
                    type: integer
                    description: Maximum IPs per key.
                  scopes:
                    type: array
                    items:
                      $ref: '#/components/schemas/Scope'
                    description: Customer scopes.
                  partner_scopes:
                    type: array
                    items:
                      $ref: '#/components/schemas/Scope'
                    description: Partner scopes (approved partners only).
                  ttl_days_without_ip:
                    type: integer
                    description: Lifetime of a key without IP allow-list.
                  renew_window_days:
                    type: integer
                    description: Renewal opens this many days before expiry.
              example:
                keys:
                - id: 00000000-0000-4000-8000-000000000011
                  key_id: arxb_0123456789abcdef0123456789abcdef
                  note: market-maker bot
                  label: market-maker bot
                  scopes:
                  - account.read
                  - spot.read
                  - spot.trade
                  can_trade: true
                  ip_whitelist:
                  - 203.0.113.7
                  - 2001:db8::1
                  created_at: '2026-10-07T09:30:00Z'
                  updated_at: '2026-10-07T09:30:00Z'
                  last_used_at: '2026-10-08T12:00:00Z'
                  expired: false
                  request_count: 18342
                max: 30
                max_ips: 20
                scopes:
                - account.read
                - spot.read
                - spot.trade
                - convert.read
                - convert.execute
                - wallet.read
                - wallet.withdraw
                - webhooks
                partner_scopes:
                - partner.customers.read
                - partner.customers.write
                - partner.kyc
                - partner.wallet.read
                - partner.convert
                - partner.wallet.withdraw
                - partner.earn.read
                - partner.earn.write
                ttl_days_without_ip: 90
                renew_window_days: 5
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    post:
      operationId: createApiKey
      summary: Create an API key
      description: "Creates an API key. Requires an interactive session (never an API key), 2FA\nenabled on the account, the\
        \ current `password` and a TOTP `totp_code`. Staff\naccounts cannot create keys. A security email is sent to the account\
        \ owner.\n\n- Without `scopes` the key gets `account.read` only.\n- `wallet.withdraw` / `partner.wallet.withdraw`\
        \ require `ip_whitelist`.\n- Keys without `ip_whitelist` expire after 90 days; with it they do not expire.\n- Partners\
        \ can pass `customer_id` to create a key **restricted to one of their\n  sub-accounts** (customer scopes only, up\
        \ to 5 per sub-account).\n\nThe `secret` is returned **once**. Sign requests as described in\n*Authentication & request\
        \ signing*.\n"
      tags:
      - Keys
      x-arx-auth: session
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - note
              - password
              - totp_code
              properties:
                note:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: Label for the key.
                label:
                  type: string
                  deprecated: true
                  description: Alias of `note`.
                scopes:
                  type: array
                  items:
                    $ref: '#/components/schemas/Scope'
                  description: Scopes to grant. Empty = `[account.read]`.
                can_trade:
                  type: boolean
                  deprecated: true
                  description: 'Legacy: `account.read` + `spot.read` + `spot.trade`.'
                ip_whitelist:
                  type: array
                  maxItems: 20
                  items:
                    type: string
                  description: Allowed IPv4/IPv6 addresses.
                password:
                  type: string
                  format: password
                  description: Current account password.
                totp_code:
                  type: string
                  description: Current 6-digit TOTP code.
                customer_id:
                  type: string
                  format: uuid
                  description: 'Partners only: restrict the key to this active sub-account (otherwise `404`).'
            example:
              note: market-maker bot
              scopes:
              - account.read
              - spot.read
              - spot.trade
              ip_whitelist:
              - 203.0.113.7
              - 2001:db8::1
              password: correct horse battery staple
              totp_code: '123456'
      responses:
        '200':
          description: Key created. Store the secret now.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                required:
                - key
                - secret
                properties:
                  key:
                    $ref: '#/components/schemas/APIKey'
                  secret:
                    type: string
                    description: 64-character hex secret. Returned **only once** — store it securely.
                  note:
                    type: string
                    description: Localized reminder.
              example:
                key:
                  id: 00000000-0000-4000-8000-000000000011
                  key_id: arxb_0123456789abcdef0123456789abcdef
                  note: market-maker bot
                  label: market-maker bot
                  scopes:
                  - account.read
                  - spot.read
                  - spot.trade
                  can_trade: true
                  ip_whitelist:
                  - 203.0.113.7
                  - 2001:db8::1
                  created_at: '2026-10-07T09:30:00Z'
                  updated_at: '2026-10-07T09:30:00Z'
                  last_used_at: '2026-10-08T12:00:00Z'
                  expired: false
                  request_count: 18342
                secret: 0f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c4b5a69788796a5b4c3d2e1f0
                note: 'Save the secret now: it will not be shown again.'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/me/api-keys/{id}:
    parameters:
    - name: id
      in: path
      description: Key id (`APIKey.id`, not the public `key_id`).
      required: true
      schema:
        type: string
        format: uuid
    patch:
      operationId: updateApiKey
      summary: Update an API key
      description: 'Changes the note, IP allow-list or scopes of a key. Changing the IP list or

        **adding** a scope requires `password` + `totp_code`; removing scopes or changing

        the note does not. A key with a withdrawal scope must keep an IP allow-list.

        Adding IPs removes the expiry; removing all IPs sets a 90-day expiry.

        Expired keys cannot be edited (`409 api_key_expired`).

        '
      tags:
      - Keys
      x-arx-auth: session
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                note:
                  type: string
                  minLength: 1
                  maxLength: 64
                ip_whitelist:
                  type: array
                  maxItems: 20
                  items:
                    type: string
                scopes:
                  type: array
                  items:
                    $ref: '#/components/schemas/Scope'
                password:
                  type: string
                  format: password
                  description: Required when changing IPs or adding scopes.
                totp_code:
                  type: string
                  description: Required when changing IPs or adding scopes.
            example:
              note: market-maker bot (read only)
              scopes:
              - account.read
              - spot.read
      responses:
        '200':
          description: Updated key.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  key:
                    $ref: '#/components/schemas/APIKey'
              example:
                key:
                  id: 00000000-0000-4000-8000-000000000011
                  key_id: arxb_0123456789abcdef0123456789abcdef
                  note: market-maker bot (read only)
                  label: market-maker bot (read only)
                  scopes:
                  - account.read
                  - spot.read
                  can_trade: false
                  ip_whitelist:
                  - 203.0.113.7
                  - 2001:db8::1
                  created_at: '2026-10-07T09:30:00Z'
                  updated_at: '2026-10-07T09:30:00Z'
                  last_used_at: '2026-10-08T12:00:00Z'
                  expired: false
                  request_count: 18342
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    delete:
      operationId: revokeApiKey
      summary: Revoke an API key
      description: Revokes the key immediately. Requests signed with it fail from this moment on.
      tags:
      - Keys
      x-arx-auth: session
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Revoked.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ok'
              example:
                ok: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/me/api-keys/{id}/renew:
    parameters:
    - name: id
      in: path
      description: Key id.
      required: true
      schema:
        type: string
        format: uuid
    post:
      operationId: renewApiKey
      summary: Renew an API key
      description: 'Extends a key without IP allow-list by 90 days. Renewal opens 5 days before

        expiry (`409 api_key_renew_too_early` with `details.renewable_from` before that).

        Keys with an IP allow-list never expire (`409 api_key_no_expiry`); expired keys

        cannot be renewed (`409 api_key_expired`).

        '
      tags:
      - Keys
      x-arx-auth: session
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Renewed key.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  key:
                    $ref: '#/components/schemas/APIKey'
              example:
                key:
                  id: 00000000-0000-4000-8000-000000000011
                  key_id: arxb_0123456789abcdef0123456789abcdef
                  note: market-maker bot
                  label: market-maker bot
                  scopes:
                  - account.read
                  - spot.read
                  - spot.trade
                  can_trade: true
                  ip_whitelist: []
                  created_at: '2026-10-07T09:30:00Z'
                  updated_at: '2026-10-07T09:30:00Z'
                  last_used_at: '2026-10-08T12:00:00Z'
                  expired: false
                  request_count: 18342
                  expires_at: '2027-01-06T09:30:00Z'
                  renewed_at: '2026-10-08T12:00:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/me:
    get:
      operationId: getPartnerProfile
      summary: Get partner profile
      description: Partner id, the partner scopes and the partner webhook events. Returns `403 partner_required` when the
        account is not an approved partner.
      tags:
      - Partner
      x-arx-auth: partner.customers.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.customers.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Partner profile.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  partner_id:
                    type: string
                    format: uuid
                  partner:
                    type: boolean
                  scopes:
                    type: array
                    items:
                      $ref: '#/components/schemas/Scope'
                  events:
                    type: array
                    items:
                      $ref: '#/components/schemas/EventType'
              example:
                partner_id: 00000000-0000-4000-8000-000000000002
                partner: true
                scopes:
                - partner.customers.read
                - partner.customers.write
                - partner.kyc
                - partner.wallet.read
                - partner.convert
                - partner.wallet.withdraw
                events:
                - partner.customer.created
                - partner.customer.kyc_approved
                - partner.customer.kyc_rejected
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers:
    get:
      operationId: listPartnerCustomers
      summary: List sub-accounts
      description: Your sub-accounts, newest first, paginated by cursor.
      tags:
      - Partner
      x-arx-auth: partner.customers.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.customers.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/Cursor'
      - name: limit
        in: query
        description: Page size (default 50, maximum 200).
        schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
      responses:
        '200':
          description: One page of sub-accounts.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                required:
                - customers
                - next_cursor
                properties:
                  customers:
                    type: array
                    items:
                      $ref: '#/components/schemas/PartnerCustomer'
                  next_cursor:
                    type:
                    - string
                    - 'null'
              example:
                customers:
                - id: 00000000-0000-4000-8000-000000000501
                  email: customer.one@example.com
                  full_name: Ana Example
                  country: BR
                  external_ref: crm-10042
                  status: active
                  kyc_status: pending
                  created_at: '2026-10-08T12:00:00Z'
                next_cursor: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    post:
      operationId: createPartnerCustomer
      summary: Create a sub-account
      description: 'Creates an end-customer sub-account linked to your partner account. The email must

        be new (an existing account is never linked). `external_ref` is your own reference,

        unique per partner. Blocked jurisdictions return `451 jurisdiction_blocked`;

        duplicated email or reference returns `409 customer_exists`.


        The customer then completes KYC with Sumsub (see `POST

        /v1/partner/customers/{cid}/kyc/token`); partners can never approve KYC.

        '
      tags:
      - Partner
      x-arx-auth: partner.customers.write
      security:
      - bearerAuth: []
      - arxKey:
        - partner.customers.write
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              - full_name
              - country
              properties:
                email:
                  type: string
                  format: email
                  maxLength: 254
                full_name:
                  type: string
                  minLength: 2
                  maxLength: 120
                country:
                  type: string
                  pattern: ^[A-Za-z]{2}$
                  description: ISO 3166-1 alpha-2.
                external_ref:
                  type: string
                  pattern: ^[A-Za-z0-9_.:-]{1,64}$
                  description: Your reference (optional).
            example:
              email: customer.one@example.com
              full_name: Ana Example
              country: BR
              external_ref: crm-10042
      responses:
        '201':
          description: Sub-account created.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                required:
                - customer
                properties:
                  customer:
                    $ref: '#/components/schemas/PartnerCustomer'
              example:
                customer:
                  id: 00000000-0000-4000-8000-000000000501
                  email: customer.one@example.com
                  full_name: Ana Example
                  country: BR
                  external_ref: crm-10042
                  status: active
                  kyc_status: none
                  created_at: '2026-10-08T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '451':
          $ref: '#/components/responses/UnavailableForLegalReasons'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: getPartnerCustomer
      summary: Get a sub-account
      description: One of your sub-accounts.
      tags:
      - Partner
      x-arx-auth: partner.customers.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.customers.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Sub-account.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                required:
                - customer
                properties:
                  customer:
                    $ref: '#/components/schemas/PartnerCustomer'
              example:
                customer:
                  id: 00000000-0000-4000-8000-000000000501
                  email: customer.one@example.com
                  full_name: Ana Example
                  country: BR
                  external_ref: crm-10042
                  status: active
                  kyc_status: pending
                  created_at: '2026-10-08T12:00:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/kyc:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: getPartnerCustomerKyc
      summary: Get sub-account KYC status
      description: KYC status of the sub-account (verification by Sumsub). Read only.
      tags:
      - Partner
      x-arx-auth: partner.customers.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.customers.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: KYC status.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer_id:
                    type: string
                    format: uuid
                  kyc_status:
                    type: string
                    enum:
                    - none
                    - pending
                    - approved
                    - rejected
                  provider:
                    type: string
                    const: sumsub
              example:
                customer_id: 00000000-0000-4000-8000-000000000501
                kyc_status: pending
                provider: sumsub
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/kyc/token:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    post:
      operationId: createPartnerCustomerKycToken
      summary: Create a KYC SDK token
      description: Issues a Sumsub WebSDK access token so the end customer can complete KYC in your interface. Valid for `ttl_seconds`.
        The partner never approves KYC. Already approved → `409 kyc_already_approved`.
      tags:
      - Partner
      x-arx-auth: partner.kyc
      security:
      - bearerAuth: []
      - arxKey:
        - partner.kyc
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: SDK token.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer_id:
                    type: string
                    format: uuid
                  provider:
                    type: string
                    const: sumsub
                  token:
                    type: string
                  ttl_seconds:
                    type: integer
              example:
                customer_id: 00000000-0000-4000-8000-000000000501
                provider: sumsub
                token: _act-sbx-example-token-not-real
                ttl_seconds: 1800
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/close:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: getPartnerCustomerClosure
      summary: Check whether a sub-account can be closed
      description: 'Checklist before closing: `can_close` is true only when the sub-account is active, every balance

        (all currencies and wallets, including held amounts) is zero and nothing is open — spot orders,

        P2P orders, withdrawals in progress, deposits or payments under review. `blockers` lists what

        is still open. `closure` is the latest closure request, if any.

        '
      tags:
      - Partner
      x-arx-auth: partner.customers.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.customers.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Closure checklist.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                required:
                - customer_id
                - status
                - can_close
                - blockers
                properties:
                  customer_id:
                    type: string
                    format: uuid
                  status:
                    type: string
                  can_close:
                    type: boolean
                  blockers:
                    type: object
                    additionalProperties: true
                  closure:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      status:
                        type: string
                        enum:
                        - requested
                        - completed
                        - cancelled
                      reason:
                        type: string
                      requested_at:
                        type: string
                        format: date-time
                      completed_at:
                        type:
                        - string
                        - 'null'
                        format: date-time
                      cancelled_at:
                        type:
                        - string
                        - 'null'
                        format: date-time
                      auto_complete_at:
                        type:
                        - string
                        - 'null'
                        format: date-time
              example:
                customer_id: 00000000-0000-4000-8000-000000000501
                status: active
                can_close: false
                blockers:
                  spot_orders: 0
                  p2p_orders: 0
                  crypto_withdrawals: 0
                  fiat_withdrawals: 0
                  qr_payments: 0
                  fiat_deposits: 0
                  cash_orders: 0
                  balances:
                  - currency: USDT
                    amount_minor: 1250000
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    post:
      operationId: closePartnerCustomer
      summary: Close a sub-account
      description: 'Unlinks an end customer: the sub-account moves to `pending_closure` immediately — every

        operation on it stops (`403`), and its sessions and keys are revoked. The closure is then

        completed by our team (data required by law — KYC/AML, ledger, audit — is retained for 5 years).


        Only possible with a **zero balance in every currency** and nothing open; otherwise `409` with

        the reason (`open_orders`, `open_p2p`, `pending_withdrawals`, `pending_payments` or

        `balance_not_zero`). Withdraw or convert the funds first. Calling it again returns `200` with

        `already_requested: true`. Optional `reason` (up to 500 characters).

        '
      tags:
      - Partner
      x-arx-auth: partner.customers.write
      security:
      - bearerAuth: []
      - arxKey:
        - partner.customers.write
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  maxLength: 500
            example:
              reason: customer left the platform
      responses:
        '201':
          description: Closure requested.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer_id:
                    type: string
                    format: uuid
                  closure:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      status:
                        type: string
                        enum:
                        - requested
                        - completed
                        - cancelled
                      reason:
                        type: string
                      requested_at:
                        type: string
                        format: date-time
                      completed_at:
                        type:
                        - string
                        - 'null'
                        format: date-time
                      cancelled_at:
                        type:
                        - string
                        - 'null'
                        format: date-time
                      auto_complete_at:
                        type:
                        - string
                        - 'null'
                        format: date-time
                  status:
                    type: string
                    const: pending_closure
              example:
                customer_id: 00000000-0000-4000-8000-000000000501
                closure:
                  id: 00000000-0000-4000-8000-000000000551
                  status: requested
                  reason: 'partner: customer left the platform'
                  requested_at: '2026-10-08T12:00:00Z'
                  completed_at: null
                  cancelled_at: null
                  auto_complete_at: null
                status: pending_closure
        '200':
          description: Already requested.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer_id:
                    type: string
                    format: uuid
                  closure:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      status:
                        type: string
                        enum:
                        - requested
                        - completed
                        - cancelled
                      reason:
                        type: string
                      requested_at:
                        type: string
                        format: date-time
                      completed_at:
                        type:
                        - string
                        - 'null'
                        format: date-time
                      cancelled_at:
                        type:
                        - string
                        - 'null'
                        format: date-time
                      auto_complete_at:
                        type:
                        - string
                        - 'null'
                        format: date-time
                  status:
                    type: string
                    const: pending_closure
                  already_requested:
                    type: boolean
                    const: true
              example:
                customer_id: 00000000-0000-4000-8000-000000000501
                closure:
                  id: 00000000-0000-4000-8000-000000000551
                  status: requested
                  reason: 'partner: customer left the platform'
                  requested_at: '2026-10-08T12:00:00Z'
                  completed_at: null
                  cancelled_at: null
                  auto_complete_at: null
                status: pending_closure
                already_requested: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/balances:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: getPartnerCustomerBalances
      summary: Get sub-account balances
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. See `GET /v1/balances`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: account.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Balances.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  balances:
                    type: array
                    items:
                      $ref: '#/components/schemas/Balance'
              example:
                balances:
                - currency: USDT
                  kind: funding
                  exponent: 6
                  balance: 1250000000
                  held: 501500000
                  available: 748500000
                - currency: USDT
                  kind: spot
                  exponent: 6
                  balance: 300000000
                  held: 93675180
                  available: 206324820
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/history:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: listPartnerCustomerHistory
      summary: List sub-account history
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. Same parameters
        and response as `GET /v1/history`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: account.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/HistoryType'
      - $ref: '#/components/parameters/From'
      - $ref: '#/components/parameters/To'
      - $ref: '#/components/parameters/Cursor'
      - $ref: '#/components/parameters/HistoryLimit'
      responses:
        '200':
          description: One page of history.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                required:
                - items
                - next_cursor
                - from
                - to
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/HistoryItem'
                  next_cursor:
                    type:
                    - string
                    - 'null'
                    description: Cursor of the next page; `null` on the last page.
                  from:
                    type: string
                    format: date-time
                  to:
                    type: string
                    format: date-time
              example:
                items:
                - type: withdrawal
                  rail: mexc
                  id: 00000000-0000-4000-8000-000000000701
                  asset: USDT
                  amount: 500000000
                  exponent: 6
                  status: completed
                  created_at: '2026-10-08T12:00:00Z'
                  updated_at: '2026-10-08T12:05:00Z'
                  details:
                    network: TRX
                    txid: 0xexampletxid
                - type: deposit
                  rail: fiat
                  id: 00000000-0000-4000-8000-000000000401
                  asset: BRL
                  amount: 50000
                  exponent: 2
                  status: confirmed
                  created_at: '2026-10-07T09:30:00Z'
                  updated_at: '2026-10-07T09:30:00Z'
                  details:
                    method: pix
                next_cursor: MTc5MTQ2MDgwMDAwMDAwMDAwMHwwMDAwMDAwMC0wMDAwLTQwMDAtODAwMC0wMDAwMDAwMDA0MDE
                from: '2026-07-10T12:00:01Z'
                to: '2026-10-08T12:00:01Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/fixed-address:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: getPartnerCustomerFixedAddress
      summary: Get a sub-account fixed deposit address
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. Each sub-account
        has its own fixed address per coin and network; deposits to it are credited to the sub-account automatically (`deposit.credited`
        webhook to the partner). Requires approved KYC of the sub-account. See `GET /v1/crypto/fixed-address`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: coin
        in: query
        description: Coin.
        required: true
        schema:
          type: string
          examples:
          - USDT
      - name: network
        in: query
        description: Network name from `mexc_deposit.networks`.
        required: true
        schema:
          type: string
          examples:
          - Tron(TRC20)
      responses:
        '200':
          description: Fixed address.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  address:
                    type: object
                    required:
                    - coin
                    - network
                    - address
                    - warning
                    properties:
                      coin:
                        type: string
                      network:
                        type: string
                        description: Network name as listed in `mexc_deposit.networks`.
                      address:
                        type: string
                      memo:
                        type: string
                        description: Present only on networks that need a memo/tag — send it with every deposit.
                      warning:
                        type: string
                        description: Localized warning to show next to the address.
                      min_usd:
                        type: number
                        description: Smallest deposit credited, in USD, on any coin. A smaller confirmed deposit is not credited.
              example:
                address:
                  coin: USDT
                  network: Tron(TRC20)
                  address: TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE
                  warning: Send only USDT on the Tron(TRC20) network to this address. Another coin or network may lose the
                    funds.
                  min_usd: 10
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/fixed-deposits:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: listPartnerCustomerFixedDeposits
      summary: List sub-account deposits to fixed addresses
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. See `GET /v1/crypto/fixed-deposits`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deposits and addresses.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposits:
                    type: array
                    items:
                      type: object
                      required:
                      - id
                      - coin
                      - network
                      - amount
                      - tx_id
                      - status
                      - created_at
                      properties:
                        id:
                          type: string
                          format: uuid
                        coin:
                          type: string
                        network:
                          type: string
                        amount:
                          type: string
                          description: Decimal amount received (text, never a float).
                        tx_id:
                          type: string
                          description: On-chain transaction hash.
                        status:
                          type: string
                          enum:
                          - confirming
                          - credited
                          - rejected
                          - below_min
                          description: '`below_min`: confirmed but under the minimum deposit — not credited; the amount stays
                            with the exchange and support decides (refund or release).'
                        created_at:
                          type: string
                          format: date-time
                        credited_at:
                          type:
                          - string
                          - 'null'
                          format: date-time
                  addresses:
                    type: array
                    items:
                      type: object
                      required:
                      - coin
                      - network
                      - address
                      - warning
                      properties:
                        coin:
                          type: string
                        network:
                          type: string
                          description: Network name as listed in `mexc_deposit.networks`.
                        address:
                          type: string
                        memo:
                          type: string
                          description: Present only on networks that need a memo/tag — send it with every deposit.
                        warning:
                          type: string
                          description: Localized warning to show next to the address.
                        min_usd:
                          type: number
                          description: Smallest deposit credited, in USD, on any coin. A smaller confirmed deposit is not
                            credited.
              example:
                deposits:
                - id: 00000000-0000-4000-8000-000000000611
                  coin: USDT
                  network: Tron(TRC20)
                  amount: '250'
                  tx_id: 7c2d1f0b9a8e7d6c5b4a39281706f5e4d3c2b1a09f8e7d6c5b4a3928170605f4
                  status: credited
                  created_at: '2026-10-08T12:00:00Z'
                  credited_at: '2026-10-08T12:00:00Z'
                addresses:
                - coin: USDT
                  network: Tron(TRC20)
                  address: TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE
                  warning: Send only USDT on the Tron(TRC20) network to this address. Another coin or network may lose the
                    funds.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/customers/{cid}/invoice-addresses:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    post:
      operationId: createPartnerCustomerInvoiceAddress
      summary: Get a unique deposit address for one invoice
      description: 'Returns a deposit address used only by this invoice (`reference`) of the sub-account

        `{cid}`. Accepted: `BTC`/`BTC`, `USDT`/`TRC20`, and `USDT` or `USDC` on `BEP20`,

        `ERC20`, `POLYGON` and `SOL` (other names of the same network, such as `Solana`,

        `Ethereum(ERC20)` or `Polygon(MATIC)`, are accepted and answered with the short name).

        Native coins (ETH, BNB, POL, SOL) are not accepted. Any other combination answers

        `422 network_not_supported`. The address is new: never shared with

        another reference nor with the sub-account fixed address.


        Idempotent per partner, sub-account and `reference`: repeating the call returns the

        same address with `200` (`201` when it is created). The same `reference` with another

        coin or network answers `409 reference_conflict`.


        Deposits to the address are credited to the sub-account automatically, under the same

        rules as the fixed address (minimum deposit, fees, compliance, `deposit.credited`

        webhook with `invoice_address_id` and `reference`), and show up in

        `GET .../invoice-addresses/{id}` and `GET .../fixed-deposits`.


        **Coin check:** show the `coin` and the `network` of the response to the payer next to

        the address. Another coin sent there on another network is lost or held for manual

        review. Another supported coin of the SAME network (for example `USDC` sent to a

        `USDT`/`SOL` address) IS credited automatically, in the coin that arrived: always

        compare `coin` and amount of each deposit (and of the `deposit.credited` webhook) with

        the invoice before marking it paid.


        Requires scope `partner.wallet.write` (restricted key: `wallet.write`) and approved KYC

        of the sub-account. `429` when the partner or the sub-account passed the daily limit

        of new invoice addresses on that network; `503 crypto_deposit_unavailable` while the

        network cannot issue addresses or the feature is switched off.

        '
      tags:
      - Partner
      x-arx-auth: partner.wallet.write
      x-arx-restricted-scope: wallet.write
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.write
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - coin
              - network
              - reference
              properties:
                coin:
                  type: string
                  enum:
                  - BTC
                  - USDT
                  - USDC
                network:
                  type: string
                  enum:
                  - BTC
                  - TRC20
                  - BEP20
                  - ERC20
                  - POLYGON
                  - SOL
                reference:
                  type: string
                  pattern: ^[A-Za-z0-9._:-]{1,64}$
                  description: Partner invoice reference.
            example:
              coin: USDT
              network: TRC20
              reference: inv-2026-000123
      responses:
        '200':
          description: Address already issued for this reference.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceAddressResponse'
        '201':
          description: Address created.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceAddressResponse'
              example:
                invoice_address:
                  id: 00000000-0000-4000-8000-000000000a01
                  coin: USDT
                  network: TRC20
                  address: TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE
                  reference: inv-2026-000123
                  created_at: '2026-11-14T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/invoice-addresses/{id}:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    - name: id
      in: path
      description: Invoice address id.
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: getPartnerCustomerInvoiceAddress
      summary: Get an invoice address and its deposits
      description: The invoice address of the sub-account `{cid}` and the deposits seen on it (newest first, up to 100). Addresses
        of any other sub-account return `404`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Invoice address with deposits.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceAddressResponse'
              example:
                invoice_address:
                  id: 00000000-0000-4000-8000-000000000a01
                  coin: USDT
                  network: TRC20
                  address: TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE
                  reference: inv-2026-000123
                  created_at: '2026-11-14T12:00:00Z'
                  deposits:
                  - tx_id: 7c2d1f0b9a8e7d6c5b4a39281706f5e4d3c2b1a09f8e7d6c5b4a3928170605f4
                    amount: '100'
                    status: credited
                    created_at: '2026-11-14T12:05:00Z'
                    credited_at: '2026-11-14T12:05:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/customers/{cid}/usdt/deposits:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: listPartnerCustomerUsdtDeposits
      summary: List sub-account USDT deposit orders
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. See `GET /v1/usdt/deposits`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deposit orders.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposits:
                    type: array
                    items:
                      $ref: '#/components/schemas/USDTDeposit'
              example:
                deposits:
                - id: 00000000-0000-4000-8000-000000000301
                  asset: USDTTRC20
                  network_name: TRON (TRC-20)
                  amount: 250000000
                  status: open
                  pay_address: TXexampleAddressDoNotUse000000000000
                  pay_amount: '250.000000'
                  qr_payload: TXexampleAddressDoNotUse000000000000
                  expires_at: '2026-10-08T13:00:00Z'
                  created_at: '2026-10-08T12:00:00Z'
                  exponent: 6
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    post:
      operationId: createPartnerCustomerUsdtDeposit
      summary: Create a sub-account USDT deposit order
      description: '**Paused** (`503 usdt_deposit_paused`): use the sub-account fixed address (`GET /v1/partner/customers/{cid}/fixed-address`).
        Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. Requires approved KYC of
        the sub-account; the credit goes to the sub-account. See `POST /v1/usdt/deposits`.'
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - asset
              - amount
              properties:
                asset:
                  type: string
                  description: USDT network code.
                  examples:
                  - USDTTRC20
                amount:
                  type: integer
                  format: int64
                  description: USDT minor units.
            example:
              asset: USDTTRC20
              amount: 250000000
      responses:
        '200':
          description: Deposit order.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposit:
                    $ref: '#/components/schemas/USDTDeposit'
                  reused:
                    type: boolean
              example:
                deposit:
                  id: 00000000-0000-4000-8000-000000000301
                  asset: USDTTRC20
                  network_name: TRON (TRC-20)
                  amount: 250000000
                  status: open
                  pay_address: TXexampleAddressDoNotUse000000000000
                  pay_amount: '250.000000'
                  qr_payload: TXexampleAddressDoNotUse000000000000
                  expires_at: '2026-10-08T13:00:00Z'
                  created_at: '2026-10-08T12:00:00Z'
                  exponent: 6
                reused: false
        '202':
          description: Order being created at the provider.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposit:
                    $ref: '#/components/schemas/USDTDeposit'
                  reused:
                    type: boolean
              example:
                deposit:
                  id: 00000000-0000-4000-8000-000000000301
                  asset: USDTTRC20
                  network_name: TRON (TRC-20)
                  amount: 250000000
                  status: creating
                  pay_address: TXexampleAddressDoNotUse000000000000
                  pay_amount: '250.000000'
                  qr_payload: TXexampleAddressDoNotUse000000000000
                  expires_at: '2026-10-08T13:00:00Z'
                  created_at: '2026-10-08T12:00:00Z'
                  exponent: 6
                reused: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/withdrawals:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: listPartnerCustomerWithdrawals
      summary: List sub-account withdrawals
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. See `GET /v1/rails/withdrawals`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: rail
        in: query
        description: Only withdrawals of this rail.
        schema:
          type: string
          enum:
          - dubaicash
          - mexc
      responses:
        '200':
          description: Withdrawals.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  withdrawals:
                    type: array
                    items:
                      $ref: '#/components/schemas/RailWithdrawal'
              example:
                withdrawals:
                - id: 00000000-0000-4000-8000-000000000701
                  rail: mexc
                  currency: USDT
                  network: TRX
                  network_name: TRON (TRC-20)
                  to_address: TXexampleAddressDoNotUse000000000000
                  amount: 500000000
                  debit: 501500000
                  net_amount: '500.000000'
                  fee: '1.500000'
                  fee_usd: '1.50'
                  fee_mode: fixed
                  status: queued
                  in_review: false
                  cancellable: true
                  created_at: '2026-10-08T12:00:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/whitelist:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: listPartnerCustomerWhitelist
      summary: List sub-account whitelist
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. See `GET /v1/crypto/whitelist`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Whitelist.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  addresses:
                    type: array
                    items:
                      $ref: '#/components/schemas/WhitelistAddress'
                  cooldown_hours:
                    type: integer
                  enforced:
                    type: boolean
              example:
                addresses:
                - id: 00000000-0000-4000-8000-000000000321
                  user_id: 00000000-0000-4000-8000-000000000501
                  network: dc:USDTTRC20
                  address: TXexampleAddressDoNotUse000000000000
                  label: cold wallet
                  active: true
                  added_at: '2026-10-01T10:00:00Z'
                cooldown_hours: 24
                enforced: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    post:
      operationId: addPartnerCustomerWhitelistAddress
      summary: Whitelist an address for a sub-account
      description: 'Adds a withdrawal address to the sub-account whitelist. The security cooldown starts

        now; withdrawals to the address are accepted only after it elapses. Audited with the

        partner as actor. API key with IP allow-list only.

        '
      tags:
      - Partner
      x-arx-auth: partner.wallet.withdraw
      x-arx-restricted-scope: wallet.withdraw
      security:
      - arxKey:
        - partner.wallet.withdraw
        arxTimestamp: []
        arxSignature: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - network
              - address
              properties:
                network:
                  type: string
                  description: Network key, e.g. `dc:USDTTRC20`.
                  examples:
                  - dc:USDTTRC20
                address:
                  type: string
                label:
                  type: string
            example:
              network: dc:USDTTRC20
              address: TXexampleAddressDoNotUse000000000000
              label: customer payout
      responses:
        '200':
          description: Whitelisted address.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  address:
                    $ref: '#/components/schemas/WhitelistAddress'
                  cooldown_hours:
                    type: integer
              example:
                address:
                  id: 00000000-0000-4000-8000-000000000321
                  user_id: 00000000-0000-4000-8000-000000000501
                  network: dc:USDTTRC20
                  address: TXexampleAddressDoNotUse000000000000
                  label: customer payout
                  active: true
                  added_at: '2026-10-08T12:00:00Z'
                cooldown_hours: 24
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/mexc/withdrawals/quote:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: getPartnerCustomerMexcWithdrawalQuote
      summary: Quote a sub-account crypto withdrawal
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. Fee, minimum/maximum
        and memo support, USDT included. See `GET /v1/mexc/withdrawals/quote`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: coin
        in: query
        description: Coin, e.g. `USDT`.
        required: true
        schema:
          type: string
        example: USDT
      - name: network
        in: query
        description: Network code from `mexc_withdraw.networks`.
        required: true
        schema:
          type: string
        example: TRX
      - name: amount
        in: query
        description: Amount the destination receives, minor units.
        required: true
        schema:
          type: integer
          format: int64
          minimum: 1
        example: 500000000
      responses:
        '200':
          description: Quote.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  quote:
                    $ref: '#/components/schemas/WithdrawalQuoteFee'
                  coin:
                    type: string
                  network:
                    type: string
              example:
                quote:
                  amount: 500000000
                  debit: 501500000
                  fee: 1500000
                  net_amount: 500000000
                  exponent: 6
                coin: USDT
                network: TRX
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/mexc/withdrawals:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    post:
      operationId: createPartnerCustomerMexcWithdrawal
      summary: Withdraw crypto from a sub-account
      description: "Withdraws a crypto asset (USDT included) from the sub-account through the Pool ArandixBit. API key with\n\
        IP allow-list only, and only to an address on the **sub-account** whitelist\n(`mexc:<COIN>:<network>`) whose cooldown\
        \ has elapsed. The sub-account's KYC, security\nlock, plan limits and fees apply. Same body and responses as `POST\
        \ /v1/mexc/withdrawals`\n(without `code`).\n\n**Rules**\n\n- With an API key (`wallet.withdraw`, IP allow-list required):\
        \ only to an address on\n  the account whitelist whose security cooldown has elapsed\n  (`422 address_not_whitelisted`\
        \ / `422 address_cooldown`); no `code` needed.\n- With a session: `code` (TOTP) is required when 2FA is enabled.\n\
        - Approved KYC, the 24 h security lock after a password/2FA change\n  (`403 security_lock`), plan limits (per transaction,\
        \ daily, monthly) and the network\n  fee apply. Above the automatic threshold the withdrawal waits for four-eyes review\n\
        \  (`auto: false`), with the amount reserved.\n- `amount` is what the destination receives; `debit = amount + fee`.\n\
        - Fee protection: send `quote_id` (from the quote endpoint) and/or `max_fee` (minor\n  units). If the current fee\
        \ is higher, nothing is debited and the API answers\n  `409 withdraw_fee_changed` with `details.fee`.\n- Idempotency\
        \ (permanent mode): send `Idempotency-Key` (8–100 characters). A retry\n  returns the **same** withdrawal with `duplicate:\
        \ true` and the header\n  `Idempotent-Replayed: true`, without time limit; the same key with different data\n  returns\
        \ `409 idempotency_conflict`; a concurrent retry returns\n  `409 idempotency_request_in_progress`.\n"
      tags:
      - Partner
      x-arx-auth: partner.wallet.withdraw
      x-arx-restricted-scope: wallet.withdraw
      security:
      - arxKey:
        - partner.wallet.withdraw
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - coin
              - network
              - amount
              - to_address
              properties:
                coin:
                  type: string
                network:
                  type: string
                amount:
                  type: integer
                  format: int64
                  description: Amount the destination receives, minor units.
                to_address:
                  type: string
                memo:
                  type: string
                  maxLength: 120
                quote_id:
                  type: string
                  format: uuid
                  description: Fee quote to honor.
                max_fee:
                  type: integer
                  format: int64
                  minimum: 0
                  description: Maximum fee you accept, minor units.
            example:
              coin: USDT
              network: TRX
              amount: 500000000
              to_address: TXexampleAddressDoNotUse000000000000
              max_fee: 2000000
      responses:
        '200':
          description: Withdrawal created (or the existing one for this key).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalCreated'
              example:
                withdrawal:
                  id: 00000000-0000-4000-8000-000000000701
                  rail: mexc
                  currency: USDT
                  network: TRX
                  network_name: TRON (TRC-20)
                  to_address: TXexampleAddressDoNotUse000000000000
                  amount: 500000000
                  debit: 501500000
                  net_amount: '500.000000'
                  fee: '1.500000'
                  fee_usd: '1.50'
                  fee_mode: fixed
                  status: queued
                  in_review: false
                  cancellable: true
                  created_at: '2026-10-08T12:00:00Z'
                auto: true
                note: Sending — the status will update shortly.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/usdt/withdrawals:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    post:
      operationId: createPartnerCustomerUsdtWithdrawal
      summary: Withdraw USDT from a sub-account
      description: "**Moved** (`503 usdt_withdraw_moved`): use `POST /v1/partner/customers/{cid}/mexc/withdrawals`\nwith `coin:\
        \ \"USDT\"`.\n\nWithdraws USDT from the sub-account. API key with IP allow-list only, and only to an\naddress on the\
        \ **sub-account** whitelist whose cooldown has elapsed. The sub-account's\nKYC, security lock, plan limits and fees\
        \ apply. Same body and responses as\n`POST /v1/usdt/withdrawals` (without `code`).\n\n**Rules**\n\n- With an API key\
        \ (`wallet.withdraw`, IP allow-list required): only to an address on\n  the account whitelist whose security cooldown\
        \ has elapsed\n  (`422 address_not_whitelisted` / `422 address_cooldown`); no `code` needed.\n- With a session: `code`\
        \ (TOTP) is required when 2FA is enabled.\n- Approved KYC, the 24 h security lock after a password/2FA change\n  (`403\
        \ security_lock`), plan limits (per transaction, daily, monthly) and the network\n  fee apply. Above the automatic\
        \ threshold the withdrawal waits for four-eyes review\n  (`auto: false`), with the amount reserved.\n- `amount` is\
        \ what the destination receives; `debit = amount + fee`.\n- Fee protection: send `quote_id` (from the quote endpoint)\
        \ and/or `max_fee` (minor\n  units). If the current fee is higher, nothing is debited and the API answers\n  `409\
        \ withdraw_fee_changed` with `details.fee`.\n- Idempotency (permanent mode): send `Idempotency-Key` (8–100 characters).\
        \ A retry\n  returns the **same** withdrawal with `duplicate: true` and the header\n  `Idempotent-Replayed: true`,\
        \ without time limit; the same key with different data\n  returns `409 idempotency_conflict`; a concurrent retry returns\n\
        \  `409 idempotency_request_in_progress`.\n"
      tags:
      - Partner
      x-arx-auth: partner.wallet.withdraw
      x-arx-restricted-scope: wallet.withdraw
      security:
      - arxKey:
        - partner.wallet.withdraw
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - asset
              - amount
              - to_address
              properties:
                asset:
                  type: string
                  examples:
                  - USDTTRC20
                amount:
                  type: integer
                  format: int64
                  description: Amount the destination receives, USDT minor units.
                to_address:
                  type: string
                quote_id:
                  type: string
                  format: uuid
                  description: Fee quote to honor.
                max_fee:
                  type: integer
                  format: int64
                  minimum: 0
                  description: Maximum fee you accept, minor units.
            example:
              asset: USDTTRC20
              amount: 500000000
              to_address: TXexampleAddressDoNotUse000000000000
              max_fee: 2000000
      responses:
        '200':
          description: Withdrawal created (or the existing one for this key).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalCreated'
              example:
                withdrawal:
                  id: 00000000-0000-4000-8000-000000000701
                  rail: mexc
                  currency: USDT
                  network: TRX
                  network_name: TRON (TRC-20)
                  to_address: TXexampleAddressDoNotUse000000000000
                  amount: 500000000
                  debit: 501500000
                  net_amount: '500.000000'
                  fee: '1.500000'
                  fee_usd: '1.50'
                  fee_mode: fixed
                  status: queued
                  in_review: false
                  cancellable: true
                  created_at: '2026-10-08T12:00:00Z'
                auto: true
                note: Sending — the status will update shortly.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/convert/quote:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    post:
      operationId: createPartnerCustomerConvertQuote
      summary: Quote a conversion for a sub-account
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. Uses the sub-account's
        plan, fees and limits. See `POST /v1/convert/quote`.
      tags:
      - Partner
      x-arx-auth: partner.convert
      x-arx-restricted-scope: convert.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.convert
        arxTimestamp: []
        arxSignature: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConvertRequest'
            example:
              from: USDT
              to: BTC
              amount: 100000000
      responses:
        '200':
          description: Quote.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertQuote'
              example:
                quote_id: 00000000-0000-4000-8000-000000000651
                expires_at: '2026-10-08T12:00:15Z'
                from: USDT
                to: BTC
                amount: 100000000
                from_exp: 6
                to_exp: 8
                route: house
                mode: house
                legs:
                - venue: house
                  from: USDT
                  to: BTC
                  in: 100000000
                  est_out: 159500
                  spread_bps: 20
                split:
                  house: 100000000
                  mexc: 0
                requires_approval: false
                fee_bps: 50
                fee: 801
                fee_level: verified
                fee_plan: Verified
                fee_class: crypto
                house_spread_bps: 20
                fiat_spread_bps: 0
                slippage_bps: 30
                est_in: 100000000
                est_out: 159500
                worst_out: 159021
                min_receive: 159021
                min_amount: 1000000
                rate: '0.0000159500'
                usd_minor: 10000
                limits:
                  class: crypto
                  level: verified
                  plan: Verified
                  max_tx_usd_minor: 1000000
                  fee_bps: 50
                  allowed: true
                  daily:
                    limit_usd_minor: 2500000
                    used_usd_minor: 10000
                    unlimited: false
                    remaining_usd_minor: 2490000
                  monthly:
                    limit_usd_minor: 25000000
                    used_usd_minor: 310000
                    unlimited: false
                    remaining_usd_minor: 24690000
                  windows:
                    daily: rolling_24h
                    monthly: calendar_month_utc
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/convert:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    post:
      operationId: executePartnerCustomerConvert
      summary: Execute a conversion for a sub-account
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. Uses the sub-account's
        KYC, limits and fiat approval flow; idempotency in permanent mode (8–100 characters, `409 idempotency_conflict` on
        mismatch). See `POST /v1/convert`.
      tags:
      - Partner
      x-arx-auth: partner.convert
      x-arx-restricted-scope: convert.execute
      security:
      - bearerAuth: []
      - arxKey:
        - partner.convert
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConvertRequest'
            example:
              from: USDT
              to: BTC
              amount: 100000000
              quote_id: 00000000-0000-4000-8000-000000000651
      responses:
        '200':
          description: Executed.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertOrder'
              example:
                ok: true
                id: 00000000-0000-4000-8000-000000000601
                status: completed
                from: USDT
                to: BTC
                amount: 100000000
                from_exp: 6
                to_exp: 8
                route: house
                needs_approval: false
                min_receive: 158900
                filled_in: 100000000
                amount_out: 159500
                fee: 1611
                rate: 1.595e-05
                residual_currency: null
                residual_amount: 0
                error: null
                expires_at: null
                created_at: '2026-10-08T12:00:00Z'
                updated_at: '2026-10-08T12:00:03Z'
                legs:
                - venue: house
                  from: USDT
                  to: BTC
                  filled_in: 100000000
                  amount_out: 159500
                  status: filled
                limit_class: crypto
                usd_minor: 10000
                tx_id: 00000000-0000-4000-8000-000000000602
                in: 100000000
                out: 159500
                replayed: false
        '202':
          description: Pending approval (fiat) or still executing.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConvertOrder'
              example:
                ok: false
                id: 00000000-0000-4000-8000-000000000601
                status: pending_approval
                from: USDT
                to: BTC
                amount: 100000000
                from_exp: 6
                to_exp: 8
                route: house
                needs_approval: true
                min_receive: 158900
                filled_in: 0
                amount_out: 0
                fee: 0
                rate: 1.595e-05
                residual_currency: null
                residual_amount: 0
                error: null
                expires_at: null
                created_at: '2026-10-08T12:00:00Z'
                updated_at: '2026-10-08T12:00:03Z'
                legs:
                - venue: house
                  from: USDT
                  to: BTC
                  filled_in: 100000000
                  amount_out: 159500
                  status: filled
                limit_class: crypto
                usd_minor: 10000
                tx_id: ''
                in: 0
                out: 0
                replayed: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/convert/orders:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: listPartnerCustomerConvertOrders
      summary: List sub-account conversions
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. See `GET /v1/convert/orders`.
      tags:
      - Partner
      x-arx-auth: partner.convert
      x-arx-restricted-scope: convert.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.convert
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Conversions.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      $ref: '#/components/schemas/ConvertOrder'
              example:
                orders:
                - ok: true
                  id: 00000000-0000-4000-8000-000000000601
                  status: completed
                  from: USDT
                  to: BTC
                  amount: 100000000
                  from_exp: 6
                  to_exp: 8
                  route: house
                  needs_approval: false
                  min_receive: 158900
                  filled_in: 100000000
                  amount_out: 159500
                  fee: 1611
                  rate: 1.595e-05
                  residual_currency: null
                  residual_amount: 0
                  error: null
                  expires_at: null
                  created_at: '2026-10-08T12:00:00Z'
                  updated_at: '2026-10-08T12:00:03Z'
                  legs:
                  - venue: house
                    from: USDT
                    to: BTC
                    filled_in: 100000000
                    amount_out: 159500
                    status: filled
                  limit_class: crypto
                  usd_minor: 10000
                  tx_id: 00000000-0000-4000-8000-000000000602
                  in: 100000000
                  out: 159500
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/statement:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: getPartnerCustomerStatement
      summary: Get sub-account statement
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. Same filters and
        formats (JSON/CSV) as `GET /v1/statement`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: account.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/StatementTypeFilter'
      - $ref: '#/components/parameters/StatementCurrency'
      - $ref: '#/components/parameters/From'
      - $ref: '#/components/parameters/To'
      - $ref: '#/components/parameters/Cursor'
      - $ref: '#/components/parameters/StatementLimit'
      - $ref: '#/components/parameters/StatementFormat'
      responses:
        '200':
          description: One page of the statement (JSON or CSV).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            X-Next-Cursor:
              $ref: '#/components/headers/X-Next-Cursor'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementPage'
              example:
                lines:
                - id: '9184'
                  entry_id: 9184
                  tx_id: 00000000-0000-4000-8000-000000001001
                  date: '2026-10-08T12:00:03Z'
                  type: trade
                  rail: spot
                  wallet: spot
                  currency: USDT
                  exponent: 6
                  amount: -93675180
                  balance_after: 206324820
                  reference: spot_trade:00000000-0000-4000-8000-000000001101
                - id: '9183'
                  entry_id: 9183
                  tx_id: 00000000-0000-4000-8000-000000001002
                  date: '2026-10-08T12:00:00Z'
                  type: withdrawal
                  rail: mexc
                  wallet: funding
                  currency: USDT
                  exponent: 6
                  amount: -500000000
                  balance_after: 750000000
                  reference: rail_wd:00000000-0000-4000-8000-000000000701
                - id: 9183:fee
                  entry_id: 9183
                  tx_id: 00000000-0000-4000-8000-000000001002
                  date: '2026-10-08T12:00:00Z'
                  type: fee
                  wallet: funding
                  currency: USDT
                  exponent: 6
                  amount: -1500000
                  balance_after: 748500000
                  reference: rail_wd:00000000-0000-4000-8000-000000000701
                next_cursor: null
                from: '2026-07-10T12:00:01Z'
                to: '2026-10-08T12:00:01Z'
            text/csv:
              schema:
                type: string
                description: 'Columns: date,id,type,rail,wallet,currency,amount_minor,amount,balance_after_minor,balance_after,reference,tx_id'
              example: 'date,id,type,rail,wallet,currency,amount_minor,amount,balance_after_minor,balance_after,reference,tx_id

                2026-10-08T12:00:00Z,9183,withdrawal,mexc,funding,USDT,-500000000,-500.000000,750000000,750.000000,rail_wd:00000000-0000-4000-8000-000000000701,00000000-0000-4000-8000-000000001002

                '
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/pix/deposits:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: listPartnerCustomerPixDeposits
      summary: List sub-account PIX deposits
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. See `GET /v1/pix/deposits`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deposits.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposits:
                    type: array
                    items:
                      $ref: '#/components/schemas/FiatDeposit'
              example:
                deposits:
                - id: 00000000-0000-4000-8000-000000000401
                  user_id: 00000000-0000-4000-8000-000000000501
                  currency: BRL
                  amount: 50000
                  method: pix
                  status: pending
                  created_at: '2026-10-08T12:00:00Z'
                  auto: false
                  reference: '0000000000'
                  instructions_fields:
                  - label: Amount
                    value: R$ 500,00
                  instructions:
                    Amount: R$ 500,00
                  qr:
                    payload: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    post:
      operationId: createPartnerCustomerPixDeposit
      summary: Create a sub-account PIX charge
      description: "Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. The sub-account's\
        \ own approved KYC is required and the credit goes only to the sub-account.\n\nCreates a BRL deposit by PIX. The credit\
        \ goes **only** to the account in context. The `auto`\nfield of the response tells which flow applies, and the flow\
        \ can change without notice, so\nalways branch on it:\n\n**Automatic charge (`auto: true`):** `qr.payload` is a PIX\
        \ copy-and-paste code for the exact\namount. Pay it before `expires_at`; the credit is automatic after the provider\
        \ confirms the\npayment (`deposit.credited`). An identical open charge can be returned again (`reused: true`).\nNo\
        \ service fee, unless the account is in a fee group.\n\n**Manual flow:** send `accept_manual: true` if you can show\
        \ the receiving account and send the\npayment proof. The response then carries `instructions_fields`, `reference`\
        \ and, when available,\n`qr`; send the proof with `POST /v1/partner/customers/{cid}/pix/deposits/{id}/proof`. Without\
        \ the\nfield, while the manual flow is active this endpoint answers `503 pix_provider_unavailable` and\ncreates nothing.\n\
        \nThe sandbox has no PIX provider, so it never returns an automatic charge. A fee group can replace\nthe minimum and\
        \ the fee and can restrict PIX to certain hours.\n\nSame rules in both flows:\n\n- approved KYC of the receiving account;\
        \ the charge carries the name/document of that\n  account's KYC profile;\n- from R$ 10,00 (`422 pix_amount_out_of_range`\
        \ on an automatic charge,\n  `422 deposit_below_minimum` on a manual one) to R$ 500.000,00 per PIX\n  (`422 pix_amount_out_of_range`);\n\
        - valid for up to 24 hours; a manual deposit without proof expires after that;\n- up to 5 open charges (`429 pix_too_many_open`);\n\
        - R$ 5.000.000,00 per account per day (`409 pix_daily_limit_exceeded`);\n- plan deposit limit (`409 deposit_limit_exceeded`;\
        \ `details`: `window`, `level`,\n  `plan`, `limit_usd_minor`, `used_usd_minor`, `remaining_usd_minor`,\n  `amount_usd_minor`).\n\
        \nA PIX returned by the payer's bank or a MED claim produces `deposit.reversed`.\n"
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - amount
              properties:
                amount:
                  type: integer
                  format: int64
                  description: Amount in BRL cents.
                accept_manual:
                  type: boolean
                  description: You can show the receiving account and send the payment proof.
            example:
              amount: 50000
      responses:
        '200':
          description: 'Automatic charge (`auto: true`): pay `qr.payload` before `expires_at`. Manual flow (no `auto` field):
            `instructions_fields`, `reference` and, when available, a PIX QR of the receiving account; send the payment proof
            in the app.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixDepositCreated'
              example:
                deposit:
                  id: 00000000-0000-4000-8000-000000000401
                  user_id: 00000000-0000-4000-8000-000000000001
                  currency: BRL
                  amount: 50000
                  method: pix
                  status: pending
                  created_at: '2026-10-08T12:00:00Z'
                  auto: true
                  reference: '0000000000'
                  instructions_fields:
                  - label: Amount
                    value: R$ 500,00
                  instructions:
                    Amount: R$ 500,00
                  qr:
                    payload: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
                  pix_copy_paste: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
                  pix_expires_at: '2026-10-09T12:00:00Z'
                reference: '0000000000'
                instructions:
                  Amount: R$ 500,00
                instructions_fields:
                - label: Amount
                  value: R$ 500,00
                qr:
                  payload: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
                auto: true
                expires_at: '2026-10-09T12:00:00Z'
                reused: false
                next: Pay the PIX code; the deposit is credited automatically after confirmation.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '404':
          $ref: '#/components/responses/NotFound'
  /v1/partner/customers/{cid}/fiat/deposits:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    post:
      operationId: createPartnerCustomerFiatDeposit
      summary: Create a sub-account fiat deposit
      description: 'Fiat deposit for the sub-account (the credit goes only to the sub-account). Same

        body and rules as `POST /v1/fiat/deposits` in the app; without `currency`/`method`

        it creates a BRL PIX charge (same response as `POST

        /v1/partner/customers/{cid}/pix/deposits`). Other currencies/methods return the

        receiving-account instructions, or `422 method_unavailable`.


        While the manual PIX flow is active, a BRL PIX request answers `503 pix_provider_unavailable`

        and creates nothing, unless it sends `accept_manual: true`.

        '
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - amount
              properties:
                currency:
                  type: string
                  default: BRL
                method:
                  type: string
                  default: pix
                  examples:
                  - pix
                  - bank_transfer
                amount:
                  type: integer
                  format: int64
                  description: Minor units of `currency`.
                accept_manual:
                  type: boolean
                  description: 'For BRL PIX: you can show the receiving account and send the payment proof.'
            example:
              currency: BRL
              method: pix
              amount: 50000
      responses:
        '200':
          description: 'Automatic charge (`auto: true`): pay `qr.payload` before `expires_at`. Manual flow (no `auto` field):
            `instructions_fields`, `reference` and, when available, a PIX QR of the receiving account; send the payment proof
            in the app.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PixDepositCreated'
              example:
                deposit:
                  id: 00000000-0000-4000-8000-000000000401
                  user_id: 00000000-0000-4000-8000-000000000001
                  currency: BRL
                  amount: 50000
                  method: pix
                  status: pending
                  created_at: '2026-10-08T12:00:00Z'
                  auto: true
                  reference: '0000000000'
                  instructions_fields:
                  - label: Amount
                    value: R$ 500,00
                  instructions:
                    Amount: R$ 500,00
                  qr:
                    payload: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
                  pix_copy_paste: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
                  pix_expires_at: '2026-10-09T12:00:00Z'
                reference: '0000000000'
                instructions:
                  Amount: R$ 500,00
                instructions_fields:
                - label: Amount
                  value: R$ 500,00
                qr:
                  payload: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
                auto: true
                expires_at: '2026-10-09T12:00:00Z'
                reused: false
                next: Pay the PIX code; the deposit is credited automatically after confirmation.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '502':
          $ref: '#/components/responses/BadGateway'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '404':
          $ref: '#/components/responses/NotFound'
  /v1/partner/customers/{cid}/pix/deposits/{id}/proof:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    - name: id
      in: path
      description: Deposit id.
      required: true
      schema:
        type: string
        format: uuid
    post:
      operationId: uploadPartnerCustomerPixDepositProof
      summary: Send the proof of a sub-account manual PIX deposit
      description: 'Same behavior as `POST /v1/pix/deposits/{id}/proof`, applied to the sub-account `{cid}`. Sign the exact
        bytes of the multipart body.

        '
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              properties:
                file:
                  type: string
                  format: binary
                  description: JPEG, PNG or PDF, up to 10 MB.
      responses:
        '200':
          description: Proof attached.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
              example:
                status: comprovante anexado
        '400':
          description: Invalid id, missing `file`, unsupported type or file too large.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Deposit not found, already processed, or not a PIX deposit of this sub-account.
        '429':
          $ref: '#/components/responses/TooManyRequests'
      x-arx-restricted-scope: wallet.read
  /v1/partner/customers/{cid}/pix/deposits/{id}:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    - name: id
      in: path
      description: Deposit id.
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: getPartnerCustomerPixDeposit
      summary: Get a sub-account PIX deposit
      description: Same behavior as the corresponding account endpoint, applied to the sub-account `{cid}`. Deposits of any
        other account return `404`. See `GET /v1/pix/deposits/{id}`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deposit.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  deposit:
                    $ref: '#/components/schemas/FiatDeposit'
              example:
                deposit:
                  id: 00000000-0000-4000-8000-000000000401
                  user_id: 00000000-0000-4000-8000-000000000501
                  currency: BRL
                  amount: 50000
                  method: pix
                  status: pending
                  created_at: '2026-10-08T12:00:00Z'
                  auto: false
                  reference: '0000000000'
                  instructions_fields:
                  - label: Amount
                    value: R$ 500,00
                  instructions:
                    Amount: R$ 500,00
                  qr:
                    payload: 00020126580014br.gov.bcb.pix0136example-only-not-a-real-key5204000053039865405500.005802BR6304ABCD
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/balances:
    get:
      operationId: getPartnerBalances
      summary: Get the partner's own balances
      description: Balances of the partner account itself, not of its sub-accounts. One row per currency and wallet.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Balances.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  partner:
                    type: boolean
                  balances:
                    type: array
                    items:
                      $ref: '#/components/schemas/Balance'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/earn/products:
    get:
      operationId: listPartnerEarnProducts
      summary: List partner Earn products
      description: 'Active products with APY, term, minimum, early-exit penalty and refund delay.

        `min_claim_usd` is the minimum yield withdrawal in US dollars.

        '
      tags:
      - Partner
      x-arx-auth: partner.earn.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.earn.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Products.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  products:
                    type: array
                    items:
                      $ref: '#/components/schemas/PartnerEarnProduct'
                  min_claim_usd:
                    type: number
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/customers/{cid}/earn/positions:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    post:
      operationId: openPartnerEarnPosition
      summary: Open an Earn position
      description: 'Moves the capital from the sub-account Funding wallet into the position, atomically. The APY is frozen
        at this moment.

        **`Idempotency-Key` is required** and is permanent per sub-account: the same key with the same data returns the

        original position (`200`, `replayed: true`); with other data, `409 idempotency_conflict`.

        Errors: `earn_below_minimum`, `earn_product_unavailable`, `insufficient_funds` (422), `kyc_required` (403), `idempotency_key_required`
        (400).

        '
      tags:
      - Partner
      x-arx-auth: partner.earn.write
      security:
      - bearerAuth: []
      - arxKey:
        - partner.earn.write
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - product_id
              - amount
              properties:
                product_id:
                  type: string
                  description: Product id from `GET /v1/partner/earn/products`.
                amount:
                  type: integer
                  format: int64
                  description: Capital in minor units of the product asset.
            example:
              product_id: vault-usdt-90
              amount: 1000000000
      responses:
        '201':
          description: Position opened.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  position:
                    $ref: '#/components/schemas/PartnerEarnPosition'
                  replayed:
                    type: boolean
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    get:
      operationId: listPartnerEarnPositions
      summary: List a sub-account Earn positions
      description: 'Newest first. Paginated with `cursor` and `next_cursor`.

        '
      tags:
      - Partner
      x-arx-auth: partner.earn.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.earn.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: cursor
        in: query
        schema:
          type: string
        description: Value of next_cursor.
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
      responses:
        '200':
          description: Positions.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  positions:
                    type: array
                    items:
                      $ref: '#/components/schemas/PartnerEarnPosition'
                  next_cursor:
                    type:
                    - string
                    - 'null'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/customers/{cid}/earn/positions/{id}:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    - name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Position id.
    get:
      operationId: getPartnerEarnPosition
      summary: Get an Earn position
      description: '`404` if the position is not from this sub-account.

        '
      tags:
      - Partner
      x-arx-auth: partner.earn.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.earn.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Position.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  position:
                    $ref: '#/components/schemas/PartnerEarnPosition'
                  replayed:
                    type: boolean
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/customers/{cid}/earn/positions/{id}/cancel-preview:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    - name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Position id.
    get:
      operationId: previewPartnerEarnCancel
      summary: Preview an early exit
      description: 'What an exit would cost now. Moves no money.

        '
      tags:
      - Partner
      x-arx-auth: partner.earn.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.earn.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Preview.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerEarnExitPreview'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/customers/{cid}/earn/positions/{id}/cancel:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    - name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Position id.
    post:
      operationId: cancelPartnerEarnPosition
      summary: Exit a position early
      description: 'Charges the penalty now (none on ETH staking), forfeits the yield not yet released and schedules the refund
        after

        `refund_business_days` (Monday to Friday). Yield already released is paid with the refund. Repeating returns the same

        state (`replayed: true`) with no new movement. Errors: `earn_not_active`, `earn_matured` (409).

        '
      tags:
      - Partner
      x-arx-auth: partner.earn.write
      security:
      - bearerAuth: []
      - arxKey:
        - partner.earn.write
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      responses:
        '200':
          description: Position in exit.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  position:
                    $ref: '#/components/schemas/PartnerEarnPosition'
                  replayed:
                    type: boolean
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/customers/{cid}/earn/positions/{id}/claim:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    - name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Position id.
    post:
      operationId: claimPartnerEarnYield
      summary: Withdraw released yield
      description: 'Pays all released yield to the Funding wallet, from the equivalent of US$ 100 per position. Send `Idempotency-Key`:
        repeating

        it returns the same withdrawal (`replayed: true`). Errors: `earn_nothing_to_claim`, `earn_not_active` (409), `earn_below_min_claim`
        (422),

        `price_unavailable` (503).

        '
      tags:
      - Partner
      x-arx-auth: partner.earn.write
      security:
      - bearerAuth: []
      - arxKey:
        - partner.earn.write
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      responses:
        '200':
          description: Yield paid.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  position:
                    $ref: '#/components/schemas/PartnerEarnPosition'
                  amount_minor:
                    type: integer
                    format: int64
                  replayed:
                    type: boolean
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/customers/{cid}/fees:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: getPartnerCustomerFees
      summary: Get a sub-account's effective fees
      description: 'Same behavior as `GET /v1/me/fees`, applied to the sub-account `{cid}`. When the

        sub-account (or its partner) is in a **fee group** (contract pricing), the response

        carries `fee_group` with the rates that replace the plan''s for PIX, Convert, crypto

        and Paraguay payouts. Without a group the response is exactly the plan''s.

        '
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: account.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Effective fees.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountFees'
              example:
                tier: starter
                level: verified
                plan: Nivel 1 – Básico
                convert_bps: 100
                convert_crypto_bps: 100
                convert_fiat_bps: 180
                spot_maker_bps: 50
                spot_taker_bps: 75
                p2p_advertiser_bps: 35
                fee_group:
                  id: 00000000-0000-4000-8000-000000000a01
                  name: Partner contract
                  pix:
                    currency: BRL
                    deposit_fee_cbps: 5000
                    deposit_fee_pct: '0.5'
                    deposit_min_minor: 10000
                    withdraw_fee_cbps: 8000
                    withdraw_fee_pct: '0.8'
                    withdraw_min_minor: 10000
                    hours:
                      enabled: true
                      tz: America/Sao_Paulo
                      start: 08:00
                      end: '20:00'
                      days:
                      - 0
                      - 1
                      - 2
                      - 3
                      - 4
                      - 5
                      - 6
                      open: true
                  convert:
                    fiat_cbps: 7500
                    fiat_pct: '0.75'
                    crypto_stable_cbps: 575
                    crypto_stable_pct: '0.0575'
                    crypto_crypto_cbps: 1150
                    crypto_crypto_pct: '0.115'
                  crypto:
                    deposit_fee_cbps: 0
                    deposit_fee_pct: '0'
                    withdraw_fee_model: network_cost_plus_pct
                    withdraw_markup_cbps: 150000
                    withdraw_markup_pct: '15'
                  py_payout:
                    transfer_bps: 150
                    cash_bps: 180
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/pix/withdrawals:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: listPartnerCustomerPixWithdrawals
      summary: List sub-account PIX withdrawals
      description: BRL PIX withdrawals of the sub-account `{cid}`, newest first (`limit`, default 50, max 200).
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
      responses:
        '200':
          description: Withdrawals.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  withdrawals:
                    type: array
                    items:
                      $ref: '#/components/schemas/FiatWithdrawal'
              example:
                withdrawals:
                - id: 00000000-0000-4000-8000-000000000731
                  currency: BRL
                  amount: 50000
                  method: pix
                  destination:
                    pix_key: '52998224725'
                    pix_key_type: cpf
                    holder_name: MARIA CLARA SOUZA
                    holder_document: '52998224725'
                  status: pending
                  fee: 400
                  net: 49600
                  has_payment_proof: false
                  created_at: '2026-10-31T12:00:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    post:
      operationId: createPartnerCustomerPixWithdrawal
      summary: Withdraw BRL by PIX from a sub-account
      description: "Same flow as `POST /v1/fiat/withdrawals` (`currency: BRL`, `method: pix`), applied to\nthe sub-account\
        \ `{cid}`. API key with IP allow-list only.\n\n**Rules**\n\n- The PIX destination must belong to the end customer:\
        \ `holder_name` and\n  `holder_document` default to the sub-account's KYC profile (name and CPF/CNPJ) and\n  are checked\
        \ against it (`422 pix_holder_not_owner`). A `cpf`/`cnpj` key must be the\n  holder's own document. `pix_key_type`\
        \ (`cpf`, `cnpj`, `email`, `mobile`, `evp`) is\n  inferred from the key when omitted.\n- Approved KYC of the sub-account\
        \ (`403 kyc_required`), 24 h security lock\n  (`403 security_lock`), balance (`422 insufficient_funds`), per-PIX ceiling\
        \ and daily\n  ceiling in BRL (`422 pix_amount_out_of_range`, `409 pix_daily_limit_exceeded`).\n- Fee: taken out of\
        \ the amount — the balance is debited `amount` and the customer\n  receives `net = amount − fee`. Fee-group accounts\
        \ pay the group percentage and must\n  respect the group minimum (`422 withdrawal_below_minimum`) and PIX hours window\n\
        \  (`422 pix_outside_hours`, `details.start`/`end`/`tz`/`days`); other accounts follow\n  the plan (and the platform\
        \ business-hours rule, `422 outside_business_hours`).\n- The withdrawal is created `pending` (amount reserved) and\
        \ paid by our team with\n  four-eyes review; status changes arrive as `withdrawal.sent` →\n  `withdrawal.completed`\
        \ (or `withdrawal.failed`), and a PIX returned by the receiving\n  bank as `withdrawal.returned`.\n- Idempotency (stored-response\
        \ mode): send `Idempotency-Key`; a retry within 24 h\n  returns the **same** withdrawal with `Idempotent-Replayed:\
        \ true`.\n"
      tags:
      - Partner
      x-arx-auth: partner.wallet.withdraw
      x-arx-restricted-scope: wallet.withdraw
      security:
      - arxKey:
        - partner.wallet.withdraw
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - amount
              - pix_key
              properties:
                amount:
                  type: integer
                  format: int64
                  description: Amount debited
                  in BRL cents (the fee comes out of it).: null
                pix_key:
                  type: string
                pix_key_type:
                  type: string
                  enum:
                  - cpf
                  - cnpj
                  - email
                  - mobile
                  - evp
                holder_name:
                  type: string
                  description: Defaults to the sub-account KYC name.
                holder_document:
                  type: string
                  description: CPF/CNPJ; defaults to the sub-account KYC document.
            example:
              amount: 50000
              pix_key: 529.982.247-25
      responses:
        '200':
          description: Withdrawal created (pending review).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  withdrawal:
                    $ref: '#/components/schemas/FiatWithdrawal'
              example:
                withdrawal:
                  id: 00000000-0000-4000-8000-000000000731
                  currency: BRL
                  amount: 50000
                  method: pix
                  destination:
                    pix_key: '52998224725'
                    pix_key_type: cpf
                    holder_name: MARIA CLARA SOUZA
                    holder_document: '52998224725'
                  status: pending
                  fee: 400
                  net: 49600
                  has_payment_proof: false
                  created_at: '2026-10-31T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/pix/withdrawals/{id}:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    - name: id
      in: path
      description: Withdrawal id.
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: getPartnerCustomerPixWithdrawal
      summary: Get a sub-account PIX withdrawal
      description: One BRL PIX withdrawal of the sub-account `{cid}`. Withdrawals of any other account return `404`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Withdrawal.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  withdrawal:
                    $ref: '#/components/schemas/FiatWithdrawal'
              example:
                withdrawal:
                  id: 00000000-0000-4000-8000-000000000731
                  currency: BRL
                  amount: 50000
                  method: pix
                  destination:
                    pix_key: '52998224725'
                    pix_key_type: cpf
                    holder_name: MARIA CLARA SOUZA
                    holder_document: '52998224725'
                  status: paid
                  fee: 400
                  net: 49600
                  payment_ref: E00000000202610311200EXAMPLE
                  has_payment_proof: false
                  created_at: '2026-10-31T12:00:00Z'
                  reviewed_at: '2026-10-31T12:10:00Z'
                  paid_at: '2026-10-31T12:20:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/customers/{cid}/py/payouts/quote:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: quotePartnerCustomerPYPayout
      summary: Quote a Paraguay payout for a sub-account
      description: 'Price of a "Receive in Paraguay" payout for the sub-account `{cid}` (same as

        `GET /v1/fiat/payout/quote`): the customer pays with a balance in `pay` and receives

        `deliver` by bank transfer (SIPAP — USD or PYG only) or cash (Ciudad del Este — USD,

        PYG or BRL). `amount` is a **decimal** in `pay` units (e.g. `100.5`). Values in the

        response are decimals too; the fee follows the sub-account''s fee group when there is

        one (`fee_bps`). Informational: the rate is locked at creation.


        PYG uses the live exchange-house price: the selling price when you pay with PYG and the buying

        price when PYG is delivered.

        '
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: pay
        in: query
        required: true
        schema:
          type: string
          enum:
          - USDT
          - USDC
          - BRL
          - PYG
          - USD
      - name: deliver
        in: query
        required: true
        schema:
          type: string
          enum:
          - USD
          - PYG
          - BRL
      - name: method
        in: query
        schema:
          type: string
          enum:
          - transfer
          - cash
          default: transfer
      - name: amount
        in: query
        required: true
        description: Decimal amount paid
        in `pay` units.: null
        schema:
          type: string
      responses:
        '200':
          description: Quote.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PYPayoutQuote'
              example:
                pay: USDT
                deliver: PYG
                method: transfer
                pay_amount: 100
                deliver_gross: 735000
                fee: 11025
                deliver_net: 723975
                fee_pct: 1.5
                fee_bps: 150
                rate_per_usd: 7350
                usd_per_pay: 1
                eta_hours: 12
                eta_business: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/py/payouts:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    get:
      operationId: listPartnerCustomerPYPayouts
      summary: List sub-account Paraguay payouts
      description: The 50 most recent "Receive in Paraguay" payouts of the sub-account `{cid}`, newest first.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Payouts.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  payouts:
                    type: array
                    items:
                      $ref: '#/components/schemas/PYPayout'
              example:
                payouts:
                - id: 00000000-0000-4000-8000-000000000b01
                  user_id: 00000000-0000-4000-8000-000000000501
                  source_currency: USDT
                  source_amount: 100000000
                  deliver_currency: PYG
                  deliver_amount: 723975
                  method: transfer
                  fee_bps: 150
                  rate_per_usd: 7350
                  usd_per_source: 1
                  destination:
                    bank: Banco Example
                    account: '0000000'
                    holder: Maria Final
                    document: '1234567'
                  status: pending
                  created_at: '2026-10-31T12:00:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    post:
      operationId: createPartnerCustomerPYPayout
      summary: Create a Paraguay payout from a sub-account
      description: "Same flow as `POST /v1/fiat/payout`, applied to the sub-account `{cid}`. API key with\nIP allow-list only.\
        \ The source amount is reserved now and the exchange rate is\n**locked**; our team pays it (bank transfer or cash)\
        \ and the status changes arrive as\n`withdrawal.sent` + `withdrawal.completed` (`rail: py_payout`) or `withdrawal.failed`\n\
        (rejected/cancelled — the reserve goes back to the balance).\n\n**Rules**\n\n- `method: transfer` (SIPAP) delivers\
        \ only `USD` or `PYG` and needs `destination`\n  (bank, account/alias, holder…); `method: cash` delivers `USD`, `PYG`\
        \ or `BRL` at\n  `cash_location: ciudad_del_este` (`422 delivery_not_allowed`), with a cash minimum\n  of ≈ R$ 1,000\
        \ (`422 below_minimum`).\n- Approved KYC of the sub-account (`403 kyc_required`), 24 h security lock,\n  balance in\
        \ `source_currency` (`422 insufficient_funds`).\n- Fee: 1.5 % transfer / 1.8 % cash, or the fee-group rates (`fee_bps`\
        \ on the payout);\n  `deliver_amount` is already net of the fee.\n- Idempotency (stored-response mode): send `Idempotency-Key`;\
        \ a retry within 24 h\n  returns the **same** payout with `Idempotent-Replayed: true`.\n"
      tags:
      - Partner
      x-arx-auth: partner.wallet.withdraw
      x-arx-restricted-scope: wallet.withdraw
      security:
      - arxKey:
        - partner.wallet.withdraw
        arxTimestamp: []
        arxSignature: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - source_currency
              - deliver_currency
              - method
              - source_amount
              properties:
                source_currency:
                  type: string
                  enum:
                  - USDT
                  - USDC
                  - BRL
                  - PYG
                  - USD
                deliver_currency:
                  type: string
                  enum:
                  - USD
                  - PYG
                  - BRL
                method:
                  type: string
                  enum:
                  - transfer
                  - cash
                source_amount:
                  type: integer
                  format: int64
                  description: Amount paid
                  minor units of `source_currency`.: null
                destination:
                  type: object
                  additionalProperties:
                    type: string
                  description: 'Transfer only: label → value (bank, account or alias, holder, document…).'
                cash_location:
                  type: string
                  enum:
                  - ciudad_del_este
                  description: Cash only.
            example:
              source_currency: USDT
              deliver_currency: PYG
              method: transfer
              source_amount: 100000000
              destination:
                bank: Banco Example
                account: '0000000'
                holder: Maria Final
                document: '1234567'
      responses:
        '200':
          description: Payout created (pending).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            Idempotent-Replayed:
              $ref: '#/components/headers/Idempotent-Replayed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  payout:
                    $ref: '#/components/schemas/PYPayout'
              example:
                payout:
                  id: 00000000-0000-4000-8000-000000000b01
                  user_id: 00000000-0000-4000-8000-000000000501
                  source_currency: USDT
                  source_amount: 100000000
                  deliver_currency: PYG
                  deliver_amount: 723975
                  method: transfer
                  fee_bps: 150
                  rate_per_usd: 7350
                  usd_per_source: 1
                  destination:
                    bank: Banco Example
                    account: '0000000'
                    holder: Maria Final
                    document: '1234567'
                  status: pending
                  created_at: '2026-10-31T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /v1/partner/customers/{cid}/py/payouts/{id}:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    - name: id
      in: path
      description: Payout id.
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: getPartnerCustomerPYPayout
      summary: Get a sub-account Paraguay payout
      description: One payout of the sub-account `{cid}`. Payouts of any other account return `404`.
      tags:
      - Partner
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Payout.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                type: object
                properties:
                  payout:
                    $ref: '#/components/schemas/PYPayout'
              example:
                payout:
                  id: 00000000-0000-4000-8000-000000000b01
                  user_id: 00000000-0000-4000-8000-000000000501
                  source_currency: USDT
                  source_amount: 100000000
                  deliver_currency: PYG
                  deliver_amount: 723975
                  method: transfer
                  fee_bps: 150
                  rate_per_usd: 7350
                  usd_per_source: 1
                  destination:
                    bank: Banco Example
                    account: '0000000'
                    holder: Maria Final
                    document: '1234567'
                  status: paid
                  payment_ref: SIPAP-000000
                  created_at: '2026-10-31T12:00:00Z'
                  paid_at: '2026-10-31T15:00:00Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/sandbox/status:
    get:
      operationId: getSandboxStatus
      summary: Get sandbox status
      description: Confirms you are calling the sandbox and lists the daily fictitious-balance limits per currency (whole
        units, rolling 24 h per account). Answers `404` in production.
      tags:
      - Sandbox
      x-arx-auth: public
      security: []
      responses:
        '200':
          description: Sandbox environment.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  sandbox:
                    type: boolean
                    const: true
                  real_money:
                    type: boolean
                    const: false
                  faucet:
                    type: object
                    properties:
                      window_hours:
                        type: integer
                      limits:
                        type: object
                        additionalProperties:
                          type: string
              example:
                sandbox: true
                real_money: false
                faucet:
                  window_hours: 24
                  limits:
                    USDT: '10000'
                    BRL: '50000'
                    BTC: '1'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/sandbox/kyc/approve:
    post:
      operationId: approveSandboxKyc
      summary: Approve your own KYC (sandbox)
      description: Sandbox only. Approves the KYC of the logged-in account — or the KYB when the profile type is `business`
        — so you can test the full flow. Session only (not API keys). Answers `404` in production, where KYC is verified by
        Sumsub.
      tags:
      - Sandbox
      x-arx-auth: session
      security:
      - bearerAuth: []
      responses:
        '200':
          description: KYC (or KYB, by the profile type) approved for testing.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_id:
                    type: string
                    format: uuid
                  kyc_status:
                    type: string
                    const: approved
                  sandbox:
                    type: boolean
                    const: true
              example:
                user_id: 00000000-0000-4000-8000-000000000101
                kyc_status: approved
                sandbox: true
        '409':
          $ref: '#/components/responses/Conflict'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/sandbox/partner/activate:
    post:
      operationId: activateSandboxPartner
      summary: Activate your B2B partner account (sandbox)
      description: Sandbox only. Turns the logged-in account into a B2B partner with the same eligibility rules as production
        (active, approved `business` KYB, not a sub-account) → `422 partner_not_eligible` otherwise; already a partner → `409
        partner_grant_open`. Session only. Answers `404` in production, where partners are approved by ArandixBit staff.
      tags:
      - Sandbox
      x-arx-auth: session
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Partner account active.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  is_partner:
                    type: boolean
                    const: true
                  sandbox:
                    type: boolean
                    const: true
              example:
                is_partner: true
                sandbox: true
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/sandbox/faucet:
    post:
      operationId: createSandboxFaucet
      summary: Add fictitious balance (sandbox)
      description: Sandbox only. Credits a fictitious balance to your own account. Limited per currency over a rolling 24
        h window (see `GET /v1/sandbox/status`) → `429 sandbox_faucet_limit`. Answers `404` in production.
      tags:
      - Sandbox
      x-arx-auth: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - wallet.read
        arxTimestamp: []
        arxSignature: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - currency
              - amount
              properties:
                currency:
                  type: string
                  description: USDT, USDC, USD, EUR, BRL, PYG, MXN, BTC, ETH, BNB, SOL or TRX.
                  example: USDT
                amount:
                  type: string
                  description: Decimal amount in whole currency units (for example `"100.50"`).
                  example: '100.50'
                wallet:
                  type: string
                  enum:
                  - funding
                  - spot
                  - p2p
                  default: funding
            example:
              currency: USDT
              amount: '100.50'
              wallet: funding
      responses:
        '200':
          description: Fictitious balance credited.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  currency:
                    type: string
                  amount_minor:
                    type: integer
                    format: int64
                  wallet:
                    type: string
                  sandbox:
                    type: boolean
                    const: true
                  real_money:
                    type: boolean
                    const: false
              example:
                currency: USDT
                amount_minor: 100500000
                wallet: funding
                sandbox: true
                real_money: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/customers/{cid}/sandbox/kyc/approve:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    post:
      operationId: approveSandboxPartnerCustomerKyc
      summary: Approve a sub-account KYC (sandbox)
      description: Sandbox only. Approves the KYC of your sub-account `{cid}` for testing (another partner's sub-account →
        `404`). Answers `404` in production, where the end customer verifies with Sumsub.
      tags:
      - Sandbox
      x-arx-auth: partner.kyc
      security:
      - bearerAuth: []
      - arxKey:
        - partner.kyc
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: KYC (or KYB, by the profile type) approved for testing.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_id:
                    type: string
                    format: uuid
                  kyc_status:
                    type: string
                    const: approved
                  sandbox:
                    type: boolean
                    const: true
              example:
                user_id: 00000000-0000-4000-8000-000000000101
                kyc_status: approved
                sandbox: true
        '409':
          $ref: '#/components/responses/Conflict'
        '403':
          $ref: '#/components/responses/Forbidden'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/partner/customers/{cid}/sandbox/faucet:
    parameters:
    - $ref: '#/components/parameters/CustomerId'
    post:
      operationId: createSandboxPartnerCustomerFaucet
      summary: Add fictitious balance to a sub-account (sandbox)
      description: Sandbox only. Same as `POST /v1/sandbox/faucet`, credited to your sub-account `{cid}` (limits are per sub-account).
        Answers `404` in production.
      tags:
      - Sandbox
      x-arx-auth: partner.wallet.read
      x-arx-restricted-scope: wallet.read
      security:
      - bearerAuth: []
      - arxKey:
        - partner.wallet.read
        arxTimestamp: []
        arxSignature: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - currency
              - amount
              properties:
                currency:
                  type: string
                  description: USDT, USDC, USD, EUR, BRL, PYG, MXN, BTC, ETH, BNB, SOL or TRX.
                  example: USDT
                amount:
                  type: string
                  description: Decimal amount in whole currency units (for example `"100.50"`).
                  example: '100.50'
                wallet:
                  type: string
                  enum:
                  - funding
                  - spot
                  - p2p
                  default: funding
            example:
              currency: USDT
              amount: '100.50'
              wallet: funding
      responses:
        '200':
          description: Fictitious balance credited.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  currency:
                    type: string
                  amount_minor:
                    type: integer
                    format: int64
                  wallet:
                    type: string
                  sandbox:
                    type: boolean
                    const: true
                  real_money:
                    type: boolean
                    const: false
              example:
                currency: USDT
                amount_minor: 100500000
                wallet: funding
                sandbox: true
                real_money: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /v1/sandbox/webhook-inboxes:
    post:
      operationId: createSandboxWebhookInbox
      summary: Create a test webhook receiver (sandbox)
      description: Sandbox only. Creates a receiver with a public URL (secret token) that stores every request it gets. Up
        to 5 per account → `409`. Answers `404` in production.
      tags:
      - Sandbox
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      responses:
        '201':
          description: Receiver created.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  inbox:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      url:
                        type: string
                        description: Public receiver URL with its secret token — register it as a webhook endpoint.
                      respond_status:
                        type: integer
                        description: HTTP status the receiver answers with (default 200).
                      created_at:
                        type: string
                        format: date-time
        '409':
          $ref: '#/components/responses/Conflict'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    get:
      operationId: listSandboxWebhookInboxes
      summary: List your test webhook receivers (sandbox)
      description: Sandbox only. Answers `404` in production.
      tags:
      - Sandbox
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Receivers.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  inboxes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        url:
                          type: string
                          description: Public receiver URL with its secret token — register it as a webhook endpoint.
                        respond_status:
                          type: integer
                          description: HTTP status the receiver answers with (default 200).
                        created_at:
                          type: string
                          format: date-time
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /v1/sandbox/webhook-inboxes/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    patch:
      operationId: updateSandboxWebhookInbox
      summary: Set the receiver response status (sandbox)
      description: Sandbox only. Sets the HTTP status the receiver answers with (200–599), for example `503` to exercise webhook
        retries.
      tags:
      - Sandbox
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - respond_status
              properties:
                respond_status:
                  type: integer
                  minimum: 200
                  maximum: 599
            example:
              respond_status: 503
      responses:
        '200':
          description: Receiver updated.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteSandboxWebhookInbox
      summary: Delete a test webhook receiver (sandbox)
      description: Sandbox only. Deletes the receiver and everything it stored.
      tags:
      - Sandbox
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      responses:
        '200':
          description: Deleted.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /v1/sandbox/webhook-inboxes/{id}/requests:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    get:
      operationId: listSandboxWebhookInboxRequests
      summary: Read what a test receiver got (sandbox)
      description: Sandbox only. Latest requests first (up to 200 kept per receiver), exactly as received — header names in
        lower case, raw body — so you can verify `X-ARX-Signature` (`t=<unix>,v1=hex(HMAC-SHA256(secret, t + "." + body))`).
        Credential headers (`Authorization`, `Cookie`) are never stored. Another account's receiver → `404`.
      tags:
      - Sandbox
      x-arx-auth: webhooks
      security:
      - bearerAuth: []
      - arxKey:
        - webhooks
        arxTimestamp: []
        arxSignature: []
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
      responses:
        '200':
          description: Received requests.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                properties:
                  requests:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        method:
                          type: string
                        headers:
                          type: object
                          additionalProperties:
                            type: string
                        body:
                          type: string
                        responded_status:
                          type: integer
                        received_at:
                          type: string
                          format: date-time
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /v1/sandbox/webhook-inboxes/receive/{token}:
    parameters:
    - name: token
      in: path
      required: true
      description: Secret token from the receiver URL.
      schema:
        type: string
    post:
      operationId: receiveSandboxWebhook
      summary: Test receiver endpoint (sandbox)
      description: Sandbox only. The public destination behind a receiver `url` — this is what your webhook endpoint points
        to. Stores the request (body up to 64 KiB) and answers with the receiver `respond_status`. Unknown token → `404`.
      tags:
      - Sandbox
      x-arx-auth: public
      security: []
      responses:
        '200':
          description: Stored (the status code is the receiver `respond_status`).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        '404':
          $ref: '#/components/responses/NotFound'
        '413':
          description: Body larger than 64 KiB.
        '429':
          $ref: '#/components/responses/TooManyRequests'
webhooks:
  deposit.credited:
    post:
      operationId: webhookDepositCredited
      summary: Deposit credited
      description: 'A deposit was credited to the account: USDT order rail (`rail: usdt`, legacy), on-chain

        crypto (`rail: onchain`, with `txid`) a fixed-address deposit (`rail: mexc`) or fiat including PIX

        (`rail: fiat`, `method: pix` for BRL PIX). `credited_amount` is what reached the

        balance (`amount − fee`) on the fiat and fixed-address rails. Sub-account events

        delivered to a partner carry `customer_id` and `customer_external_ref`.

        '
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookDepositEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: deposit.credited
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                id: 00000000-0000-4000-8000-000000000301
                rail: usdt
                currency: USDT
                network: USDTTRC20
                amount: 250000000
                exponent: 6
                status: credited
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  deposit.reversed:
    post:
      operationId: webhookDepositReversed
      summary: PIX deposit reversed
      description: 'A PIX deposit was returned or a MED claim was confirmed by the provider. `amount` is

        the reversed amount; `applied` is what was debited from the Funding balance;

        `shortfall` is what the balance could not cover (settled by our team). `status`:

        `applied`, `debt` or `credit_cancelled` (the PIX was returned before being credited:

        nothing was credited or debited). Appears in the statement as `type=reversal`.

        '
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookReversalEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: deposit.reversed
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                id: 00000000-0000-4000-8000-000000000401
                reversal_id: 00000000-0000-4000-8000-000000000411
                rail: fiat
                method: pix
                currency: BRL
                exponent: 2
                amount: 50000
                applied: 50000
                shortfall: 0
                status: applied
                event: MED
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  withdrawal.sent:
    post:
      operationId: webhookWithdrawalSent
      summary: Withdrawal sent
      description: 'The withdrawal was handed to the provider/network (provider `submitted`, on-chain `broadcast`, fiat —
        PIX included — `sending`/`paid`, Paraguay payout `rail: py_payout` `paid`).'
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookWithdrawalEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: withdrawal.sent
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                id: 00000000-0000-4000-8000-000000000701
                rail: mexc
                currency: USDT
                network: TRX
                amount: 500000000
                debit: 501500000
                exponent: 6
                status: submitted
                txid: null
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  withdrawal.completed:
    post:
      operationId: webhookWithdrawalCompleted
      summary: Withdrawal completed
      description: 'The withdrawal was completed by the provider (with `txid` when available), the fiat/PIX payout was paid
        (`net` = amount paid, `payment_ref`) or the Paraguay payout was delivered (`rail: py_payout`, `deliver_amount`).'
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookWithdrawalEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: withdrawal.completed
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                id: 00000000-0000-4000-8000-000000000701
                rail: mexc
                currency: USDT
                network: TRX
                amount: 500000000
                debit: 501500000
                exponent: 6
                status: completed
                txid: 0xexampletxid
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  withdrawal.failed:
    post:
      operationId: webhookWithdrawalFailed
      summary: Withdrawal failed
      description: 'The withdrawal failed, was rejected or refunded — or a fiat/PIX withdrawal or Paraguay payout was cancelled
        (`status: cancelled`); the reserved amount was released back to the balance.'
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookWithdrawalEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: withdrawal.failed
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                id: 00000000-0000-4000-8000-000000000701
                rail: mexc
                currency: USDT
                network: TRX
                amount: 500000000
                debit: 501500000
                exponent: 6
                status: refunded
                txid: null
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  withdrawal.returned:
    post:
      operationId: webhookWithdrawalReturned
      summary: PIX withdrawal returned
      description: A PIX withdrawal was returned by the destination bank; the amount was credited back to the Funding balance
        (`applied`).
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookReversalEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: withdrawal.returned
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                id: 00000000-0000-4000-8000-000000000721
                reversal_id: 00000000-0000-4000-8000-000000000412
                rail: fiat
                method: pix
                currency: BRL
                exponent: 2
                amount: 120000
                applied: 120000
                shortfall: 0
                status: returned
                event: PIX_REVERSAL_OUT
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  order.filled:
    post:
      operationId: webhookOrderFilled
      summary: Spot order filled
      description: A spot order was completely filled.
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookOrderEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: order.filled
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                id: 00000000-0000-4000-8000-000000000201
                symbol: BTC/USDT
                side: buy
                type: limit
                price: 62450120000
                amount: 150000
                filled: 150000
                quote_filled: 93675180
                status: filled
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  convert.completed:
    post:
      operationId: webhookConvertCompleted
      summary: Conversion completed
      description: A conversion was executed (`status` `completed` or `partial`).
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookConvertEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: convert.completed
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                id: 00000000-0000-4000-8000-000000000601
                from: USDT
                to: BTC
                amount: 100000000
                from_exponent: 6
                amount_out: 159500
                to_exponent: 8
                fee: 1611
                status: completed
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  convert.pending_approval:
    post:
      operationId: webhookConvertPendingApproval
      summary: Conversion pending approval
      description: A conversion involving fiat is reserved and waiting for staff approval.
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookConvertEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: convert.pending_approval
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                id: 00000000-0000-4000-8000-000000000611
                from: BRL
                to: USDT
                amount: 50000
                from_exponent: 2
                amount_out: 0
                to_exponent: 6
                fee: 0
                status: pending_approval
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  convert.rejected:
    post:
      operationId: webhookConvertRejected
      summary: Conversion rejected
      description: A conversion pending approval was rejected by staff; the reserved amount was released.
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookConvertEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: convert.rejected
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                id: 00000000-0000-4000-8000-000000000611
                from: BRL
                to: USDT
                amount: 50000
                from_exponent: 2
                amount_out: 0
                to_exponent: 6
                fee: 0
                status: rejected
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  kyc.status_changed:
    post:
      operationId: webhookKycStatusChanged
      summary: KYC status changed
      description: The identity verification status of the account changed (Sumsub or staff review).
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookKYCEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: kyc.status_changed
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                status: approved
                previous_status: pending
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  partner.customer.created:
    post:
      operationId: webhookPartnerCustomerCreated
      summary: 'Partner: sub-account created'
      description: A sub-account was created for the partner.
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPartnerEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: partner.customer.created
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                customer_id: 00000000-0000-4000-8000-000000000501
                country: BR
                external_ref: crm-10042
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  partner.customer.kyc_approved:
    post:
      operationId: webhookPartnerCustomerKycApproved
      summary: 'Partner: sub-account KYC approved'
      description: Sumsub approved the identity verification of a sub-account.
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPartnerEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: partner.customer.kyc_approved
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                customer_id: 00000000-0000-4000-8000-000000000501
                status: approved
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  partner.customer.kyc_rejected:
    post:
      operationId: webhookPartnerCustomerKycRejected
      summary: 'Partner: sub-account KYC rejected'
      description: The identity verification of a sub-account was rejected.
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPartnerEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: partner.customer.kyc_rejected
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                customer_id: 00000000-0000-4000-8000-000000000501
                status: rejected
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  earn.opened:
    post:
      operationId: webhookEarnOpened
      summary: 'Partner: Earn position opened'
      description: A sub-account opened an Earn position.
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPartnerEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: earn.opened
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                position_id: 00000000-0000-4000-8000-000000000a01
                product_id: vault-usdt-90
                asset: USDT
                exponent: 6
                principal_minor: 1000000000
                status: active
                apy_bps: 700
                term_days: 90
                opened_at: '2026-11-10T15:00:00Z'
                matures_at: '2027-02-08T15:00:00Z'
                customer_id: 00000000-0000-4000-8000-000000000501
                customer_external_ref: vx-123
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  earn.released:
    post:
      operationId: webhookEarnReleased
      summary: 'Partner: Earn yield released'
      description: The month turned and the yield credited before it became withdrawable.
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPartnerEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: earn.released
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                position_id: 00000000-0000-4000-8000-000000000a01
                product_id: vault-usdt-90
                asset: USDT
                exponent: 6
                principal_minor: 1000000000
                status: active
                amount_minor: 3835616
                month: 2026-12
                claimable_minor: 3835616
                customer_id: 00000000-0000-4000-8000-000000000501
                customer_external_ref: vx-123
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  earn.claimed:
    post:
      operationId: webhookEarnClaimed
      summary: 'Partner: Earn yield paid'
      description: Yield reached the sub-account Funding wallet. `auto` is true when paid automatically at maturity or on
        exit.
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPartnerEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: earn.claimed
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                position_id: 00000000-0000-4000-8000-000000000a01
                product_id: vault-usdt-90
                asset: USDT
                exponent: 6
                principal_minor: 1000000000
                status: active
                claim_id: 00000000-0000-4000-8000-000000000a02
                amount_minor: 3835616
                auto: false
                customer_id: 00000000-0000-4000-8000-000000000501
                customer_external_ref: vx-123
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  earn.cancelled:
    post:
      operationId: webhookEarnCancelled
      summary: 'Partner: Earn early exit requested'
      description: 'An early exit started: the penalty was charged and the refund was scheduled.'
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPartnerEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: earn.cancelled
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                position_id: 00000000-0000-4000-8000-000000000a01
                product_id: vault-usdt-90
                asset: USDT
                exponent: 6
                principal_minor: 1000000000
                status: cancelling
                penalty_minor: 300000000
                forfeited_minor: 383561
                yield_to_pay_minor: 3835616
                refund_net_minor: 700000000
                refund_due_at: '2026-12-11T13:00:00Z'
                customer_id: 00000000-0000-4000-8000-000000000501
                customer_external_ref: vx-123
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  earn.refunded:
    post:
      operationId: webhookEarnRefunded
      summary: 'Partner: Earn capital refunded'
      description: 'The net capital of an early exit went back to the Funding wallet. Pending yield arrives as `earn.claimed`
        with `auto: true`.'
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPartnerEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: earn.refunded
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                position_id: 00000000-0000-4000-8000-000000000a01
                product_id: vault-usdt-90
                asset: USDT
                exponent: 6
                principal_minor: 1000000000
                status: cancelled
                refund_net_minor: 700000000
                yield_to_pay_minor: 3835616
                closed_at: '2026-12-11T13:00:00Z'
                customer_id: 00000000-0000-4000-8000-000000000501
                customer_external_ref: vx-123
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
  earn.matured:
    post:
      operationId: webhookEarnMatured
      summary: 'Partner: Earn position matured'
      description: 'The term ended and the capital went back to the Funding wallet. Pending yield arrives as `earn.claimed`
        with `auto: true`.'
      tags:
      - Webhooks
      security: []
      parameters:
      - name: X-ARX-Signature
        in: header
        required: true
        schema:
          type: string
        description: '`t=<unix seconds>,v1=<hex HMAC-SHA256(endpoint_secret, t + "." + raw_body)>`.'
        example: t=1791460800,v1=5f0c1d2e3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d
      - name: X-ARX-Event-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Event id (same as the payload `id`); identical across retries and resends — de-duplicate on it.
      - name: X-ARX-Event-Type
        in: header
        required: true
        schema:
          type: string
        description: Event type (same as the payload `type`).
      - name: X-ARX-Delivery-Id
        in: header
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id (one per endpoint and event).
      - name: X-ARX-Delivery-Attempt
        in: header
        required: true
        schema:
          type: integer
          minimum: 1
        description: Attempt number, starting at 1.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPartnerEvent'
            example:
              id: 00000000-0000-4000-8000-000000000901
              type: earn.matured
              created_at: '2026-10-08T12:00:00Z'
              api_version: '2026-10-07'
              data:
                position_id: 00000000-0000-4000-8000-000000000a01
                product_id: vault-usdt-90
                asset: USDT
                exponent: 6
                principal_minor: 1000000000
                status: matured
                capital_minor: 1000000000
                yield_to_pay_minor: 17260273
                closed_at: '2027-02-08T15:00:00Z'
                customer_id: 00000000-0000-4000-8000-000000000501
                customer_external_ref: vx-123
      responses:
        '200':
          description: Any 2xx response within 10 seconds acknowledges the delivery. Anything else (including redirects) is
            retried.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Interactive session access token (web/mobile login). Has every permission of its own user; scopes do not
        apply.
    arxKey:
      type: apiKey
      in: header
      name: X-ARX-APIKEY
      description: Public API key id (`arxb_…`). The value listed in each operation's security requirement is the scope the
        key must hold. Always sent together with `X-ARX-TIMESTAMP` and `X-ARX-SIGNATURE`.
    arxTimestamp:
      type: apiKey
      in: header
      name: X-ARX-TIMESTAMP
      description: Unix epoch in milliseconds; must be within ±10 s of the server clock (see `GET /v1/public/time`).
    arxSignature:
      type: apiKey
      in: header
      name: X-ARX-SIGNATURE
      description: Lower-case hex `HMAC-SHA256(secret, timestamp + METHOD + path_with_query + body)`.
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: "Optional client-generated key that makes the request safe to retry\n(1–100 characters `[A-Za-z0-9_.:-]`;\
        \ malformed → `400 idempotency_key_invalid`).\nScoped to the authenticated account. Two modes (see *Idempotency*):\n\
        \n- **Stored-response mode** (spot orders/cancellations, Convert cancellation,\n  deposit creation, webhook endpoint\
        \ and sub-account creation): kept 24 h; same\n  key + same request → the stored response is replayed with\n  `Idempotent-Replayed:\
        \ true`; same key + different request → `409\n  idempotency_key_reused`; first request still running → `409\n  idempotency_request_in_progress`.\
        \ Only 2xx/4xx responses (except 429) are\n  stored, so retrying a 5xx with the same key is safe.\n- **Permanent mode**\
        \ (Convert execution and crypto withdrawals): the key must be\n  8–100 characters (shorter → `400 bad_request`); a\
        \ retry returns the same\n  conversion (`replayed: true`) or withdrawal (`duplicate: true`) with\n  `Idempotent-Replayed:\
        \ true`, without expiry; same key with different data →\n  `409 idempotency_conflict`; concurrent retry → `409 idempotency_request_in_progress`.\n"
      schema:
        type: string
        minLength: 1
        maxLength: 100
        pattern: ^[A-Za-z0-9_.:-]{1,100}$
      example: 9b2f6c1e-7d4a-4c3b-9e21-5a8f0d3c6b17
    CustomerId:
      name: cid
      in: path
      required: true
      description: Sub-account id. Must belong to the calling partner (or be the sub-account of a restricted key); any other
        id returns `404`.
      schema:
        type: string
        format: uuid
      example: 00000000-0000-4000-8000-000000000501
    Cursor:
      name: cursor
      in: query
      description: Opaque `next_cursor` from the previous page. Send the same filters as the first request.
      schema:
        type: string
        maxLength: 120
    From:
      name: from
      in: query
      description: 'Start of the period (inclusive), RFC 3339 or epoch milliseconds. Default: `to` minus 90 days.'
      schema:
        type: string
        examples:
        - '2026-10-01T00:00:00Z'
        - '1790812800000'
    To:
      name: to
      in: query
      description: 'End of the period (exclusive), RFC 3339 or epoch milliseconds. Default: now. Maximum window: 366 days.'
      schema:
        type: string
        examples:
        - '2026-10-01T00:00:00Z'
        - '1790812800000'
    HistoryType:
      name: type
      in: query
      description: Only items of this type. Omit for all types.
      schema:
        type: string
        enum:
        - deposit
        - withdrawal
        - convert
        - trade
    HistoryLimit:
      name: limit
      in: query
      description: Page size (default 50, maximum 200).
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 50
    StatementTypeFilter:
      name: type
      in: query
      description: Only lines of this type. `fee` returns only the fee lines.
      schema:
        $ref: '#/components/schemas/StatementType'
    StatementCurrency:
      name: currency
      in: query
      description: Only lines in this currency (2–10 upper-case letters/digits).
      schema:
        type: string
        pattern: ^[A-Za-z0-9]{2,10}$
        examples:
        - BRL
        - USDT
    StatementLimit:
      name: limit
      in: query
      description: 'Number of ledger entries per page. JSON: default 100, maximum 500. CSV: default 1000, maximum 5000. An
        entry with a fee produces two lines.'
      schema:
        type: integer
        minimum: 1
        maximum: 5000
    StatementFormat:
      name: format
      in: query
      description: '`json` (default) or `csv`.'
      schema:
        type: string
        enum:
        - json
        - csv
        default: json
    SpotSymbol:
      name: symbol
      in: query
      required: true
      description: Spot symbol exactly as listed by `/v1/spot/symbols` (for example `BTC/USDT`; URL-encode the slash as `%2F`).
      schema:
        type: string
        examples:
        - BTC/USDT
  headers:
    X-Request-Id:
      description: Unique id of the request (echoed when the client sends `X-Request-Id`). Quote it when contacting support.
      schema:
        type: string
      example: c1f0a7d2-4b8e-4f6a-9c3d-2e7b5a1f0d94
    X-RateLimit-Limit:
      description: Requests allowed per 60 s window for this API key. Present only on API-key requests.
      schema:
        type: integer
      example: 600
    X-RateLimit-Remaining:
      description: Requests left in the current window for this API key. Present only on API-key requests.
      schema:
        type: integer
      example: 597
    X-RateLimit-Reset:
      description: Unix time (seconds) when the oldest request leaves the window. Present only on API-key requests.
      schema:
        type: integer
      example: 1791460860
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
      example: 60
    Idempotent-Replayed:
      description: '`true` when this response is a replay of a previous request with the same `Idempotency-Key`. Absent otherwise.'
      schema:
        type: string
        enum:
        - 'true'
      example: 'true'
    X-Next-Cursor:
      description: 'CSV only: cursor of the next page; absent on the last page.'
      schema:
        type: string
      example: c3w5MTgy
  responses:
    BadRequest:
      description: 'Invalid request: malformed JSON, missing or invalid parameter. `details` maps invalid fields to hints.'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            validation:
              summary: Invalid field
              value:
                error:
                  code: bad_request
                  message: invalid data
                  details:
                    from/to: RFC 3339 or epoch in ms
            idempotency_key_invalid:
              summary: Malformed Idempotency-Key
              value:
                error:
                  code: idempotency_key_invalid
                  message: 'invalid Idempotency-Key: 1 to 100 characters (letters, digits, _ - : .)'
    Unauthorized:
      description: Missing or invalid credentials, bad signature, replayed request, expired key or clock skew.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing_token:
              summary: No credentials
              value:
                error:
                  code: unauthorized
                  message: missing token
            bad_signature:
              summary: Signature mismatch
              value:
                error:
                  code: unauthorized
                  message: invalid signature
            timestamp_out_of_window:
              summary: Clock skew over 10 s
              value:
                error:
                  code: timestamp_out_of_window
                  message: timestamp outside the 10s window — sync your clock
                  details:
                    server_time: '1791460800123'
                    recv_window_ms: '10000'
            api_key_expired:
              summary: Expired key
              value:
                error:
                  code: api_key_expired
                  message: key expired — renew it or create a new one
    Forbidden:
      description: 'Authenticated, but not allowed: missing scope, IP not allowed, KYC not approved, account state or role.'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            scope:
              summary: Key lacks the scope
              value:
                error:
                  code: api_key_scope_required
                  message: the API key lacks the scope required by this route
                  details:
                    scope: spot.trade
            kyc_required:
              summary: KYC not approved
              value:
                error:
                  code: kyc_required
                  message: approved identity verification (KYC) is required
            ip:
              summary: IP not in the key allow-list
              value:
                error:
                  code: forbidden
                  message: IP not authorized for this key
    NotFound:
      description: Resource not found. Resources of other accounts are reported as not found.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            not_found:
              summary: Not found
              value:
                error:
                  code: not_found
                  message: order not found
    Conflict:
      description: The request conflicts with the current state of the resource or with a previous idempotent request.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            state:
              summary: Wrong state
              value:
                error:
                  code: conflict
                  message: order is not open
            idempotency_key_reused:
              summary: Key reused with another request
              value:
                error:
                  code: idempotency_key_reused
                  message: Idempotency-Key already used with a different request — use a new key
            idempotency_request_in_progress:
              summary: First request still running
              value:
                error:
                  code: idempotency_request_in_progress
                  message: a request with this Idempotency-Key is still in progress — retry shortly
    PayloadTooLarge:
      description: Request body too large.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            payload_too_large:
              summary: Body over the limit
              value:
                error:
                  code: payload_too_large
                  message: request body too large
    UnprocessableEntity:
      description: The request is valid but a business rule refused it (funds, limits, whitelist, provider rules).
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            insufficient_funds:
              summary: Not enough available balance
              value:
                error:
                  code: insufficient_funds
                  message: insufficient available USDT balance
            limit_exceeded:
              summary: Plan limit
              value:
                error:
                  code: limit_exceeded
                  message: Daily withdrawal limit for your level reached.
    UpgradeRequired:
      description: A WebSocket upgrade (RFC 6455) is required.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            websocket_required:
              summary: Plain HTTP request
              value:
                error:
                  code: websocket_required
                  message: use a WebSocket connection (RFC 6455)
    TooManyRequests:
      description: Rate limit exceeded. Wait `Retry-After` seconds before retrying.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            rate_limited:
              summary: Key quota exhausted
              value:
                error:
                  code: rate_limited
                  message: key request limit reached
    UnavailableForLegalReasons:
      description: The country or jurisdiction is not served.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            jurisdiction_blocked:
              summary: Blocked jurisdiction
              value:
                error:
                  code: jurisdiction_blocked
                  message: 'Jurisdiction/nationality not served: XX'
    BadGateway:
      description: An upstream provider (payments, liquidity or identity verification) failed or is unreachable. Retry later;
        nothing was charged unless stated.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            provider:
              summary: Provider unavailable
              value:
                error:
                  code: pix_provider_unavailable
                  message: The provider is unavailable right now — try again shortly
    ServiceUnavailable:
      description: Temporarily unavailable (feature disabled, live price or liquidity unavailable, dependency down). Retry
        with backoff.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            temporarily_unavailable:
              summary: Temporary failure
              value:
                error:
                  code: temporarily_unavailable
                  message: service temporarily unavailable — please try again shortly
            price_unavailable:
              summary: No live price
              value:
                error:
                  code: price_unavailable
                  message: quote unavailable — try again
  schemas:
    Error:
      type: object
      description: Standard error envelope.
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              description: Stable machine-readable code (see `x-arx-error-codes`).
              examples:
              - api_key_scope_required
              - insufficient_funds
              - rate_limited
            message:
              type: string
              description: Human-readable message in the request language (es, pt, en, gn).
            details:
              type: object
              additionalProperties:
                type: string
              description: 'Optional flat map of strings: invalid fields → hints, or extra context.'
    Ok:
      type: object
      required:
      - ok
      properties:
        ok:
          type: boolean
          const: true
    Scope:
      type: string
      description: API key scope. See *Scopes* in the introduction.
      enum:
      - account.read
      - spot.read
      - spot.trade
      - convert.read
      - convert.execute
      - wallet.read
      - wallet.withdraw
      - webhooks
      - partner.customers.read
      - partner.customers.write
      - partner.kyc
      - partner.wallet.read
      - partner.convert
      - partner.wallet.withdraw
    EventType:
      type: string
      description: Webhook event type. `*` subscribes to every type available to the account.
      enum:
      - deposit.credited
      - deposit.reversed
      - withdrawal.sent
      - withdrawal.completed
      - withdrawal.failed
      - withdrawal.returned
      - order.filled
      - convert.completed
      - convert.pending_approval
      - convert.rejected
      - kyc.status_changed
      - partner.customer.created
      - partner.customer.kyc_approved
      - partner.customer.kyc_rejected
      - earn.opened
      - earn.released
      - earn.claimed
      - earn.cancelled
      - earn.refunded
      - earn.matured
    APIKey:
      type: object
      required:
      - id
      - key_id
      - note
      - scopes
      - ip_whitelist
      - created_at
      - expired
      - request_count
      properties:
        id:
          type: string
          format: uuid
          description: Internal key id (used in management paths).
        key_id:
          type: string
          description: Public key id sent in `X-ARX-APIKEY`.
          examples:
          - arxb_0123456789abcdef0123456789abcdef
        note:
          type: string
          description: Your label for the key (1–64 characters).
        label:
          type: string
          deprecated: true
          description: Same as `note` (kept for compatibility).
        scopes:
          type: array
          items:
            $ref: '#/components/schemas/Scope'
        can_trade:
          type: boolean
          deprecated: true
          description: '`true` when the key holds `spot.trade`.'
        ip_whitelist:
          type: array
          items:
            type: string
          description: Allowed client IPs (canonical IPv4/IPv6). Empty = any IP (the key then expires in 90 days).
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        last_used_at:
          type: string
          format: date-time
          description: Last authenticated use (updated every ~15 s).
        expires_at:
          type: string
          format: date-time
          description: Absent for keys with an IP allow-list (they do not expire).
        expired:
          type: boolean
        renewable_from:
          type: string
          format: date-time
          description: From this moment the key can be renewed (5 days before expiry).
        renewed_at:
          type: string
          format: date-time
        request_count:
          type: integer
          format: int64
          description: Authenticated requests made with the key.
        customer_id:
          type: string
          format: uuid
          description: Present when the key is restricted to this sub-account.
    Balance:
      type: object
      required:
      - currency
      - kind
      - exponent
      - balance
      - held
      - available
      properties:
        currency:
          type: string
          examples:
          - USDT
        kind:
          type: string
          enum:
          - funding
          - spot
          - p2p
          - earn
          description: Wallet. Deposits and withdrawals use `funding`; spot orders use `spot`.
        exponent:
          type: integer
          description: Decimals of the currency.
        balance:
          type: integer
          format: int64
          description: Total balance in minor units.
        held:
          type: integer
          format: int64
          description: Amount reserved by open orders, pending withdrawals or conversions.
        available:
          type: integer
          format: int64
          description: '`balance - held`.'
    PortfolioAsset:
      type: object
      properties:
        currency:
          type: string
        balance:
          type: integer
          format: int64
          description: Sum of all wallets, minor units.
        held:
          type: integer
          format: int64
          description: Sum of held amounts, minor units.
        exponent:
          type: integer
        price_usd:
          type: number
          description: Display price in USD (not for accounting).
        value_usd:
          type: number
          description: Display value in USD.
        pct:
          type: number
          description: Share of the total portfolio value, in percent.
    UsageWindow:
      type: object
      properties:
        limit_usd_minor:
          type: integer
          format: int64
          description: Window limit in USD cents; `0` = unlimited.
        used_usd_minor:
          type: integer
          format: int64
          description: Amount already used in the window, USD cents.
        remaining_usd_minor:
          type:
          - integer
          - 'null'
          format: int64
          description: Remaining amount; `null` when unlimited.
        unlimited:
          type: boolean
    ConvertAllowance:
      type: object
      properties:
        class:
          type: string
          enum:
          - crypto
          - fiat
          description: '`crypto` = crypto↔crypto; `fiat` = any conversion involving BRL/PYG.'
        level:
          type: string
          description: Verification level (`unverified`, `verified`, `plus`, `vip`).
        plan:
          type: string
          description: Plan label.
        max_tx_usd_minor:
          type: integer
          format: int64
          description: Per-transaction limit in USD cents; `0` = unlimited.
        fee_bps:
          type: integer
          description: Convert fee of the plan for this class, basis points.
        allowed:
          type: boolean
          description: '`false` for unverified accounts.'
        daily:
          $ref: '#/components/schemas/UsageWindow'
        monthly:
          $ref: '#/components/schemas/UsageWindow'
        windows:
          type: object
          properties:
            daily:
              type: string
              const: rolling_24h
            monthly:
              type: string
              const: calendar_month_utc
    HistoryItem:
      type: object
      properties:
        type:
          type: string
          enum:
          - deposit
          - withdrawal
          - convert
          - trade
        rail:
          type: string
          description: Origin of the item.
          examples:
          - usdt
          - onchain
          - fiat
          - dubaicash
          - mexc
          - convert
          - spot
        id:
          type: string
          format: uuid
        asset:
          type: string
          description: Currency (the symbol for trades).
        amount:
          type: integer
          format: int64
          description: Amount in minor units of `asset` (base amount for trades).
        exponent:
          type: integer
          description: Decimals of `amount` (absent for trades).
        status:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        details:
          type: object
          additionalProperties: true
          description: Type-specific fields (network, txid, price, fees…).
    StatementType:
      type: string
      enum:
      - deposit
      - withdrawal
      - convert
      - trade
      - fee
      - reversal
      - adjustment
      - transfer
      - payment
      - p2p
      - earn
      - reward
      - other
    StatementLine:
      type: object
      required:
      - id
      - entry_id
      - tx_id
      - date
      - type
      - wallet
      - currency
      - exponent
      - amount
      - balance_after
      properties:
        id:
          type: string
          description: Ledger entry id; fee lines use `<entry_id>:fee`.
          examples:
          - '9182'
          - 9182:fee
        entry_id:
          type: integer
          format: int64
        tx_id:
          type: string
          format: uuid
          description: Ledger transaction id (shared by all lines of one movement).
        date:
          type: string
          format: date-time
        type:
          $ref: '#/components/schemas/StatementType'
        rail:
          type: string
          description: Rail when known.
          examples:
          - pix
          - usdt
          - onchain
          - dubaicash
          - mexc
          - bank_transfer
          - cash
        wallet:
          type: string
          examples:
          - funding
          - spot
          - p2p
          - earn
        currency:
          type: string
        exponent:
          type: integer
        amount:
          type: integer
          format: int64
          description: Signed amount in minor units (positive = credit).
        balance_after:
          type: integer
          format: int64
          description: Wallet balance after this line, minor units.
        reference:
          type: string
          description: Business reference `<kind>:<uuid>` when available.
          examples:
          - fiat_dep:00000000-0000-4000-8000-000000000401
    StatementPage:
      type: object
      required:
      - lines
      - next_cursor
      - from
      - to
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/StatementLine'
        next_cursor:
          type:
          - string
          - 'null'
        from:
          type: string
          format: date-time
        to:
          type: string
          format: date-time
    SpotSymbol:
      type: object
      properties:
        symbol:
          type: string
          examples:
          - BTC/USDT
        base:
          type: string
          examples:
          - BTC
        quote:
          type: string
          examples:
          - USDT
        base_exp:
          type: integer
          description: Decimals of the base currency (`amount`).
        quote_exp:
          type: integer
          description: Decimals of the quote currency (`price`).
    SpotSymbols:
      type: object
      properties:
        symbols:
          type: array
          items:
            $ref: '#/components/schemas/SpotSymbol'
        maker_bps:
          type: integer
          description: Maker fee actually charged, basis points (100 = 1 %).
        taker_bps:
          type: integer
          description: Taker fee actually charged, basis points.
    Level:
      type: object
      properties:
        price:
          type: integer
          format: int64
          description: Quote minor units per one whole base unit.
        amount:
          type: integer
          format: int64
          description: Aggregated remaining amount at this price, base minor units.
    Book:
      type: object
      properties:
        symbol:
          type: string
        bids:
          type: array
          items:
            $ref: '#/components/schemas/Level'
          description: Best (highest) first.
        asks:
          type: array
          items:
            $ref: '#/components/schemas/Level'
          description: Best (lowest) first.
    Trade:
      type: object
      properties:
        id:
          type: string
          format: uuid
        symbol:
          type: string
        price:
          type: integer
          format: int64
          description: Quote minor units per whole base unit.
        amount:
          type: integer
          format: int64
          description: Base minor units.
        quote_amount:
          type: integer
          format: int64
          description: Quote minor units.
        taker_side:
          type: string
          enum:
          - buy
          - sell
        created_at:
          type: string
          format: date-time
    SpotOrder:
      type: object
      required:
      - id
      - client_order_id
      - symbol
      - side
      - type
      - price
      - amount
      - filled
      - quote_filled
      - status
      - created_at
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type: string
          format: uuid
          description: Owner account.
        client_order_id:
          type:
          - string
          - 'null'
          description: Your id for the order (`null` when not set). Unique per account. For OCO it is set on the first leg
            only.
        symbol:
          type: string
        side:
          type: string
          enum:
          - buy
          - sell
        type:
          type: string
          enum:
          - limit
          - market
          - stop_limit
          - oco
          - trailing_stop
        price:
          type: integer
          format: int64
          description: Limit price, quote minor units per whole base unit (`0` for market).
        amount:
          type: integer
          format: int64
          description: Order amount, base minor units.
        filled:
          type: integer
          format: int64
          description: Filled amount, base minor units.
        quote_filled:
          type: integer
          format: int64
          description: Filled value, quote minor units.
        status:
          type: string
          enum:
          - pending
          - open
          - partial
          - filled
          - cancelled
          - reconcile
          description: '`pending` = conditional order waiting for its trigger; `reconcile` = executed externally, settlement
            under review.'
        created_at:
          type: string
          format: date-time
        stop_price:
          type: integer
          format: int64
          description: Trigger price (conditional orders).
        trigger_dir:
          type: string
          description: Trigger direction of a conditional order (`up` or `down`).
        oco_group:
          type: string
          format: uuid
          description: Shared by both legs of an OCO; cancelling one cancels the other.
        trail_bps:
          type: integer
          description: Trailing distance in basis points (trailing stop).
        trail_ref:
          type: integer
          format: int64
          description: Current trailing reference price (trailing stop).
    ConvertRequest:
      type: object
      required:
      - from
      - to
      - amount
      properties:
        from:
          type: string
          description: Currency you pay (case-insensitive).
          examples:
          - USDT
        to:
          type: string
          description: Currency you receive.
          examples:
          - BTC
        amount:
          type: integer
          format: int64
          description: Amount of `from`, minor units (> 0).
        quote_id:
          type: string
          format: uuid
          description: Execute at a quote obtained from `/v1/convert/quote` while it is valid (`expires_at`).
        min_receive:
          type: integer
          format: int64
          description: Minimum acceptable amount of `to`, minor units. The conversion fails rather than deliver less.
        idempotency_key:
          type: string
          pattern: ^[A-Za-z0-9_.:-]{8,100}$
          description: Legacy body field equivalent to the `Idempotency-Key` header for Convert de-duplication.
    ConvertLimits:
      type: object
      properties:
        crypto:
          $ref: '#/components/schemas/ConvertAllowance'
        fiat:
          $ref: '#/components/schemas/ConvertAllowance'
    ConvertQuote:
      type: object
      properties:
        quote_id:
          type: string
          format: uuid
          description: Pass to `POST /v1/convert` before `expires_at` to execute without re-quoting.
        expires_at:
          type: string
          format: date-time
          description: Quote validity (about 15 s).
        from:
          type: string
        to:
          type: string
        amount:
          type: integer
          format: int64
          description: Amount of `from`, minor units.
        from_exp:
          type: integer
        to_exp:
          type: integer
        route:
          type: string
          description: '`house`, `mexc`, `mixed`, `fiat` or a combination such as `house+fiat`.'
        mode:
          type: string
        legs:
          type: array
          items:
            type: object
            additionalProperties: true
          description: Execution legs (venue, currencies, estimated amounts).
        split:
          type: object
          description: How much of `amount` is filled by the house and by the Pool ArandixBit.
          properties:
            house:
              type: integer
              format: int64
            mexc:
              type: integer
              format: int64
        requires_approval:
          type: boolean
          description: '`true` for conversions involving fiat: execution waits for staff approval.'
        approval_ttl_sec:
          type: integer
          description: How long a fiat conversion waits for approval.
        fee_bps:
          type: integer
        fee:
          type: integer
          format: int64
          description: Estimated fee, minor units of `to`.
        fee_level:
          type: string
        fee_plan:
          type: string
        fee_class:
          type: string
          enum:
          - crypto
          - fiat
        house_spread_bps:
          type: integer
        fiat_spread_bps:
          type: integer
        slippage_bps:
          type: integer
        est_in:
          type: integer
          format: int64
          description: Estimated amount consumed, minor units of `from`.
        est_out:
          type: integer
          format: int64
          description: Estimated amount received, minor units of `to`.
        worst_out:
          type: integer
          format: int64
          description: Worst acceptable amount given slippage.
        min_receive:
          type: integer
          format: int64
          description: Minimum the execution will accept (`max(worst_out, your min_receive)`).
        min_amount:
          type: integer
          format: int64
          description: Minimum `amount` for this pair.
        rate:
          type: string
          description: Estimated rate (`to` per 1 `from`), decimal string.
        brl_price:
          description: BRL reference price used for fiat legs, when applicable.
        usd_minor:
          type: integer
          format: int64
          description: Value of `amount` in USD cents (for limits).
        limits:
          $ref: '#/components/schemas/ConvertAllowance'
      additionalProperties: true
    ConvertOrder:
      type: object
      properties:
        id:
          type: string
          format: uuid
        ok:
          type: boolean
          description: '`true` when the conversion settled (`completed`, `partial` or `compensated`).'
        status:
          type: string
          enum:
          - pending_approval
          - executing
          - review
          - completed
          - partial
          - compensated
          - failed
          - rejected
          - expired
          - cancelled
        from:
          type: string
        to:
          type: string
        amount:
          type: integer
          format: int64
          description: Requested amount of `from`.
        from_exp:
          type: integer
        to_exp:
          type: integer
        route:
          type: string
        needs_approval:
          type: boolean
        min_receive:
          type: integer
          format: int64
          description: Minimum amount of `to` protected for you.
        filled_in:
          type: integer
          format: int64
          description: Amount of `from` actually consumed.
        amount_out:
          type: integer
          format: int64
          description: Amount of `to` credited.
        fee:
          type: integer
          format: int64
          description: Fee charged, minor units of `to`.
        rate:
          type: number
          description: Effective rate (`to` per 1 `from`), display only.
        residual_currency:
          type:
          - string
          - 'null'
        residual_amount:
          type: integer
          format: int64
        error:
          type:
          - string
          - 'null'
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
          description: Approval deadline for `pending_approval`.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        estimate:
          description: Quote snapshot taken at request time.
        legs:
          type: array
          items:
            type: object
            additionalProperties: true
        limit_class:
          type: string
          enum:
          - crypto
          - fiat
        usd_minor:
          type: integer
          format: int64
        tx_id:
          type: string
          description: Ledger transaction id once settled (empty before).
        in:
          type: integer
          format: int64
          deprecated: true
          description: Same as `filled_in`.
        out:
          type: integer
          format: int64
          deprecated: true
          description: Same as `amount_out`.
        replayed:
          type: boolean
          description: 'Only on `POST /v1/convert`: `true` when the conversion already existed for this idempotency key.'
      additionalProperties: true
    USDTDeposit:
      type: object
      required:
      - id
      - asset
      - network_name
      - amount
      - status
      - created_at
      - exponent
      properties:
        id:
          type: string
          format: uuid
        asset:
          type: string
          description: USDT network code.
          examples:
          - USDTTRC20
        network_name:
          type: string
          examples:
          - TRON (TRC-20)
        amount:
          type: integer
          format: int64
          description: Ordered amount, USDT minor units (6 decimals).
        status:
          type: string
          enum:
          - creating
          - open
          - review
          - credited
          - closed
          - failed
        pay_address:
          type: string
          description: Address to send to (while `open`).
        pay_amount:
          type: string
          description: Exact amount to send, decimal string. Send exactly this value.
        qr_payload:
          type: string
        expires_at:
          type: string
          format: date-time
        credited_amount:
          type: integer
          format: int64
          description: Amount credited, USDT minor units.
        provider_status:
          type: string
        warning:
          type: string
          description: Localized warning to show to the payer, if any.
        created_at:
          type: string
          format: date-time
        exponent:
          type: integer
    RailWithdrawal:
      type: object
      required:
      - id
      - rail
      - currency
      - network
      - to_address
      - amount
      - debit
      - status
      - in_review
      - cancellable
      - created_at
      properties:
        id:
          type: string
          format: uuid
        rail:
          type: string
          enum:
          - dubaicash
          - mexc
        currency:
          type: string
        network:
          type: string
          examples:
          - USDTTRC20
          - TRC20
        network_name:
          type: string
        to_address:
          type: string
        memo:
          type: string
        amount:
          type: integer
          format: int64
          description: Amount the destination receives, minor units.
        debit:
          type: integer
          format: int64
          description: Amount debited from your balance (`amount + fee`).
        net_amount:
          type: string
          description: Amount received, decimal string.
        fee:
          type: string
          description: Fee, decimal string.
        fee_usd:
          type: string
          description: Fee in USD, decimal string.
        fee_mode:
          type: string
          enum:
          - fixed
          - cost_plus
        status:
          type: string
          enum:
          - pending_review
          - approved
          - queued
          - sending
          - submitted
          - unknown
          - provider_review
          - review
          - completed
          - failed
          - refunded
          - rejected
          - cancelled
        in_review:
          type: boolean
          description: Waiting for staff (four-eyes) or provider review.
        txid:
          type: string
        cancellable:
          type: boolean
          description: '`true` while `pending_review` or `queued`.'
        created_at:
          type: string
          format: date-time
        finished_at:
          type: string
          format: date-time
    WithdrawalCreated:
      type: object
      required:
      - withdrawal
      properties:
        withdrawal:
          $ref: '#/components/schemas/RailWithdrawal'
        auto:
          type: boolean
          description: '`true` = being sent automatically; `false` = waiting for four-eyes review (amount reserved).'
        duplicate:
          type: boolean
          description: '`true` when an identical withdrawal (same Idempotency-Key, or same data within 60 s) already existed;
            it is returned instead of a new one.'
        note:
          type: string
          description: Localized human-readable status note.
    WithdrawalQuoteFee:
      type: object
      properties:
        amount:
          type: integer
          format: int64
          description: Amount the destination receives.
        debit:
          type: integer
          format: int64
          description: Total debit (`amount + fee`).
        fee:
          type: integer
          format: int64
          description: Fee in minor units of the currency.
        net_amount:
          description: Amount received (decimal string for USDT, integer minor units for the Pool ArandixBit).
        exponent:
          type: integer
        fee_usd:
          type: string
        fee_usd_minor:
          type: integer
          format: int64
        fee_fixed:
          type: boolean
        fee_mode:
          type: string
          enum:
          - fixed
          - cost_plus
        quote_id:
          type: string
          format: uuid
          description: Send as `quote_id` when creating the withdrawal to lock this fee.
        expires_at:
          type: string
          format: date-time
        ttl_sec:
          type: integer
          description: Quote validity in seconds (default 30).
        min:
          type: integer
          format: int64
          description: 'Pool ArandixBit only: minimum amount.'
        max:
          type: integer
          format: int64
          description: 'Pool ArandixBit only: maximum amount (absent = no maximum).'
        memo_supported:
          type: boolean
          description: Pool ArandixBit only.
        network_name:
          type: string
          description: Pool ArandixBit only.
    OnchainDeposit:
      type: object
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type: string
          format: uuid
        network:
          type: string
        txid:
          type: string
        vout_index:
          type: integer
        address:
          type: string
        amount:
          type: integer
          format: int64
          description: Minor units of the network currency.
        confirmations:
          type: integer
        status:
          type: string
          examples:
          - pending
          - credited
        created_at:
          type: string
          format: date-time
    OnchainWithdrawal:
      type: object
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type: string
          format: uuid
        network:
          type: string
        to_address:
          type: string
        amount:
          type: integer
          format: int64
          description: Minor units.
        status:
          type: string
          enum:
          - pending
          - approved
          - broadcast
          - rejected
          - cancelled
          - failed
        txid:
          type: string
        reason:
          type: string
        created_at:
          type: string
          format: date-time
        custody_state:
          type: string
          description: '`pending_approval` when the custodian holds the transfer for policy approval.'
    WhitelistAddress:
      type: object
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type: string
          format: uuid
        network:
          type: string
          description: Network key, e.g. `mexc:BTC:BTC` or `mexc:USDT:TRX` (`dc:…` keys belong to the paused legacy USDT order
            rail).
          examples:
          - dc:USDTTRC20
        address:
          type: string
        label:
          type: string
        active:
          type: boolean
        added_at:
          type: string
          format: date-time
          description: Start of the security cooldown.
    PaymentField:
      type: object
      description: One line of payment instructions (localized label).
      properties:
        label:
          type: string
        value:
          type: string
    FiatDeposit:
      type: object
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type: string
          format: uuid
        currency:
          type: string
          examples:
          - BRL
        amount:
          type: integer
          format: int64
          description: 'Minor units (BRL: cents).'
        method:
          type: string
          examples:
          - pix
          - bank_transfer
        status:
          type: string
          enum:
          - pending
          - confirmed
          - rejected
        reason:
          type: string
          description: Rejection reason.
        created_at:
          type: string
          format: date-time
        processor:
          type: string
          description: 'Set on automatic charges only; manual deposits have no processor. Internal identifier: do not rely
            on its value.'
        auto:
          type: boolean
          description: '`true` for automatic charges (credited on provider confirmation).'
        pix_copy_paste:
          type: string
          description: PIX copy-and-paste code (only while payable).
        pix_expires_at:
          type: string
          format: date-time
        credited_amount:
          type: integer
          format: int64
          description: Amount credited, minor units (present once credited).
        fee:
          type: integer
          format: int64
          description: Service fee taken out of the deposit, minor units — the fee-group rate (e.g. 0.50 % of a PIX deposit)
            or the plan rule.
        net_amount:
          type: integer
          format: int64
          description: What reaches the balance (`amount − fee`; equals `credited_amount` once credited).
        reference:
          type: string
          description: Short reference to quote in the payment/support.
        instructions:
          type: object
          additionalProperties:
            type: string
          description: Legacy label → value map of payment instructions.
        instructions_fields:
          type: array
          items:
            $ref: '#/components/schemas/PaymentField'
        qr:
          type: object
          description: QR payload (PIX copy-and-paste) while payable.
          properties:
            payload:
              type: string
      additionalProperties: true
    PixDepositCreated:
      type: object
      properties:
        deposit:
          $ref: '#/components/schemas/FiatDeposit'
        reference:
          type: string
        instructions:
          type: object
          additionalProperties:
            type: string
        instructions_fields:
          type: array
          items:
            $ref: '#/components/schemas/PaymentField'
        qr:
          type: object
          properties:
            payload:
              type: string
        auto:
          type: boolean
          description: '`true` for an automatic charge. Absent in the manual flow.'
        expires_at:
          type: string
          format: date-time
        reused:
          type: boolean
          description: '`true` when an open charge with the same amount was returned instead of a new one.'
        next:
          type: string
          description: Localized next-step hint.
      additionalProperties: true
    AccountFees:
      type: object
      properties:
        tier:
          type: string
        level:
          type: string
        plan:
          type: string
        convert_bps:
          type: integer
        convert_crypto_bps:
          type: integer
        convert_fiat_bps:
          type: integer
        spot_maker_bps:
          type: integer
        spot_taker_bps:
          type: integer
        p2p_advertiser_bps:
          type: integer
        fee_group:
          $ref: '#/components/schemas/FeeGroupRates'
    FeeGroupRates:
      type: object
      description: 'Contract pricing that replaces the plan''s fees (present only for accounts in a fee

        group). `*_cbps` = hundredths of a basis point (1 % = 10000; 0.0575 % = 575);

        `*_pct` = the same as a decimal percentage string. Fees are `floor(amount × cbps /

        1000000)`; the crypto withdrawal fee is `ceil(network_cost × (1 + markup))`.

        '
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        pix:
          type: object
          properties:
            currency:
              type: string
              enum:
              - BRL
            deposit_fee_cbps:
              type: integer
            deposit_fee_pct:
              type: string
            deposit_min_minor:
              type: integer
              format: int64
              description: BRL cents (0 = plan minimum).
            withdraw_fee_cbps:
              type: integer
            withdraw_fee_pct:
              type: string
            withdraw_min_minor:
              type: integer
              format: int64
              description: BRL cents (0 = none).
            hours:
              type: object
              properties:
                enabled:
                  type: boolean
                tz:
                  type: string
                  description: IANA time zone.
                start:
                  type: string
                  description: HH:MM, inclusive.
                end:
                  type: string
                  description: HH:MM, exclusive.
                days:
                  type: array
                  items:
                    type: integer
                    minimum: 0
                    maximum: 6
                  description: Week days (0 = Sunday).
                open:
                  type: boolean
                  description: Whether PIX is open right now.
        convert:
          type: object
          properties:
            fiat_cbps:
              type: integer
              description: Any pair with a fiat currency (BRL/PYG/USD).
            fiat_pct:
              type: string
            crypto_stable_cbps:
              type: integer
              description: Crypto ↔ USDT/USDC.
            crypto_stable_pct:
              type: string
            crypto_crypto_cbps:
              type: integer
              description: Crypto ↔ crypto (no stablecoin).
            crypto_crypto_pct:
              type: string
        crypto:
          type: object
          properties:
            deposit_fee_cbps:
              type: integer
            deposit_fee_pct:
              type: string
            withdraw_fee_model:
              type: string
              enum:
              - network_cost_plus_pct
            withdraw_markup_cbps:
              type: integer
            withdraw_markup_pct:
              type: string
        py_payout:
          type: object
          properties:
            transfer_bps:
              type: integer
            cash_bps:
              type: integer
    PYPayout:
      type: object
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type: string
          format: uuid
        source_currency:
          type: string
        source_amount:
          type: integer
          format: int64
          description: Minor units of `source_currency` (reserved
          then debited when paid).: null
        deliver_currency:
          type: string
        deliver_amount:
          type: integer
          format: int64
          description: Net amount delivered
          minor units of `deliver_currency`.: null
        method:
          type: string
          enum:
          - transfer
          - cash
        fee_bps:
          type: integer
        rate_per_usd:
          type: number
          description: Delivery units per 1 USD (locked).
        usd_per_source:
          type: number
          description: USD per 1 source unit (locked).
        destination:
          type: object
          additionalProperties: true
        cash_location:
          type: string
        status:
          type: string
          enum:
          - pending
          - paid
          - rejected
          - cancelled
        reason:
          type: string
        payment_ref:
          type: string
        created_at:
          type: string
          format: date-time
        reviewed_at:
          type: string
          format: date-time
        paid_at:
          type: string
          format: date-time
    PYPayoutQuote:
      type: object
      properties:
        pay:
          type: string
        deliver:
          type: string
        method:
          type: string
        pay_amount:
          type: number
        deliver_gross:
          type: number
        fee:
          type: number
        deliver_net:
          type: number
        fee_pct:
          type: number
        fee_bps:
          type: integer
        rate_per_usd:
          type: number
        usd_per_pay:
          type: number
        eta_hours:
          type: integer
        eta_business:
          type: boolean
    FiatWithdrawal:
      type: object
      properties:
        id:
          type: string
          format: uuid
        currency:
          type: string
        amount:
          type: integer
          format: int64
          description: Minor units.
        method:
          type: string
        destination:
          type: object
          additionalProperties: true
        status:
          type: string
          enum:
          - pending
          - approved
          - sending
          - paid
          - rejected
          - cancelled
        fee:
          type: integer
          format: int64
          description: Service fee (taken out of `amount`)
          minor units.: null
        net:
          type: integer
          format: int64
          description: What the destination receives (`amount − fee`).
        reason:
          type: string
        payment_ref:
          type: string
        has_payment_proof:
          type: boolean
        payment_proof_name:
          type: string
        created_at:
          type: string
          format: date-time
        reviewed_at:
          type: string
          format: date-time
        paid_at:
          type: string
          format: date-time
    WebhookErrorCode:
      type: string
      description: '**Stable** code of a delivery failure (the free-text `error` next to it may change).


        | Code | Meaning |

        |---|---|

        | `dns_unresolved` | Hostname does not resolve. |

        | `blocked_address` | Hostname resolves to an internal or reserved IP. |

        | `connect_timeout` | Connection or response exceeded the time limit. |

        | `tls_error` | Certificate or TLS handshake error. |

        | `http_status` | Non-2xx response. |

        | `redirect_not_allowed` | 3xx response (redirects are never followed). |

        | `body_too_large` | Response body too large. |

        | `secret_unavailable` | The endpoint secret could not be read — rotate the secret. |

        | `invalid_url` | Invalid URL. |

        | `other` | Any other error. |

        '
      enum:
      - dns_unresolved
      - blocked_address
      - connect_timeout
      - tls_error
      - http_status
      - redirect_not_allowed
      - body_too_large
      - secret_unavailable
      - invalid_url
      - other
    WebhookEndpoint:
      type: object
      required:
      - id
      - url
      - events
      - include_customers
      - active
      - consecutive_failures
      - created_at
      - updated_at
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type: string
          format: uuid
        url:
          type: string
          format: uri
        description:
          type: string
        events:
          type: array
          items:
            $ref: '#/components/schemas/EventType'
        include_customers:
          type: boolean
          description: 'Partner: also receive events of sub-accounts.'
        active:
          type: boolean
        disabled_reason:
          type: string
        consecutive_failures:
          type: integer
        last_success_at:
          type: string
          format: date-time
        last_failure_at:
          type: string
          format: date-time
        last_error:
          type: string
          description: Last delivery/test error (free text — use `last_error_code`).
        last_error_code:
          $ref: '#/components/schemas/WebhookErrorCode'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    WebhookDelivery:
      type: object
      properties:
        id:
          type: string
          format: uuid
        event_id:
          type: string
          format: uuid
        event_type:
          type: string
        event_data:
          type: object
          additionalProperties: true
        endpoint_id:
          type: string
          format: uuid
        endpoint_user_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
          - pending
          - sending
          - delivered
          - failed
        attempts:
          type: integer
        next_attempt_at:
          type: string
          format: date-time
        last_status_code:
          type: integer
        last_latency_ms:
          type: integer
        last_error:
          type: string
          description: Free text — use `last_error_code`.
        last_error_code:
          $ref: '#/components/schemas/WebhookErrorCode'
        last_response:
          type: string
          description: First 1 KiB of the last response body.
        delivered_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    WebhookAttempt:
      type: object
      properties:
        attempt:
          type: integer
        status_code:
          type: integer
        latency_ms:
          type: integer
        error:
          type: string
          description: Free text — use `error_code`.
        error_code:
          $ref: '#/components/schemas/WebhookErrorCode'
        response:
          type: string
          description: First 1 KiB of the response body.
        created_at:
          type: string
          format: date-time
    PartnerCustomer:
      type: object
      required:
      - id
      - email
      - full_name
      - country
      - status
      - kyc_status
      - created_at
      properties:
        id:
          type: string
          format: uuid
        email:
          type: string
          format: email
        full_name:
          type: string
        country:
          type: string
          description: ISO 3166-1 alpha-2.
        external_ref:
          type: string
          description: Your reference for the customer (unique per partner).
        status:
          type: string
          examples:
          - active
        kyc_status:
          type: string
          enum:
          - none
          - pending
          - approved
          - rejected
        created_at:
          type: string
          format: date-time
    PartnerGrant:
      type: object
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type: string
          format: uuid
        email:
          type: string
          description: Masked without the `users.pii` permission.
        status:
          type: string
          enum:
          - proposed
          - approved
          - rejected
          - revoked
        reason:
          type: string
        proposed_by:
          type: string
          format: uuid
        decided_by:
          type: string
          format: uuid
        decision_note:
          type: string
        decided_at:
          type: string
          format: date-time
        revoked_by:
          type: string
          format: uuid
        revoked_at:
          type: string
          format: date-time
        revoke_reason:
          type: string
        created_at:
          type: string
          format: date-time
        is_partner:
          type: boolean
    ServerTime:
      type: object
      required:
      - server_time
      - iso
      properties:
        server_time:
          type: integer
          format: int64
          description: Server clock, Unix epoch in milliseconds.
        iso:
          type: string
          format: date-time
          description: Same instant, RFC 3339 with nanoseconds (UTC).
    Ticker:
      type: object
      properties:
        symbol:
          type: string
          examples:
          - BTC
        name:
          type: string
        price:
          type: number
          description: USD reference price (display).
        change_24h:
          type: number
          description: Percent.
        high_24h:
          type: number
        low_24h:
          type: number
        volume_24h:
          type: number
        market_cap:
          type: number
    Candle:
      type: object
      properties:
        time:
          type: integer
          description: Open time, Unix seconds.
        open:
          type: number
        high:
          type: number
        low:
          type: number
        close:
          type: number
        volume:
          type: number
          description: Base volume (0 when the source does not provide it).
    WebhookEvent:
      type: object
      required:
      - id
      - type
      - created_at
      - api_version
      - data
      properties:
        id:
          type: string
          format: uuid
          description: Event id — equal to `X-ARX-Event-Id`. Use it to de-duplicate.
        type:
          $ref: '#/components/schemas/EventType'
        created_at:
          type: string
          format: date-time
        api_version:
          type: string
          const: '2026-10-07'
          description: Payload version.
        data:
          type: object
          description: Event-specific object (see each event). Sub-account events delivered to a partner include `customer_id`.
    WebhookDepositEvent:
      allOf:
      - $ref: '#/components/schemas/WebhookEvent'
      - type: object
        properties:
          data:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: Deposit id.
              rail:
                type: string
                enum:
                - usdt
                - onchain
                - fiat
                - mexc
              currency:
                type: string
              network:
                type: string
                description: USDT network or on-chain network (crypto rails).
              method:
                type: string
                description: 'Fiat method (fiat rail): `pix` for BRL PIX deposits.'
              amount:
                type: integer
                format: int64
                description: 'Deposit amount (fiat: the amount requested/paid), minor units.'
              credited_amount:
                type: integer
                format: int64
                description: Amount actually credited to the balance (`amount − fee`), minor units — fiat and fixed-address
                  (mexc) rails.
              fee:
                type: integer
                format: int64
                description: Fee taken out of the deposit, minor units — fiat and fixed-address (mexc) rails.
              exponent:
                type: integer
              txid:
                type: string
                description: On-chain transaction id (onchain rail).
              status:
                type: string
                examples:
                - credited
                - confirmed
              customer_id:
                type: string
                format: uuid
                description: Sub-account id — only on sub-account events delivered to the partner.
              customer_external_ref:
                type:
                - string
                - 'null'
                description: The partner's `external_ref` of the sub-account — only on sub-account events delivered to the
                  partner.
    WebhookWithdrawalEvent:
      allOf:
      - $ref: '#/components/schemas/WebhookEvent'
      - type: object
        properties:
          data:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: Withdrawal id.
              rail:
                type: string
                enum:
                - dubaicash
                - mexc
                - onchain
                - fiat
                - py_payout
              currency:
                type: string
                description: 'Currency debited (py_payout: the source currency).'
              network:
                type: string
              method:
                type: string
                description: Fiat method (fiat rail, `pix` for BRL PIX) or `transfer`/`cash` (py_payout).
              amount:
                type: integer
                format: int64
                description: Amount the destination receives, minor units.
              debit:
                type: integer
                format: int64
                description: Amount debited.
              fee:
                type: integer
                format: int64
                description: 'Service fee taken out of `amount`, minor units of `currency` (fiat rail; py_payout: `amount
                  × fee_bps / 10000`).'
              net:
                type: integer
                format: int64
                description: '`amount − fee`, minor units of `currency` (fiat: what is paid to the PIX/bank destination; py_payout:
                  the source amount converted into `deliver_amount`).'
              deliver_currency:
                type: string
                description: Currency delivered (py_payout).
              deliver_amount:
                type: integer
                format: int64
                description: Net amount delivered (py_payout).
              deliver_exponent:
                type: integer
                description: Exponent of `deliver_currency` (py_payout).
              fee_bps:
                type: integer
                description: Fee applied (py_payout).
              cash_location:
                type:
                - string
                - 'null'
                description: Cash pick-up point (py_payout cash).
              payment_ref:
                type:
                - string
                - 'null'
                description: Payment reference (PIX end-to-end id / transfer reference) once paid.
              reason:
                type:
                - string
                - 'null'
                description: Rejection reason (py_payout).
              exponent:
                type: integer
              status:
                type: string
              txid:
                type:
                - string
                - 'null'
              customer_id:
                type: string
                format: uuid
                description: Sub-account id — only on sub-account events delivered to the partner.
              customer_external_ref:
                type:
                - string
                - 'null'
                description: The partner's `external_ref` of the sub-account — only on sub-account events delivered to the
                  partner.
    WebhookReversalEvent:
      allOf:
      - $ref: '#/components/schemas/WebhookEvent'
      - type: object
        properties:
          data:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: Deposit (`deposit.reversed`) or withdrawal (`withdrawal.returned`) id.
              reversal_id:
                type: string
                format: uuid
              rail:
                type: string
                enum:
                - fiat
              method:
                type: string
                enum:
                - pix
              currency:
                type: string
              exponent:
                type: integer
              amount:
                type: integer
                format: int64
                description: Reversed amount, minor units.
              applied:
                type: integer
                format: int64
                description: Amount debited from (or, for `withdrawal.returned`, credited to) the Funding balance.
              shortfall:
                type: integer
                format: int64
                description: Amount the balance could not cover (a debt settled by our team).
              status:
                type: string
                enum:
                - applied
                - debt
                - credit_cancelled
                - returned
              event:
                type: string
                examples:
                - PIX_REVERSAL
                - PIX_REFUND
                - MED
                - PIX_REVERSAL_OUT
              customer_id:
                type: string
                format: uuid
                description: Sub-account id — only on sub-account events delivered to the partner.
    WebhookOrderEvent:
      allOf:
      - $ref: '#/components/schemas/WebhookEvent'
      - type: object
        properties:
          data:
            type: object
            properties:
              id:
                type: string
                format: uuid
              symbol:
                type: string
              side:
                type: string
                enum:
                - buy
                - sell
              type:
                type: string
              price:
                type: integer
                format: int64
                description: Quote minor units per whole base unit.
              amount:
                type: integer
                format: int64
                description: Base minor units.
              filled:
                type: integer
                format: int64
                description: Base minor units.
              quote_filled:
                type: integer
                format: int64
                description: Quote minor units.
              status:
                type: string
                const: filled
              customer_id:
                type: string
                format: uuid
                description: Sub-account id — only on sub-account events delivered to the partner.
    WebhookConvertEvent:
      allOf:
      - $ref: '#/components/schemas/WebhookEvent'
      - type: object
        properties:
          data:
            type: object
            properties:
              id:
                type: string
                format: uuid
              from:
                type: string
              to:
                type: string
              amount:
                type: integer
                format: int64
                description: Requested amount of `from`.
              from_exponent:
                type: integer
              amount_out:
                type: integer
                format: int64
                description: Amount of `to` credited (0 until executed).
              to_exponent:
                type: integer
              fee:
                type: integer
                format: int64
                description: Fee, minor units of `to`.
              status:
                type: string
                enum:
                - pending_approval
                - completed
                - partial
                - rejected
              customer_id:
                type: string
                format: uuid
                description: Sub-account id — only on sub-account events delivered to the partner.
    WebhookKYCEvent:
      allOf:
      - $ref: '#/components/schemas/WebhookEvent'
      - type: object
        properties:
          data:
            type: object
            properties:
              status:
                type: string
                enum:
                - none
                - pending
                - approved
                - rejected
              previous_status:
                type: string
              customer_id:
                type: string
                format: uuid
                description: Sub-account id — only on sub-account events delivered to the partner.
    WebhookPartnerEvent:
      allOf:
      - $ref: '#/components/schemas/WebhookEvent'
      - type: object
        properties:
          data:
            type: object
            properties:
              customer_id:
                type: string
                format: uuid
                description: Sub-account id.
              status:
                type: string
                description: KYC status (`approved`/`rejected`) for KYC events.
              country:
                type: string
                description: Only on `partner.customer.created`.
              external_ref:
                type:
                - string
                - 'null'
                description: Only on `partner.customer.created`.
    PartnerEarnExitPreview:
      type: object
      properties:
        position_id:
          type: string
          format: uuid
        asset:
          type: string
        exponent:
          type: integer
        principal_minor:
          type: integer
          format: int64
        penalty_bps:
          type: integer
        penalty_minor:
          type: integer
          format: int64
        forfeited_minor:
          type: integer
          format: int64
        yield_paid_minor:
          type: integer
          format: int64
        refund_net_minor:
          type: integer
          format: int64
        refund_business_days:
          type: integer
        refund_due_at:
          type: string
          format: date-time
        can_cancel:
          type: boolean
    PartnerEarnPosition:
      type: object
      properties:
        id:
          type: string
          format: uuid
        customer_id:
          type: string
          format: uuid
        product_id:
          type: string
        asset:
          type: string
        exponent:
          type: integer
        principal_minor:
          type: integer
          format: int64
        apy_bps:
          type: integer
          description: Frozen at opening.
        term_days:
          type: integer
        early_penalty_bps:
          type: integer
        refund_business_days:
          type: integer
        status:
          type: string
          enum:
          - active
          - cancelling
          - cancelled
          - matured
        opened_at:
          type: string
          format: date-time
        matures_at:
          type:
          - string
          - 'null'
          format: date-time
        next_accrual_at:
          type: string
          format: date-time
          description: Next credit (12:00 UTC).
        accrual_days:
          type: integer
        accrued_minor:
          type: integer
          format: int64
          description: Total credited so far.
        locked_minor:
          type: integer
          format: int64
          description: Credited and not yet released.
        released_minor:
          type: integer
          format: int64
        claimable_minor:
          type: integer
          format: int64
          description: Released and not yet withdrawn.
        claimed_minor:
          type: integer
          format: int64
        yield_pending_minor:
          type: integer
          format: int64
          description: Remaining yield of a closed position waiting for automatic payment.
        penalty_minor:
          type: integer
          format: int64
        forfeited_minor:
          type: integer
          format: int64
        refund_net_minor:
          type:
          - integer
          - 'null'
          format: int64
        refund_due_at:
          type:
          - string
          - 'null'
          format: date-time
        cancel_requested_at:
          type:
          - string
          - 'null'
          format: date-time
        closed_at:
          type:
          - string
          - 'null'
          format: date-time
        next_release_at:
          type:
          - string
          - 'null'
          format: date-time
    PartnerEarnProduct:
      type: object
      properties:
        id:
          type: string
        family:
          type: string
          enum:
          - vault
          - btc_term
          - eth_staking
        name:
          type: string
        asset:
          type: string
        exponent:
          type: integer
        term_days:
          type: integer
          description: 0 means no term.
        apy_bps:
          type: integer
          description: 'Annual rate: 700 = 7.00%.'
        min_minor:
          type: integer
          format: int64
        early_penalty_bps:
          type: integer
          description: Penalty on capital for an early exit.
        refund_business_days:
          type: integer
        status:
          type: string
    InvoiceAddressResponse:
      type: object
      required:
      - invoice_address
      properties:
        invoice_address:
          type: object
          required:
          - id
          - coin
          - network
          - address
          - reference
          - created_at
          properties:
            id:
              type: string
              format: uuid
            coin:
              type: string
              enum:
              - BTC
              - USDT
            network:
              type: string
              enum:
              - BTC
              - TRC20
              - BEP20
            address:
              type: string
              description: Send only this coin on this network to this address (TRON in base58 "T…").
            reference:
              type: string
            created_at:
              type: string
              format: date-time
            active:
              type: boolean
              description: '`false` while the network wallet is switched off: the address is not being read right now — do
                not show it to payers. Always `true` on creation.'
            deposits:
              type: array
              description: Only in `GET .../invoice-addresses/{id}`. Newest first, up to 100.
              items:
                type: object
                required:
                - tx_id
                - amount
                - status
                - created_at
                - credited_at
                properties:
                  tx_id:
                    type: string
                    description: On-chain transaction hash.
                  amount:
                    type: string
                    description: Decimal amount received (text, never a float).
                  status:
                    type: string
                    enum:
                    - confirming
                    - credited
                    - rejected
                    - below_min
                  created_at:
                    type: string
                    format: date-time
                  credited_at:
                    type:
                    - string
                    - 'null'
                    format: date-time
x-arx-error-codes:
- code: address_cooldown
  status: 422
  description: The withdrawal address is still in its security cooldown after being whitelisted.
- code: address_not_whitelisted
  status: 422
  description: The withdrawal address is not on the whitelist (required for API-key and partner withdrawals).
- code: api_key_customer_limit
  status: 409
  description: A sub-account already has the maximum of 5 restricted keys.
- code: api_key_customer_restricted
  status: 403
  description: A key restricted to a sub-account cannot access this route.
- code: api_key_customer_scope
  status: 400
  description: A sub-account restricted key only accepts customer scopes (no `partner.*`).
- code: api_key_expired
  status: 401
  description: The API key expired. Also returned as 409 when trying to edit or renew an expired key.
- code: api_key_limit
  status: 409
  description: The account already has the maximum number of active API keys (30).
- code: api_key_no_expiry
  status: 409
  description: Keys with an IP allow-list do not expire and cannot be renewed.
- code: api_key_renew_too_early
  status: 409
  description: Renewal opens 5 days before expiry (`details.renewable_from`).
- code: api_key_required
  status: 403
  description: This partner operation moves money and must be called with an API key, not a session.
- code: api_key_scope_required
  status: 403
  description: The API key lacks the scope required by the route (`details.scope`).
- code: bad_request
  status: 400
  description: Malformed JSON or invalid parameters; `details` maps each invalid field to a hint.
- code: below_min_withdrawal
  status: 422
  description: Amount below the minimum withdrawal (`details.min`).
- code: conflict
  status: 409
  description: The resource is not in a state that allows the operation (for example, the order is not open).
- code: convert_below_min_receive
  status: 409
  description: The conversion would deliver less than `min_receive`; nothing was executed.
- code: convert_below_minimum
  status: 422
  description: Amount below the minimum for this conversion.
- code: convert_limit_exceeded
  status: 422
  description: Plan Convert limit (per conversion, daily or monthly) exceeded; `details` has `window`, `limit_usd_minor`,
    `remaining_usd_minor`.
- code: convert_not_filled
  status: 409
  description: The external leg of the conversion was not filled; nothing was executed.
- code: convert_pair_in_integration
  status: 422
  description: Conversions with this currency (PYG) are switched off at the moment.
- code: convert_pair_unavailable
  status: 422
  description: This conversion pair is not available.
- code: customer_exists
  status: 409
  description: A sub-account with this email or external reference already exists.
- code: deposit_limit_exceeded
  status: 409
  description: Plan deposit limit exceeded (fiat deposits); `details` has `window`, `level`, `plan`, `limit_usd_minor`, `used_usd_minor`,
    `remaining_usd_minor`, `amount_usd_minor`.
- code: dubaicash_provider_unavailable
  status: 502
  description: The payment provider is unavailable; nothing was charged — retry later.
- code: duplicate_client_order_id
  status: 409
  description: Another order of the account already uses this `client_order_id`.
- code: feature_unavailable
  status: 503
  description: The feature is not available in this environment.
- code: forbidden
  status: 403
  description: 'Not allowed: IP not in the key allow-list, inactive account or missing permission.'
- code: four_eyes_required
  status: 403
  description: 'Staff: four-eyes rule — the proposer cannot approve and nobody decides on their own account.'
- code: house_liquidity_unavailable
  status: 503
  description: House liquidity for this conversion is temporarily unavailable.
- code: idempotency_conflict
  status: 409
  description: 'Permanent-mode idempotency (Convert, withdrawals): the key was already used with different data.'
- code: idempotency_key_invalid
  status: 400
  description: Malformed `Idempotency-Key` (1–100 characters `[A-Za-z0-9_.:-]`).
- code: idempotency_key_reused
  status: 409
  description: 'Stored-response idempotency: the key was already used for a different request (method, path or body).'
- code: idempotency_request_in_progress
  status: 409
  description: A request with the same `Idempotency-Key` is still executing; retry shortly.
- code: insufficient_funds
  status: 422
  description: Not enough available balance for the operation.
- code: internal
  status: 500
  description: Unexpected server error. Safe to retry with backoff; include `X-Request-Id` when contacting support.
- code: invalid_address
  status: 400
  description: The destination address is invalid for the network.
- code: ip_required_for_withdraw
  status: 400
  description: Keys with a withdrawal scope require an IP allow-list.
- code: jurisdiction_blocked
  status: 451
  description: The country or jurisdiction is not served.
- code: kyc_already_approved
  status: 409
  description: The sub-account KYC is already approved.
- code: kyc_disabled
  status: 503
  description: Identity verification is temporarily unavailable.
- code: kyc_provider_error
  status: 502
  description: The KYC provider could not start the verification; retry later.
- code: kyc_required
  status: 403
  description: Approved identity verification (KYC) is required for this operation.
- code: limit_exceeded
  status: 422
  description: Plan withdrawal limit (per transaction, daily or monthly) exceeded.
- code: market_unavailable
  status: 503
  description: The reference market-data feed is temporarily unavailable.
- code: method_unavailable
  status: 422
  description: The deposit method is not available for this currency.
- code: mexc_provider_unavailable
  status: 502
  description: Pool ArandixBit is unavailable right now; retry later.
- code: mexc_withdraw_unavailable
  status: 503
  description: Crypto withdrawals via the Pool ArandixBit are not available right now.
- code: mxn_amount_out_of_range
  status: 422
  description: MXN deposit amount outside the allowed range.
- code: mxn_provider_unavailable
  status: 502
  description: The MXN deposit provider is unavailable; retry later.
- code: mxn_too_many_open
  status: 429
  description: Too many open MXN deposit charges; pay or wait for the current ones.
- code: no_live_price
  status: 503
  description: No live price available to validate a conditional order; retry shortly.
- code: not_found
  status: 404
  description: Resource not found (also returned for resources of other accounts).
- code: not_pending
  status: 409
  description: The conversion was already decided and can no longer be cancelled.
- code: partner_grant_closed
  status: 409
  description: 'Staff: the partner proposal was already decided.'
- code: partner_grant_open
  status: 409
  description: 'Staff: there is already an open proposal or the account is already a partner.'
- code: partner_not_eligible
  status: 422
  description: 'Staff: the account is not eligible to become a partner (business account with approved KYB required).'
- code: partner_required
  status: 403
  description: '`partner.*` scopes and routes are only for approved partner accounts.'
- code: payload_too_large
  status: 413
  description: The request body is too large.
- code: pix_outside_hours
  status: 422
  description: 'Fee-group account: PIX deposits/withdrawals are closed right now (`details.kind` deposit|withdrawal, `start`,
    `end` HH:MM, `tz`, `days` 0 = Sunday).'
- code: pix_amount_out_of_range
  status: 422
  description: PIX deposit amount outside the allowed range (`details.min`, `details.max`, BRL cents).
- code: pix_provider_unavailable
  status: 502
  description: The PIX provider is unavailable; nothing was charged — retry later.
- code: pix_qr_invalid
  status: 502
  description: The provider returned an invalid PIX QR code (BR Code failed CRC/format/amount checks); the deposit was closed
    and nothing can be paid — create a new charge or deposit USDT.
- code: pix_too_many_open
  status: 429
  description: Too many open PIX charges; pay or wait for the current ones to expire.
- code: price_unavailable
  status: 503
  description: No reliable live price right now (the operation fails closed); retry shortly.
- code: quote_expired
  status: 409
  description: The Convert quote expired; request a new quote.
- code: quote_invalid
  status: 400
  description: Unknown quote id, or a quote of another account.
- code: quote_mismatch
  status: 400
  description: The quote does not match this request (currencies, network or amount).
- code: rail_disabled
  status: 503
  description: This rail (Convert, USDT or withdrawal provider) is not available in this environment.
- code: rate_limited
  status: 429
  description: Rate limit exceeded; wait `Retry-After` seconds.
- code: routing_unavailable
  status: 503
  description: Liquidity routing is temporarily unavailable (502 when the external venue failed); retry later.
- code: sandbox_faucet_limit
  status: 429
  description: Sandbox only — the daily fictitious-balance limit for this currency was reached (`details.limit`, `details.used_minor`).
- code: security_lock
  status: 403
  description: Withdrawals are blocked for 24 h after a password or 2FA change (`details.until`).
- code: self_operation
  status: 403
  description: 'Staff: operations on one''s own account are not allowed.'
- code: settlement_pending
  status: 202
  description: The market order executed externally; internal settlement is being reconciled and the balance will be adjusted.
- code: staff_api_keys_forbidden
  status: 403
  description: Staff accounts never use API keys (keys of promoted accounts are revoked).
- code: temporarily_unavailable
  status: 503
  description: A dependency is temporarily unavailable; retry shortly (with the same `Idempotency-Key`).
- code: timestamp_out_of_window
  status: 401
  description: '`X-ARX-TIMESTAMP` is more than 10 s away from the server clock; `details.server_time` (epoch ms) and `details.recv_window_ms`.'
- code: too_many_conditional
  status: 409
  description: Too many open conditional orders on the account.
- code: totp_required
  status: 401
  description: A valid 2FA (TOTP) code is required or the code is wrong.
- code: totp_required_for_api_keys
  status: 403
  description: Enable 2FA on the account before creating API keys.
- code: unauthorized
  status: 401
  description: 'Missing or invalid credentials: token, key, signature, or a replayed request.'
- code: usdt_amount_out_of_range
  status: 422
  description: USDT deposit amount outside the allowed range (`details.min`, `details.max`).
- code: usdt_order_failed
  status: 502
  description: The USDT deposit order could not be created at the provider; retry shortly.
- code: usdt_too_many_open
  status: 409
  description: Too many open USDT deposit orders; complete or wait for the current ones.
- code: usdt_unavailable
  status: 503
  description: USDT deposits and withdrawals are not available right now.
- code: webhook_limit
  status: 409
  description: Maximum number of webhook endpoints reached (10; 25 for partners).
- code: webhook_url_blocked
  status: 400
  description: The webhook URL resolves to an internal or reserved address.
- code: webhook_url_invalid
  status: 400
  description: 'Invalid webhook URL: use https, port 443 or 8443, with a public hostname.'
- code: websocket_required
  status: 426
  description: Use a WebSocket connection (RFC 6455).
- code: withdraw_fee_changed
  status: 409
  description: The current withdrawal fee is higher than the accepted fee (`max_fee` or quote); nothing was debited (`details.fee`).
- code: withdraw_fee_unavailable
  status: 503
  description: The network fee is unavailable right now; retry shortly.
- code: withdraw_quote_required
  status: 400
  description: Quote the withdrawal fee (`quote_id`) or send `max_fee` before confirming.
- code: withdrawal_below_minimum
  status: 422
  description: 'Fee-group account: PIX withdrawal below the group minimum (`details.min_amount_minor`, BRL cents).'
- code: withdrawal_unavailable
  status: 422
  description: Withdrawals on this network/asset are temporarily unavailable.
- code: ws_capacity
  status: 503
  description: The WebSocket service is at capacity; retry shortly.
- code: earn_below_min_claim
  status: 422
  description: Released yield is below the minimum withdrawal (US$ 100 equivalent).
- code: earn_below_minimum
  status: 422
  description: Amount below the Earn product minimum.
- code: earn_matured
  status: 409
  description: The position already matured; payment is automatic.
- code: earn_not_active
  status: 409
  description: The Earn position is not active.
- code: earn_nothing_to_claim
  status: 409
  description: No released yield to withdraw yet.
- code: earn_product_unavailable
  status: 422
  description: The Earn product does not exist or was discontinued.
- code: idempotency_key_required
  status: 400
  description: This route requires the Idempotency-Key header.
x-arx-changelog:
- date: '2026-11-19'
  version: v1.1 (2026-11-19)
  title: Unique deposit address per invoice
  items:
  - 'New routes `POST /v1/partner/customers/{cid}/invoice-addresses` and `GET /v1/partner/customers/{cid}/invoice-addresses/{id}`:
    a new deposit address for each invoice reference of a sub-account, idempotent per reference.'
  - 'Accepted: `BTC`/`BTC`, `USDT`/`TRC20`, and `USDT` or `USDC` on `BEP20`, `ERC20`, `POLYGON` and `SOL`. Requires scope
    `partner.wallet.write` (restricted key: `wallet.write`).'
  - 'Deposits to the address are credited to the sub-account like the fixed address and the `deposit.credited` webhook carries
    `invoice_address_id` and `reference`. Another supported coin of the same network sent there is credited in the coin that
    arrived: compare coin and amount with the invoice.'
- date: '2026-11-05'
  version: v1.1 (2026-11-05)
  title: Guarani buy and sell prices
  items:
  - New public route `GET /v1/public/local-quotes` with `bid` and `ask` of USDT/PYG, BRL/PYG and USDT/BRL.
  - Conversions and Paraguay payouts with PYG use the exchange-house buying price when PYG is received and the selling price
    when PYG is given.
- date: '2026-11-05'
  version: v1.1 (2026-11-05)
  title: Manual PIX by API
  items:
  - 'New route `POST /v1/pix/deposits/{id}/proof`: API keys can send the payment proof of a manual PIX deposit.'
  - New route `POST /v1/partner/customers/{cid}/pix/deposits/{id}/proof` for a sub-account.
  - 'While the manual flow is active, sub-account PIX deposits (`pix/deposits` and `fiat/deposits`) answer `503 pix_provider_unavailable`
    and create nothing, unless the request sends `accept_manual: true`.'
- date: '2026-11-05'
  version: v1.1 (2026-11-05)
  title: Fixed addresses for many accounts
  items:
  - With an API key, `GET /v1/crypto/fixed-address`, `GET /v1/partner/customers/{cid}/fixed-address` and the sub-account `pix/deposits`
    and `fiat/deposits` creation routes count against the key quota only, not a limit of 20 requests per minute per IP.
  - 'A network with no address left for a new account now answers `503 crypto_deposit_network_full` instead of `502`, and
    shows `pool_full: true` in `mexc_deposit.networks`. The Lightning network is no longer listed: it never issued a deposit
    address.'
  - 'BRL deposits by PIX now document both flows, told apart by the `auto` field: automatic charge and manual confirmation.
    Both go from R$ 10,00 to R$ 500.000,00 per PIX, are valid for up to 24 hours and allow up to 5 open charges and R$ 5.000.000,00
    per day.'
- date: '2026-11-04'
  version: v1.1 (2026-11-04)
  title: Partner Earn
  items:
  - New scopes `partner.earn.read` and `partner.earn.write`.
  - 'New routes: `GET /v1/partner/earn/products` and `/v1/partner/customers/{cid}/earn/positions` (open, list, get, cancel-preview,
    cancel, claim).'
  - 'New webhooks for sub-accounts: `earn.opened`, `earn.released`, `earn.claimed`, `earn.cancelled`, `earn.refunded`, `earn.matured`.'
- date: '2026-10-31'
  version: v1.1 (2026-10-31)
  title: Partner PIX withdrawals, Paraguay payouts and fee groups
  items:
  - 'New sub-account routes: `POST/GET /v1/partner/customers/{cid}/pix/withdrawals` (+ `/{id}`) for BRL PIX withdrawals; `GET
    …/{cid}/py/payouts/quote`, `POST/GET …/{cid}/py/payouts` (+ `/{id}`) for "Receive in Paraguay" payouts; `GET …/{cid}/fees`
    for the effective fees.'
  - 'Fee groups (contract pricing): `GET /v1/me/fees` adds `fee_group` with the PIX, Convert (fractional bps, `*_cbps`), crypto
    and payout rates that replace the plan for accounts in a group; Convert quotes add `fee_cbps`, `fee_pct` and `fee_group`.
    New errors `422 pix_outside_hours` and `422 withdrawal_below_minimum`.'
  - 'Webhooks: sub-account events carry `customer_external_ref`; `deposit.credited` adds `credited_amount` and `fee` (fiat
    and fixed-address rails); fiat `withdrawal.*` add `fee`, `net` and `payment_ref`, and a cancelled fiat withdrawal emits
    `withdrawal.failed`; Paraguay payouts emit `withdrawal.sent`/`completed`/`failed` with `rail: py_payout` (`amount`, `fee`,
    `net`, `deliver_amount`).'
  - Fiat/PIX deposits (`/v1/pix/deposits`, `/v1/fiat/deposits` and the sub-account variants) add `fee` and `net_amount` (plus
    `credited_amount` once credited).
- date: '2026-10-22'
  version: v1.1 (2026-10-22)
  title: Sandbox in sync with production
  items:
  - The sandbox now runs the same code as production (more deposit coins, new fees and Convert rules), keeping its fictitious
    balances, simulated withdrawals and test webhook receiver.
  - Fixed the `servers` and WebSocket `servers` descriptions of this reference, which some OpenAPI tools read as extra fields.
  - BRL deposits by PIX are documented with the current manual-confirmation flow (receiving account, `reference`, payment
    proof in the app, minimum R$ 100, 5-hour validity, 0,10% fee); examples use the current rails. Identifiers of older records
    (`dubaicash` rail/processor values and error code) are unchanged for compatibility.
- date: '2026-10-13'
  version: v1.1 (2026-10-13)
  title: More deposit coins
  items:
  - 'Minimum deposit of US$ 10 (equivalent) on any coin: shown as `mexc_deposit.min_usd`, per network as `min_amount` and
    with the fixed address as `min_usd`; a confirmed deposit below it is not credited (`status: below_min`).'
  - Fixed-address deposits now cover 20+ coins. `GET /v1/rails/config` → `mexc_deposit.networks` lists only coins the exchange
    holds and networks open for deposit right now, with `coin_name`, `confirmations` and `memo_required`.
- date: '2026-10-13'
  version: v1.1 (2026-10-13)
  title: 'Sandbox: withdrawals, Convert and webhook receiver'
  items:
  - Sandbox withdrawals (`POST /v1/mexc/withdrawals`) now run end to end against a simulated provider, with test addresses
    for failure, rejection and manual review.
  - Sandbox Convert settles against fictitious house liquidity.
  - 'New sandbox webhook receiver: `POST/GET /v1/sandbox/webhook-inboxes`, `PATCH/DELETE /v1/sandbox/webhook-inboxes/{id}`,
    `GET /v1/sandbox/webhook-inboxes/{id}/requests` and the public `POST /v1/sandbox/webhook-inboxes/receive/{token}`.'
- date: '2026-10-13'
  version: v1.1 (2026-10-13)
  title: Sandbox environment (default)
  items:
  - New sandbox at `https://api-sandbox.arandixbit.com` — the only server published in this reference. Fictitious balances,
    no real money, no external providers. Production access (endpoint and keys) is private, inside the account dashboard.
  - 'No shared or demo credentials: each developer creates their own account and API keys. New sandbox-only operations: `GET
    /v1/sandbox/status`, `POST /v1/sandbox/kyc/approve`, `POST /v1/sandbox/partner/activate`, `POST /v1/sandbox/faucet` and,
    for partners, `POST /v1/partner/customers/{cid}/sandbox/kyc/approve` and `/sandbox/faucet` (`429 sandbox_faucet_limit`).
    All answer `404` in production.'
  - Code samples read the base URL and secrets from environment variables (`ARX_API`, `ARX_KEY_ID`, `ARX_SECRET`).
- date: '2026-10-09'
  version: v1.1 (2026-10-09)
  title: Fixed deposit addresses
  items:
  - 'New `GET /v1/crypto/fixed-address` and `GET /v1/crypto/fixed-deposits`: one fixed deposit address per account, coin and
    network; deposits are credited automatically once per transaction (`deposit.credited` with `rail: "mexc"`, `txid`, `address`).'
  - 'Partners: `GET /v1/partner/customers/{cid}/fixed-address` and `/fixed-deposits` (one fixed address per sub-account);
    sub-account crypto withdrawals via `GET …/{cid}/mexc/withdrawals/quote` and `POST …/{cid}/mexc/withdrawals` (USDT included).'
  - '`/v1/rails/config` adds `mexc_deposit` and `usdt.deposit_paused`. USDT withdrawals move to `POST /v1/mexc/withdrawals`
    (`coin: "USDT"`); the legacy USDT order rail is paused (`503 usdt_deposit_paused`, `503 usdt_withdraw_moved`).'
- date: '2026-10-09'
  version: v1.1 (2026-10-09)
  title: Close sub-accounts
  items:
  - 'New `GET /v1/partner/customers/{cid}/close` (closure checklist) and `POST /v1/partner/customers/{cid}/close` (unlink
    an end customer: zero balance and nothing open required; the sub-account moves to `pending_closure` and stops operating).'
- date: '2026-10-08'
  version: v1.1 (2026-10-08)
  title: Developer experience upgrade
  items:
  - New `GET /v1/public/time` server-time endpoint for clock synchronization of signed requests.
  - '`Idempotency-Key` header on state-changing POSTs: stored-response mode (24 h replay with `Idempotent-Replayed: true`,
    `idempotency_key_reused`, `idempotency_request_in_progress`) and the existing permanent mode on Convert and withdrawals
    (now also sends `Idempotent-Replayed`). Keys of 1–100 characters.'
  - 'Spot `client_order_id` (unique per account): set it on `POST /v1/spot/orders`, filter `GET /v1/spot/orders?client_order_id=`
    and cancel with `POST /v1/spot/orders/by-client-id/{client_order_id}/cancel`; returned on every order.'
  - '`401 timestamp_out_of_window` now includes `details.server_time` and `details.recv_window_ms`.'
  - Reference rewritten in English with examples for every operation and the `x-arx-error-codes` catalogue.
  - WebSocket market stream available at `wss://stream.arandixbit.com/v1/ws`, backed by new public endpoints `/v1/public/symbols`,
    `/v1/public/book` and `/v1/public/trades`.
  - Sub-account restricted API keys (`customer_id`) for partners, with `x-arx-restricted-scope` on sub-account routes.
  - Stable webhook delivery `error_code` on attempts, deliveries, tests and endpoints (`last_error_code`).
  - Automatic PIX reversals and MED (`deposit.reversed`, `withdrawal.returned`, statement `type=reversal`) and plan deposit
    limits (`409 deposit_limit_exceeded`, `deposit` block in `GET /v1/me/limits`).
  - 'CORS: `Idempotency-Key` accepted; `Idempotent-Replayed`, `X-Request-Id` and rate-limit headers exposed.'
- date: '2026-10-08'
  title: Official channel verification
  items:
  - New `GET /v1/public/verify` to check whether a website, email or phone number is an official channel.
- date: '2026-10-08'
  title: Real spot fees
  items:
  - '`/v1/spot/symbols` and `/v1/public/symbols` report the maker/taker fees actually charged (fee configuration, 1 %) instead
    of legacy constants.'
- date: '2026-10-08'
  title: Webhook error codes
  items:
  - Stable `error_code` next to the free-text delivery error (`dns_unresolved`, `blocked_address`, `connect_timeout`, `tls_error`,
    `http_status`, `redirect_not_allowed`, `body_too_large`, `secret_unavailable`, `invalid_url`, `other`).
  - '`PATCH /v1/webhooks/endpoints/{id}` re-validates DNS only when the URL changes.'
- date: '2026-10-08'
  title: Public spot market data
  items:
  - '`GET /v1/public/symbols`, `/v1/public/book` (depth 5/10/20) and `/v1/public/trades` (1–40) without authentication, cached
    for 1 s and limited per IP.'
- date: '2026-10-08'
  title: Plan deposit limits and PIX reversals
  items:
  - Plan deposit limits enforced on fiat deposit creation (`409 deposit_limit_exceeded`); usage shown in `GET /v1/me/limits`.
  - Automatic PIX refunds, reversals and MED in the ledger with the `deposit.reversed` and `withdrawal.returned` webhooks.
- date: '2026-10-08'
  title: Sub-account isolation for partners
  items:
  - API keys restricted to a single sub-account (`customer_id`), acting as the sub-account; automatic revocation when unlinked.
  - 'Ledger statement: `GET /v1/statement` and `GET /v1/partner/customers/{cid}/statement` (JSON or CSV).'
  - 'PIX deposits through the API: `/v1/pix/deposits` and the sub-account variants, with credit only to the account in context.'
  - Sub-accounts can register their own webhook endpoints.
- date: '2026-10-08'
  title: Security hardening (penetration test)
  items:
  - Keys of accounts promoted to staff are rejected (`403 staff_api_keys_forbidden`) and revoked.
  - Anti-replay of signatures persisted across instances for state-changing requests.
  - 'Withdrawals: `Idempotency-Key` (retry returns the same withdrawal) and `max_fee` fee cap.'
  - Cancelling withdrawals requires `wallet.withdraw`; webhook tests limited to 5 per minute; WebSocket frame limits include
    control frames.
- date: '2026-10-07'
  version: v1.0 (2026-10-07)
  title: Public API launch
  items:
  - Scoped API keys signed with HMAC-SHA256, IP allow-lists, expiry and per-key rate limits.
  - OpenAPI 3.1 contract verified against the server routes, with localized errors (es, pt, en, gn).
  - Webhooks with signed deliveries, transactional outbox, retries for about 24 hours and delivery logs.
  - Public market-data WebSocket.
  - 'B2B partner API: sub-accounts, Sumsub KYC tokens, deposits, Convert and whitelisted withdrawals.'
  - Unified history (`GET /v1/history`) with cursor pagination.
