# Current hosted venues are funded once on Polygon — see /guides/escrow-lifecycle.
# Hosted writes need: pmxt_api_key + wallet_address + private_key (signs EIP-712 locally).
import pmxt
client = pmxt.Polymarket(
pmxt_api_key="YOUR_PMXT_API_KEY",
wallet_address="0xYourWallet", # EVM address — its Polygon USDC funds the escrow
private_key="0x...", # any EVM key controlling that address
)
cancelled = client.cancel_order("order_abc123")
print(cancelled.id, cancelled.status){
"cancel_id": "<string>",
"typed_data": {},
"deadline": 123,
"pull_typed_data": {}
}{
"error": {
"message": "<string>",
"code": "HOSTED_TRADING_ERROR",
"retryable": true,
"exchange": "<string>",
"detail": {}
}
}{
"error": {
"message": "<string>",
"code": "HOSTED_TRADING_ERROR",
"retryable": true,
"exchange": "<string>",
"detail": {}
}
}{
"error": {
"message": "<string>",
"code": "HOSTED_TRADING_ERROR",
"retryable": true,
"exchange": "<string>",
"detail": {}
}
}Trading
Cancel Order
Start a cancel on an existing open order. Returns the cancel payload for the wallet to sign — you then submit the signature to POST /v0/orders/cancel.
The SDK’s cancelOrder() chains both steps. Call this endpoint directly only if you need to show the cancel to a user before signing.
POST
/
v0
/
orders
/
cancel
/
build
# Current hosted venues are funded once on Polygon — see /guides/escrow-lifecycle.
# Hosted writes need: pmxt_api_key + wallet_address + private_key (signs EIP-712 locally).
import pmxt
client = pmxt.Polymarket(
pmxt_api_key="YOUR_PMXT_API_KEY",
wallet_address="0xYourWallet", # EVM address — its Polygon USDC funds the escrow
private_key="0x...", # any EVM key controlling that address
)
cancelled = client.cancel_order("order_abc123")
print(cancelled.id, cancelled.status){
"cancel_id": "<string>",
"typed_data": {},
"deadline": 123,
"pull_typed_data": {}
}{
"error": {
"message": "<string>",
"code": "HOSTED_TRADING_ERROR",
"retryable": true,
"exchange": "<string>",
"detail": {}
}
}{
"error": {
"message": "<string>",
"code": "HOSTED_TRADING_ERROR",
"retryable": true,
"exchange": "<string>",
"detail": {}
}
}{
"error": {
"message": "<string>",
"code": "HOSTED_TRADING_ERROR",
"retryable": true,
"exchange": "<string>",
"detail": {}
}
}Authorizations
Body
application/json
Response
Cancel build response.
Was this page helpful?

