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>",
  "dry_run": false,
  "price": 123,
  "signed_order": {
    "salt": "<string>",
    "maker": "<string>",
    "signer": "<string>",
    "taker": "<string>",
    "tokenId": "<string>",
    "makerAmount": "<string>",
    "takerAmount": "<string>",
    "expiration": "<string>",
    "nonce": "<string>",
    "feeRateBps": "<string>",
    "side": "<string>",
    "signatureType": 123,
    "signature": "<string>"
  },
  "which_side_to_close": "yes"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}
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
reasoning
string | null
source
string | null
skill_slug
string | null
dry_run
boolean
default:false
price
number | null
signed_order
SignedPolymarketOrder · object

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

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

Response

Successful Response