Overview
The Transactions API provides access to a user’s complete transaction history across all chains. It supports pagination for efficient data loading and returns detailed information about swaps, transfers, and their execution status.API Methods
getTransactionHistory
Retrieve paginated transaction history for a user.Parameters
Pagination and filter parameters
Returns
Paginated list of transactions with continuation token
Example
Pagination Pattern
The API uses cursor-based pagination with continuation tokens:Real-World Implementation
Here’s how the transaction history is used in the actual application:Transaction Types
SWAP
Token swap transaction between different assets
- Has both
originTokenanddestinationToken - May involve multiple chains
- Includes price/rate information
TRANSFER
Token transfer to another account
- Has
recipientAccountId - Only
originTokenis relevant - May be cross-chain
Transaction Status Flow
- PENDING: Transaction submitted, waiting for blockchain confirmation
- IN_PROGRESS: Being processed across chains (OneBalance only)
- COMPLETED: Successfully completed on all chains
- FAILED: Transaction failed on one or more chains
- REFUNDED: Failed transaction with funds returned to user
Filtering and Display
Display Transaction Details
Error Handling
Best Practices
Reasonable Page Size
Use 10-50 transactions per page for optimal performance and UX
Cache Results
Cache transaction data to avoid unnecessary API calls on navigation
Show Loading States
Display loading indicators during pagination for better UX
Handle Empty States
Show helpful messages when users have no transaction history
Related APIs
- Quotes API - For checking individual quote status
- Balances API - For current account balances
Related Types
- Transaction - Complete transaction structure
- TransactionHistoryParams - Request parameters
- TransactionHistoryResponse - Response structure