Skip to main content

Spark operations

TEOS API consumers can search for spark operations associated with one or more blockchain addresses. This endpoint allows retrieving operations based on direction, asset, and pagination options.

note

The multiple method signatures seen in the API documentation represent different combinations of optional parameters. In reality, this is a single GET method that supports flexible combinations of query parameters. The various signatures are simply different ways to call the same endpoint with different optional parameters.

A spark operation represents a transfer of a tokenized asset (a spark) between addresses, including information about the sender, receiver, transaction, and asset details.

📘 Learn more about sparks.

Request Endpoint

GET /odata/v1.0/SparkOperations/Search

Query Parameters

NameTypeDescriptionMandatoryDefault
addressesarray<string>List of blockchain addresses to search operations for. Must not be empty.
directionstringFilter operations by direction. Possible values: All, Received, Sent.All
uniqueAssetIdstringOptional filter to limit operations by a specific asset ID.
pageNumberintegerOptional page number for pagination.1
pageSizeintegerOptional page size for pagination.25

Example Request

GET /odata/v1.0/SparkOperations/Search?
addresses=['0xa94f93dbfce5bb64603d245d4519e625c002fee5','0xeb9c947cbae36895b513a32755c18ab4eb6cf762']&
direction=All&
uniqueAssetId=0x237c8a00fee9024072cb0001&
pageNumber=1&
pageSize=10

Response Body

Content type: application/json — Returns a list of spark operations matching the query parameters.

ParameterDescription
SenderBlockchain address of the operation sender.
ReceiverBlockchain address of the operation receiver.
SignedByAddress that signed the operation.
SparksAmount of sparks transferred.
UnitsQuantity of asset units transferred.
BlockchainTransactionIdIdentifier of the underlying blockchain transaction.
UniqueAssetIdID of the asset transferred.
AssetNameHuman-readable name of the asset.
UnitsOfMeasureUnit of measure for the asset quantity.
DateTimeTimestamp of the operation.

Example Response

In EVM-compatible networks (e.g., Sparknet, Ethereum, and Polygon), the "Sender", "Receiver", "SignedBy" are 42 characters long. In non-EVM networks, the address length may differ. For example, on Internet Computer, it is 63 characters.

[
{
"Sender": "0xabe9e6c2b231ae427cd089b2b68be0a1dab565a1",
"Receiver": "0xabe9e6c2b231ae427cd089b2b68be0a1dab565a1",
"SignedBy": "0xabe9e6c2b231ae427cd089b2b68be0a1dab565a1",
"Sparks": "1000000000",
"Units": "35",
"BlockchainTransactionId": "0x748ac47e7226cae0e4e13373375f33ab9e4d43ef29d85d233162a7e7e913703b",
"UniqueAssetId": "0x237c8a00fee9024072cb0001",
"AssetName": "Iron",
"UnitsOfMeasure": "kg",
"DateTime": "2021-12-22T13:24:57"
}
]

Response Codes

CodeDescription
200Spark operations successfully retrieved.
401Unauthorized.