List your open positions
GET/positions
Lists your open positions. 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 | query | string | Filter: a |
pair | query | string | Filter: |
Responses
200
OK.
| Field | Type | Description |
|---|---|---|
positions required | array of object | |
positions[].trade_id required | string | |
positions[].rfq_id required | string | |
positions[].chain required | string | |
positions[].pair required | string | Pair, such as |
positions[].notional required | string | Decimal string. |
positions[].rate required | string | Decimal string. |
positions[].entry_price required | string or null | The forward rate at which the position opened, as a decimal string with six decimal places. It is the same value as |
positions[].mark_price required | string or null | The current forward rate for the position: CRX's latest on-chain forward curve for the pair, applied to the live spot rate, at the position's settlement date. It is a decimal string with six decimal places. |
positions[].mark_time required | integer or null | The time of the price behind |
positions[].unrealized_pnl required | string or null | Your profit or loss on the position if it settled at |
positions[].settlement required | integerminimum 0 | Settlement time. |
positions[].premium_bps required | integer | |
positions[].status required | string or null |
|
positions[].awaiting_fixing required | boolean |
|
positions[].pair_status required | string active paused delisted | |
positions[].delisting_at | integerminimum 0 | Scheduled delisting time. Omitted if none. |
positions[].as_of_block required | integer or null | Block number, or |
positions[].leg_id required | string | Your leg ID. |
positions[].side required | integer 1 -1 | Your side: |
positions[].fixing_adjustment | object | Your Fixing adjustment, on a trade you requested with The Fixing adjustment of a trade that settles at an official fixing: the result at the fixing less the result at the market price, in USDC, when the fixing gives the better result. Your trade only. |
positions[].fixing_adjustment.reference required | string BRL PTAX Banxico FIX PHP BAP | The fixing. |
positions[].fixing_adjustment.fixing required | string or null | The fixing as published. |
positions[].fixing_adjustment.amount required | string or null | The adjustment CRX pays you, in USDC, a decimal string with six decimal places. |
positions[].fixing_adjustment.outstanding required | string or null | Always |
positions[].fixing_adjustment.paid required | string or null | USDC CRX sent for this trade. |
positions[].fixing_adjustment.status required | string pending paid held none |
|
positions[].fixing_adjustment.tx required | string or null | The USDC transfer, once sent. |
net_positions required | array of object | Your positions netted by chain, pair and settlement date, one row for each. A close is a trade on the opposite side at the same settlement date; the row shows what remains. |
net_positions[].chain required | string | Chain key, such as |
net_positions[].pair required | string | Pair, such as |
net_positions[].settlement required | integerminimum 0 | Settlement date of the netted trades, as Unix time in milliseconds. |
net_positions[].side required | integer or null 1 -1 null | Your net side: |
net_positions[].notional required | string | Net notional in the base currency, as a decimal string with six decimal places. |
net_positions[].rate required | string or null | Average rate of the trades on the net side, weighted by notional, as a decimal string with six decimal places. |
net_positions[].entry_price required | string or null | The average forward rate at which the net position opened, as a decimal string with six decimal places. It is the same value as |
net_positions[].mark_price required | string or null | The current forward rate for the pair at the row's settlement date, as on |
net_positions[].mark_time required | integer or null | The time of the price behind |
net_positions[].unrealized_pnl required | string or null | The sum of the |
net_positions[].status required | string |
|
net_positions[].final required | boolean |
|
net_positions[].awaiting_fixing required | boolean |
|
net_positions[].pair_status required | string active paused delisted | |
net_positions[].delisting_at | integerminimum 0 | Delisting time, when one is scheduled. |
net_positions[].trades required | array of object | The trades the row nets, each with |
net_positions[].trades[].trade_id | string | |
net_positions[].trades[].rfq_id | string | |
net_positions[].trades[].side | integer 1 -1 | |
net_positions[].trades[].notional | string | Decimal string. |
net_positions[].trades[].rate | string | Decimal string. |
net_positions[].trades[].status | 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