Skip to main content
POST
Trade
Multi-outcome markets (e.g., “Who will win the election?”) use a different contract type on Polymarket. This is auto-detected and handled server-side — no extra parameters needed.
Before selling, verify:
  1. Market is active — resolved markets cannot be sold, use /redeem instead
  2. Shares >= 5 — Polymarket minimum per sell order
  3. Position exists on-chain — call GET /positions fresh before selling
  4. Use shares (not amount) for sells
The source tag groups trades for P&L tracking and prevents accidental re-buys on markets you already hold. Use a consistent prefix like sdk:strategy-name.

Body

application/json

Request to execute a trade via SDK.

market_id
string
required
side
enum<string>
required
Available options:
yes,
no
amount
number
default:0
shares
number
default:0
action
enum<string>
default:buy
Available options:
buy,
sell
venue
enum<string>
default:sim
Available options:
sim,
simmer,
sandbox,
polymarket,
kalshi
order_type
enum<string> | null
Available options:
GTC,
GTD,
FOK,
FAK
execute
boolean
default:false
deprecated

DEPRECATED. Legacy flag that returns Polymarket order params for client-side CLOB submission instead of executing the trade. YES side only — NO is not supported. Does not write to sim_trades and is incompatible with venue='sim'. Use venue='polymarket' for server-side execution (handles both managed and external wallets) or venue='sim' for sandbox trades.

reasoning
string | null
source
string | null
skill_slug
string | null
signal_data
Signal Data · object | null
dry_run
boolean
default:false
price
number | null
synthetic
boolean
default:false
signed_order
SignedPolymarketOrder · object | null

Pre-signed Polymarket order from external wallet (client-side signing).

Supports both V1 and V2 order shapes via optional fields. The frontend populates V1-or-V2 depending on its VITE_POLYMARKET_V2_ENABLED flag; the /polymarket/place-order-external handler routes based on exchange_version hint on the parent ExternalWalletOrderRequest (or infers from which fields are present).

V1 uses: taker, expiration, nonce, feeRateBps (in signed hash) V2 uses: timestamp, metadata, builder (in signed hash); expiration retained in HTTP body at "0" (out of signed hash)

which_side_to_close
enum<string> | null
Available options:
yes,
no
wallet_address
string | null

Response

Successful Response