Aori Data Server
Aori provides a data server that can be used to query historical trade data, and active orders. This data can be useful for querying existing orderbook data before subscribing to the Websocket feed for local orderbook construction.
Querying Historical Trade Data
aori_viewTrades
POSThttps://data.aori.io/
This endpoint allows you to query historical trades that occurred on Aori with various filter parameters.
Optional filter parameters
- Name
offerer
- Type
- string
- Description
Filter events by the address of the order creator.
- Name
tradeId
- Type
- string
- Description
Filter events by specific trade ID.
- Name
orderType
- Type
- 'rfq' | 'limit'
- Description
Filter by order type (RFQ or limit order).
- Name
eventType
- Type
- string[]
- Description
Array of event types to filter by.
- Name
chains
- Type
- number[]
- Description
Array of chain IDs to filter by.
- Name
base
- Type
- string
- Description
Filter by base token address.
- Name
quote
- Type
- string
- Description
Filter by quote token address.
- Name
page
- Type
- number
- Description
Page number for pagination (default: 0).
- Name
limit
- Type
- number
- Description
Number of events per page (default: 20).
Request
POST
https://data.aori.io/import { rawCall } from '@aori-io/sdk'
await rawCall(
'https://data.aori.io',
'aori_viewTrades',
[{
offerer: "0x123...",
orderType: "limit",
chains: [1, 137],
limit: 50
}]
)
Response
{
"status": "Ok",
"data": {
"events": [
{
"tradeId": "aori-9gqbo",
"event": "QuoteRequested",
"data": {
"orderType": "rfq",
"makerOrdr": {
// AoriOrder from @aori-io/sdk
}
},
"timestamp": "2024-10-28T18:58:51.229Z"
}
],
"totalEvents": 156
}
}