Get Asset Info
Query Spot asset information
Apply to: classic account
HTTP Request
GET /v5/asset/transfer/query-asset-info
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
accountType | true | string | Account type. SPOT |
coin | false | string | Coin name, uppercase only |
Response Parameters
Parameter | Type | Comments |
---|---|---|
spot | Object | |
> status | string | account status. ACCOUNT_STATUS_NORMAL : normal, ACCOUNT_STATUS_UNSPECIFIED : banned |
> assets | array | Object |
>> coin | string | Coin |
>> frozen | string | Freeze amount |
>> free | string | Free balance |
>> withdraw | string | Amount in withdrawing |
Request Example
- HTTP
- Python
- Node.js
GET /v5/asset/transfer/query-asset-info?accountType=SPOT&coin=ETH HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672136538042
X-BAPI-RECV-WINDOW: 5000
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.get_spot_asset_info(
accountType="FUND",
coin="USDC",
))
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.getAssetInfo({ accountType: 'FUND', coin: 'USDC' })
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Response Example
{
"retCode": 0,
"retMsg": "success",
"result": {
"spot": {
"status": "ACCOUNT_STATUS_NORMAL",
"assets": [
{
"coin": "ETH",
"frozen": "0",
"free": "11.53485",
"withdraw": ""
}
]
}
},
"retExtInfo": {},
"time": 1672136539127
}