# 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).
# Pass an outcome straight from client.fetch_markets() — no UUID lookup needed.
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
)
market = client.fetch_markets({"query": "trump 2028"})[0]
yes = next(o for o in market.outcomes if o.label.lower() == "yes")
built = client.build_order(
outcome=yes,
side="buy",
type="limit",
amount=10,
price=0.55,
)
order = client.submit_order(built)
print(order.id, order.status)
{
"id": "<string>",
"status": "<string>",
"side": "buy",
"type": "market",
"amount": 123,
"price": 123,
"filled": 123,
"remaining": 123,
"fee": 123,
"timestamp": "<string>",
"tx_hash": "<string>",
"chain": "<string>",
"block_number": 123
}{
"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
Submit Order
Submit a signed order returned by buildOrderHosted and get back the resulting order — id, fill status, average price, and the on-chain tx hash once it settles.
built_order_id must come from a recent buildOrderHosted call and be submitted before its expiry. For one-shot order placement, use createOrderHosted instead.
POST
/
v0
/
trade
/
submit-order
# 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).
# Pass an outcome straight from client.fetch_markets() — no UUID lookup needed.
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
)
market = client.fetch_markets({"query": "trump 2028"})[0]
yes = next(o for o in market.outcomes if o.label.lower() == "yes")
built = client.build_order(
outcome=yes,
side="buy",
type="limit",
amount=10,
price=0.55,
)
order = client.submit_order(built)
print(order.id, order.status)
{
"id": "<string>",
"status": "<string>",
"side": "buy",
"type": "market",
"amount": 123,
"price": 123,
"filled": 123,
"remaining": 123,
"fee": 123,
"timestamp": "<string>",
"tx_hash": "<string>",
"chain": "<string>",
"block_number": 123
}{
"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
Hosted submit-order request. signature is the local EIP-712 signature over BuildOrderHostedResponse.typed_data.
Response
Order accepted by the hosted backend.
Hosted-mode Order shape. Mirrors pmxt.Order so the SDK can return it directly. tx_hash, chain, and block_number populate once execution settles on-chain.
Was this page helpful?

