{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/auth":{"post":{"operationId":"auth_authenticate","summary":"Get a token","description":"Exchange your API credentials for a **token pair**: a 15-minute access token, and a 7-day refresh token that mints the next access token without re-sending your api key.\n\nCredentials go in the `x-client-id` and `x-api-key` **headers** — there is no request body.\n\nThe service operator issues the client id and api key **once**; only a SHA-256 hash of the key is stored, so it cannot be recovered.\n\n**Credentials are per environment.** You need one pair for sandbox and a separate pair for production; neither authenticates against the other.\n\n## Use `/refresh`, not `/auth`, to stay logged in\n\nCall `/auth` when you have no valid refresh token — at startup, or after a refresh has been rejected. Thereafter roll the pair forward with [`/refresh`](/api-reference/auth/refresh-token), which keeps your api key off the wire.","tags":["auth"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPairResponse"}}}},"401":{"description":"Unauthorized — the client id or api key is wrong, or the api client has been deactivated.\n\nA common cause is pointing at the **wrong environment**: sandbox credentials sent to production, or the reverse, fail here exactly like a bad key. Check `BASE_URL` and the credential pair together before assuming the key is wrong.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — your credentials are valid, but the api client is not fully provisioned, so no token can be issued.\n\n**Do not retry.** Nothing you can send changes the outcome; contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"clientId":[]}]}},"/refresh":{"post":{"operationId":"auth_refreshToken","summary":"Refresh a token","description":"Trade a valid refresh token for a **new access + refresh token pair**, without re-sending your api key.\n\nThis and `/auth` are the only endpoints that do not require a bearer token — the refresh token *is* the credential here, so it is sent in the body rather than the `Authorization` header.\n\n## Refresh tokens rotate\n\nEach call **consumes** the token you present and issues a new one. A refresh token is single-use: once spent, it is dead. Always store the `refreshToken` from the response and discard the one you just sent.\n\n## Replay revokes the whole chain\n\nPresenting an **already-consumed** token is the signature of a stolen one, so the service revokes the entire rotation family — the token you sent, the one that replaced it, and every descendant. Both you and the attacker are forced back to `/auth` with your api key.\n\nIn practice this means a refresh token must be **stored durably and refreshed by exactly one process**. Two workers sharing a refresh token will race, one will replay, and both get logged out.","tags":["auth"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPairResponse"}}}},"401":{"description":"Unauthorized — the refresh token is missing, malformed, expired, already consumed, revoked, or its api client has been deactivated.\n\nEvery case is terminal for this token: **call `/auth` with your api key**. Retrying the refresh will never succeed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — the refresh token was valid, but the api client is not fully provisioned, so no new pair can be issued.\n\n**This also revokes the whole rotation family**, so the refresh token you sent is now dead — and falling back to `/auth` returns the same `403`. **Do not retry;** contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"refreshToken":{"$ref":"#/components/schemas/RefreshToken"}},"required":["refreshToken"]}}}}}},"/create":{"post":{"operationId":"wallets_createUser","summary":"Create a user","description":"Creates the user and derives **one wallet per configured chain** from a single bip39 mnemonic, atomically.\n\n⚠️ **The `mnemonic` is returned exactly once and is never stored in plaintext.** Persist it before you discard the response — there is no way to retrieve it afterwards, and no export endpoint.\n\nThe `password` (minimum 8 characters) encrypts the keystore entries with AES-256-GCM. It is unrecoverable and is required by `/send` and `/extend`.\n\nOnly chains available on your endpoint are created, so a partial address map is normal in development. Chains that become available later are backfilled with `/extend`.","tags":["wallets"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallets_createUser_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict — a wallet already exists for a derived address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — that asset is not available on your endpoint. Permanent, not a transient outage: do not retry, and contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"$ref":"#/components/schemas/Password"},"existingSeed":{"$ref":"#/components/schemas/Mnemonic"}},"required":["password"]}}}},"security":[{"bearerAuth":[]}]}},"/extend":{"post":{"operationId":"wallets_extendUser","summary":"Add missing chains","description":"A user's wallet set is fixed at `/create` time, so a user created before a chain was configured has no address on it. `/extend` derives and inserts wallets for the **missing chains only**.\n\nThe server proves ownership before adding anything: the mnemonic must derive one of the user's stored addresses (otherwise `403`), and the password must decrypt an existing keystore entry (otherwise `401`).\n\nIdempotent — when nothing is missing you get `added: []`. The mnemonic is never returned or stored.","tags":["wallets"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallets_extendUser_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such user. Check the `userId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"existingSeed":{"$ref":"#/components/schemas/Mnemonic"},"password":{"$ref":"#/components/schemas/Password"}},"required":["userId","existingSeed","password"]}}}},"security":[{"bearerAuth":[]}]}},"/addresses":{"post":{"operationId":"wallets_listAddresses","summary":"List addresses","description":"Returns `{ chain: address }` for every wallet the user has. The only endpoint that takes no `assetId`. A chain missing from the map was unavailable when the user was created — fix it with `/extend`.","tags":["wallets"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallets_listAddresses_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such user. Check the `userId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"}},"required":["userId"]}}}},"security":[{"bearerAuth":[]}]}},"/validate":{"post":{"operationId":"wallets_validateAddress","summary":"Validate an address","description":"With `address`, validates that address for the asset's chain on the network this service runs on (a testnet address is refused on mainnet and the other way round); `userId` is not needed. Without `address`, validates the address the service stored for this user on the asset's chain. `result` is the **string** `\"true\"` or `\"false\"`, not a boolean.","tags":["wallets"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallets_validateAddress_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such user. Check the `userId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — that asset is not available on your endpoint. Permanent, not a transient outage: do not retry, and contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId","description":"Required when `address` is omitted."},"assetId":{"$ref":"#/components/schemas/AssetId"},"address":{"type":"string","description":"The address to check. When present, `userId` is ignored."}},"required":["assetId"]}}}},"security":[{"bearerAuth":[]}]}},"/balance":{"post":{"operationId":"balances_getBalance","summary":"Check a balance","description":"The balance of the user's wallet for that asset, as a **human-decimal string** — never a float, never base units.\n\nThe balance is exact, down to the last base unit — nothing is floored to `\"0\"`, so `\"0\"` means the address holds nothing of that asset.","tags":["balances"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balances_getBalance_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such user, or (on Bitcoin) an address the indexer does not know. Check the `userId` and the `assetId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — that asset is not available on your endpoint. Permanent, not a transient outage: do not retry, and contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"assetId":{"$ref":"#/components/schemas/AssetId"}},"required":["userId","assetId"]}}}},"security":[{"bearerAuth":[]}]}},"/info":{"post":{"operationId":"balances_getWalletInfo","summary":"Get wallet info","description":"What a wallet screen needs, in one round-trip. If history is unavailable, `transactions` comes back `[]` rather than failing the call — so an empty list is not proof there is no history. A balance failure *is* an error.","tags":["balances"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balances_getWalletInfo_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such user. Check the `userId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — that asset is not available on your endpoint. Permanent, not a transient outage: do not retry, and contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"assetId":{"$ref":"#/components/schemas/AssetId"}},"required":["userId","assetId"]}}}},"security":[{"bearerAuth":[]}]}},"/portfolio":{"post":{"operationId":"balances_getPortfolio","summary":"Get portfolio","description":"The address and balance of **every asset your api client is enabled for**, in one call — what a portfolio screen needs instead of one `/addresses` call plus one `/balance` per asset. Takes no `assetId`.\n\nOne unavailable asset never fails the call: a balance that cannot be read comes back `\"0\"`, and every other asset is still returned. So a `\"0\"` here is not proof the wallet is empty — confirm with [`/balance`](/api-reference/balances/get-balance) before acting on it. An asset with an empty `address` is on a chain that was unavailable when the user was created; backfill it with [`/extend`](/api-reference/wallets/extend-user).","tags":["balances"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balances_getPortfolio_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such user. Check the `userId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"}},"required":["userId"]}}}},"security":[{"bearerAuth":[]}]}},"/send":{"post":{"operationId":"transfers_sendTransfer","summary":"Send funds","description":"Signs and broadcasts a transfer, and returns as soon as the network accepts it.\n\n⚠️ **A `txHash` is not a confirmation.** Poll `/txid` until `status` flips from `pending` to `success` or `failed`.\n\n## The fee comes out of the amount — for native assets\n\n**Native transfers (BTC, ETH, BNB, POL, TRX, SOL) are sent net of the network fee: the recipient receives `amount` − `fee`, not `amount`.** The transfer is sized so that the total leaving the wallet equals exactly the `amount` you asked for. If you need the recipient to receive an exact figure, add the fee (quote it with `/fee`) to the `amount` you send.\n\n**Token transfers (USDT, USDC) deliver the full `amount`.** Their fee is paid separately, in the chain's native coin — so a token wallet also needs a native balance for gas.\n\n## Amounts\n\n`amount` is a **human-decimal string** (`\"0.5\"`), matched against `/^\\d+(\\.\\d+)?$/` and parsed to base units with the asset's decimals. Never send base units, and never send a float you produced by arithmetic.\n\nMinimums are enforced: **0.00001 BTC**, and **0.0001** for a native EVM send (ETH, BNB, POL). Token sends must be greater than zero. An amount with more decimal places than the asset supports is rejected.\n\n## Sender\n\nThe **sender is resolved server-side** from `userId` + `assetId`. A client can never supply a private key or a from-address. `recipient` must differ from the sender.\n\n## Idempotency — `X-Request-Id` is required here\n\n`/send` is the one endpoint where **you must supply `X-Request-Id`** (omitting it is a `400`). It is the idempotency key, and it is what makes a retry safe.\n\nThe contract: **one id per logical transfer, the same id on every retry of it, a fresh id for a new transfer.** Generate it before the first attempt and store it alongside your intent record — if you mint a new id on retry, you have authorised a *second* transfer, and the service will send it.\n\nRepeating a request with the same id resolves against the original:\n\n| Original attempt | Repeat with the same id |\n| --- | --- |\n| Completed | The stored result is **replayed** — the same `txHash`, nothing new broadcast. |\n| Still in flight | `409` — the outcome isn't known yet. Reconcile via `/transactions`; never blind-retry. |\n| Failed before broadcast | The retry proceeds normally. |\n| Same id, **different** `assetId` / `recipient` / `amount` | `422` — the id is already committed to a different transfer. |\n\nA failure is only re-armed for retry when it is **definitely pre-broadcast** (bad input, wrong password, a broadcast the chain positively rejected). Ambiguous failures — a timeout, a dropped connection, an unknown `500` — deliberately leave the transfer claimed, because the transaction may be on-chain. Retrying those with the same id returns `409` until the claim expires (**48 hours**), which is the service refusing to double-send on your behalf.","tags":["transfers"],"parameters":[{"name":"X-Request-Id","in":"header","description":"**Required on `/send`, and client-supplied** — it is the idempotency key for the transfer.\n\nOne id per logical transfer; **the same id on every retry of it**; a fresh id for a new transfer. 1–64 characters of `A-Za-z0-9._-`. Omitting it is a `400`.","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,64}$","maxLength":64}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transfers_sendTransfer_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — a wrong keystore password, or a missing/expired bearer token. Nothing is signed or broadcast.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required — the wallet cannot cover the transfer. Nothing is signed or broadcast.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such user. Check the `userId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict — this transfer is already in flight, or (on Ethereum, BSC and Polygon) the wallet is busy with another transfer, which are serialised per wallet. **Nothing new was broadcast.**\n\nNeither case is a reason to mint a new `X-Request-Id`: doing so authorises a second transfer. Back off and retry with the same one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable — the amount is smaller than the network fee that would be deducted from it (native sends), or the `X-Request-Id` is already committed to a different transfer. **Nothing was broadcast.**","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway — the chain rejected the broadcast (TRON). The transfer did not go out.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — that asset is not available on your endpoint. Permanent, not a transient outage: do not retry, and contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"assetId":{"$ref":"#/components/schemas/AssetId"},"recipient":{"type":"string","description":"Destination address on the asset's chain. Must differ from the sender."},"amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Human-decimal amount, e.g. `\"0.5\"`. Never base units, never a float."},"password":{"$ref":"#/components/schemas/Password"}},"required":["userId","assetId","recipient","amount","password"]}}}},"security":[{"bearerAuth":[]}]}},"/transactions":{"post":{"operationId":"transactions_listTransactions","summary":"List transactions","description":"Recent history for that asset, newest first, capped by the service's page size (10 by default).\n\nEvery chain is normalised to the same row shape. `type` is `send` or `receive` relative to this user, `amount` is denominated in the asset, and `fee` is denominated in the chain's **native** currency.\n\nAn empty history is `[]`, not an error.","tags":["transactions"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transactions_listTransactions_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such user. Check the `userId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — either that asset is not available on your endpoint (**permanent**: do not retry, contact your operator), or history could not be read right now (**transient**: retry with backoff). The message tells you which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"assetId":{"$ref":"#/components/schemas/AssetId"}},"required":["userId","assetId"]}}}},"security":[{"bearerAuth":[]}]}},"/txid":{"post":{"operationId":"transactions_getTransaction","summary":"Get a transaction","description":"One transaction, in the same row shape as `/transactions`. This is how you confirm a `/send`: poll until `status` is no longer `pending`.\n\nThe hash format is chain-specific — a malformed hash is a `400`, an unknown one is a `404`.","tags":["transactions"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transactions_getTransaction_Response_200"}}}},"400":{"description":"Bad Request — the message differs by chain family.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — the transaction hash is not known to the chain, or there is no such user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — that asset is not available on your endpoint. Permanent, not a transient outage: do not retry, and contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"assetId":{"$ref":"#/components/schemas/AssetId"},"txHash":{"type":"string","description":"Chain-specific: `0x` + 64 hex on EVM, 64 hex on Bitcoin and Tron, a base58 signature on Solana."}},"required":["userId","assetId","txHash"]}}}},"security":[{"bearerAuth":[]}]}},"/fee":{"post":{"operationId":"fees_estimateFee","summary":"Estimate a fee","description":"Estimates what a transfer between two addresses would cost.\n\n⚠️ **This is the one endpoint that takes raw addresses instead of a `userId`.** It never touches the user's wallet, so pass `sender` and `recipient` explicitly. They must differ.\n\nThe shape of `result` is family-specific: a decimal **string** in the chain's native currency for Bitcoin, the EVM chains and Solana; an **object of consumed resources** (`bandwidth`, plus `energy` for TRC20) on TRON.\n\n**On assets where transfers are covered for you, `result` is instead a decimal string denominated in the token being sent** — the fee the sender is charged, deducted in the same transfer. It may be `\"0\"` if transfers on that asset are free to the sender. Quote it before you confirm a transfer: the sender needs the amount **plus** this fee, or `/send` returns `402`.\n\nDepending on how your endpoint prices that fee it is either exact or an estimate, so read the figure `/send` returns as the amount actually charged.\n\nThese are estimates — gas prices and Tron resource prices move between the estimate and the broadcast.","tags":["fees"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Fees_estimateFee_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — that asset is not available on your endpoint. Permanent, not a transient outage: do not retry, and contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"$ref":"#/components/schemas/AssetId"},"sender":{"type":"string","description":"Raw source address — **not** a `userId`."},"recipient":{"type":"string","description":"Raw destination address. Must differ from `sender`."}},"required":["assetId","sender","recipient"]}}}},"security":[{"bearerAuth":[]}]}},"/prices":{"post":{"operationId":"prices_getPrices","summary":"Get market prices","description":"Current fiat market prices for every coin the API supports, in USD, EUR, GBP, CAD, AUD, SEK, DKK, PLN, BRL and AED.\n\nThere is **no request body** — no `userId`, no `assetId`. One call returns the whole map.\n\n## Keyed by symbol, not assetId\n\nA price belongs to a *coin*, not to a chain deployment, so the map is keyed by symbol: the single `USDT` entry is the price of USDT whichever chain you hold it on. To price a balance, resolve your `assetId` to its symbol from the [Asset IDs](/get-started/assets) table and read that entry.\n\n## Prices are numbers, and they are indicative\n\n- The fiat values are plain JSON **numbers** — this is the one place the API does not use decimal strings. Balances, amounts and fees stay strings everywhere else.\n- Quotes are refreshed in the background, so a value is typically a few minutes old. Treat them as **indicative market data for display and estimation**, not as an execution or settlement rate.\n- The endpoint serves the last known values, so it keeps answering even while a refresh behind it is failing. Read staleness from your own clock, not from the response — it carries no timestamp.\n- A fiat with no recorded quote reads as `0`. Guard against that before dividing by a price.","tags":["prices"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Prices_getPrices_Response_200"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/config":{"post":{"operationId":"configuration_getConfiguration","summary":"Get your configuration","description":"What your api client is enabled for: every `assetId` it may use, and who pays the network fee on each.\n\nThere is **no request body** — no `userId`, no `assetId`. The answer is the same for every user you hold.\n\n## Read this instead of hardcoding the asset table\n\nYour api client may be enabled for only some of the assets in the [Asset IDs](/get-started/assets) table, and a call for one you are not enabled for is a `403`. This endpoint is the list that will not `403` — resolved against the running service, so an asset that is *limited* on your environment is absent here too rather than failing later with `400 Unknown assetId`.\n\nIt is also the list `/create`, `/extend` and `/addresses` filter their address maps to: a chain appears there while you have at least one enabled asset on it.\n\nCall it at startup and cache it. It changes only when your operator changes your account, so poll it on the order of minutes if you poll it at all.\n\n## Who pays the fee\n\n`feePayer` says who covers the network fee on a transfer of that asset:\n\n- `USER` — the fee comes out of the sending wallet. For a native asset it is taken from the `amount`; for a token it is paid in the chain's native coin, which the wallet must therefore hold.\n- `PLATFORM` — you cover it, so your user can move the token without holding any of the chain's native coin.\n\nThe top-level `feePayer` is `PLATFORM` when at least one of your assets is, and `USER` when none are.\n\n## Where trades fill\n\n`liquidity` says where your [buy and sell orders](/get-started/trading) are filled: `type` is `internal` when they fill on your own desk, and `provider` when they fill through the liquidity provider set on your account, named in `provider`.\n\n<Warning>\n`feePayer` describes your arrangement, not a guarantee for the next transfer. A `PLATFORM` asset can still fall back to `USER` on an individual send. **`/fee` is the only quote** — call it before a transfer and show your user what it returns.\n</Warning>","tags":["configuration"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Configuration_getConfiguration_Response_200"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"bearerAuth":[]}]}},"/order":{"post":{"operationId":"trading_quoteBuy","summary":"Quote a buy","description":"Prices a purchase of `assetId` and opens the order as a quote. **Nothing is bought here** — the order stays `open` until you accept it with `/trade/approve`.\n\nGive **exactly one** leg and the other is priced for you:\n\n- `fiatAmount` — \"spend this much\", and the crypto you receive is derived.\n- `cryptoAmount` — \"buy this much\", and the fiat you pay is derived.\n\nSending both, or neither, is a `400`.\n\nThe quote is indicative and short-lived. It lapses at `result.quote.expiresAt` — roughly a minute — and approving it after that is a `409`. **The price that binds is the one confirmed at approval**, not the one returned here, so show the user the approval price before treating the order as done.\n\nRounding always runs in the user's disfavour on the fiat leg and downwards on the crypto leg, so a rounded quote can never be filled short.\n\nEvery amount and price in the response is shown to **at most 6 decimal places**, cut rather than rounded, so a figure you display is never larger than the one that settles.","tags":["trading"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK — the quote is open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such user. Check the `userId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway — no usable price for that asset right now. Nothing was quoted or traded. Transient: retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — trading is not available for that asset right now. Do not retry in a tight loop; contact your operator if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway Timeout — pricing did not answer in time. Nothing was quoted; retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"assetId":{"$ref":"#/components/schemas/AssetId"},"fiat":{"$ref":"#/components/schemas/Fiat"},"fiatAmount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"How much fiat to spend. Mutually exclusive with `cryptoAmount`."},"cryptoAmount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"How much of the asset to buy. Mutually exclusive with `fiatAmount`."}},"required":["userId","assetId"]}}}},"security":[{"bearerAuth":[]}]}},"/sell":{"post":{"operationId":"trading_quoteSell","summary":"Quote a sell","description":"Prices a sale of `assetId` and opens the order as a quote. **Nothing is sold here** — the order stays `open` until you accept it with `/trade/approve`.\n\nGive **exactly one** leg and the other is priced for you:\n\n- `cryptoAmount` — \"sell this much\", and the fiat you receive is derived. This is the usual case.\n- `fiatAmount` — \"raise this much\", and the crypto to sell is derived.\n\nSending both, or neither, is a `400`.\n\nThe quote is indicative and short-lived. It lapses at `result.quote.expiresAt` — roughly a minute — and approving it after that is a `409`. **The price that binds is the one confirmed at approval**, not the one returned here.\n\nEvery amount and price in the response is shown to **at most 6 decimal places**, cut rather than rounded, so a figure you display is never larger than the one that settles.","tags":["trading"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK — the quote is open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such user. Check the `userId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway — no usable price for that asset right now. Nothing was quoted or traded. Transient: retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — trading is not available for that asset right now. Do not retry in a tight loop; contact your operator if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway Timeout — pricing did not answer in time. Nothing was quoted; retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"assetId":{"$ref":"#/components/schemas/AssetId"},"fiat":{"$ref":"#/components/schemas/Fiat"},"cryptoAmount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"How much of the asset to sell. Mutually exclusive with `fiatAmount`."},"fiatAmount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"How much fiat to raise. Mutually exclusive with `cryptoAmount`."}},"required":["userId","assetId"]}}}},"security":[{"bearerAuth":[]}]}},"/trade/approve":{"post":{"operationId":"trading_approveTrade","summary":"Approve a quote","description":"Accepts an `open` quote and works the order. This is the committing step.\n\nThe quote you were shown was indicative. Approving **prices the order again**, holding the leg you fixed and moving the derived one, and the confirmed numbers come back on the top-level `cryptoAmount` / `fiatAmount` / `price`. The original stays under `quote`, so you can show the user what moved.\n\nA trade you have already approved is not approved twice. The outcomes:\n\n- already `completed` → the original result is **replayed**. Nothing trades again.\n- still `executing` → `409`. The order is placed and the outcome is not yet confirmed — poll `/trade`, never re-approve.\n- `expired`, `failed` or `cancelled` → `409`. Request a new quote.\n\nApproving an order whose quote has lapsed marks it `expired` and answers `409` — that\nholds for a trade you already approved but never settled, not just an untouched one.\n\nA `502` or `504` means the order was rejected or the outcome is unknown. Poll `/trade` before doing anything else: a trade sitting at `executing` has not been abandoned, and re-approving it is the one thing that could trade twice.","tags":["trading"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK — the order settled, or was accepted and is being worked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such trade for this user. Check the `tradeId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict — the trade is not in a state that can be approved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Bad Gateway — the order was rejected, or no price could be obtained. `Order rejected: …` means nothing traded and the trade is now `failed`; request a new quote. Otherwise retry with backoff.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — trading is not available for that asset right now. Do not retry in a tight loop; contact your operator if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway Timeout — the outcome is **unknown**. The trade stays `executing`. Poll `/trade`; do not approve again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"tradeId":{"$ref":"#/components/schemas/TradeId"}},"required":["userId","tradeId"]}}}},"security":[{"bearerAuth":[]}]}},"/trade/cancel":{"post":{"operationId":"trading_cancelTrade","summary":"Cancel a quote","description":"Drops an `open` quote. Idempotent — cancelling an already-cancelled trade returns it unchanged with `200`.\n\nOnly an `open` quote can be cancelled. Once approved, the order is being worked and there is nothing to withdraw; that is a `409`. A quote you simply never approve lapses on its own.","tags":["trading"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK — the quote is cancelled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such trade for this user. Check the `tradeId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict — only an open quote can be cancelled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"tradeId":{"$ref":"#/components/schemas/TradeId"}},"required":["userId","tradeId"]}}}},"security":[{"bearerAuth":[]}]}},"/trade":{"post":{"operationId":"trading_getTrade","summary":"Get a trade","description":"One trade by its id. This is the endpoint to poll while an order is `approved` or `executing` — it is how you learn the outcome, and the only safe thing to do after an ambiguous `502` or `504` on `/trade/approve`.\n\nScoped to the user: a `tradeId` belonging to someone else is a `404`, indistinguishable from one that does not exist.","tags":["trading"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such trade for this user. Check the `tradeId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"tradeId":{"$ref":"#/components/schemas/TradeId"}},"required":["userId","tradeId"]}}}},"security":[{"bearerAuth":[]}]}},"/trades":{"post":{"operationId":"trading_listTrades","summary":"List trades","description":"A user's most recent trades, newest first, capped by the service's page size (10 by default). Both sides are in the same list — filter with `side`, and narrow to a single state with `status`. Both filters are checked against the documented values; anything else is a `400`.\n\nOnly the user's own trades are ever returned.","tags":["trading"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}},{"name":"X-USER-ID","in":"header","description":"Optional. When present it **overrides** any `userId` in the body.","required":false,"schema":{"$ref":"#/components/schemas/UserId"}}],"responses":{"200":{"description":"OK — newest first. An empty array when the user has never traded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trading_listTrades_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — no such user. Check the `userId`; retrying unchanged will not help.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"side":{"$ref":"#/components/schemas/TradesPostRequestBodyContentApplicationJsonSchemaSide","description":"Optional. Return only this side."},"status":{"$ref":"#/components/schemas/TradeStatus"}},"required":["userId"]}}}},"security":[{"bearerAuth":[]}]}},"/platform/addresses":{"post":{"operationId":"platformWallet_getPlatformAddresses","summary":"List addresses","description":"One address per chain for **your platform's own wallet** — the twin of [`/addresses`](/api-reference/wallets/list-addresses), minus the `userId`. Fund the wallet at these addresses.\n\nDo not send an `X-USER-ID` header here — a platform endpoint always acts as the platform wallet, and sending one is a `400`.","tags":["platformWallet"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform_wallet_getPlatformAddresses_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"security":[{"bearerAuth":[]}]}},"/platform/balance":{"post":{"operationId":"platformWallet_getPlatformBalance","summary":"Check a balance","description":"The balance of **your platform's own wallet** for that asset — the twin of [`/balance`](/api-reference/balances/get-balance), minus the `userId`. The wallet is resolved server-side from your credentials; you never carry an id for it.\n\nDo not send an `X-USER-ID` header here — a platform endpoint always acts as the platform wallet, and sending one is a `400`.","tags":["platformWallet"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform_wallet_getPlatformBalance_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — on Bitcoin, the platform wallet's address is one the indexer does not know.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — that asset is not available on your endpoint. Permanent, not a transient outage: do not retry, and contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"$ref":"#/components/schemas/AssetId"}},"required":["assetId"]}}}},"security":[{"bearerAuth":[]}]}},"/platform/info":{"post":{"operationId":"platformWallet_getPlatformInfo","summary":"Get wallet info","description":"Address, balance and recent history of **your platform's own wallet** in one call — the twin of [`/info`](/api-reference/balances/get-wallet-info), minus the `userId`.\n\nDo not send an `X-USER-ID` header here — a platform endpoint always acts as the platform wallet, and sending one is a `400`.","tags":["platformWallet"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform_wallet_getPlatformInfo_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — that asset is not available on your endpoint. Permanent, not a transient outage: do not retry, and contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"$ref":"#/components/schemas/AssetId"}},"required":["assetId"]}}}},"security":[{"bearerAuth":[]}]}},"/platform/portfolio":{"post":{"operationId":"platformWallet_getPlatformPortfolio","summary":"Get portfolio","description":"The address and balance of every enabled asset of **your platform's own wallet** in one call — the twin of [`/portfolio`](/api-reference/balances/get-portfolio), minus the `userId`. A balance that cannot be read comes back `\"0\"` rather than failing the call, so confirm a `\"0\"` with [`/platform/balance`](/api-reference/platform-wallet/get-platform-balance) before acting on it.\n\nDo not send an `X-USER-ID` header here — a platform endpoint always acts as the platform wallet, and sending one is a `400`.","tags":["platformWallet"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform_wallet_getPlatformPortfolio_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"security":[{"bearerAuth":[]}]}},"/platform/send":{"post":{"operationId":"platformWallet_sendPlatformTransfer","summary":"Send funds","description":"Signs and broadcasts a transfer from **your platform's own wallet** — the twin of [`/send`](/api-reference/transfers/send-transfer), with two differences: there is no `userId`, and there is **no `password`** — the platform wallet's key is held and unlocked by the service, so the body is just `assetId`, `recipient` and `amount`.\n\nEverything else is identical to `/send` and its description applies verbatim: native transfers deliver `amount` − fee while token transfers deliver the full `amount`, a `txHash` is not a confirmation, and **`X-Request-Id` is required** — it is the idempotency key, scoped to the platform wallet. Reuse the same id to retry a transfer safely; a duplicate never broadcasts twice.\n\nUse this to pay out from the wallet you fund at [`/platform/addresses`](/api-reference/platform-wallet/get-platform-addresses) — for example to settle a completed trade with a user.\n\nDo not send an `X-USER-ID` header here — a platform endpoint always acts as the platform wallet, and sending one is a `400`.","tags":["platformWallet"],"parameters":[{"name":"X-Request-Id","in":"header","description":"**Required on `/send`, and client-supplied** — it is the idempotency key for the transfer.\n\nOne id per logical transfer; **the same id on every retry of it**; a fresh id for a new transfer. 1–64 characters of `A-Za-z0-9._-`. Omitting it is a `400`.","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,64}$","maxLength":64}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform_wallet_sendPlatformTransfer_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required — the platform wallet cannot cover the amount plus the network fee. Fund it and retry with the same `X-Request-Id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict — the original attempt with this `X-Request-Id` is still in flight, the wallet is busy with another send, or the transfer is still being prepared. Back off and retry with the **same** id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable — this `X-Request-Id` is already committed to a different `assetId` / `recipient` / `amount`. Use a fresh id for a new transfer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — that asset is not available on your endpoint. Permanent, not a transient outage: do not retry, and contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"$ref":"#/components/schemas/AssetId"},"recipient":{"type":"string","description":"Destination address on the asset's chain. Must differ from the platform wallet's own address."},"amount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Human-decimal amount string. Same rules and minimums as `/send`."}},"required":["assetId","recipient","amount"]}}}},"security":[{"bearerAuth":[]}]}},"/platform/transactions":{"post":{"operationId":"platformWallet_getPlatformTransactions","summary":"List transactions","description":"Recent transactions of **your platform's own wallet** for that asset — the twin of [`/transactions`](/api-reference/transactions/list-transactions), minus the `userId`. Same page size and the same caveat: EVM history lags a fresh broadcast.\n\nDo not send an `X-USER-ID` header here — a platform endpoint always acts as the platform wallet, and sending one is a `400`.","tags":["platformWallet"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform_wallet_getPlatformTransactions_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — either that asset is not available on your endpoint (**permanent**: do not retry, contact your operator), or history could not be read right now (**transient**: retry with backoff). The message tells you which.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"$ref":"#/components/schemas/AssetId"}},"required":["assetId"]}}}},"security":[{"bearerAuth":[]}]}},"/platform/txid":{"post":{"operationId":"platformWallet_getPlatformTransactionById","summary":"Get a transaction","description":"A single transaction by hash, as seen from **your platform's own wallet** — the twin of [`/txid`](/api-reference/transactions/get-transaction), minus the `userId`. Poll it after a [`/platform/send`](/api-reference/platform-wallet/send-platform-transfer) until `status` leaves `pending`.\n\nDo not send an `X-USER-ID` header here — a platform endpoint always acts as the platform wallet, and sending one is a `400`.","tags":["platformWallet"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform_wallet_getPlatformTransactionById_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found — the transaction hash is not known to the chain, or the platform wallet is not a party to it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — that asset is not available on your endpoint. Permanent, not a transient outage: do not retry, and contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"$ref":"#/components/schemas/AssetId"},"txHash":{"type":"string","description":"The transaction hash to look up."}},"required":["assetId","txHash"]}}}},"security":[{"bearerAuth":[]}]}},"/platform/fee":{"post":{"operationId":"platformWallet_getPlatformFee","summary":"Estimate a fee","description":"What a transfer out of **your platform's own wallet** will cost — the twin of [`/fee`](/api-reference/fees/estimate-fee), with one difference: the `sender` is resolved server-side to the platform wallet's address, so the body is just `assetId` and `recipient`. A `sender` you supply is ignored.\n\nThe quote describes the [`/platform/send`](/api-reference/platform-wallet/send-platform-transfer) that follows it: a decimal string in the chain's native currency on Bitcoin, EVM and Solana, a resource object on TRON.\n\nDo not send an `X-USER-ID` header here — a platform endpoint always acts as the platform wallet, and sending one is a `400`.","tags":["platformWallet"],"parameters":[{"name":"X-Request-Id","in":"header","description":"Correlation id. Generated if omitted, echoed on every response, and written to the audit log. **`/send` is the exception — there it is required, and it doubles as the idempotency key.**","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Platform_wallet_getPlatformFee_Response_200"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized — no bearer token, or one that does not verify. Get a fresh access token from `/refresh` (or `/auth`) and replay the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — that asset is not enabled for your api client. Permanent until your operator enables it: do not retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service Unavailable — that asset is not available on your endpoint. Permanent, not a transient outage: do not retry, and contact your operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"$ref":"#/components/schemas/AssetId"},"recipient":{"type":"string","description":"Destination address on the asset's chain. Must differ from the platform wallet's own address."}},"required":["assetId","recipient"]}}}},"security":[{"bearerAuth":[]}]}}},"tags":[{"name":"auth","description":"Get the access token that every other endpoint requires."},{"name":"wallets","description":"Create users, add chains for them, and look up their addresses."},{"name":"balances","description":"How much a user holds, in coins or tokens."},{"name":"transfers","description":"Move funds out of a wallet."},{"name":"transactions","description":"What has happened — full history, or a single transaction by its hash."},{"name":"fees","description":"What a transfer will cost, before you send it."},{"name":"prices","description":"Fiat market prices for the supported coins."},{"name":"configuration","description":"What your api client is enabled for, and who pays the network fee."},{"name":"trading","description":"Buy and sell an asset against fiat — quote, approve, then poll for the fill."},{"name":"platformWallet","description":"Your platform's own wallet — the same address, balance, portfolio, send, history and fee endpoints, scoped to the wallet your api client itself holds. No `userId`, no password; do not send `X-USER-ID`."}],"servers":[{"url":"https://api-demo.walletstech.com","description":"Sandbox. Develop and test here. Requires its own credentials."},{"url":"https://api.walletstech.com","description":"Production — real funds, and transfers that cannot be reversed. Requires its own credentials."}],"components":{"schemas":{"RefreshToken":{"type":"string","description":"Opaque 64-character hex token. **Single-use** — every `/refresh` consumes the token presented and returns a new one.\n\nIt is not a JWT and carries no readable claims. Only a hash of it is stored, so it cannot be recovered if lost — a lost refresh token just means calling `/auth` again.","title":"RefreshToken"},"TokenPairResponseResult":{"type":"object","properties":{"token":{"type":"string","description":"HS256 JWT access token. Present it as `Authorization: Bearer <token>` on every endpoint except `/auth` and `/refresh`."},"expiresAt":{"type":"string","format":"date-time","description":"Access-token expiry — **15 minutes** after issue."},"refreshToken":{"$ref":"#/components/schemas/RefreshToken"},"refreshExpiresAt":{"type":"string","format":"date-time","description":"Refresh-token expiry — **7 days** after issue. Rotating does not extend the window past this."}},"required":["token","expiresAt","refreshToken","refreshExpiresAt"],"title":"TokenPairResponseResult"},"RequestId":{"type":"string","description":"Echo of the inbound `X-Request-Id`, or a generated one.","title":"RequestId"},"TokenPairResponse":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/TokenPairResponseResult"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"description":"An access token for the next 15 minutes, plus the refresh token that mints the one after it.","title":"TokenPairResponse"},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string","description":"Safe, client-facing message. Internal detail never leaks here."},"error":{"type":"string","description":"The HTTP status code, as a string."},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["message","error","requestId"],"title":"ErrorResponse"},"UserId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","description":"24-character hex id, returned by `/create`.","title":"UserId"},"Password":{"type":"string","minLength":8,"description":"Keystore password (AES-256-GCM, scrypt KDF). Unrecoverable — required by `/send` and `/extend`.","title":"Password"},"Mnemonic":{"type":"string","description":"bip39 seed phrase, validated with `bip39.validateMnemonic`.","title":"Mnemonic"},"AddressMap":{"type":"object","additionalProperties":{"type":"string"},"description":"One address per chain the user holds a wallet on, limited to the chains your api client is enabled for.","title":"AddressMap"},"CreatePostResponsesContentApplicationJsonSchemaResult":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"mnemonic":{"type":"string","description":"The bip39 seed phrase. Returned **only** on a create that generated or imported a new wallet set, and never stored in plaintext. Absent when an existing user was adopted."},"addresses":{"$ref":"#/components/schemas/AddressMap"}},"required":["userId","addresses"],"title":"CreatePostResponsesContentApplicationJsonSchemaResult"},"Wallets_createUser_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/CreatePostResponsesContentApplicationJsonSchemaResult"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Wallets_createUser_Response_200"},"Chain":{"type":"string","enum":["BITCOIN","ETHEREUM","BSC","TRON","POLYGON","SOLANA"],"title":"Chain"},"ExtendPostResponsesContentApplicationJsonSchemaResult":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UserId"},"added":{"type":"array","items":{"$ref":"#/components/schemas/Chain"},"description":"Chains added by this call. Empty when the user already had every configured chain."},"addresses":{"$ref":"#/components/schemas/AddressMap"}},"required":["userId","added","addresses"],"title":"ExtendPostResponsesContentApplicationJsonSchemaResult"},"Wallets_extendUser_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/ExtendPostResponsesContentApplicationJsonSchemaResult"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Wallets_extendUser_Response_200"},"Wallets_listAddresses_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/AddressMap"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Wallets_listAddresses_Response_200"},"AssetId":{"type":"string","enum":["1","2","21","22","3","31","32","4","41","42","5","51","52","6","61","62"],"description":"Primary asset selector. An all-digit string (`\"21\"`) is accepted and normalised to an integer.\n\n- `1` — BITCOIN BTC (native, 8 decimals)\n- `2` — ETHEREUM ETH (native, 18 decimals)\n- `21` — ETHEREUM USDT (ERC20, 6 decimals)\n- `22` — ETHEREUM USDC (ERC20, 6 decimals)\n- `3` — BSC BNB (native, 18 decimals)\n- `31` — BSC USDT (BEP20, 18 decimals)\n- `32` — BSC USDC (BEP20, 18 decimals)\n- `4` — TRON TRX (native, 6 decimals)\n- `41` — TRON USDT (TRC20, 6 decimals)\n- `42` — TRON USDC (TRC20, 6 decimals) — not on every endpoint\n- `5` — POLYGON POL (native, 18 decimals)\n- `51` — POLYGON USDT (ERC20, 6 decimals) — not on every endpoint\n- `52` — POLYGON USDC (ERC20, 6 decimals)\n- `6` — SOLANA SOL (native, 9 decimals)\n- `61` — SOLANA USDT (SPL, 6 decimals) — not on every endpoint\n- `62` — SOLANA USDC (SPL, 6 decimals)","title":"AssetId"},"ValidatePostResponsesContentApplicationJsonSchemaResult":{"type":"string","enum":["true","false"],"description":"A string, not a boolean.","title":"ValidatePostResponsesContentApplicationJsonSchemaResult"},"Wallets_validateAddress_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/ValidatePostResponsesContentApplicationJsonSchemaResult","description":"A string, not a boolean."},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Wallets_validateAddress_Response_200"},"Balances_getBalance_Response_200":{"type":"object","properties":{"result":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Balance in the asset, as a human-decimal string, exact down to the last base unit."},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Balances_getBalance_Response_200"},"TransactionType":{"type":"string","enum":["send","receive"],"description":"Direction relative to this user. `null` on EVM token lookups when the receipt carries no matching Transfer log.","title":"TransactionType"},"TransactionStatus":{"type":"string","enum":["pending","success","failed"],"title":"TransactionStatus"},"Transaction":{"type":"object","properties":{"hash":{"type":"string"},"type":{"$ref":"#/components/schemas/TransactionType","description":"Direction relative to this user. `null` on EVM token lookups when the receipt carries no matching Transfer log."},"amount":{"type":["string","null"],"pattern":"^\\d+(\\.\\d+)?$","description":"Amount denominated in the asset. `null` on EVM token lookups when the receipt carries no matching Transfer log."},"fee":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Fee denominated in the chain's **native** currency."},"status":{"$ref":"#/components/schemas/TransactionStatus"},"date":{"type":["string","null"],"format":"date-time","description":"Block time. `null` while the transaction is unconfirmed."}},"required":["hash","type","amount","fee","status","date"],"description":"A chain-agnostic transaction row. Every chain is normalised to this shape.","title":"Transaction"},"InfoPostResponsesContentApplicationJsonSchemaResult":{"type":"object","properties":{"address":{"type":"string","description":"The user's address on the asset's chain."},"balance":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Balance in the asset."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"},"description":"Recent history. Also `[]` when history is unavailable, so an empty list is not proof there is none."}},"required":["address","balance","transactions"],"title":"InfoPostResponsesContentApplicationJsonSchemaResult"},"Balances_getWalletInfo_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/InfoPostResponsesContentApplicationJsonSchemaResult"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Balances_getWalletInfo_Response_200"},"PortfolioAsset":{"type":"object","properties":{"assetId":{"$ref":"#/components/schemas/AssetId"},"address":{"type":"string","description":"The wallet's address on the asset's chain. Empty when the wallet has no address there."},"balance":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Balance in the asset, exact to the last base unit. `\"0\"` when it could not be read at that moment, so a `\"0\"` here is not proof the wallet is empty — confirm with `/balance` before acting on it."},"symbol":{"type":"string","description":"The coin symbol, and the key to read this asset's entry out of `/prices`."}},"required":["assetId","address","balance","symbol"],"title":"PortfolioAsset"},"Portfolio":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/PortfolioAsset"},"description":"One entry per asset your api client is enabled for, in the order of the asset table."}},"required":["assets"],"title":"Portfolio"},"Balances_getPortfolio_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Portfolio"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Balances_getPortfolio_Response_200"},"SendPostResponsesContentApplicationJsonSchemaResult":{"type":"object","properties":{"txHash":{"type":"string","description":"Broadcast hash. **Not a confirmation** — poll `/txid` for status."}},"required":["txHash"],"title":"SendPostResponsesContentApplicationJsonSchemaResult"},"Transfers_sendTransfer_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/SendPostResponsesContentApplicationJsonSchemaResult"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Transfers_sendTransfer_Response_200"},"Transactions_listTransactions_Response_200":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Transactions_listTransactions_Response_200"},"Transactions_getTransaction_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Transaction"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Transactions_getTransaction_Response_200"},"TronFee":{"type":"object","properties":{"bandwidth":{"type":"integer"},"energy":{"type":"integer","description":"TRC20 transfers only."}},"required":["bandwidth"],"description":"Resources a Tron transfer will consume beyond what the account already covers. Not a currency amount.","title":"TronFee"},"FeePostResponsesContentApplicationJsonSchemaResult":{"oneOf":[{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},{"$ref":"#/components/schemas/TronFee"}],"description":"A decimal string in the chain's native currency on Bitcoin, EVM and Solana; a resource object on TRON.","title":"FeePostResponsesContentApplicationJsonSchemaResult"},"Fees_estimateFee_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/FeePostResponsesContentApplicationJsonSchemaResult","description":"A decimal string in the chain's native currency on Bitcoin, EVM and Solana; a resource object on TRON."},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Fees_estimateFee_Response_200"},"FiatPrices":{"type":"object","properties":{"USD":{"type":"number","format":"double"},"EUR":{"type":"number","format":"double"},"GBP":{"type":"number","format":"double"},"CAD":{"type":"number","format":"double"},"AUD":{"type":"number","format":"double"},"SEK":{"type":"number","format":"double"},"DKK":{"type":"number","format":"double"},"PLN":{"type":"number","format":"double"},"BRL":{"type":"number","format":"double"},"AED":{"type":"number","format":"double"}},"description":"One market price per supported fiat currency. Plain JSON **numbers**, not the decimal strings used for balances and amounts.","title":"FiatPrices"},"PriceMap":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FiatPrices"},"description":"One entry per priced coin, keyed by **symbol** rather than `assetId` — a price belongs to a coin, so a single `USDT` entry covers USDT on every chain it lives on.","title":"PriceMap"},"Prices_getPrices_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/PriceMap"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Prices_getPrices_Response_200"},"FeePayer":{"type":"string","enum":["USER","PLATFORM"],"description":"Who covers the network fee on a transfer.\n\n- `USER` — the fee comes out of the sending wallet, the usual arrangement.\n- `PLATFORM` — your api client covers it, so your user can move the token without holding the chain's native coin.","title":"FeePayer"},"ConfigLiquidityType":{"type":"string","enum":["internal","provider"],"description":"`internal` — orders fill on your own desk. `provider` — orders fill through the liquidity provider set on your account.","title":"ConfigLiquidityType"},"ConfigLiquidity":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/ConfigLiquidityType","description":"`internal` — orders fill on your own desk. `provider` — orders fill through the liquidity provider set on your account."},"provider":{"type":"string","description":"The liquidity provider your orders fill through. Present only when `type` is `provider`."}},"required":["type"],"description":"Where your buy and sell orders are filled.","title":"ConfigLiquidity"},"ConfigAssetKind":{"type":"string","enum":["NATIVE","TOKEN"],"description":"`NATIVE` is the chain's own coin; `TOKEN` is a contract on it.","title":"ConfigAssetKind"},"ConfigAsset":{"type":"object","properties":{"assetId":{"$ref":"#/components/schemas/AssetId"},"chain":{"$ref":"#/components/schemas/Chain"},"symbol":{"type":"string","description":"The coin symbol, and the key to read this asset's entry out of `/prices`."},"kind":{"$ref":"#/components/schemas/ConfigAssetKind","description":"`NATIVE` is the chain's own coin; `TOKEN` is a contract on it."},"standard":{"type":"string","description":"The token standard. Present on a `TOKEN`, absent on a `NATIVE` asset."},"decimals":{"type":"integer","description":"Decimal places this asset supports. An amount with more than this many is rejected."},"feePayer":{"$ref":"#/components/schemas/FeePayer"}},"required":["assetId","chain","symbol","kind","decimals","feePayer"],"title":"ConfigAsset"},"Configuration":{"type":"object","properties":{"feePayer":{"$ref":"#/components/schemas/FeePayer"},"liquidity":{"$ref":"#/components/schemas/ConfigLiquidity"},"assets":{"type":"array","items":{"$ref":"#/components/schemas/ConfigAsset"},"description":"Every asset your api client is enabled for, in catalog order."}},"required":["feePayer","liquidity","assets"],"title":"Configuration"},"Configuration_getConfiguration_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Configuration"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Configuration_getConfiguration_Response_200"},"Fiat":{"type":"string","enum":["USD","EUR","GBP","CAD","AUD","SEK","DKK","PLN","BRL","AED"],"description":"Fiat currency the trade is priced in. Defaults to `USD` when omitted.","title":"Fiat"},"TradeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","description":"24-character hex id of a trade, returned by `/order` and `/sell`.","title":"TradeId"},"TradeSide":{"type":"string","enum":["buy","sell"],"title":"TradeSide"},"TradeStatus":{"type":"string","enum":["open","approved","executing","completed","failed","expired","cancelled"],"description":"Where the trade is in its lifecycle.\n\n`open` is the only status you can approve or cancel. `executing` is in flight — poll, never approve again. `completed`, `failed`, `expired` and `cancelled` are terminal.","title":"TradeStatus"},"TradeQuote":{"type":"object","properties":{"cryptoAmount":{"type":["string","null"]},"fiatAmount":{"type":["string","null"]},"price":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","description":"After this instant the quote has lapsed and approving it is a `409`."}},"required":["cryptoAmount","fiatAmount","price","expiresAt"],"description":"The original quote, unchanged by approval or settlement.","title":"TradeQuote"},"Trade":{"type":"object","properties":{"tradeId":{"$ref":"#/components/schemas/TradeId"},"side":{"$ref":"#/components/schemas/TradeSide"},"status":{"$ref":"#/components/schemas/TradeStatus"},"assetId":{"$ref":"#/components/schemas/AssetId"},"symbol":{"type":"string","description":"Ticker of the traded asset, e.g. `BTC`."},"fiat":{"$ref":"#/components/schemas/Fiat"},"provider":{"type":"string","description":"Where this trade fills — `INTERNAL` for your own desk, otherwise the liquidity provider's name, as `/config` reports it in `liquidity.provider`. Fixed when the trade is quoted."},"cryptoAmount":{"type":["string","null"],"description":"Decimal string. `null` only if the stored amount could not be read."},"fiatAmount":{"type":["string","null"],"description":"Decimal string. `null` only if the stored amount could not be read."},"price":{"type":"string","description":"Unit price of one whole coin, in `fiat`."},"quote":{"$ref":"#/components/schemas/TradeQuote","description":"The original quote, unchanged by approval or settlement."},"reference":{"type":"string","description":"Present only when the fill carried one."},"failureReason":{"type":"string","description":"Present only on a `failed` trade."},"createdAt":{"type":"string","format":"date-time"},"approvedAt":{"type":["string","null"],"format":"date-time","description":"`null` until the quote is approved."},"completedAt":{"type":["string","null"],"format":"date-time","description":"`null` until the trade reaches a terminal status."}},"required":["tradeId","side","status","assetId","symbol","fiat","provider","cryptoAmount","fiatAmount","price","quote","createdAt","approvedAt","completedAt"],"description":"One trade, whichever side it is.\n\n`cryptoAmount`, `fiatAmount` and `price` are the **best known** figures: what executed if it has, else what you approved, else what was quoted. `quote` always holds the original quoted leg, so you can show both. Every amount and price is cut — not rounded — to at most 6 decimal places, with trailing zeros trimmed, so `100.00` is returned as `100`.","title":"Trade"},"TradeResponse":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Trade"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"TradeResponse"},"TradesPostRequestBodyContentApplicationJsonSchemaSide":{"type":"string","enum":["buy","sell"],"description":"Optional. Return only this side.","title":"TradesPostRequestBodyContentApplicationJsonSchemaSide"},"Trading_listTrades_Response_200":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/Trade"}},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Trading_listTrades_Response_200"},"Platform_wallet_getPlatformAddresses_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/AddressMap"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Platform wallet_getPlatformAddresses_Response_200"},"Platform_wallet_getPlatformBalance_Response_200":{"type":"object","properties":{"result":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Balance in the asset, as a human-decimal string."},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Platform wallet_getPlatformBalance_Response_200"},"PlatformInfoPostResponsesContentApplicationJsonSchemaResult":{"type":"object","properties":{"address":{"type":"string","description":"The platform wallet's address on the asset's chain."},"balance":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Balance in the asset."},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"},"description":"Recent history. Also `[]` when history is unavailable, so an empty list is not proof there is none."}},"required":["address","balance","transactions"],"title":"PlatformInfoPostResponsesContentApplicationJsonSchemaResult"},"Platform_wallet_getPlatformInfo_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/PlatformInfoPostResponsesContentApplicationJsonSchemaResult"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Platform wallet_getPlatformInfo_Response_200"},"Platform_wallet_getPlatformPortfolio_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Portfolio"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Platform wallet_getPlatformPortfolio_Response_200"},"PlatformSendPostResponsesContentApplicationJsonSchemaResult":{"type":"object","properties":{"txHash":{"type":"string","description":"Broadcast hash. **Not a confirmation** — poll `/platform/txid` for status."}},"required":["txHash"],"title":"PlatformSendPostResponsesContentApplicationJsonSchemaResult"},"Platform_wallet_sendPlatformTransfer_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/PlatformSendPostResponsesContentApplicationJsonSchemaResult"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Platform wallet_sendPlatformTransfer_Response_200"},"Platform_wallet_getPlatformTransactions_Response_200":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Platform wallet_getPlatformTransactions_Response_200"},"Platform_wallet_getPlatformTransactionById_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Transaction"},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Platform wallet_getPlatformTransactionById_Response_200"},"PlatformFeePostResponsesContentApplicationJsonSchemaResult":{"oneOf":[{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},{"$ref":"#/components/schemas/TronFee"}],"description":"A decimal string in the chain's native currency on Bitcoin, EVM and Solana; a resource object on TRON.","title":"PlatformFeePostResponsesContentApplicationJsonSchemaResult"},"Platform_wallet_getPlatformFee_Response_200":{"type":"object","properties":{"result":{"$ref":"#/components/schemas/PlatformFeePostResponsesContentApplicationJsonSchemaResult","description":"A decimal string in the chain's native currency on Bitcoin, EVM and Solana; a resource object on TRON."},"requestId":{"$ref":"#/components/schemas/RequestId"}},"required":["result","requestId"],"title":"Platform wallet_getPlatformFee_Response_200"}},"securitySchemes":{"clientId":{"type":"apiKey","in":"header","name":"x-client-id","description":"API client id, issued by the service operator. Used only by `/auth`."},"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key, issued by the service operator and shown once. Used only by `/auth`."},"bearerAuth":{"type":"http","scheme":"bearer","description":"A 15-minute token from `/auth`. Required on every endpoint except `/auth`."}}}}