Skip to main content
GET
/
v2
/
onchain
/
wallets
/
{address}
/
trades
Wallet trade history (onchain)
curl --request GET \
  --url https://api.polynode.dev/v2/onchain/wallets/{address}/trades

Documentation Index

Fetch the complete documentation index at: https://polynode.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Returns every onchain trade fill for a wallet — both maker and taker sides, every fill, every counterparty, every fee. Pulled directly from onchain settlement data, never misses a fill. Each trade is enriched with market metadata (question, slug, outcome, image).
Want the entire wallet’s history in one call? Use Trade History (Wallet) — Bulk (Growth plan and above). Returns up to 250K trades in a single response, no pagination.

Quick start — get the most recent 100 trades

curl "https://api.polynode.dev/v2/onchain/wallets/{address}/trades?limit=100" \
  -H "x-api-key: YOUR_KEY"
Default limit=100, max limit=1000. That’s all most apps need.

Get every trade for the wallet (full history)

To walk the entire history, add ?cursor= (empty value) to the first request, then for each next page, copy pagination.cursor from the response back into the URL. Stop when pagination.has_more is false. Three complete copy-paste scripts that walk an entire wallet:
import requests

API_KEY = "YOUR_KEY"
WALLET = "0xc944d399164b4460a4a79184fc6f419027891e0a"

def get_all_trades(wallet):
    cursor = ""           # empty string = first page
    all_trades = []
    while True:
        r = requests.get(
            f"https://api.polynode.dev/v2/onchain/wallets/{wallet}/trades",
            params={"limit": 1000, "cursor": cursor},
            headers={"x-api-key": API_KEY},
        ).json()
        all_trades.extend(r["trades"])
        if not r["pagination"]["has_more"]:
            break
        cursor = r["pagination"]["cursor"]   # feed this into the next request
    return all_trades

trades = get_all_trades(WALLET)
print(f"got {len(trades)} trades")
Each page takes ~1 second regardless of how many trades the wallet has. The loop just keeps running until has_more is false.

Request

GET /v2/onchain/wallets/{address}/trades?limit=100
GET /v2/onchain/wallets/{address}/trades?limit=1000&cursor=<value-from-prior-response>
ParameterTypeLocationDescription
addressstringpathWallet address (0x-prefixed, 40 hex chars)
limitintegerqueryMax results per page (default 100, max 1000)
cursorstringqueryPass empty string ?cursor= for first page, then echo back pagination.cursor from each response. Required to walk past the first page reliably on heavy wallets.
offsetintegerqueryAlternative to cursor: skip first N. Fast for the first ~25K results then degrades. Use cursor for anything bigger.

Response

{
  "wallet": "0xc944d399164b4460a4a79184fc6f419027891e0a",
  "source": "onchain",
  "count": 1,
  "pagination": {
    "limit": 1000,
    "has_more": false
  },
  "trades": [
    {
      "tx_hash": "0x3611178d615caeab8f1fb32bc6232a32aaf93fc1e2f5bc5c9914ce2ddb9a13c3",
      "order_hash": "0x8676e03168a3cbf39bc1c695e9419127605bd070ff26e7cd628b662c363a82b5",
      "timestamp": 1777503244,
      "maker": "0xc944d399164b4460a4a79184fc6f419027891e0a",
      "taker": "0xe111180000d2663c0091e4f400237545b87b996b",
      "maker_asset_id": "0",
      "taker_asset_id": "110959653450933276250915064669875552310439627880508793089816880777942697720191",
      "maker_amount": 4723.199764,
      "taker_amount": 4737.412,
      "fee": 0,
      "side": "maker",
      "direction": "BUY",
      "market": "US x Iran ceasefire extended by April 22, 2026?",
      "slug": "us-x-iran-ceasefire-extended-by-april-22-2026",
      "outcome": "No",
      "image": "https://polymarket-upload.s3.us-east-2.amazonaws.com/us-x-iran-ceasefire-by-Cgmx3GCuOwjs.jpg"
    }
  ]
}
When pagination.has_more is true, the response also includes a pagination.cursor string — pass that as ?cursor=<value> for the next request.
FieldTypeDescription
countintegerNumber of trades in this response
pagination.has_morebooleantrue if more pages available — keep paginating
pagination.cursorstringPass back as ?cursor=<value> for the next page (only present when has_more is true)
trades[].tx_hashstringTransaction hash
trades[].timestampnumberUnix timestamp of the fill
trades[].order_hashstringOrder hash that was filled
trades[].makerstringMaker wallet address
trades[].takerstringTaker wallet address
trades[].maker_asset_idstringAsset the maker provided ("0" = USDC)
trades[].taker_asset_idstringAsset the taker provided (CTF token ID)
trades[].maker_amountnumberAmount maker provided (USDC)
trades[].taker_amountnumberAmount taker provided (tokens)
trades[].feenumberFee paid on this fill (USDC)
trades[].sidestring"maker" or "taker" relative to the queried wallet — exchange role on this fill
trades[].directionstring"BUY" or "SELL" from the queried wallet’s perspective. BUY = wallet contributed USDC and received outcome tokens. SELL = wallet contributed outcome tokens and received USDC.
trades[].marketstringMarket question
trades[].slugstringMarket slug
trades[].outcomestringOutcome label (e.g. “Yes”, “Up”, “Trump”)
trades[].imagestringMarket image URL

side vs direction

Both fields are populated on every row, and they answer different questions:
  • side = was the wallet the maker (resting limit order) or taker (crossing the spread) on this fill?
  • direction = did the wallet BUY outcome shares (gave USDC) or SELL them (received USDC)?
You’ll see all four combinations in real wallets — a maker can be a buyer or seller depending on which side of the orderbook they posted to. Same for takers.

Path Parameters

address
string
required

Wallet address

Query Parameters

limit
integer
default:100

Max results (max 1000)

offset
integer
default:0

Skip first N results

cursor
string

Cursor pagination. Pass empty string ?cursor= for the first page, then echo back pagination.cursor from each response. Format: <lastTs>:<lastId>. Each page loads at the same speed regardless of depth — recommended over offset for paging beyond ~25K results.

Response

Trade fills