Skip to content

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 ​

FieldTypeRequiredDescription
pageintegerNoPage number (default: 1, minimum: 1)
per_pageintegerNoItems per page (default: 10, maximum: 50)
statusstringNoFilter by transaction status: new, pending, success or failed (see status list)
user_subscription_idstringNoOnly 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
bash
#!/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}"
javascript
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
<?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;
?>
python
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 ​

bash
#!/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 ​

FieldTypeDescription
codeintegerResponse code (0 = success)
request_idstringUnique request identifier
resultobjectResponse data
result.pageintegerCurrent page
result.per_pageintegerItems per page
result.totalintegerTotal number of transactions matching the filter
result.itemsarrayList of transactions, newest first
result.items[].idstringInternal transaction ID
result.items[].created_atstringCreation timestamp (ISO 8601 format)
result.items[].statusstringTransaction status (see status list)
result.items[].external_idstring|nullExternal transaction ID (if provided)
result.items[].servicestringService type: "energy", "bandwidth" or "activate_address"
result.items[].paramsobject|nullOriginal request parameters
result.items[].amountstringTransaction amount in TRX
result.items[].hashstring|nullTransaction hash; present only when status is success

Response Example ​

Response to the request without parameters:

json
{
  "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 CodeKeyDescription
1authAuthentication error (invalid token or signature)
2invalid_service_or_paramsInvalid service or parameters
500internal_server_errorInternal server error

Tron Energy API Documentation