GetExchanges
Retrieves currency exchange history filtered by currency, account, or both.
Request
GET /nxt?requestType=getExchanges
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
currency | long | Filter by currency ID | Optional |
account | string | Filter by account ID | Optional |
firstIndex | int | Pagination start index | Optional |
lastIndex | int | Pagination end index | Optional |
timestamp | int | Filter exchanges newer than timestamp | Optional |
includeCurrencyInfo | boolean | Include currency metadata in response | Optional |
Response
{
"exchanges": [
{
"transactionFullHash": "abc123...",
"timestamp": 123456789,
"unitsQNT": "1000000000",
"rateQNTPerUnit": "500",
"currency": "987654321",
"baseCurrency": "555555555",
"offer": "111111111",
"offerFullHash": "def456...",
"seller": "1234567890",
"buyer": "0987654321",
"block": "50000",
"height": 250
}
]
}
Example
# Get exchanges for a currency
curl "http://localhost:22024/nxt?requestType=getExchanges¤cy=987654321"
# Get exchanges for an account
curl "http://localhost:22024/nxt?requestType=getExchanges&account=1234567890"
# Get exchanges for a currency and account
curl "http://localhost:22024/nxt?requestType=getExchanges¤cy=987654321&account=1234567890"