getOperations
Retrieve a paginated list of operations from the canister. This is a query method that doesn’t modify state.Method Signature
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
offset | bigint | Yes | Starting index for pagination (0-based) |
limit | bigint | Yes | Maximum number of operations to return |
Response
Returns an array ofOperationAndId
objects:
OperationType
Operations can be one of several types:TradeOperation
TransactionOperation
Example Usage
Basic Pagination
Paginate Through All Operations
Filter Operations by Type
Query Method
This is a query method, meaning:- It doesn’t modify canister state
- It’s faster and cheaper to call
- Results are not certified (for certified data, use update calls)
- Can be called without authentication in some cases