Method Name
private/get_collaterals
private/get_collateralsGet collaterals of a subaccount
Required minimum session key permission level is read_only
Parameters
| subaccount_idintegerrequired Subaccount_id |
Response
| idstring or integerrequired |
| resultobjectrequired |
| result.subaccount_idintegerrequired Subaccount_id |
| result.collateralsarray of objectsrequired All collaterals that count towards margin of subaccount |
| result.collaterals[].amountstringrequired Asset amount of given collateral |
| result.collaterals[].amount_stepstringrequired Minimum amount step for the collateral |
| result.collaterals[].asset_namestringrequired Asset name |
| result.collaterals[].asset_typestringrequired Type of asset collateral (currently always erc20)enum erc20optionperp |
| result.collaterals[].average_pricestringrequired Average price of the collateral, 0 for USDC. |
| result.collaterals[].average_price_excl_feesstringrequired Average price of whole position excluding fees |
| result.collaterals[].creation_timestampintegerrequired Timestamp of when the position was opened (in ms since Unix epoch) |
| result.collaterals[].cumulative_intereststringrequired Cumulative interest earned on supplying collateral or paid for borrowing |
| result.collaterals[].currencystringrequired Underlying currency of asset ( ETH, BTC, etc) |
| result.collaterals[].deltastringrequired Asset delta w.r.t. the delta currency |
| result.collaterals[].delta_currencystringrequired Currency with respect to which delta is reported.For example, LRTs like WEETH have their delta reported in ETH |
| result.collaterals[].initial_marginstringrequired USD value of collateral that contributes to initial margin |
| result.collaterals[].maintenance_marginstringrequired USD value of collateral that contributes to maintenance margin |
| result.collaterals[].mark_pricestringrequired Current mark price of the asset |
| result.collaterals[].mark_valuestringrequired USD value of the collateral (amount * mark price) |
| result.collaterals[].open_orders_marginstringrequired USD margin requirement for all open orders for this asset / instrument |
| result.collaterals[].pending_intereststringrequired Portion of interest that has not yet been settled on-chain. This number is added to the portfolio value for margin calculations purposes. |
| result.collaterals[].realized_pnlstringrequired Realized trading profit or loss of the collateral, 0 for USDC. |
| result.collaterals[].realized_pnl_excl_feesstringrequired Realized trading profit or loss of the position excluding fees |
| result.collaterals[].total_feesstringrequired Total fees paid for opening and changing the position |
| result.collaterals[].unrealized_pnlstringrequired Unrealized trading profit or loss of the collateral, 0 for USDC. |
| result.collaterals[].unrealized_pnl_excl_feesstringrequired Unrealized trading profit or loss of the position excluding fees |
Example
{request_example_shell}{request_example_javascript}{request_example_python}The above command returns JSON structured like this:
{response_example_json}