PredictionsTrade
A single fill on the Polymarket CTF exchange, published to the `predictions-trades` Kafka topic as trades are ingested from the chain. One on-chain transaction can contain several fills; each fill is published as its own message. The buyer side's amount is the USDC premium and the seller side's amount is the number of outcome tokens, so the price per share is `buyer amount / seller amount`.
▶Proto definition.proto
message PredictionsTrade { int64 maker_id = 1; int64 taker_id = 2; int64 asset_id = 3; string maker_address = 4; string taker_address = 5; string asset_address = 6; int64 executed_at = 7; Decimal fee = 8; Decimal maker_amount_filled = 9; Decimal taker_amount_filled = 10; Side maker_side = 11; Side taker_side = 12; string transaction_hash = 13; }
Fields
maker_id
int64
1
Internal numeric id of the maker's wallet. Ids are stable and shared
across all predictions messages (PredictionsPosition.user_id,
PredictionsInsider.user_id, ...).
taker_id
int64
2
Internal numeric id of the taker's wallet.
asset_id
int64
3
Internal numeric id of the outcome token being traded. Same id space
as PredictionsPosition.asset_id and PredictionsInsider.asset_id.
maker_address
string
4
Maker wallet address (0x-prefixed hex).
taker_address
string
5
Taker wallet address (0x-prefixed hex).
asset_address
string
6
Polymarket CTF (ERC-1155) token id of the outcome token, as a decimal
string. Note: despite the name this is a token id, not a 0x contract
address. It matches PredictionsInsider.token_id and
PredictionsPosition.asset_address.
executed_at
int64
7
When the fill executed on-chain. Unix epoch milliseconds, UTC.
Exchange fee charged on this fill, in USDC.
Amount the maker gave up: USDC if maker_side is BUYER, outcome
tokens if maker_side is SELLER.
Amount the taker gave up: USDC if taker_side is BUYER, outcome
tokens if taker_side is SELLER.
Whether the maker bought or sold the outcome token.
Whether the taker bought or sold the outcome token. Always the
opposite of maker_side.
transaction_hash
string
13
Hash of the Polygon transaction containing this fill
(0x-prefixed hex).