Skip to main content

Get Asset Detail

Query detailed holding information for a specific on-chain token, including PnL and cost basis.

info
  • Token is identified by chainCode + tokenAddress — get these from Get Asset List or Get Biz Token List
  • Response wraps the asset in an assetList array with 0 or 1 element; an empty array means the user does not hold this token
  • Use tradeFlag to determine if the token can be sold via Execute Redeem

HTTP Request

POST/v5/alpha/trade/asset-detail

Request Parameters

ParameterRequiredTypeComments
chainCodetruestringBlockchain code, e.g. ETH, SOL, BSC
tokenAddresstruestringToken contract address on the specified chain

Response Parameters

ParameterTypeComments
assetListarrayAsset details. Contains 0 or 1 element. Empty if user does not hold this token
> chainCodestringBlockchain code
> chainIconUrlstringChain icon URL
> tokenAddressstringToken contract address
> tokenCodestringToken code in DEX_<id> format. Use this in quote and execution requests
> tokenSymbolstringToken symbol
> tokenDecimalsintegerToken decimal precision
> tokenIconUrlDaystringToken icon URL (light mode)
> tokenIconUrlNightstringToken icon URL (dark mode)
> tokenAmountstringHolding quantity
> tokenAmountUsdstringHolding value in USD
> tradeFlagintegerWhether tradable. 0: Not tradable, 1: Tradable
> pnlstringUnrealized PnL in USD. Positive = profit. Null if no cost basis available
> pnlRatiostringPnL ratio as decimal, e.g. 0.15 = +15%. Null if no cost basis available
> costPricestringAverage cost price. Null if no cost basis available
> lastPricestringCurrent market price
> costTotalValuestringTotal cost basis in USD. Null if no cost basis available
> assetStatusintegerToken lifecycle status. 0: Running, 1: Delisting soon, 2: Delisted
> announcementUrlstringDelisting announcement URL. Present when assetStatus is 1 or 2
> estimatedOfflineTimeintegerEstimated delisting timestamp (ms). Present when assetStatus=1
> delistingTimeintegerActual delisting timestamp (ms). Present when assetStatus=2

Request Example

POST /v5/alpha/trade/asset-detail HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1704067200000
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"chainCode": "ETH",
"tokenAddress": "0x6982508145454ce325ddbe47a25d4ec3d2311933"
}

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"assetList": [
{
"chainCode": "ETH",
"chainIconUrl": "https://example.com/eth.png",
"tokenAddress": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
"tokenCode": "DEX_123",
"tokenSymbol": "PEPE",
"tokenDecimals": 18,
"tokenIconUrlDay": "https://example.com/pepe-day.png",
"tokenIconUrlNight": "https://example.com/pepe-night.png",
"tokenAmount": "50000000",
"tokenAmountUsd": "500.00",
"tradeFlag": 1,
"pnl": "75.00",
"pnlRatio": "0.15",
"costPrice": "0.0000085",
"lastPrice": "0.00001",
"costTotalValue": "425.00",
"assetStatus": 0
}
]
},
"retExtInfo": {},
"time": 1704067200000
}