Skip to main content

make_composite_trade_id

Function make_composite_trade_id 

Source
pub fn make_composite_trade_id(trade_id: &str, venue_order_id: &str) -> TradeId
Expand description

Creates a composite trade ID bounded to 36 characters.

When multiple orders are filled by a single market order, Polymarket sends one trade message with a single ID for all fills. This creates a unique trade ID per fill by combining the trade ID with part of the venue order ID.

Format: {trade_id[..27]}-{venue_order_id[last 8]} = 36 chars.