Read your balance
GET/balance
Returns your collateral, margin, and last deposit and withdrawal. Granted viewers can call it.
Authentication
x-crx-addressx-crx-tsx-crx-sigx-crx-addressx-crx-signerx-crx-tsx-crx-sigx-crx-session
Parameters
| Name | In | Type | Description |
|---|---|---|---|
chain required | query | string | A |
Responses
200
OK.
| Field | Type | Description |
|---|---|---|
account required | string | Lowercase address. |
state required | string live stale no_data not_on_chain not_seeded |
|
seat_view | object | |
seat_view.reason | string or null | Why |
as_of required | integer or null | Time of the figures. |
as_of_block required | integer or null | Block number, or |
collateral required | string or null | Live collateral in USD, else the last settled figure. |
free required | string or null | Amount you can withdraw, in USD. |
equity required | string or null | Account equity, in USD. |
im required | string or null | Initial margin, in USD. |
mm required | string or null | Maintenance margin, in USD. |
owed required | string or null | Loss the collateral did not cover; |
level_bps required | integer or null | Margin level: |
margin_status required | string or null ok call liquidatable no_risk unconfirmed owes paused null |
|
clock_deadline required | integer or null | Deadline to cure a margin call, or |
lift_band required | string or null | Expected |
seed required | object | Onboarding status. |
seed.state | string or null |
|
seed.code | string or null | Reserved. Always |
open_legs required | integer or null | Number of open positions. |
account_status | string active removed not_active |
|
outcome | string | First that applies: |
message | string | Text to show the user. |
deposit required | object | |
deposit.last required | object or null | Latest deposit, or |
deposit.last.tx required | string | Transaction hash; cite it to CRX. |
deposit.last.index_in_tx required | integer or null | Index of your deposit in |
deposit.last.amount required | string or null | Amount in USD, as a decimal string. |
deposit.last.status required | string pending credited failed |
|
deposit.last.outcome | string | Why it is not credited or was returned; |
deposit.last.message | string | Text to show the user. |
deposit.last.final required | boolean |
|
deposit.last.expected_by | integer or null | Expected credit time while |
deposit.last.expected_by_at | string or null |
|
withdraw required | object | |
withdraw.live required | boolean or null |
|
withdraw.nonce required | string | Nonce for your next |
withdraw.last required | object or null | Latest withdrawal, or |
withdraw.last.item required | string or null | Withdrawal ID, as in |
withdraw.last.tx required | string or null | Withdrawal transaction until executed, then the payout transaction. |
withdraw.last.arm_tx required | string or null | Withdrawal transaction. |
withdraw.last.nonce required | string or null | |
withdraw.last.amount required | string or null | Amount in USD, as a decimal string. |
withdraw.last.paid required | string or null | USDC executed. On |
withdraw.last.status required | string sending pending accepted paid partial returned refused |
|
withdraw.last.reason required | string or null | Refusal reason: |
withdraw.last.outcome | string |
|
withdraw.last.message | string | Text to show the user. |
withdraw.last.final required | boolean |
|
withdraw.last.expected_by | integer or null | Latest expected execution time while in progress; execution can be earlier. |
withdraw.last.expected_by_at | string or null |
|
400
bad_request, invalid_signature.
code bad_request 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.
code not_whitelisted
408
timeout: no answer within 30 seconds.
code timeout
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