Pool Trade Event
Retrieve the trading history of a specific liquidity pool, with pagination support.
Endpoint
GET /api/v1/partner/pool/event/trade
Request Parameters
pool_address
string
Yes
The address of the liquidity pool.
limit
int
No
Number of records to return (default: 20, max: see backend config).
desc
bool
No
Fetch order: true
for descending (default), false
for ascending.
cursor
int64
No
Cursor for pagination (must be used with timestamp
).
timestamp
int64
No
Timestamp for pagination (must be used with cursor
).
Note:
If
desc=false
, bothcursor
andtimestamp
must be provided.If
desc=true
, bothcursor
andtimestamp
can be omitted for the first page.If
action
is omitted, all actions are returned.If you want to fetch the latest events, you can omit both
cursor
andtimestamp
, just providepool_address
andlimit
.If you want to fetch the next page, you must provide both
cursor
andtimestamp
.If you want to fetch the previous page, you must provide both
cursor
andtimestamp
withdesc=false
.
Headers
x-api-key
No
API key for authorization.
cURL Example
curl --location 'https://api.noodles.fi/api/v1/partner/pool/event/trade?pool_address=0x682f4b17874ec47723bb527cf21e18b630eba0699d10781740cd0a7964dc6b19&cursor=865526449×tamp=1748401534150' \
--header 'x-api-key: YOUR_API_KEY'
Response
Fields
code
number
No
HTTP status code (200 for success).
message
string
No
Status message.
data
array
No
Array of trade history objects.
pagination
object
No
Pagination info for next page.
Trade History Object
id
int64
No
Unique trade event ID.
timestamp
int64
No
Event timestamp (ms since epoch).
action
string
No
Event type (e.g., trade
).
pool_address
string
No
Pool address.
coin_a_type
string
No
Coin A type.
coin_b_type
string
No
Coin B type.
coin_a_symbol
string
No
Coin A symbol.
coin_b_symbol
string
No
Coin B symbol.
price
float
No
Trade price.
amount_a
float
No
Amount of coin A.
amount_b
float
No
Amount of coin B.
a_to_b
bool
No
Trade direction: true if A to B.
tx_digest
string
No
Transaction digest.
sender
string
No
Sender address.
source
string
Yes
Source DEX name (may be null).
Pagination Object
last_cursor
int64
Yes
Cursor for next page.
last_timestamp
int64
Yes
Timestamp for next page.
limit
int64
Yes
Page size.
Success Response
{
"code": 200,
"message": "OK",
"data": [
{
"id": 860989488,
"timestamp": 1748401534150,
"action": "trade",
"pool_address": "0x682f4b17874ec47723bb527cf21e18b630eba0699d10781740cd0a7964dc6b19",
"coin_a_type": "0xe1b45a0e641b9955a20aa0ad1c1f4ad86aad8afb07296d4085e349a50e90bdca::blue::BLUE",
"coin_b_type": "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC",
"coin_a_symbol": "BLUE",
"coin_b_symbol": "USDC",
"price": 0.1304020748591467,
"amount_a": 7670.834463949,
"amount_b": 1000.29273,
"a_to_b": true,
"tx_digest": "65Xm7arTdMzbSP45pXiNb4GmVo2QVQuR4KvkBFMe1Amv",
"sender": "9931830efcb4efafbe635b3a9335bed737f2ec0ee84a181f46068aaba3fcd0f8",
"source": "aftermath-aggregator"
}
],
"pagination": {
"last_cursor": 860989488,
"last_timestamp": 1748401534150,
"limit": 20
}
}
Response when no data is available
{
"code": 200,
"message": "OK",
"data": [],
"pagination": {
"last_cursor": null,
"last_timestamp": null,
"limit": 20
}
}
See also: Environment Setup
Last updated