Get deposit transactions
POST/deposit
Returns the unsigned approve (when the allowance is short) and deposit transactions. Send them from your account. Credited in about a minute. Track it on deposit.last (GET /balance) or the deposit.* events on GET /trades.
Authentication
x-crx-addressx-crx-tsx-crx-sigx-crx-addressx-crx-signerx-crx-tsx-crx-sigx-crx-session
Request body
| Field | Type | Description |
|---|---|---|
chain required | string | A |
amount required | string | Decimal string, up to the token's decimals. Minimum 100 USDC; below it, 400 |
token | string | The chain's |
symbol | string | Token symbol in place of |
Responses
200
OK.
| Field | Type | Description |
|---|---|---|
transactions required | array of object | Send in order: approve (for this amount, if your allowance is short), then deposit. |
transactions[].to required | string |
|
transactions[].data required | string | Calldata, as 0x hex. |
transactions[].value required | string 0 | |
transactions[].chain_id required | integer | |
amount_raw required | string | Amount in token base units. |
amount_ledger required | string | Ledger units, 6 decimal places. |
outcome | string |
|
message | string | Text to show the user. |
400
bad_request, invalid_signature. seat_not_ready: account setup is not finished.
code bad_request seat_not_ready invalid_signature
401
unauthorized: a header is missing or malformed, x-crx-ts is out of range, the call was already used, the signature does not match, or the caller lacks access.
code unauthorized
403
not_whitelisted: the account is not approved for this call. seat_cannot_sign: the account wallet cannot sign trades or take deposits; use a standard wallet.
code not_whitelisted seat_cannot_sign
408
timeout: no answer within 30 seconds.
code timeout
413
payload_too_large: the body is over 2 MiB.
code payload_too_large
415
unsupported_media_type: send content-type: application/json.
code unsupported_media_type
422
unprocessable_entity.
code unprocessable_entity
429
rate_limited: retry after Retry-After seconds.
code rate_limited
| Header | Type | Description |
|---|---|---|
Retry-After | integer | Seconds until the next call is accepted. |
ratelimit-limit | integer | Maximum calls in a burst. |
ratelimit-remaining | integer | Calls remaining before the limit. |
ratelimit-reset | integer | Seconds until the full limit is restored. |
ratelimit-refill | integer | Calls restored per minute. |
502
upstream: a chain read failed. Retry shortly.
code upstream
503
deposits_closed: deposits are not open on this chain. deposit_check_unavailable: CRX cannot check the account wallet now. Retry after Retry-After.
code deposits_closed deposit_check_unavailable