curl --request GET \
--url https://api.kuru.io/api/v3/{userAddress}/user/order-eventsimport requests
url = "https://api.kuru.io/api/v3/{userAddress}/user/order-events"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.kuru.io/api/v3/{userAddress}/user/order-events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kuru.io/api/v3/{userAddress}/user/order-events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kuru.io/api/v3/{userAddress}/user/order-events"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.kuru.io/api/v3/{userAddress}/user/order-events")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kuru.io/api/v3/{userAddress}/user/order-events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"data": [
{
"eventType": "trade",
"transactionHash": "0xdef456...",
"blockTimestamp": "2024-01-28T12:00:00.000Z",
"eventData": {
"orderId": "0xabc...",
"marketAddress": "0x111...",
"marketId": 3,
"owner": "0xabc123...",
"orderSize": "1000000000000000000",
"filledSize": "500000000000000000",
"fillPrice": "49998000000000000000000",
"updatedSize": "500000000000000000",
"isBuy": false,
"sizePrecision": "1000000000000000000",
"pricePrecision": "10000",
"baseFilled": "500000000000000000",
"baseFilledInUsd": "24999000000000000000000",
"baseToken": {
"address": "0x...",
"name": "Chog",
"symbol": "CHOG",
"decimal": 18,
"logoUrl": "https://..."
},
"quoteToken": {
"address": "0x...",
"name": "USD Coin",
"symbol": "USDC",
"decimal": 6,
"logoUrl": "https://..."
}
}
}
],
"pagination": {
"total": 1,
"page": 1,
"pageSize": 50
}
}
}{
"error": "Invalid eventType: \"swap\". Must be one of: order-created, order-canceled, trade"
}{
"error": "Internal database or server error"
}Get user order events
Lightweight endpoint designed for market makers. Returns order-related events only:
order-created, order-canceled, and trade.
Events are sorted by blockTimestamp in descending order.
Cursoring guidance for high-volume market makers:
- use timestamp windows (
fromTimestamp,toTimestamp) as the primary cursor mechanism - persist the last processed event timestamp and query the next window using
fromTimestamp - use
limitonly to cap payload size per request - avoid offset-based deep pagination for continuous polling on accounts with large event volume
- when multiple events share the same second-level timestamp, re-query with a small overlap window and de-duplicate by (
transactionHash,eventType, event-specific identifier)
Timestamp validation:
fromTimestampandtoTimestampmust be non-negative integers- when both are provided,
fromTimestampmust be strictly less thantoTimestamp
Cache behavior:
- responses are cached in Redis with a 2-second TTL per unique parameter combination to minimize staleness for latency-sensitive consumers
Base-denomination convention:
- computed amount fields (
baseDeposited,baseFilled,basePositionValue) are always expressed in base token terms, regardless ofisBuy - buy orders are normalized to base-equivalent position size
Response field denominations:
size,orderSize,filledSize,remainingSize,updatedSize— size precision units; divide bysizePrecisionfor human-readable base amountbaseDeposited,baseFilled,basePositionValue— raw base token units; divide by10^decimal(base token) for human-readable amountprice(order-created, order-canceled) — price precision units; divide bypricePrecisionfor human-readable pricefillPrice(trade) — 1e18 precision; divide by 1e18 for human-readable price*InUsdfields (baseDepositedInUsd,baseFilledInUsd,basePositionValueInUsd) — 1e18 precision; divide by 1e18 for USD value
curl --request GET \
--url https://api.kuru.io/api/v3/{userAddress}/user/order-eventsimport requests
url = "https://api.kuru.io/api/v3/{userAddress}/user/order-events"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.kuru.io/api/v3/{userAddress}/user/order-events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kuru.io/api/v3/{userAddress}/user/order-events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kuru.io/api/v3/{userAddress}/user/order-events"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.kuru.io/api/v3/{userAddress}/user/order-events")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kuru.io/api/v3/{userAddress}/user/order-events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"data": [
{
"eventType": "trade",
"transactionHash": "0xdef456...",
"blockTimestamp": "2024-01-28T12:00:00.000Z",
"eventData": {
"orderId": "0xabc...",
"marketAddress": "0x111...",
"marketId": 3,
"owner": "0xabc123...",
"orderSize": "1000000000000000000",
"filledSize": "500000000000000000",
"fillPrice": "49998000000000000000000",
"updatedSize": "500000000000000000",
"isBuy": false,
"sizePrecision": "1000000000000000000",
"pricePrecision": "10000",
"baseFilled": "500000000000000000",
"baseFilledInUsd": "24999000000000000000000",
"baseToken": {
"address": "0x...",
"name": "Chog",
"symbol": "CHOG",
"decimal": 18,
"logoUrl": "https://..."
},
"quoteToken": {
"address": "0x...",
"name": "USD Coin",
"symbol": "USDC",
"decimal": 6,
"logoUrl": "https://..."
}
}
}
],
"pagination": {
"total": 1,
"page": 1,
"pageSize": 50
}
}
}{
"error": "Invalid eventType: \"swap\". Must be one of: order-created, order-canceled, trade"
}{
"error": "Internal database or server error"
}Path Parameters
Ethereum address of the user (case-insensitive)
"0xabc123..."
Query Parameters
Maximum number of events to return in this window (payload cap, not a cursor)
x >= 150
Number of events to skip (legacy pagination; not recommended for high-volume market-maker polling)
x >= 00
Filter to a specific market contract address
"0x111..."
Unix epoch in seconds; include events at or after this time (recommended cursor start)
x >= 01706400000
Unix epoch in seconds; include events at or before this time (recommended cursor end)
x >= 01706486400
Filter to a single event type
order-created, order-canceled, trade "trade"
Response
Successful response
Show child attributes
Show child attributes