This guide explains how to retrieve NFT transaction data under a collection using the Runes API, including the latest transaction price, quantity, and event history by runesId.
API Endpoint and Structure
Request Address
Method: GET
URL: https://web3.okx.com/api/v5/mktplace/nft/runes/trade-history
Key Features
- Fetch real-time NFT trade history.
- Filter by token ID (
runesIds), time range, or pagination. - Supports multi-token queries (up to 20 comma-separated IDs).
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
runesIds | String | No | Unique token IDs (comma-separated; max 20). Leave empty for all tokens. |
cursor | String | No | Pagination cursor for sequential data retrieval. |
limit | Integer | No | Number of records per page (default: 10, max: 100). |
startTime | Long | No | Start timestamp (seconds) for filtering transactions. |
endTime | Long | No | End timestamp (seconds) for filtering transactions. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
runesId | String | Unique identifier of the NFT token. |
name | String | Name of the token. |
txHash | String | Blockchain transaction hash. |
typeName | String | Event type (e.g., SALE, TRANSFER). |
amount | String | Token quantity involved in the transaction. |
from/to | String | Sender and receiver wallet addresses. |
createOn | Date | Timestamp of the transaction. |
platformName | String | Marketplace platform name. |
satPrice | BigDecimal | Price in satoshis (for BTC-denominated trades). |
price/usdPrice | BigDecimal | Prices in BTC and USD. |
status | Integer | Transaction status (1: Success, 2: Pending). |
👉 Explore advanced NFT API integrations for scalable Web3 solutions.
Example Usage
Request Example
curl -X GET "https://web3.okx.com/api/v5/mktplace/nft/runes/trade-history?runesIds=123,456&limit=5"Response Example
{
"runesId": "123",
"name": "CryptoPunk #1234",
"txHash": "0xabc...def",
"typeName": "SALE",
"amount": "1",
"price": "0.05",
"status": 1
}FAQs
1. How do I query multiple NFT tokens?
Provide comma-separated runesIds (e.g., ?runesIds=123,456).
2. Can I filter transactions by date?
Yes, use startTime and endTime (in Unix seconds).
3. What’s the maximum pagination limit?
100 records per request. Use cursor for subsequent pages.
4. How are prices calculated?
Prices are returned in satoshis, BTC, and USD for flexibility.
👉 Learn how to optimize NFT API performance with rate-limiting best practices.
Best Practices
- Use
limitto reduce payload size. - Cache frequent queries to minimize API calls.
- Combine with Marketplace API for full trading insights.
Need deeper analysis? Check our developer docs for Web3 WaaS solutions.