dex_trade
Get trade history from decentralized exchanges. Returns individual swap transactions with price, amount, and direction.
Usage hints:
- Pool address is required — use dex_pools to find pool addresses
- Use from/to date filters for specific time ranges
REST endpoint
GET /api/v1/dex/trade — see REST reference.
Parameters
| Name | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
chain | string | yes | Specifes chain | "..." | |
exchange | string | yes | Specifes exchange | "..." | |
pool | string | yes | Specifies pool | "..." | |
from | string | no | Specifies from | "..." | |
to | string | no | Specifies to | "..." | |
page | integer | no | 1 | Page number (default: 1) | 1 |
limit | integer | no | 1000 | Page size (default: 1000) | 1000 |
sort | string | no | asc | Specifies sort (asc, desc) (default: asc) | "asc" |
Example invocation
JSON-RPC tools/call payload:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "dex_trade",
"arguments": {
"chain": "...",
"exchange": "...",
"pool": "...",
"page": 1,
"limit": 1000,
"sort": "asc"
}
}
}