Skip to main content
GET
/
api
/
v1
/
accounts
/
transaction-log
curl -X GET "https://api.roxom.com/api/v1/accounts/transaction-log" \
  -H "X-API-Key: your_api_key_here" \
  -H "X-API-Signature: your_rsa_signature_here"
{
  "data": {
    "logs": [
      {
        "txId": "01963bbe-299e-70b5-8ae1-a914270647ef",
        "time": 1642678800000,
        "transactionType": "OrderFill",
        "symbol": "OIL-BTC",
        "side": "buy",
        "amount": "100.00",
        "totalValue": "5000000",
        "fillPrice": "50000",
        "fee": "250",
        "pnl": "0",
        "orderId": "01963bbe-299e-70b5-8ae1-a914270647ef",
        "tradeId": "01963bbe-299e-70b5-8ae1-a914270647ef",
        "transactionTrigger": null,
        "createdAt": 1642678800000,
        "isTaker": true,
        "positionBefore": "0.00",
        "positionAfter": "100.00",
        "balanceBefore": "10000000",
        "balanceAfter": "9994750",
        "price": "50000",
        "fundingRate": null
      }
    ],
    "cursor": null
  },
  "error": false
}

Get Transaction Log

Retrieve comprehensive transaction history including order fills, deposits, withdrawals, funding fees, and insurance fund reimbursements with pagination support.

Endpoint

GET /api/v1/accounts/transaction-log

Parameters

X-API-Key
string
required
RSA public key identifier for authentication
X-API-Signature
string
required
Base64-encoded RSA signature of the request payload. Payload format: GET:/api/v1/accounts/transaction-log
from
integer
Start timestamp in milliseconds.
Default: 365 days ago from current time
to
integer
End timestamp in milliseconds.
Default: Current time
limit
integer
Maximum number of transaction logs to return (1-1000).
Default: 100
Maximum: 1000
cursor
string
Pagination cursor from previous response to retrieve next page
unit
string
Units for response values. Either “btc” or “sats”.
Default: sats

Example Request

curl -X GET "https://api.roxom.com/api/v1/accounts/transaction-log" \
  -H "X-API-Key: your_api_key_here" \
  -H "X-API-Signature: your_rsa_signature_here"

Response

{
  "data": {
    "logs": [
      {
        "txId": "01963bbe-299e-70b5-8ae1-a914270647ef",
        "time": 1642678800000,
        "transactionType": "OrderFill",
        "symbol": "OIL-BTC",
        "side": "buy",
        "amount": "100.00",
        "totalValue": "5000000",
        "fillPrice": "50000",
        "fee": "250",
        "pnl": "0",
        "orderId": "01963bbe-299e-70b5-8ae1-a914270647ef",
        "tradeId": "01963bbe-299e-70b5-8ae1-a914270647ef",
        "transactionTrigger": null,
        "createdAt": 1642678800000,
        "isTaker": true,
        "positionBefore": "0.00",
        "positionAfter": "100.00",
        "balanceBefore": "10000000",
        "balanceAfter": "9994750",
        "price": "50000",
        "fundingRate": null
      }
    ],
    "cursor": null
  },
  "error": false
}

Response Fields

data
object
Transaction log data
error
boolean
Indicates if the request failed

Transaction Types

Records trade executions. Includes:
  • Order and trade IDs
  • Fill price and execution details
  • Position changes (before/after)
  • Taker/maker flag
  • Trading fees
Records account deposits. Includes:
  • Deposit amount
  • Balance changes
Records account withdrawals. Includes:
  • Withdrawal amount
  • Balance changes
Records funding fee payments for perpetual positions. Includes:
  • Current funding rate
  • Position size
  • Fee amount (positive = received, negative = paid)
  • Symbol and side
Records insurance fund payouts to traders. Includes:
  • Reimbursement amount
  • Balance changes

Pagination

The transaction log endpoint supports cursor-based pagination:
  1. Initial Request: Make a request without a cursor to get the first page
  2. Check Cursor: If the response includes a cursor value, more data is available
  3. Next Page: Include the cursor in your next request to get the next page
  4. Repeat: Continue until cursor is null

Example Pagination Flow

async function getAllTransactions() {
  const allLogs = [];
  let cursor = null;
  
  do {
    const params = new URLSearchParams({
      limit: 1000,
      unit: 'btc'
    });
    
    if (cursor) {
      params.set('cursor', cursor);
    }
    
    const response = await fetch(
      `https://api.roxom.com/api/v1/accounts/transaction-log?${params}`,
      { headers }
    );
    
    const data = await response.json();
    allLogs.push(...data.data.logs);
    cursor = data.data.cursor;
    
  } while (cursor);
  
  return allLogs;
}

Notes

Time Range Defaults: If no time range is specified, the endpoint returns transactions from the last 365 days up to the current time.
Maximum Limit: The maximum value for limit is 1000. If you specify a higher value, it will be capped at 1000.
Large Time Ranges: Requesting transaction logs for very large time ranges may result in multiple pages of results. Use pagination to retrieve all data efficiently.
Filtering by Date: To get transactions for a specific date range, use Unix timestamps in milliseconds for the from and to parameters.
// Get transactions for January 2024
const from = new Date('2024-01-01').getTime(); // 1704067200000
const to = new Date('2024-02-01').getTime();   // 1706745600000

Use Cases

  • Account Reconciliation: Track all balance changes and verify account state
  • Trade Analysis: Analyze trading performance and fee costs
  • Tax Reporting: Export transaction history for tax calculations
  • Funding Rate Tracking: Monitor funding fee payments over time
  • Position History: Review position entry/exit points and PnL