Get NFT Transactions
This endpoint allows you to fetch the NFT transaction history for a given address.
Endpoint
- Mainnet
- Testnet
GET https://api.spacescan.io/address/nft-transaction/{address}
GET https://api-testnet11.spacescan.io/address/nft-transaction/{address}
Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
address | string | Yes | - | The XCH address to fetch NFT transactions for |
count | number | No | 100 | Number of transactions to return per type |
send_cursor | number | No | null | Pagination cursor for sent transactions |
received_cursor | number | No | null | Pagination cursor for received transactions |
Free API
Use api.spacescan.io
for free tier access. See our API Plans for rate limits and features.
Pro API
Use pro-api.spacescan.io
with your API key in the x-api-key
header. See our API Plans for details.
curl -X GET "https://pro-api.spacescan.io/address/nft-transaction/{address}" \
-H "x-api-key: YOUR_API_KEY"
Live API Test
- Mainnet
- Testnet
Request Examples
- cURL
- Python
- JavaScript
- Mainnet
- Testnet
# Initial request
curl -X GET "https://api.spacescan.io/address/nft-transaction/xch1..."
# Paginated request for specific transaction types
curl -X GET "https://api.spacescan.io/address/nft-transaction/xch1...?send_cursor=100&received_cursor=50"
curl -X GET "https://api-testnet11.spacescan.io/address/nft-transaction/xch1..."
- Mainnet
- Testnet
import requests
address = "xch1..."
url = f"https://api.spacescan.io/address/nft-transaction/{address}"
# Request with parameters
params = {
"count": 50,
"send_cursor": 100,
"received_cursor": 50
}
response = requests.get(url, params=params)
data = response.json()
print(data)
import requests
address = "xch1..."
url = f"https://api-testnet11.spacescan.io/address/nft-transaction/{address}"
response = requests.get(url)
data = response.json()
print(data)
- Mainnet
- Testnet
const address = "xch1...";
const url = `https://api.spacescan.io/address/nft-transaction/${address}`;
fetch(url)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const address = "xch1...";
const url = `https://api-testnet11.spacescan.io/address/nft-transaction/${address}`;
fetch(url)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Response
- Mainnet
- Testnet
Failed to load API response. Please try again later.
Failed to load API response. Please try again later.
Response Schema
Field | Type | Description |
---|---|---|
status | string | Success or failure status |
send_transactions.transactions | array | List of sent NFT transactions |
send_transactions.transactions[].coin_id | string | Unique identifier for the coin |
send_transactions.transactions[].time | string | ISO timestamp of the transaction |
send_transactions.transactions[].height | number | Block height of the transaction |
send_transactions.transactions[].nft_id | string | The unique identifier of the NFT |
send_transactions.transactions[].to | string | Recipient address |
send_transactions.transactions[].memo | string[] | Optional memo array |
send_transactions.next_cursor | number | Cursor for next page of sent transactions |
send_transactions.total_count | number | Total count of sent transactions |
received_transactions.transactions | array | List of received NFT transactions |
received_transactions.transactions[].coin_id | string | Unique identifier for the coin |
received_transactions.transactions[].time | string | ISO timestamp of the transaction |
received_transactions.transactions[].height | number | Block height of the transaction |
received_transactions.transactions[].nft_id | string | The unique identifier of the NFT |
received_transactions.transactions[].from | string | Sender address |
received_transactions.transactions[].memo | string[] | Optional memo array |
received_transactions.next_cursor | number | Cursor for next page of received transactions |
received_transactions.total_count | number | Total count of received transactions |
Notes
- Each transaction type (sent/received) can be paginated independently