Skip to main content
POST
/
v1beta1
/
cancel_replace_order
Cancel or Replace Order
curl --request POST \
  --url https://traderapi.us-east-1.privatelink.preprod.polymarketexchange.com/api/v1beta1/cancel_replace_order \
  --header 'Content-Type: application/json' \
  --data '
{
  "all_or_none": true,
  "best_limit": true,
  "clord_id": "<string>",
  "good_till_time": "2023-11-07T05:31:56Z",
  "immediately_executable_limit": true,
  "manual_order_indicator": "MANUAL_ORDER_INDICATOR_UNDEFINED",
  "min_qty": "<string>",
  "order_id": "<string>",
  "order_qty": "<string>",
  "participate_dont_initiate": true,
  "price": "<string>",
  "stop_price": "<string>",
  "strict_limit": true,
  "symbol": "<string>",
  "symbol_sub_type": "<string>",
  "time_in_force": "TIME_IN_FORCE_UNDEFINED"
}
'
{}

Body

application/json

Request to update an existing order with the given details.

all_or_none
boolean

A flag that if set indicates that either all of the order quantity should be filled, or none of it (partial fills will not be allowed).

best_limit
boolean

A flag that if set indicates that the price of a limit order shall be set to the price at the top of the book on the same side as this order.

clord_id
string

Client assigned ID for the cancel replace order.

good_till_time
string<date-time>

The time at which this order shall expire if the time in force is set as good till time.

immediately_executable_limit
boolean

A flag that if set indicates that the price of a limit order shall be set to the price at the top of the book on the opposing side as this order, thus able to immediately match.

manual_order_indicator
enum<string>
default:MANUAL_ORDER_INDICATOR_UNDEFINED

ManualOrderIndicator designates the manual or automated nature of an order.

  • MANUAL_ORDER_INDICATOR_UNDEFINED: An unset value for the manual order indicator.
  • MANUAL_ORDER_INDICATOR_MANUAL: The order was initially received via manual entry.
  • MANUAL_ORDER_INDICATOR_AUTOMATED: The order was initially received electronically.
Available options:
MANUAL_ORDER_INDICATOR_UNDEFINED,
MANUAL_ORDER_INDICATOR_MANUAL,
MANUAL_ORDER_INDICATOR_AUTOMATED
min_qty
string<int64>

Minimum quantity that must be filled immediately upon replacement. If the replaced order cannot be matched for at least this quantity at the time of submission, the replacement is expired. Any quantity above min_qty that is not immediately filled will rest on the book as a working order (optional for IOC time in force).

order_id
string

Exchange assigned ID for the order to be replaced (required).

order_qty
string<int64>

Desired order quantity for the replaced order.

participate_dont_initiate
boolean

A flag that if set indicates that immediate match is not desired.

price
string<int64>

Desired limit price for the replaced order (required for limit and stop limit orders).

stop_price
string<int64>

Desired stop price for the replaced order (required for stop and stop limit orders).

strict_limit
boolean

A flag that if set indicates this particular order must be filled at the exact limit price specified without price improvement.

symbol
string

Desired instrument's symbol (required).

symbol_sub_type
string

The sub type of the instrument symbol.

time_in_force
enum<string>
default:TIME_IN_FORCE_UNDEFINED

TimeInForce specifies how long the order remains in effect.

  • TIME_IN_FORCE_UNDEFINED: An unset value for TimeInForce. In the context of inserting orders, this will be interpreted as TIME_IN_FORCE_DAY
  • TIME_IN_FORCE_DAY: Order will automatically cancel if it has not been filled by the close of the trading day
  • TIME_IN_FORCE_GOOD_TILL_CANCEL: Order will remain active until filled or cancelled
  • TIME_IN_FORCE_IMMEDIATE_OR_CANCEL: Order will attempt to fill immediately, then cancel any unfilled portions of the order
  • TIME_IN_FORCE_GOOD_TILL_TIME: Order will remain active until filled or until the time specified
  • TIME_IN_FORCE_FILL_OR_KILL: Order will attempt to fill immediately for the entire order quantity, then cancel if the order was unable to be filled.
Available options:
TIME_IN_FORCE_UNDEFINED,
TIME_IN_FORCE_DAY,
TIME_IN_FORCE_GOOD_TILL_CANCEL,
TIME_IN_FORCE_IMMEDIATE_OR_CANCEL,
TIME_IN_FORCE_GOOD_TILL_TIME,
TIME_IN_FORCE_FILL_OR_KILL

Response

A successful response.

The response is of type object.