Skip to main content
GET
/
data
/
trades
Get trades
curl --request GET \
  --url https://clob.polymarket.com/data/trades \
  --header 'POLY_ADDRESS: <api-key>' \
  --header 'POLY_API_KEY: <api-key>' \
  --header 'POLY_PASSPHRASE: <api-key>' \
  --header 'POLY_SIGNATURE: <api-key>' \
  --header 'POLY_TIMESTAMP: <api-key>'
import requests

url = "https://clob.polymarket.com/data/trades"

headers = {
"POLY_API_KEY": "<api-key>",
"POLY_ADDRESS": "<api-key>",
"POLY_SIGNATURE": "<api-key>",
"POLY_PASSPHRASE": "<api-key>",
"POLY_TIMESTAMP": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {
POLY_API_KEY: '<api-key>',
POLY_ADDRESS: '<api-key>',
POLY_SIGNATURE: '<api-key>',
POLY_PASSPHRASE: '<api-key>',
POLY_TIMESTAMP: '<api-key>'
}
};

fetch('https://clob.polymarket.com/data/trades', 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://clob.polymarket.com/data/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"POLY_ADDRESS: <api-key>",
"POLY_API_KEY: <api-key>",
"POLY_PASSPHRASE: <api-key>",
"POLY_SIGNATURE: <api-key>",
"POLY_TIMESTAMP: <api-key>"
],
]);

$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://clob.polymarket.com/data/trades"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("POLY_API_KEY", "<api-key>")
req.Header.Add("POLY_ADDRESS", "<api-key>")
req.Header.Add("POLY_SIGNATURE", "<api-key>")
req.Header.Add("POLY_PASSPHRASE", "<api-key>")
req.Header.Add("POLY_TIMESTAMP", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://clob.polymarket.com/data/trades")
.header("POLY_API_KEY", "<api-key>")
.header("POLY_ADDRESS", "<api-key>")
.header("POLY_SIGNATURE", "<api-key>")
.header("POLY_PASSPHRASE", "<api-key>")
.header("POLY_TIMESTAMP", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://clob.polymarket.com/data/trades")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["POLY_API_KEY"] = '<api-key>'
request["POLY_ADDRESS"] = '<api-key>'
request["POLY_SIGNATURE"] = '<api-key>'
request["POLY_PASSPHRASE"] = '<api-key>'
request["POLY_TIMESTAMP"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "limit": 100,
  "next_cursor": "MTAw",
  "count": 2,
  "data": [
    {
      "id": "trade-123",
      "taker_order_id": "0xabcdef1234567890abcdef1234567890abcdef12",
      "market": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "asset_id": "15871154585880608648532107628464183779895785213830018178010423617714102767076",
      "side": "BUY",
      "size": "100000000",
      "fee_rate_bps": "30",
      "price": "0.5",
      "status": "TRADE_STATUS_CONFIRMED",
      "match_time": "1700000000",
      "last_update": "1700000000",
      "outcome": "YES",
      "bucket_index": 0,
      "owner": "f4f247b7-4ac7-ff29-a152-04fda0a8755a",
      "maker_address": "0x1234567890123456789012345678901234567890",
      "transaction_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
      "trader_side": "TAKER",
      "maker_orders": []
    }
  ]
}
{
"error": "Invalid trade params payload"
}
{
"error": "Invalid API key"
}
{
"error": "Internal server error"
}

Authorizations

POLY_API_KEY
string
header
required

Your API key

POLY_ADDRESS
string
header
required

Ethereum address associated with the API key

POLY_SIGNATURE
string
header
required

HMAC signature of the request

POLY_PASSPHRASE
string
header
required

API key passphrase

POLY_TIMESTAMP
string
header
required

Unix timestamp of the request

Query Parameters

id
string

Trade ID to filter by specific trade

maker_address
string
required

Maker address to filter trades

Pattern: ^0x[a-fA-F0-9]{40}$
market
string

Market (condition ID) to filter trades

Pattern: ^0x[a-fA-F0-9]{64}$
asset_id
string

Asset ID (token ID) to filter trades

before
string

Filter trades before this Unix timestamp

Pattern: ^\d+$
after
string

Filter trades after this Unix timestamp

Pattern: ^\d+$
next_cursor
string

Cursor for pagination (base64 encoded offset)

Response

Successfully retrieved trades

Paginated trades response

limit
integer
required

Maximum number of items per page

Example:

100

next_cursor
string
required

Cursor for next page (base64 encoded offset). "LTE=" indicates no more pages

Example:

"MTAw"

count
integer
required

Number of items in current response

Example:

2

data
object[]
required

Array of trades