Skip to main content

Overview

The History API allows third-party partners to query the transaction and activity history of the authenticated user. It supports both cards and account resources, with multiple features for summaries, transactions, balances, and filtered account activity.
All endpoints require authentication via the Authorization: Bearer <api_key> header. The user is inferred from the API key; you do not pass a userId in the URL.

Authentication

All requests must include an API key in the Authorization header:
Authorization: Bearer your-api-key-here
Unauthorized requests (missing or invalid API key) will return a 401 Unauthorized response.

Get User History

Retrieves the transaction and activity history for the authenticated user. You can query either cards or account data, and choose which feature you want via query parameters.

Query Parameters

ParameterTypeRequiredDescription
resourcestringYesResource type to query. Must be one of: cards, account
featurestringYesFeature to retrieve (varies by resource, see tables below)
currentPagenumberNoCurrent page number for pagination. Default: 0
pageSizenumberNoNumber of items per page. Default: 10. Maximum: 100
startDatestringNoStart date for filtering history (ISO 8601 format, e.g. 2024-01-01T00:00:00Z)
endDatestringNoEnd date for filtering history (ISO 8601 format)
filterByTextstringNoText filter for searching card transactions (e.g. merchant name, description)
asOfstringNoSnapshot date for certain features (ISO 8601 format). Used mainly with cards-summary

Resource and Feature Combinations

Account resource

When resource=account, the following feature values are supported:
FeatureDescription
accountFull account history (all supported transaction types)
account-onrampHistory of onramp (buy) operations
account-offrampHistory of offramp (sell) operations
account-swapHistory of swap/bridge operations
account-cryptoHistory of crypto transfers (token transfers)
account-portifolioAggregated portfolio-related history (transfers, swaps, bridges)
These features all return the same Account History shape, but filtered by transaction type internally.

Cards resource

When resource=cards, the following feature values are supported:
FeatureDescription
cards-transactionsPaginated list of card transactions, including card metadata (last four digits, nickname, etc.)
cards-summarySnapshot of the user’s cards (status, spending limits, etc.) at a point in time (asOf)
cards-balanceHistory of collateral movements and running card balance

Responses

The response shape depends on the combination of resource and feature. Below are the main structures you will encounter.

Account History Response (resource=account)

For resource=account, you receive a list of account history entries and pagination info.
message
string
Status message (if present)
nodes
array
Array of account history entries. Each entry typically includes:
id
string
Entry ID
transactionDate
string
Date and time of the transaction (ISO 8601)
transactionType
string
Type of transaction (e.g., buy, sell, swap-bridge, transfer-token)
description
string
Human-readable description of the transaction
status
string
Current status of the transaction
amount
string
Amount involved in the operation
assetSent
string
Asset sent (if applicable)
amountSent
string
Amount sent (if applicable)
assetReceived
string
Asset received (if applicable)
amountReceived
string
Amount received (if applicable)
runningBalance
string
Running balance after this transaction
executedAt
string
Execution timestamp (ISO 8601, nullable)
transactionPurpose
string
Purpose of the transaction
userDescription
string
Optional user-provided description
pageInfo
object
Pagination information:
hasNextPage
boolean
Whether there is another page of results
currentPage
number
Current page index (starting from 0)
pageSize
number
Number of items per page
numberOfPages
number
Total number of pages available
totalCount
number
Total number of records matching the query

Example Request (Account History)

curl -X GET "https://history-api.lootrush.com/api/history?resource=account&feature=account&currentPage=0&pageSize=10" \
  -H "Authorization: Bearer your-api-key-here"

Example Response (simplified)

{
  "nodes": [
    {
      "id": "hist-123",
      "transactionDate": "2024-01-15T10:30:00Z",
      "transactionType": "buy",
      "description": "Onramp via credit card",
      "status": "completed",
      "assetSent": "USD",
      "amountSent": "100.00",
      "assetReceived": "USDC",
      "amountReceived": "99.50",
      "amount": "99.50",
      "runningBalance": "250.00",
      "executedAt": "2024-01-15T10:30:10Z",
      "transactionPurpose": "onramp",
      "userDescription": null
    }
  ],
  "pageInfo": {
    "hasNextPage": false,
    "currentPage": 0,
    "pageSize": 10,
    "numberOfPages": 1,
    "totalCount": 1
  }
}

Cards Transactions Response (resource=cards, feature=cards-transactions)

For cards-transactions, you receive card transactions enriched with card metadata.
userCardTransactions
array
Array of items with transaction and card information:
transaction
object
Card transaction details (amount, merchant, status, currency, etc.)
card
object
Card metadata:
name
string
Cardholder name
nickname
string
Card nickname
lastFourDigits
string
Last four digits of the card
pagination
object
Pagination information:
hasNextPage
boolean
currentPage
number
pageSize
number
numberOfPages
number
totalCount
number

Example Request (Cards Transactions)

curl -X GET "https://history-api.lootrush.com/api/history?resource=cards&feature=cards-transactions&currentPage=0&pageSize=10&filterByText=Amazon" \
  -H "Authorization: Bearer your-api-key-here"

Example Response (simplified)

{
  "userCardTransactions": [
    {
      "transaction": {
        "id": "txn-123",
        "amount": 42.5,
        "merchantName": "Amazon",
        "createdAt": "2024-01-15T10:30:00Z",
        "type": "purchase",
        "status": "completed",
        "currency": "USD"
      },
      "card": {
        "name": "Alice Doe",
        "nickname": "Main Card",
        "lastFourDigits": "4242"
      }
    }
  ],
  "pagination": {
    "hasNextPage": false,
    "currentPage": 0,
    "pageSize": 10,
    "numberOfPages": 1,
    "totalCount": 1
  }
}

Cards Summary Response (resource=cards, feature=cards-summary)

For cards-summary, you receive a snapshot of the user’s cards and related limits.
userCardsSnapshot
array
Array of card snapshots with fields such as:
id
string
Card ID
nickname
string
Card nickname
lastFourDigits
string
Last four digits of the card
status
string
Card status
spendingLimit
number
Spending limit associated with the card
spendingInterval
string
Interval for the spending limit (e.g., monthly)
pagination
object
Same structure as other paginated responses.

Example Request (Cards Summary)

curl -X GET "https://history-api.lootrush.com/api/history?resource=cards&feature=cards-summary&currentPage=0&pageSize=10&asOf=2024-01-15T00:00:00Z" \
  -H "Authorization: Bearer your-api-key-here"

Cards Balance Response (resource=cards, feature=cards-balance)

For cards-balance, you receive card collateral movements and running balance over time.
cardIssuerUserCollateralMovement
array
Array of balance movement records:
amount
number
Amount of the movement
runningBalance
number
Balance after the movement
previousBalance
number
Balance before the movement
description
string
Description of the movement
createdAt
string
Timestamp of the movement (ISO 8601)
type
string
Movement type
pagination
object
Same structure as other paginated responses.

Error Responses

error
string
Error message describing what went wrong
Status CodeError MessageDescription
400Invalid feature or validation errorThe combination of resource/feature or other query params is invalid
401Unauthorized: API key is requiredThe Authorization header is missing or not in the expected format
401Unauthorized: Invalid API keyThe provided API key is invalid
429Rate limit exceededToo many requests for the same user in a short period
500API key validation failed: ...Internal error while validating the API key

Rate Limits

The History API is rate-limited per user to protect the service and ensure fair usage.
Each user can perform up to 2 requests every 2 seconds. Exceeding this limit will result in a 429 Rate limit exceeded error.
When you receive 429 responses, implement retry logic with exponential backoff to avoid hammering the API.

Best Practices

  1. Use pagination: Always provide currentPage and pageSize to avoid fetching excessively large responses.
  2. Filter by date: Use startDate, endDate, and asOf to restrict the time window of data as much as possible.
  3. Choose the right feature: Use account-onramp, account-offramp, account-swap, account-crypto, or account-portifolio to narrow the type of account history you need.
  4. Leverage text search: For card transactions, use filterByText to search by merchant or description instead of post-processing large datasets.
  5. Handle rate limits: Implement exponential backoff and respect 429 responses to keep your integration stable.

Support

For API support, please contact: