Transaction History
Returns your account's own transactions, newest first, with pagination and status filtering. Only transactions placed by the account the API key belongs to are listed. Balance top-ups, referral rewards and payouts are not orders and are not listed.
POST /v1/transactions/history
Request
All parameters are optional. If parameters are not specified, returns the first page with 10 items. An unknown status, a page below 1 or a per_page outside 1–50 is refused with code 2. A user_subscription_id that is not a string of 1–26 characters is refused the same way.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| page | integer | No | Page number (default: 1, minimum: 1) |
| per_page | integer | No | Items per page (default: 10, maximum: 50) |
| status | string | No | Filter by transaction status: new, pending, success or failed (see status list) |
| user_subscription_id | string | No | Only the transactions one of your subscriptions bought: its id as Subscription history and Start subscription return it. An id that is not one of your subscriptions returns an empty page |
#!/bin/bash
API_TOKEN="your_api_token"
API_SECRET="your_api_secret"
REQUEST_BODY='{
"page": 1,
"per_page": 10,
"status": "success"
}'
# Calculate signature
SIGNATURE=$(echo -n "${REQUEST_BODY}${API_SECRET}" | sha256sum | cut -d' ' -f1)
# Execute API request
curl -X POST "https://api.trxup.com/v1/transactions/history" \
-H "Authorization: Bearer ${API_TOKEN}" \
-H "X-Signature: ${SIGNATURE}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}"const crypto = require('crypto');
const axios = require('axios');
const apiToken = 'your_api_token';
const apiSecret = 'your_api_secret';
const requestBody = JSON.stringify({
page: 1,
per_page: 10,
status: 'success'
});
// Calculate signature
const signature = crypto
.createHash('sha256')
.update(requestBody + apiSecret)
.digest('hex');
// Execute API request
axios({
method: 'post',
url: 'https://api.trxup.com/v1/transactions/history',
headers: {
'Authorization': `Bearer ${apiToken}`,
'X-Signature': signature,
'Content-Type': 'application/json'
},
data: requestBody
})
.then(response => console.log(response.data))
.catch(error => console.error(error));<?php
$apiToken = 'your_api_token';
$apiSecret = 'your_api_secret';
$requestBody = json_encode([
'page' => 1,
'per_page' => 10,
'status' => 'success'
]);
// Calculate signature
$signature = hash('sha256', $requestBody . $apiSecret);
// Execute API request
$ch = curl_init('https://api.trxup.com/v1/transactions/history');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $requestBody);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiToken,
'X-Signature: ' . $signature,
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>import hashlib
import json
import requests
api_token = 'your_api_token'
api_secret = 'your_api_secret'
request_body = json.dumps({
'page': 1,
'per_page': 10,
'status': 'success'
})
# Calculate signature
signature = hashlib.sha256((request_body + api_secret).encode()).hexdigest()
# Execute API request
headers = {
'Authorization': f'Bearer {api_token}',
'X-Signature': signature,
'Content-Type': 'application/json'
}
response = requests.post(
'https://api.trxup.com/v1/transactions/history',
headers=headers,
data=request_body
)
print(response.json())Example request without parameters
#!/bin/bash
API_TOKEN="your_api_token"
API_SECRET="your_api_secret"
REQUEST_BODY='{}'
# Calculate signature
SIGNATURE=$(echo -n "${REQUEST_BODY}${API_SECRET}" | sha256sum | cut -d' ' -f1)
# Execute API request
curl -X POST "https://api.trxup.com/v1/transactions/history" \
-H "Authorization: Bearer ${API_TOKEN}" \
-H "X-Signature: ${SIGNATURE}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}"Response
Response contains a page of the account's transactions with pagination information. Each item has exactly the fields Check Transaction Status returns for the same id.
A transaction that buys several resources at once (for example energy and bandwidth together) is one item, and its amount is the whole amount charged for it. Its service is "energy", and params.amounts lists every resource it bought.
Response Fields
| Field | Type | Description |
|---|---|---|
| code | integer | Response code (0 = success) |
| request_id | string | Unique request identifier |
| result | object | Response data |
| result.page | integer | Current page |
| result.per_page | integer | Items per page |
| result.total | integer | Total number of transactions matching the filter |
| result.items | array | List of transactions, newest first |
| result.items[].id | string | Internal transaction ID |
| result.items[].created_at | string | Creation timestamp (ISO 8601 format) |
| result.items[].status | string | Transaction status (see status list) |
| result.items[].external_id | string|null | External transaction ID (if provided) |
| result.items[].service | string | Service type: "energy", "bandwidth" or "activate_address" |
| result.items[].params | object|null | Original request parameters |
| result.items[].amount | string | Transaction amount in TRX |
| result.items[].hash | string|null | Transaction hash; present only when status is success |
Response Example
Response to the request without parameters:
{
"code": 0,
"request_id": "64daeda7-15e4-4bcf-ae60-c94867af66d8",
"result": {
"page": 1,
"per_page": 10,
"total": 3,
"items": [
{
"id": "01M52FEER5JVJ16QNSVX75700Q",
"created_at": "2026-10-01T12:02:00+00:00",
"status": "new",
"external_id": null,
"service": "energy",
"params": {
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"amounts": {
"energy": 65000
},
"duration": 1
},
"amount": "3.58"
},
{
"id": "01M52FEEQT9TGZCHG1732ARRDN",
"created_at": "2026-10-01T12:01:00+00:00",
"status": "failed",
"external_id": "hist-energy",
"service": "energy",
"params": {
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"amounts": {
"energy": 65000
},
"duration": 1
},
"amount": "3.58"
},
{
"id": "01M52FEEPEY6V1SBAMCDMA4GTG",
"created_at": "2026-10-01T12:00:00+00:00",
"status": "success",
"external_id": "hist-bundle",
"service": "energy",
"params": {
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"amounts": {
"energy": 65000,
"bandwidth": 5000
},
"duration": 1
},
"amount": "3.64",
"hash": "aa11bb22cc33dd44ee55ff6600112233445566778899aabbccddeeff00112233"
}
]
}
}Possible Errors
| Error Code | Key | Description |
|---|---|---|
| 1 | auth | Authentication error (invalid token or signature) |
| 2 | invalid_service_or_params | Invalid service or parameters |
| 500 | internal_server_error | Internal server error |