Skip to main content
Prediction Market data is currently in beta. It is actively being worked on and improved, but may be unreliable. Polymarket data is live, and Kalshi data will be added soon.Subscriptions require a Growth or Enterprise plan. Learn more.
Kalshi has limited trade data. When subscribing to Kalshi trades:
  • No traderId filtering: Individual trader information is not exposed
  • No BUY/SELL distinction: All trades show as TRADE type (no direction information)
  • No trader identity: The maker and traderId fields will be null or unavailable
These limitations are due to privacy considerations on Kalshi’s CFTC-regulated exchange.

Returns

Arguments

Subscription example

subscription {
  onPredictionTradesCreated(
    input: {
      marketId: "0x25aa90b3cd98305e849189b4e8b770fc77fe89bccb7cf9656468414e01145d38:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137"
      # Optional filters:
      # eventId: "67284:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137"
      # traderId: "0xa8702435199b2275b827ee5b88e78bb568a67a65:Polymarket"
    }
  ) {
    eventId
    trades {
      sortKey
      outcomeId
      outcomeLabel
      protocol
      tradeType
      maker
      timestamp
      outcomeIndex
      priceUsd
      priceCollateral
      amount
      amountCollateral
      amountUsd
      transactionHash
      blockNumber
      networkId
      exchangeAddress
      transactionId
      traderId
      predictionMarket {
        id
        protocol
        venueMarketId
        question
        label
        eventLabel
        outcomeLabels
        closesAt
        resolvesAt
      }
    }
  }
}
Example Response
{
  "data": {
    "onPredictionTradesCreated": {
      "marketId": "0x25aa90b3cd98305e849189b4e8b770fc77fe89bccb7cf9656468414e01145d38:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137",
      "eventId": "67284:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137",
      "trades": [
        {
          "marketId": "0x25aa90b3cd98305e849189b4e8b770fc77fe89bccb7cf9656468414e01145d38:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137",
          "outcomeId": "111080671036126109659854287535401661966194360665829017654832975124868412594547:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137",
          "outcomeLabel": "No",
          "protocol": "POLYMARKET",
          "tradeType": "BUY",
          "maker": "0xa8702435199b2275b827ee5b88e78bb568a67a65",
          "timestamp": 1773355617,
          "outcomeIndex": 1,
          "priceUsd": "0.998860",
          "priceCollateral": "0.999",
          "amount": "54.004",
          "amountCollateral": "53.949996",
          "amountUsd": "53.942428",
          "transactionHash": "0x282415359cdc196306f87011fa080f11dc7dedd6a5ade65b369407244b66cec0",
          "blockNumber": 84117792,
          "networkId": 137,
          "exchangeAddress": "0xc5d563a36ae78145c45a50134d48a1215220f80a",
          "transactionId": null,
          "traderId": "0xa8702435199b2275b827ee5b88e78bb568a67a65:Polymarket",
          "predictionMarket": null
        }
      ]
    }
  }
}

Usage Guidelines

  • ID formats:
    • Market ID:
      • Polymarket: <marketAddress>:Polymarket:<exchangeAddress>:<networkId> (e.g., 0x25aa90b3cd98305e849189b4e8b770fc77fe89bccb7cf9656468414e01145d38:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137)
      • Kalshi: <marketSlug>:Kalshi (e.g., KXMVECROSSCATEGORY-S2026A4A05B370DF-F1FBA451AA9:Kalshi)
    • Event ID varies by platform:
      • Polymarket: <eventSlug>:Polymarket:<exchangeAddress>:<networkId> (e.g., 67284:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137)
      • Kalshi: <eventSlug>:Kalshi (e.g., KXMVESPORTSMULTIGAMEEXTENDED-S2026350C4EF9BCE:Kalshi)
    • Trader ID: Polymarket only - <address>:Polymarket (e.g., 0x02227b8f5a9636e895607edd3185ed6ee5598ff7:Polymarket)
  • Subscribe with optional filters: marketId (specific outcome), eventId (all outcomes in an event), or traderId (trades by a specific user - Polymarket only)
  • Trades stream in real-time as they are ingested from prediction market venues
  • priceUsd shows the probability price (0.00 to 1.00), while amountUsd shows the monetary value
  • Platform differences: Polymarket shows BUY/SELL trade types, while Kalshi only shows TRADE type

Troubleshooting Tips

BUY means purchasing shares of an outcome, SELL means selling shares. TRADE is a generic trade without direction. BUY_COUNTERPARTY and SELL_COUNTERPARTY represent the opposite side of maker trades. PAYOUT_REDEMPTION indicates claiming winnings after resolution.
For a resolved market, profit = (final outcome price - entry price) * shares held. If the trader bought “Yes” at 0.65 and it resolved to 1.00, their profit is (1.00 - 0.65) * shares. If it resolved to 0.00, their loss is 0.65 * shares.
amount is the number of shares traded, priceUsd is the per-share price, and amountUsd is the total cost (amount * priceUsd). For example, buying 1000 shares at 0.65 per share costs $650 USD.
Older trades or trades from certain venues may be missing data like transactionHash, blockNumber, or traderId. This depends on what data the prediction market protocol provides. Always check for null before using these fields.
This subscription provides executed trades (fills), not pending orders. To build an order book, you need to track the current state of liquidity using onPredictionMarketBarsUpdated or query market depth through the prediction venue’s native API. Use trade data to show trade history and recent activity.