Retrieve the order history of the internal account associated with your TronSave API key, with pagination and status filtering.
Retrieve the order history of the internal account associated with the provided API key. Orders are returned sorted by creation time, newest first. By default the endpoint returns the 10 newest orders.
Endpoint
GEThttps://api.tronsave.io/v2/orders
Rate limit: 15 requests per 1 second.
Headers
Name
Type
Description
apikey*
String
TronSave API key that represents the internal account. See Authentication to get your API key.
* Required.
Query parameters
Name
Type
Description
page
Integer
Page index, starts from 0. Default: 0.
pageSize
Integer
Number of orders per page. Default: 10.
status
String
"Active" or "Completed". Default: get all.
Request body
This endpoint takes no request body — pass the apikey header and optional query parameters only.
Response
A successful response returns error: false and the matching orders in data.data, along with the total count in data.total.
200: OK
Success response example
Error responses
This endpoint authenticates with the apikey header. Missing or invalid keys return 401.
401 Unauthorized — missing API key:
401 Unauthorized — invalid API key:
400 Bad Request — schema validation. Invalid query parameters are rejected. The message names the offending field, for example:
{
"error": false,
"message": "Success",
"data": {
"id": string, // id of order
"requester": string, // the address represents the order owner
"receiver": string, // the address of the resource that is received
"resourceAmount": number, // the amount of resource
"resourceType": string, // the resource type is "ENERGY" or "BANDWIDTH"
"remainAmount": number, // the remaining amount can be matched by the system,
"price": number, // price unit is equal to SUN
"durationSec": number, // rent duration, duration unit is equal to seconds
"status": string, // the order status, either Active or Completed
"orderType": string, // type of order is "NORMAL" or "EXTEND"
"allowPartialFill": boolean, //Allow the order to be filled partially or not
"payoutAmount": number, // Total payout of this order
"fulfilledPercent": number, //The percent that shows filling processing. 0-100
"delegates": [ //All matched delegates for this order
{
"delegator": string, // The address that delegates the resource for the target address
"amount": number, //The amount of resource was delegated
"txid": number // The transaction ID in on-chain
}[]
}
}[],
"total": number
}
{
"statusCode": 400,
"code": "FST_ERR_VALIDATION",
"error": "Bad Request",
"message": "querystring/status must be equal to one of the allowed values"
}
curl -X GET "https://api.tronsave.io/v2/orders?page=0&pageSize=10" \
-H "apikey: YOUR_API_KEY"