Get asset by ID
GEThttps://api.sandbox.magfi.net/api/assets/:id
Retrieve a specific asset by its ID
Request
Path Parameters
Asset ID
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
Asset retrieved successfully
- application/json
- Schema
- Example (auto)
Schema
Name of the asset
Possible values: <= 255 characters
Bitcoin
Short label/symbol for the asset
Possible values: <= 255 characters
BTC
Name of the unit
Possible values: <= 255 characters
bitcoin
Type of the asset
Possible values: <= 255 characters
bitcoin
bitcoin
Maximum number of decimal places
8
ID of the blockchain
Possible values: <= 255 characters
btc-mainnet
Fireblocks asset identifier
Possible values: <= 255 characters
BTC
Whether the asset is globally available
false
Innotrust identifier
Possible values: <= 255 characters
INNO_BTC
Whether the asset is internal
false
Whether manual deposit is required
false
Whether the asset requires a tag
false
Whether the asset is a single unit
false
Whether Fireblocks incoming addresses are supported
false
Whether the asset can be transferred
true
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Bitcoin",
"label": "BTC",
"unitName": "bitcoin",
"assetType": "bitcoin",
"maxDecimalPrecision": 8,
"blockchainId": "btc-mainnet",
"fireblocksAssetId": "BTC",
"globallyAvailable": false,
"innotrustId": "INNO_BTC",
"internal": false,
"requiresManualDeposit": false,
"requiresTag": false,
"singleUnit": false,
"supportFireblocksIncomingAddress": false,
"transferable": true,
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z"
}
Bad Request - Invalid input data
- application/json
- Schema
- Example (auto)
Schema
Error message
Detailed error description
Error code
{
"message": "Invalid input data",
"description": "The request data did not pass validation",
"code": "INVALID_INPUT"
}
Unauthorized - Invalid or missing authentication token
- application/json
- Schema
- Example (auto)
Schema
Error message
Detailed error description
Error code
{
"message": "Unauthorized",
"description": "Invalid, expired or missing bearer token",
"code": "UNAUTHORIZED"
}
Forbidden - Insufficient permissions
- application/json
- Schema
- Example (auto)
Schema
Error message
Detailed error description
Error code
{
"message": "Forbidden",
"description": "You don't have permission to access this resource",
"code": "FORBIDDEN"
}
Not Found - Resource not found
- application/json
- Schema
- Example (auto)
Schema
Error message
Detailed error description
Error code
{
"message": "Resource not found",
"description": "The requested resource could not be found",
"code": "NOT_FOUND"
}
Conflict - Resource already exists or state conflict
- application/json
- Schema
- Example (auto)
Schema
Error message
Detailed error description
Error code
{
"message": "Resource conflict",
"description": "The resource already exists or is in an invalid state",
"code": "CONFLICT"
}
Unprocessable Entity - Validation error
- application/json
- Schema
- Example (auto)
Schema
Error message
Detailed error description
Error code
{
"message": "Validation error",
"description": "The request data failed validation rules",
"code": "VALIDATION_ERROR"
}
- javascript
- python
- curl
- rust
- go
- java
- ruby
- FETCH
- JQUERY
- XHR
const myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://api.sandbox.magfi.net/api/assets/:id", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));