curl --request POST \
--url https://api.simmer.markets/api/sdk/trade \
--header 'Content-Type: application/json' \
--data '
{
"market_id": "<string>",
"amount": 0,
"shares": 0,
"action": "buy",
"venue": "sim",
"execute": false,
"reasoning": "<string>",
"source": "<string>",
"skill_slug": "<string>",
"signal_data": {},
"dry_run": false,
"price": 123,
"signed_order": {
"salt": "<string>",
"maker": "<string>",
"signer": "<string>",
"tokenId": "<string>",
"makerAmount": "<string>",
"takerAmount": "<string>",
"side": "<string>",
"signatureType": 123,
"signature": "<string>",
"taker": "<string>",
"nonce": "<string>",
"feeRateBps": "<string>",
"timestamp": "<string>",
"metadata": "<string>",
"builder": "<string>",
"expiration": "<string>"
},
"wallet_address": "<string>"
}
'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Trade
Execute a trade via SDK.
Venues:
- venue=“sim” (default): Execute on Simmer’s LMSR market with $SIM
- venue=“polymarket”: Execute real trade on Polymarket via Dome API (requires wallet setup with allowances)
- venue=“kalshi”: Execute real trade on Kalshi via DFlow (requires Solana wallet setup with SOL + USDC)
Options:
- dry_run=True: Validate and calculate without executing. Returns the exact shares, projected price, and cost the live path would settle for. Supported on all venues: polymarket, kalshi, and sim (LMSR — closed-form cost-inversion guarantees dry_run.cost == live.cost within float precision). Useful for sizing budgets without committing the trade.
Deprecated: venue=“sandbox”/“simmer” are deprecated, use venue=“sim” instead.
Requires API key in Authorization header (rate limited: 120/minute).
curl --request POST \
--url https://api.simmer.markets/api/sdk/trade \
--header 'Content-Type: application/json' \
--data '
{
"market_id": "<string>",
"amount": 0,
"shares": 0,
"action": "buy",
"venue": "sim",
"execute": false,
"reasoning": "<string>",
"source": "<string>",
"skill_slug": "<string>",
"signal_data": {},
"dry_run": false,
"price": 123,
"signed_order": {
"salt": "<string>",
"maker": "<string>",
"signer": "<string>",
"tokenId": "<string>",
"makerAmount": "<string>",
"takerAmount": "<string>",
"side": "<string>",
"signatureType": 123,
"signature": "<string>",
"taker": "<string>",
"nonce": "<string>",
"feeRateBps": "<string>",
"timestamp": "<string>",
"metadata": "<string>",
"builder": "<string>",
"expiration": "<string>"
},
"wallet_address": "<string>"
}
'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}- Market is active — resolved markets cannot be sold, use
/redeeminstead - Shares >= 5 — Polymarket minimum per sell order
- Position exists on-chain — call
GET /positionsfresh before selling - Use
shares(notamount) for sells
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
Request to execute a trade via SDK.
yes, no buy, sell sim, simmer, sandbox, polymarket, kalshi GTC, GTD, FOK, FAK 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.
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)
Show child attributes
Show child attributes
yes, no Response
Successful Response
