Wallet trade history — bulk export
curl --request GET \
--url https://api.polynode.dev/v2/onchain/wallets/{address}/trades/allimport requests
url = "https://api.polynode.dev/v2/onchain/wallets/{address}/trades/all"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.polynode.dev/v2/onchain/wallets/{address}/trades/all', 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.polynode.dev/v2/onchain/wallets/{address}/trades/all",
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.polynode.dev/v2/onchain/wallets/{address}/trades/all"
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.polynode.dev/v2/onchain/wallets/{address}/trades/all")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polynode.dev/v2/onchain/wallets/{address}/trades/all")
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_bodyOnchain V2 (legacy)
Trade History (Wallet) — Bulk
Return every trade for a wallet in a single response. Growth plan or above.
GET
/
v2
/
onchain
/
wallets
/
{address}
/
trades
/
all
Wallet trade history — bulk export
curl --request GET \
--url https://api.polynode.dev/v2/onchain/wallets/{address}/trades/allimport requests
url = "https://api.polynode.dev/v2/onchain/wallets/{address}/trades/all"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.polynode.dev/v2/onchain/wallets/{address}/trades/all', 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.polynode.dev/v2/onchain/wallets/{address}/trades/all",
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.polynode.dev/v2/onchain/wallets/{address}/trades/all"
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.polynode.dev/v2/onchain/wallets/{address}/trades/all")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polynode.dev/v2/onchain/wallets/{address}/trades/all")
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_bodyGrowth plan or above only. This endpoint returns the entire trade history for a wallet in one response — no client-side pagination, no offset bookkeeping. Because a single call can return tens of thousands of fills (and tens of MB of JSON), it’s gated to the Growth plan and above. Starter and free tier requests receive
403.- Hard cap: 250,000 trades per call — beyond that, response includes
"partial": truewith"partial_reason": "hard_cap_250000" - Wall-clock budget: 180 seconds — first cold-cache call on a heavy wallet may take 1-3 minutes
- Cache: full results cached 5 minutes. Repeat calls return in under 1 second
- Typical payload: 1-50 MB. Worst case (capped): 100-200 MB JSON
Request
GET /v2/onchain/wallets/{address}/trades/all?from=<unix>&to=<unix>
| Parameter | Type | Location | Description |
|---|---|---|---|
address | string | path | Wallet address (0x-prefixed, 40 hex chars) |
from | integer | query | Optional start of window in unix seconds. Default: 2024-01-01 (covers all Polymarket history) |
to | integer | query | Optional end of window in unix seconds. Default: now |
Response
{
"wallet": "0x2f5653a3761f65c5a299f9839eadbd4d4d679ffa",
"from_ts": 1704067200,
"to_ts": 1777600000,
"count": 8421,
"partial": false,
"partial_reason": null,
"fetched_in_ms": 7813,
"cache": "miss",
"trades": [
{
"tx_hash": "0x2fc63f3efc794d13c747d089d3b42bb9b4539b22216ccb2e6b2ea039ca5bb9ca",
"order_hash": "0x84f21e21f5c2a1df3264694a33ec9a8a292b83e163cbda4efe63333243aa08ef",
"timestamp": 1774749310,
"maker": "0x2f5653a3761f65c5a299f9839eadbd4d4d679ffa",
"taker": "0x198098d9c6c1dcb843314b9da212c44396c9a1d0",
"token_id": "21912724974096796009916816278814088615574660931588091764221331842149572809887",
"direction": "BUY",
"price": 0.625,
"shares": 4.88,
"usd": 3.05,
"fee": 0
}
]
}
Response fields
| Field | Type | Description |
|---|---|---|
wallet | string | The wallet address requested (lowercased) |
from_ts / to_ts | integer | Resolved time window in unix seconds |
count | integer | Total trades returned (≤ 250,000) |
partial | boolean | true if either the 250K hard cap or the 180s wall-clock budget was hit before the full window was walked |
partial_reason | string | null | "hard_cap_250000" or "wall_clock_180s" when partial; otherwise null |
fetched_in_ms | integer | Server-side fetch time. Cached calls show the original miss time |
cache | string | "hit" if served from Redis cache, "miss" if freshly walked |
trades | array | All trades, sorted by timestamp descending (newest first) |
Trade fields
| Field | Type | Description |
|---|---|---|
tx_hash | string | Polygon transaction hash |
order_hash | string | Order hash from the exchange |
timestamp | integer | Unix seconds when the fill settled |
maker | string | Maker address |
taker | string | Taker address |
token_id | string | The outcome token id traded in this fill |
direction | string | "BUY" or "SELL" from the maker’s perspective |
price | number | USDC per share, 4-decimal precision |
shares | number | Outcome tokens traded |
usd | number | USDC notional |
fee | number | Maker fee paid (USDC) |
Example: full lifetime trade history of a wallet
curl "https://api.polynode.dev/v2/onchain/wallets/0x2f5653a3761f65c5a299f9839eadbd4d4d679ffa/trades/all?key=$YOUR_KEY"
Example: only trades from the last 30 days
NOW=$(date +%s); FROM=$((NOW - 2592000))
curl "https://api.polynode.dev/v2/onchain/wallets/0x2f5653a3761f65c5a299f9839eadbd4d4d679ffa/trades/all?from=$FROM&to=$NOW&key=$YOUR_KEY"
Errors
403 Tier required:
{ "error": "/trades/all requires the Growth plan or above. Your tier: starter. See polynode.dev/pricing." }
401 No API key:
{ "error": "API key required. Pass via ?key= or x-api-key header." }
Notes
partial: trueresults are not cached. Subsequent calls re-attempt the full walk. Tighten the time window withfrom/toif you keep hitting the cap.- Cache key is
(wallet, from_ts, to_ts). Different windows cached independently. - For wallets that consistently exceed the 250K cap, slice into multiple windowed calls and concatenate client-side. Each window cached separately for 5 minutes.
- Trades include both maker AND taker sides — every fill the wallet was involved in. No double-counting.

