Skip to main content
POST
/
api
/
sdk
/
trade
Trade
curl --request POST \
  --url https://api.simmer.markets/api/sdk/trade \
  --header 'Content-Type: application/json' \
  --data '
{
  "market_id": "<string>",
  "side": "yes",
  "amount": 0,
  "shares": 0,
  "action": "buy",
  "venue": "sim",
  "order_type": "GTC",
  "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>"
  },
  "which_side_to_close": "yes",
  "wallet_address": "<string>"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.simmer.markets/llms.txt

Use this file to discover all available pages before exploring further.

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
dry_run
boolean
default:false
price
number | null
signed_order
SignedPolymarketOrder · object

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