curl --request POST \
--url https://traderapi.us-east-1.privatelink.preprod.polymarketexchange.com/api/v1beta1/search_trades \
--header 'Content-Type: application/json' \
--data '
{
"accounts": [
"<string>"
],
"end_time": "2023-11-07T05:31:56Z",
"exec_id": "<string>",
"order_id": "<string>",
"page_size": 123,
"page_token": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"states": [
"TRADE_STATE_UNDEFINED"
],
"symbol": "<string>",
"trade_id": "<string>",
"trade_link_id": "<string>"
}
'{
"next_page_token": "<string>",
"trade": [
{
"aggressor": {
"aggressor": true,
"commission_notional_collected": "<string>",
"commission_spread_px": "<string>",
"id": "<string>",
"last_px": "<string>",
"last_shares": "<string>",
"leg_prices": [
{
"anchor": true,
"px": "<string>",
"qty": "<string>",
"reference_px": "<string>",
"side": "SIDE_UNDEFINED",
"symbol": "<string>"
}
],
"order": {
"account": "trading-account-456",
"all_or_none": true,
"avg_px": "<string>",
"best_limit": true,
"block_trade_indicator": true,
"cash_order_qty": "<string>",
"client_account_id": "<string>",
"client_participant_id": "<string>",
"clord_id": "<string>",
"collateral_memo": "<string>",
"commission_notional_total_collected": "<string>",
"commissions_basis_points": "<string>",
"context": {
"any_context": {
"@type": "<string>"
},
"fix_context": {
"begin_string": "<string>",
"on_behalf_of_comp_id": "<string>",
"on_behalf_of_sub_id": "<string>",
"orig_clord_id": "<string>",
"security_type": "<string>",
"sender_comp_id": "<string>",
"sender_location_id": "<string>",
"sender_sub_id": "<string>",
"target_comp_id": "<string>",
"target_location_id": "<string>",
"target_sub_id": "<string>"
},
"service_name": "<string>",
"validation_contexts": [
{
"@type": "<string>"
}
]
},
"create_time": "2023-11-07T05:31:56Z",
"cross_id": "<string>",
"cum_qty": "<string>",
"fractional_quantity_scale": "<string>",
"good_till_time": "2023-11-07T05:31:56Z",
"host_cross_id": "<string>",
"id": "<string>",
"ignore_price_validity_checks": true,
"immediately_executable_limit": true,
"insert_time": "2023-11-07T05:31:56Z",
"last_trade_id": "<string>",
"last_transact_time": "2023-11-07T05:31:56Z",
"leaves_qty": "<string>",
"maker_commissions_basis_points": "<string>",
"manual_order_indicator": "MANUAL_ORDER_INDICATOR_UNDEFINED",
"min_qty": "<string>",
"order_capacity": "ORDER_CAPACITY_UNDEFINED",
"order_qty": "<string>",
"parent_order_id": "<string>",
"participant": "<string>",
"participate_dont_initiate": true,
"price": "5500",
"price_scale": "10000",
"price_to_quantity_filled": {},
"priority_weight": "<string>",
"risk_check_time": "2023-11-07T05:31:56Z",
"self_match_prevention_instruction": "SELF_MATCH_PREVENTION_INSTRUCTION_UNDEFINED",
"side": "SIDE_UNDEFINED",
"state": "ORDER_STATE_NEW",
"stop_price": "<string>",
"strict_limit": true,
"submitting_participant": "<string>",
"symbol": "aec-nfl-buf-nyj-2025-01-15",
"symbol_sub_type": "<string>",
"time_in_force": "TIME_IN_FORCE_UNDEFINED",
"transaction_booked_time": "2023-11-07T05:31:56Z",
"trigger_method": "CONDITION_TRIGGER_METHOD_UNDEFINED",
"type": "ORDER_TYPE_UNDEFINED"
},
"order_reject_reason": "ORD_REJECT_REASON_EXCHANGE_OPTION",
"text": "<string>",
"trace_id": "<string>",
"trade_id": "<string>",
"transact_time": "2023-11-07T05:31:56Z",
"transact_trade_date": {
"day": 123,
"month": 123,
"year": 123
},
"type": "EXECUTION_TYPE_NEW",
"unsolicited_cancel_reason": "UNSOLICITED_CXL_REASON_UNDEFINED"
},
"id": "<string>",
"metadata": {},
"passive": {
"aggressor": true,
"commission_notional_collected": "<string>",
"commission_spread_px": "<string>",
"id": "<string>",
"last_px": "<string>",
"last_shares": "<string>",
"leg_prices": [
{
"anchor": true,
"px": "<string>",
"qty": "<string>",
"reference_px": "<string>",
"side": "SIDE_UNDEFINED",
"symbol": "<string>"
}
],
"order": {
"account": "trading-account-456",
"all_or_none": true,
"avg_px": "<string>",
"best_limit": true,
"block_trade_indicator": true,
"cash_order_qty": "<string>",
"client_account_id": "<string>",
"client_participant_id": "<string>",
"clord_id": "<string>",
"collateral_memo": "<string>",
"commission_notional_total_collected": "<string>",
"commissions_basis_points": "<string>",
"context": {
"any_context": {
"@type": "<string>"
},
"fix_context": {
"begin_string": "<string>",
"on_behalf_of_comp_id": "<string>",
"on_behalf_of_sub_id": "<string>",
"orig_clord_id": "<string>",
"security_type": "<string>",
"sender_comp_id": "<string>",
"sender_location_id": "<string>",
"sender_sub_id": "<string>",
"target_comp_id": "<string>",
"target_location_id": "<string>",
"target_sub_id": "<string>"
},
"service_name": "<string>",
"validation_contexts": [
{
"@type": "<string>"
}
]
},
"create_time": "2023-11-07T05:31:56Z",
"cross_id": "<string>",
"cum_qty": "<string>",
"fractional_quantity_scale": "<string>",
"good_till_time": "2023-11-07T05:31:56Z",
"host_cross_id": "<string>",
"id": "<string>",
"ignore_price_validity_checks": true,
"immediately_executable_limit": true,
"insert_time": "2023-11-07T05:31:56Z",
"last_trade_id": "<string>",
"last_transact_time": "2023-11-07T05:31:56Z",
"leaves_qty": "<string>",
"maker_commissions_basis_points": "<string>",
"manual_order_indicator": "MANUAL_ORDER_INDICATOR_UNDEFINED",
"min_qty": "<string>",
"order_capacity": "ORDER_CAPACITY_UNDEFINED",
"order_qty": "<string>",
"parent_order_id": "<string>",
"participant": "<string>",
"participate_dont_initiate": true,
"price": "5500",
"price_scale": "10000",
"price_to_quantity_filled": {},
"priority_weight": "<string>",
"risk_check_time": "2023-11-07T05:31:56Z",
"self_match_prevention_instruction": "SELF_MATCH_PREVENTION_INSTRUCTION_UNDEFINED",
"side": "SIDE_UNDEFINED",
"state": "ORDER_STATE_NEW",
"stop_price": "<string>",
"strict_limit": true,
"submitting_participant": "<string>",
"symbol": "aec-nfl-buf-nyj-2025-01-15",
"symbol_sub_type": "<string>",
"time_in_force": "TIME_IN_FORCE_UNDEFINED",
"transaction_booked_time": "2023-11-07T05:31:56Z",
"trigger_method": "CONDITION_TRIGGER_METHOD_UNDEFINED",
"type": "ORDER_TYPE_UNDEFINED"
},
"order_reject_reason": "ORD_REJECT_REASON_EXCHANGE_OPTION",
"text": "<string>",
"trace_id": "<string>",
"trade_id": "<string>",
"transact_time": "2023-11-07T05:31:56Z",
"transact_trade_date": {
"day": 123,
"month": 123,
"year": 123
},
"type": "EXECUTION_TYPE_NEW",
"unsolicited_cancel_reason": "UNSOLICITED_CXL_REASON_UNDEFINED"
},
"reporting_counterparty": "SIDE_UNDEFINED",
"state": "TRADE_STATE_UNDEFINED",
"text": "<string>",
"trade_link_id": "<string>",
"trade_type": "TRADE_TYPE_UNDEFINED"
}
]
}Searches for exchange trades using the given details to filter and returns a list of the found trades.
curl --request POST \
--url https://traderapi.us-east-1.privatelink.preprod.polymarketexchange.com/api/v1beta1/search_trades \
--header 'Content-Type: application/json' \
--data '
{
"accounts": [
"<string>"
],
"end_time": "2023-11-07T05:31:56Z",
"exec_id": "<string>",
"order_id": "<string>",
"page_size": 123,
"page_token": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"states": [
"TRADE_STATE_UNDEFINED"
],
"symbol": "<string>",
"trade_id": "<string>",
"trade_link_id": "<string>"
}
'{
"next_page_token": "<string>",
"trade": [
{
"aggressor": {
"aggressor": true,
"commission_notional_collected": "<string>",
"commission_spread_px": "<string>",
"id": "<string>",
"last_px": "<string>",
"last_shares": "<string>",
"leg_prices": [
{
"anchor": true,
"px": "<string>",
"qty": "<string>",
"reference_px": "<string>",
"side": "SIDE_UNDEFINED",
"symbol": "<string>"
}
],
"order": {
"account": "trading-account-456",
"all_or_none": true,
"avg_px": "<string>",
"best_limit": true,
"block_trade_indicator": true,
"cash_order_qty": "<string>",
"client_account_id": "<string>",
"client_participant_id": "<string>",
"clord_id": "<string>",
"collateral_memo": "<string>",
"commission_notional_total_collected": "<string>",
"commissions_basis_points": "<string>",
"context": {
"any_context": {
"@type": "<string>"
},
"fix_context": {
"begin_string": "<string>",
"on_behalf_of_comp_id": "<string>",
"on_behalf_of_sub_id": "<string>",
"orig_clord_id": "<string>",
"security_type": "<string>",
"sender_comp_id": "<string>",
"sender_location_id": "<string>",
"sender_sub_id": "<string>",
"target_comp_id": "<string>",
"target_location_id": "<string>",
"target_sub_id": "<string>"
},
"service_name": "<string>",
"validation_contexts": [
{
"@type": "<string>"
}
]
},
"create_time": "2023-11-07T05:31:56Z",
"cross_id": "<string>",
"cum_qty": "<string>",
"fractional_quantity_scale": "<string>",
"good_till_time": "2023-11-07T05:31:56Z",
"host_cross_id": "<string>",
"id": "<string>",
"ignore_price_validity_checks": true,
"immediately_executable_limit": true,
"insert_time": "2023-11-07T05:31:56Z",
"last_trade_id": "<string>",
"last_transact_time": "2023-11-07T05:31:56Z",
"leaves_qty": "<string>",
"maker_commissions_basis_points": "<string>",
"manual_order_indicator": "MANUAL_ORDER_INDICATOR_UNDEFINED",
"min_qty": "<string>",
"order_capacity": "ORDER_CAPACITY_UNDEFINED",
"order_qty": "<string>",
"parent_order_id": "<string>",
"participant": "<string>",
"participate_dont_initiate": true,
"price": "5500",
"price_scale": "10000",
"price_to_quantity_filled": {},
"priority_weight": "<string>",
"risk_check_time": "2023-11-07T05:31:56Z",
"self_match_prevention_instruction": "SELF_MATCH_PREVENTION_INSTRUCTION_UNDEFINED",
"side": "SIDE_UNDEFINED",
"state": "ORDER_STATE_NEW",
"stop_price": "<string>",
"strict_limit": true,
"submitting_participant": "<string>",
"symbol": "aec-nfl-buf-nyj-2025-01-15",
"symbol_sub_type": "<string>",
"time_in_force": "TIME_IN_FORCE_UNDEFINED",
"transaction_booked_time": "2023-11-07T05:31:56Z",
"trigger_method": "CONDITION_TRIGGER_METHOD_UNDEFINED",
"type": "ORDER_TYPE_UNDEFINED"
},
"order_reject_reason": "ORD_REJECT_REASON_EXCHANGE_OPTION",
"text": "<string>",
"trace_id": "<string>",
"trade_id": "<string>",
"transact_time": "2023-11-07T05:31:56Z",
"transact_trade_date": {
"day": 123,
"month": 123,
"year": 123
},
"type": "EXECUTION_TYPE_NEW",
"unsolicited_cancel_reason": "UNSOLICITED_CXL_REASON_UNDEFINED"
},
"id": "<string>",
"metadata": {},
"passive": {
"aggressor": true,
"commission_notional_collected": "<string>",
"commission_spread_px": "<string>",
"id": "<string>",
"last_px": "<string>",
"last_shares": "<string>",
"leg_prices": [
{
"anchor": true,
"px": "<string>",
"qty": "<string>",
"reference_px": "<string>",
"side": "SIDE_UNDEFINED",
"symbol": "<string>"
}
],
"order": {
"account": "trading-account-456",
"all_or_none": true,
"avg_px": "<string>",
"best_limit": true,
"block_trade_indicator": true,
"cash_order_qty": "<string>",
"client_account_id": "<string>",
"client_participant_id": "<string>",
"clord_id": "<string>",
"collateral_memo": "<string>",
"commission_notional_total_collected": "<string>",
"commissions_basis_points": "<string>",
"context": {
"any_context": {
"@type": "<string>"
},
"fix_context": {
"begin_string": "<string>",
"on_behalf_of_comp_id": "<string>",
"on_behalf_of_sub_id": "<string>",
"orig_clord_id": "<string>",
"security_type": "<string>",
"sender_comp_id": "<string>",
"sender_location_id": "<string>",
"sender_sub_id": "<string>",
"target_comp_id": "<string>",
"target_location_id": "<string>",
"target_sub_id": "<string>"
},
"service_name": "<string>",
"validation_contexts": [
{
"@type": "<string>"
}
]
},
"create_time": "2023-11-07T05:31:56Z",
"cross_id": "<string>",
"cum_qty": "<string>",
"fractional_quantity_scale": "<string>",
"good_till_time": "2023-11-07T05:31:56Z",
"host_cross_id": "<string>",
"id": "<string>",
"ignore_price_validity_checks": true,
"immediately_executable_limit": true,
"insert_time": "2023-11-07T05:31:56Z",
"last_trade_id": "<string>",
"last_transact_time": "2023-11-07T05:31:56Z",
"leaves_qty": "<string>",
"maker_commissions_basis_points": "<string>",
"manual_order_indicator": "MANUAL_ORDER_INDICATOR_UNDEFINED",
"min_qty": "<string>",
"order_capacity": "ORDER_CAPACITY_UNDEFINED",
"order_qty": "<string>",
"parent_order_id": "<string>",
"participant": "<string>",
"participate_dont_initiate": true,
"price": "5500",
"price_scale": "10000",
"price_to_quantity_filled": {},
"priority_weight": "<string>",
"risk_check_time": "2023-11-07T05:31:56Z",
"self_match_prevention_instruction": "SELF_MATCH_PREVENTION_INSTRUCTION_UNDEFINED",
"side": "SIDE_UNDEFINED",
"state": "ORDER_STATE_NEW",
"stop_price": "<string>",
"strict_limit": true,
"submitting_participant": "<string>",
"symbol": "aec-nfl-buf-nyj-2025-01-15",
"symbol_sub_type": "<string>",
"time_in_force": "TIME_IN_FORCE_UNDEFINED",
"transaction_booked_time": "2023-11-07T05:31:56Z",
"trigger_method": "CONDITION_TRIGGER_METHOD_UNDEFINED",
"type": "ORDER_TYPE_UNDEFINED"
},
"order_reject_reason": "ORD_REJECT_REASON_EXCHANGE_OPTION",
"text": "<string>",
"trace_id": "<string>",
"trade_id": "<string>",
"transact_time": "2023-11-07T05:31:56Z",
"transact_trade_date": {
"day": 123,
"month": 123,
"year": 123
},
"type": "EXECUTION_TYPE_NEW",
"unsolicited_cancel_reason": "UNSOLICITED_CXL_REASON_UNDEFINED"
},
"reporting_counterparty": "SIDE_UNDEFINED",
"state": "TRADE_STATE_UNDEFINED",
"text": "<string>",
"trade_link_id": "<string>",
"trade_type": "TRADE_TYPE_UNDEFINED"
}
]
}Request to search for trades filtered using the given details.
Fully qualified resource account names to filter upon (ie: "firms/[firmid]/accounts/[accountid]").
End time for the orders to be fetched.
Exchange assigned execution ID to filter upon.
Exchange assigned order ID of the order to filter upon.
The maximum number of orders to return in a response. This field is optional.
A pagination token returned from a previous call to SearchTradesRequest.
that indicates where this listing should continue from.
This field is optional.
Start time for the orders to be fetched.
Trade states to filter upon.
TradeState indicates the state of a trade.
TRADE_STATE_UNDEFINED, TRADE_STATE_NEW, TRADE_STATE_CLEARED, TRADE_STATE_BUSTED, TRADE_STATE_INFLIGHT, TRADE_STATE_PENDING_RISK, TRADE_STATE_PENDING_CLEARED, TRADE_STATE_REJECTED, TRADE_STATE_CLEARING_ACKNOWLEDGED, TRADE_STATE_RETRY_REQUEST Instrument symbol to filter upon.
Exchange assigned trade ID to filter upon.