HomeDocumentationAPI Reference
Log In
API Reference

Get Asset

Method Name

public/get_asset

Get single asset by asset name

Parameters

asset_namestringrequired
Asset name

Response

idstring or integerrequired
resultobjectrequired
result.addressstringrequired
On-chain address of Asset.sol contract
result.asset_idstringrequired
Asset ID of the created asset
result.asset_namestringrequired
Asset name
result.asset_typestringrequired
erc20, option, or perp
enum erc20optionperp
result.currencystringrequired
Underlying currency of asset (ETH, BTC, etc)
result.erc20_detailsobject or nullrequired
ERC20-specific details
result.erc20_details.decimalsintegerrequired
Number of decimals of the underlying on-chain ERC20 token
result.erc20_details.borrow_indexstring
Latest borrow index as per CashAsset.sol implementation
result.erc20_details.supply_indexstring
Latest supply index as per CashAsset.sol implementation
result.erc20_details.underlying_erc20_addressstring
Address of underlying on-chain ERC20 (not V2 asset)
result.is_collateralbooleanrequired
If True: use as collateral in margin calculations
result.is_positionbooleanrequired
If True: treat as position in margin calculations
result.option_detailsobject or nullrequired
Option-specific details
result.option_details.expiryintegerrequired
Unix timestamp of expiry date (in seconds)
result.option_details.indexstringrequired
Underlying settlement price index
result.option_details.option_typestringrequired
enum CP
result.option_details.strikestringrequired
result.option_details.settlement_pricestring or null
Settlement price of the option
result.perp_detailsobject or nullrequired
Perp-specific details
result.perp_details.aggregate_fundingstringrequired
Latest aggregated funding as per PerpAsset.sol
result.perp_details.funding_ratestringrequired
Current hourly funding rate as per PerpAsset.sol
result.perp_details.indexstringrequired
Underlying spot price index for funding rate
result.perp_details.max_rate_per_hourstringrequired
Max rate per hour as per PerpAsset.sol
result.perp_details.min_rate_per_hourstringrequired
Min rate per hour as per PerpAsset.sol
result.perp_details.static_interest_ratestringrequired
Static interest rate as per PerpAsset.sol
result.sub_idstringrequired
SubId identifier used in Asset.sol

Example

{request_example_shell}
{request_example_javascript}
{request_example_python}

The above command returns JSON structured like this:

{response_example_json}