Fetch trades
curl --request GET \
--url https://github.com/openpx-trade/openpx/v1/trades/fetch_tradesimport requests
url = "https://github.com/openpx-trade/openpx/v1/trades/fetch_trades"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://github.com/openpx-trade/openpx/v1/trades/fetch_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://github.com/openpx-trade/openpx/v1/trades/fetch_trades",
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://github.com/openpx-trade/openpx/v1/trades/fetch_trades"
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://github.com/openpx-trade/openpx/v1/trades/fetch_trades")
.asString();require 'uri'
require 'net/http'
url = URI("https://github.com/openpx-trade/openpx/v1/trades/fetch_trades")
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{
"trades": [
{
"exchange_ts": "2023-11-07T05:31:56Z",
"id": "<string>",
"openpx_ts": "2023-11-07T05:31:56Z",
"price": 123,
"size": 123,
"aggressor_side": "<string>",
"no_price": 123,
"outcome": "<string>",
"taker_address": "<string>",
"yes_price": 123
}
],
"cursor": "<string>"
}{
"kind": "Authentication",
"message": "<string>"
}Trades
fetch_trades
Fetch a paginated tape of recent public trades for one market.
GET
/
v1
/
trades
/
fetch_trades
Fetch trades
curl --request GET \
--url https://github.com/openpx-trade/openpx/v1/trades/fetch_tradesimport requests
url = "https://github.com/openpx-trade/openpx/v1/trades/fetch_trades"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://github.com/openpx-trade/openpx/v1/trades/fetch_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://github.com/openpx-trade/openpx/v1/trades/fetch_trades",
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://github.com/openpx-trade/openpx/v1/trades/fetch_trades"
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://github.com/openpx-trade/openpx/v1/trades/fetch_trades")
.asString();require 'uri'
require 'net/http'
url = URI("https://github.com/openpx-trade/openpx/v1/trades/fetch_trades")
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{
"trades": [
{
"exchange_ts": "2023-11-07T05:31:56Z",
"id": "<string>",
"openpx_ts": "2023-11-07T05:31:56Z",
"price": 123,
"size": 123,
"aggressor_side": "<string>",
"no_price": 123,
"outcome": "<string>",
"taker_address": "<string>",
"yes_price": 123
}
],
"cursor": "<string>"
}{
"kind": "Authentication",
"message": "<string>"
}Fetch a paginated tape of recent public trades for one market.
Query Parameters
Market identifier — Kalshi market ticker or Polymarket Gamma slug (e.g. "KXBTCD-25APR1517").
Opaque cursor returned by a prior page (e.g. "eyJvIjoxMDB9").
Inclusive upper bound, unix seconds (e.g. 1714608000).
Max trades to return; capped at 1000 (Kalshi) / 500 (Polymarket) (e.g. 100).
Required range:
x >= 0Inclusive lower bound, unix seconds (e.g. 1714521600).

