Understanding blockchain transaction history is essential for developers, analysts, and businesses operating in the Web3 ecosystem. Whether you're auditing wallet activity, tracking token transfers, or analyzing user behavior across chains, accessing accurate and timely on-chain data is crucial. This guide dives into how to efficiently retrieve transaction history by account using a powerful Wallet API designed for Web3 applications.
The endpoint detailed here allows you to query all or specific chain transaction records under an account, sorted in descending chronological order—ensuring you always get the most recent activity first.
Retrieve Comprehensive Transaction History
With the GET /api/v5/wallet/post-transaction/transactions endpoint, you can pull detailed transaction data across multiple blockchains. This makes it ideal for Wallet-as-a-Service (WaaS) platforms, decentralized finance (DeFi) dashboards, and blockchain analytics tools that require real-time visibility into user wallet activity.
All responses are structured chronologically with the latest transactions appearing at the top, enabling efficient pagination and historical analysis.
👉 Access real-time on-chain transaction data with powerful API tools
Request Path
GET https://web3.okx.com/api/v5/wallet/post-transaction/transactionsThis secure RESTful endpoint supports flexible filtering to help you narrow down results based on your use case—whether monitoring a single wallet’s Ethereum transactions or scanning cross-chain movements involving ERC-20 tokens.
Customize Your Query with Optional Parameters
You don’t have to retrieve every transaction. Use optional parameters to refine your search and reduce response size.
Supported Request Parameters
accountId(String, Required)
The unique identifier for the wallet or user account. This is the primary key used to fetch associated transaction records.chainIndex(String, Optional)
Specify a particular blockchain using its index (e.g.,ETH=3). If omitted, the query returns data across all supported chains linked to the account.tokenAddress(String, Optional)
Filter results by a specific token contract address. If left empty, only transactions involving the main chain currency (like ETH) will be returned. If not passed at all, all transactions—including those with various tokens—are included.begin(String, Optional)
Unix timestamp in milliseconds. Returns transactions occurring after this time.end(String, Optional)
Unix timestamp in milliseconds. Returns transactions occurring before this time.
If neitherbeginnorendis provided, the system defaults to fetching transactions up to the current time.cursor(String, Optional)
Used for pagination. Pass the cursor from a previous response to retrieve the next set of results.limit(String, Optional)
Number of records to return per request. Defaults to 20 (most recent), with a maximum of 20 records per call.
These parameters make it easy to build dynamic interfaces—such as wallet explorers or audit logs—that support date filtering, token-specific views, and infinite scrolling via cursor-based pagination.
Understand the Response Structure
Each API response includes a structured list of transactions along with metadata for deeper analysis.
Key Response Fields
transactionList(Array)
Contains individual transaction objects with comprehensive details.chainIndex– Identifier of the blockchain where the transaction occurred.txHash– Unique transaction hash for verification on-chain.iType– EVM layer transaction type:0: External main chain coin transfer1: Contract internal main chain coin transfer2: Token transfer
methodId– Smart contract method identifier (e.g., function called).nonce– Sequence number of transactions sent from the sender address.txTime– Transaction timestamp in Unix milliseconds.from(Array) – Input details:address: Sender(s), comma-separated in multi-sig cases.amount: Value transferred from this address.
to(Array) – Output details:address: Recipient(s), comma-separated if applicable.amount: Value received.
tokenAddress– Contract address of the token involved (null for native coin transfers).amount– Quantity transferred.symbol– Currency symbol (e.g., ETH, USDT).txFee– Total gas or transaction fee paid.txStatus– Current status:success,fail, orpending.hitBlacklist– Boolean indicating if the transaction involves blacklisted addresses.tag– Deprecated field indicating potential risk types (e.g., phishing, contract vulnerability).
cursor– Pagination token for retrieving subsequent pages.
This level of detail enables advanced features like fraud detection, balance reconciliation, and automated reporting—all critical for enterprise-grade Web3 applications.
👉 Streamline your Web3 development with scalable wallet APIs
Practical Use Cases
1. Wallet Activity Dashboard
Build a user-facing interface that displays recent sends, receives, and smart contract interactions—sorted by time and filterable by token or chain.
2. Compliance & Auditing
Financial institutions and custodians can use this data to generate audit trails, detect suspicious patterns, and ensure regulatory compliance.
3. Transaction Monitoring Alerts
Set up backend systems that monitor incoming/outgoing transactions and trigger alerts when certain thresholds (e.g., large transfers) or blacklisted addresses are detected.
4. Cross-Chain Analytics
Aggregate data across chains using chainIndex filtering to understand user behavior in multi-chain environments like Layer 2s and appchains.
Frequently Asked Questions
What is the default sorting order of transactions?
Transactions are returned in descending chronological order by default—newest first—based on the txTime field.
How do I paginate through large datasets?
Use the cursor parameter returned in each response. Pass it as an input in your next request to fetch the next page. Combine with limit to control page size (max 20 items).
Can I filter transactions by specific tokens?
Yes. Use the tokenAddress parameter to retrieve only transactions involving a particular token contract. Leave it empty to see only native coin transfers.
Is there a rate limit on this API?
While specific rate limits aren't detailed here, best practices suggest implementing throttling logic in your client application to avoid overloading the server. Consider caching frequent queries.
What does hitBlacklist: true indicate?
It means one or more addresses involved in the transaction appear on known threat lists (e.g., phishing scams or malicious contracts). While useful for risk assessment, always cross-reference with other security tools.
Why is the tag field marked as deprecated?
The tag field previously provided risk categorization but is no longer maintained. Rely instead on hitBlacklist combined with external threat intelligence services for up-to-date risk scoring.
👉 Unlock seamless on-chain data access for your dApp today
Final Thoughts
Accessing granular, well-structured transaction history by account is foundational for building robust Web3 applications. With support for multi-chain queries, token filtering, time ranges, and secure pagination, this Wallet API empowers developers to create intuitive, data-rich experiences—from personal wallets to institutional-grade analytics platforms.
By leveraging these capabilities within a scalable infrastructure, teams can accelerate development cycles and deliver reliable, high-performance solutions in the evolving Web3 landscape.
Core keywords naturally integrated: transaction history, on-chain information query, wallet API, Web3 API, account-based transactions, blockchain data retrieval, cross-chain analytics, API pagination.