Skip to main content

Get total amount of an asset

An asset, often referred to as a token, represents a digital artifact on the TEOS platform that can be stored, managed, and verified on blockchain.

This endpoint returns both the total number of Sparks and the total number of natural units associated with the asset identified by the provided uniqueAssetId.

📘 Learn more about natural units of measure and Sparks.

Request Endpoint:​

GET /odata/v1.0/Assets({key})/TotalAmount

Parameters​

ParameterTypeDescriptionMandatory
keystringUniqueAssetId of the asset✅

Example Request:

GET /odata/v1.0/Assets('0x86766979FD04114E1F90001')/TotalAmount

Response Body:​

application/json — Returns total Sparks and Units

ParameterTypeDescription
TotalSparksstringTotal number of Sparks for the asset
TotalUnitsstringTotal number of natural units for the asset

Example Response:​

{
"TotalSparks": "1000000",
"TotalUnits": "1000"
}

Response Codes:​

CodeDescription
200The asset's total amount was successfully retrieved.
400The request is invalid. Error details are included.
401Unauthorized.
404The asset was not found using the provided uniqueAssetId.