HomeDocumentationAPI Reference
Log In
API Reference

Get Currency

Method Name

public/get_currency

Get currency related risk params, spot price 24hrs ago and lending details for a specific currency.

Parameters

currencystringrequired
Underlying currency of asset (ETH, BTC, etc)

Response

idstring or integerrequired
resultobjectrequired
result.borrow_apystringrequired
Borrow APY (only for USDC)
result.currencystringrequired
Underlying currency of asset (ETH, BTC, etc)
result.market_typestringrequired
Market type of the currency
enum ALLSRM_BASE_ONLYSRM_OPTION_ONLYSRM_PERP_ONLYCASH
result.spot_pricestringrequired
Spot price of the currency
result.srm_im_discountstringrequired
Initial Margin discount for given collateral in Standard Manager (e.g. LTV). Only the Standard Manager supports non-USDC collateral
result.srm_mm_discountstringrequired
Maintenance Margin discount for given collateral in Standard Manager (e.g. liquidation threshold). Only the Standard Manager supports non-USDC collateral
result.supply_apystringrequired
Supply APY (only for USDC)
result.total_borrowstringrequired
Total collateral borrowed in the protocol (only USDC is borrowable)
result.total_supplystringrequired
Total collateral supplied in the protocol
result.asset_cap_and_supply_per_managerobjectrequired
Current open interest and open interest cap by manager and asset type
result.instrument_typesarray of stringsrequired
Instrument types supported for the currency
result.managersarray of objectsrequired
Managers supported for the currency
result.managers[].addressstringrequired
Address of the manager
result.managers[].margin_typestringrequired
Margin type of the manager
enum PMSMPM2
result.managers[].currencystring or null
Currency of the manager (only applies to portfolio managers)
result.pm2_collateral_discountsarray of objectsrequired
Initial and Maintenance Margin discounts for given collateral in PM2
result.pm2_collateral_discounts[].im_discountstringrequired
Initial Margin discount for given collateral in PM2
result.pm2_collateral_discounts[].manager_currencystringrequired
Currency of the manager
result.pm2_collateral_discounts[].mm_discountstringrequired
Maintenance Margin discount for given collateral in PM2
result.protocol_asset_addressesobjectrequired
Asset addressses of the derive protocol for given currency
result.protocol_asset_addresses.optionstring or null
Address of the Derive protocol option contract (none if not supported)
result.protocol_asset_addresses.perpstring or null
Address of the Derive protocol perp contract (none if not supported)
result.protocol_asset_addresses.spotstring or null
Address of the Derive protocol spot contract (none if not supported)
result.protocol_asset_addresses.underlying_erc20string or null
Address of the erc20 asset on Derive chain. This is the asset that is deposited into the spot asset
result.erc20_detailsobject or null
Details of the erc20 asset (if applicable)
result.spot_price_24hstring or null
Spot price of the currency 24 hours ago
result.srm_perp_margin_requirementsobject or null
Perp margin requirements (mm_perp_req, im_perp_req, max_leverage) from the Standard Risk Manager. Only present for non-CASH currencies with SRM support.
result.srm_perp_margin_requirements.im_perp_reqstringrequired
Initial margin requirement for perp positions (fraction of notional)
result.srm_perp_margin_requirements.max_leveragestringrequired
Maximum leverage for perp positions (1 / im_perp_req)
result.srm_perp_margin_requirements.mm_perp_reqstringrequired
Maintenance margin requirement for perp positions (fraction of notional)

Example

{request_example_shell}
{request_example_javascript}
{request_example_python}

The above command returns JSON structured like this:

{response_example_json}