Skip to main content

GET /v1/trades

Retrieve individual trade ticks from prediction markets and DEX perps.

Min Tier: Pro | Credits: 50 base + 2 per row returned

Parameters

ParameterTypeRequiredDefaultDescription
api-keystringYesYour API key.
symbolstringYesAsset symbol (e.g. BTC, ETH) or market slug (e.g. btc-above-100k-march-2026).
sourcestringYesData source. One of polymarket, kalshi, hyperliquid.
startstringNoISO 8601 start time (inclusive).
endstringNoISO 8601 end time (exclusive).
sidestringNoallFilter by trade side. One of buy, sell, all.
limitintegerNo100Number of trades to return. Range: 1–1000.
afterstringNoCursor for pagination. Pass meta.next_cursor from a previous response.

Response

FieldTypeDescriptionSources
timestampstringISO 8601 trade execution time.All
symbolstringAsset symbol or market slug.All
sourcestringData source identifier.All
trade_idstringUnique trade identifier from the source.All
pricenumberExecution price. Polymarket and Kalshi return probability (0–1).All
sizenumberTrade size in the base asset or contract units.All
sidestringbuy or sell.All
maker_takerstring | nullmaker or taker role indicator.Hyperliquid
market_idstring | nullSource-specific market identifier.Polymarket, Kalshi

Response Headers

HeaderDescription
X-Credits-UsedCredits consumed by this request.
X-Credits-RemainingCredits remaining in your billing cycle.
X-Rows-ReturnedNumber of trades in the response.
X-Rows-Cappedtrue if the result set was truncated by your plan's row limit.

Example

cURL

curl "https://kwery-api.com/v1/trades?api-key=YOUR_KEY&symbol=BTC&source=hyperliquid&start=2026-03-08T14:00:00Z&end=2026-03-08T14:05:00Z&side=buy&limit=5"

Python

import requests

resp = requests.get("https://kwery-api.com/v1/trades", params={
    "api-key": "YOUR_KEY",
    "symbol": "BTC",
    "source": "hyperliquid",
    "start": "2026-03-08T14:00:00Z",
    "end": "2026-03-08T14:05:00Z",
    "side": "buy",
    "limit": 5,
})
data = resp.json()

TypeScript

const params = new URLSearchParams({
  "api-key": "YOUR_KEY",
  "symbol": "BTC",
  "source": "hyperliquid",
  "start": "2026-03-08T14:00:00Z",
  "end": "2026-03-08T14:05:00Z",
  "side": "buy",
  "limit": "5",
});
const res = await fetch(`https://kwery-api.com/v1/trades?${params}`);
const data = await res.json();

Example Response

{
  "data": [
    {
      "timestamp": "2026-03-08T14:00:01.234Z",
      "symbol": "BTC",
      "source": "hyperliquid",
      "trade_id": "hl_tx_9f8e7d6c",
      "price": 94320.50,
      "size": 0.150,
      "side": "buy",
      "maker_taker": "taker",
      "market_id": null
    },
    {
      "timestamp": "2026-03-08T14:00:03.891Z",
      "symbol": "BTC",
      "source": "hyperliquid",
      "trade_id": "hl_tx_a1b2c3d4",
      "price": 94322.00,
      "size": 0.420,
      "side": "buy",
      "maker_taker": "taker",
      "market_id": null
    },
    {
      "timestamp": "2026-03-08T14:00:07.102Z",
      "symbol": "BTC",
      "source": "hyperliquid",
      "trade_id": "hl_tx_e5f6a7b8",
      "price": 94318.75,
      "size": 0.085,
      "side": "buy",
      "maker_taker": "maker",
      "market_id": null
    }
  ],
  "meta": {
    "symbol": "BTC",
    "source": "hyperliquid",
    "returned": 5,
    "next_cursor": "eyJ0IjoiMjAyNi0wMy0wOFQxNDowMDoxMi41NjdaIn0",
    "has_more": true
  }
}

Source-Specific Behavior

Polymarketprice is the outcome probability (0–1). size is in USDC contract units. market_id is the Polymarket condition ID. maker_taker is always null.

Kalshiprice is the contract probability (0–1). size is the number of contracts. market_id is the Kalshi event ticker. maker_taker is always null.

Hyperliquidprice is in USD. maker_taker indicates whether the trade was a maker or taker fill. market_id is always null.

Tier Access

PlanHistory Depth
FreeNot available — returns 403.
Pro14 days
BusinessFull history

Errors

StatusCodeWhen
400invalid_symbolThe symbol parameter is missing or not recognized.
400invalid_sourceThe source parameter is not one of polymarket, kalshi, hyperliquid.
400invalid_sideThe side parameter is not one of buy, sell, all.
400invalid_time_rangestart is after end, or the range exceeds your plan's history depth.
401unauthorizedMissing or invalid api-key.
403tier_restrictedYour plan does not have access to trade data.
429rate_limitedYou have exceeded your plan's request rate. Retry after the Retry-After header value.