GET Account assets holdings
Returns all assets held by one account given its stake address.
GET /api/core/accounts/{stake_address}/assets
🎰 Parameters
Name | Description | In | Type | Required |
---|---|---|---|---|
stake_address | Bech32 Stake address | path | string | true |
👨💻 Code samples
- Node.js
- Python
- Rust
const CBI = await new CardanoBI({ apiKey: 'YOUR-KEY', apiSecret: 'YOUR-SECRET' });
const assets = await CBI.core.accounts.assets_({ stake_address: "stake1uyq4f9rye96ywptukdypkdu69gc4sd34hwzd940pxslczhc7n5vyt" });
console.log(assets);
CBI = CardanoBI(apiKey='YOUR-KEY', apiSecret='YOUR-SECRET' });
assets = await CBI.core.accounts.assets_(stake_address='stake1uyq4f9rye96ywptukdypkdu69gc4sd34hwzd940pxslczhc7n5vyt');
print(assets);
let CBI = CardanoBI::new(Some("YOUR-KEY"), Some("YOUR-SECRET")).await.expect("Failed to initialize CardanoBI");
let assets_assets = CBI.core.accounts.assets_(Some("stake1uyq4f9rye96ywptukdypkdu69gc4sd34hwzd940pxslczhc7n5vyt"), HashMap::new()).await.expect("Failed to call endpoint");
println!("assets_assets: {:?}", assets_assets);
💌 Response Codes
- 200
- 400
- 401
- 402
- 403
- 404
- 429
OK: Successful request.
[
{
"policy_hex": "682fe60c9918842b3323c43b5144bc3d52a23bd2fb81345560d73f63",
"fingerprint": "asset105nh988tzzzk3duk6relug69td98ja3nl3uv2c",
"name": "NEWM",
"quantity": 100000000
},
"...",
{
"policy_hex": "7cb6fbb296945e2c7c8b4bda24b90636bc15becf9c4d6c6eabb6447c",
"fingerprint": "asset1w86zwjq9pdul3l27dr5lgkvs4euuy2fam72uq6",
"name": "Cardabbean01136",
"quantity": 1
}
]
Bad Request: The request was unacceptable, often due to missing a required parameter.
Response schema is undefined.
Unauthorized: No valid API key provided.
Response schema is undefined.
Quota Exceeded: This API key has reached its usage limit on request.
Response schema is undefined.
Access Denied: The request is missing a valid API key or token.
Response schema is undefined.
Not Found: The requested resource cannot be found.
Response schema is undefined.
Too Many Requests: This API key has reached its rate limit.
Response schema is undefined.
💌 Response Schemas
- 200
- 400
- 401
- 402
- 403
- 404
- 429
Status Code 200
Name | Type | Description |
---|---|---|
policy_hex | string | The hexadecimal encoding of the MultiAsset policy hash. |
fingerprint | string | The CIP14 fingerprint for the MultiAsset. |
name | string | The MultiAsset name. |
quantity | integer(int64) | The balance of the given MultiAsset held by the account. |
Status Code 400
Name | Type | Description |
---|
Response schema is undefined.
Status Code 401
Name | Type | Description |
---|
Response schema is undefined.
Status Code 402
Name | Type | Description |
---|
Response schema is undefined.
Status Code 403
Name | Type | Description |
---|
Response schema is undefined.
Status Code 404
Name | Type | Description |
---|
Response schema is undefined.
Status Code 429
Name | Type | Description |
---|
Response schema is undefined.