1. CRX
  2. API reference
  3. Funds
  4. Get deposit transactions

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-address x-crx-ts x-crx-sig
  • x-crx-address x-crx-signer x-crx-ts x-crx-sig
  • x-crx-session

Request body

FieldTypeDescription
chain requiredstring

A chains[].key from GET /health, such as ethereum.

amount requiredstring

Decimal string, up to the token's decimals. Minimum 100 USDC; below it, 400 bad_request gives the minimum in details.min.

tokenstring

The chain's base_token. Optional.

symbolstring

Token symbol in place of token, such as USDC. Optional.

Responses

200

OK.

FieldTypeDescription
transactions requiredarray of object

Send in order: approve (for this amount, if your allowance is short), then deposit.

transactions[].to requiredstring

base_token (approve) or core (deposit), as in GET /health.

transactions[].data requiredstring

Calldata, as 0x hex.

transactions[].value requiredstring 0
transactions[].chain_id requiredinteger
amount_raw requiredstring

Amount in token base units.

amount_ledger requiredstring

Ledger units, 6 decimal places.

outcomestring

platform_paused during a CRX pause; the deposit is credited after it. Omitted otherwise.

messagestring

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

HeaderTypeDescription
Retry-Afterinteger

Seconds until the next call is accepted.

ratelimit-limitinteger

Maximum calls in a burst.

ratelimit-remaininginteger

Calls remaining before the limit.

ratelimit-resetinteger

Seconds until the full limit is restored.

ratelimit-refillinteger

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