Submit a new market order or limit order for execution.
Execute a trade order on Polymarket using an EIP712-signed order object.Documentation Index
Fetch the complete documentation index at: https://docs.aionmarket.com/llms.txt
Use this file to discover all available pages before exploring further.
FAK / FOK), Polymarket enforces precision constraints:
makerAmount supports max 2 decimalstakerAmount supports max 4 decimalsmakerAmount % 10000 == 0takerAmount % 100 == 0POST /agents/registerPOST /wallet/credentialsGET /markets/context/:marketId (recommended)| Field | Type | Required | Description |
|---|---|---|---|
venue | string | No | Defaults to polymarket |
marketConditionId | string | Yes | Condition identifier |
marketQuestion | string | Yes | Market question |
outcome | string | Yes | YES or NO |
orderSize | number | Yes | Requested contracts |
price | number | Yes | Price per contract |
isLimitOrder | boolean | No | Limit or market mode |
orderType | string | No | GTC, FOK, GTD, FAK (default: GTC for limit, FAK for market) |
walletAddress | string | No | Wallet address |
orderVersion | integer | No | 1=legacy V1, 2=Polymarket V2; auto-inferred if omitted |
order | object | Yes | Signed EIP712 order payload |
reasoning | string | No | Trade explanation |
source | string | No | Strategy source tag |
skillSlug | string | No | Skill identifier for attribution |
expirationTime | number | No | Limit order expiration (milliseconds) |
tickSize | string | No | V2 tick size: 0.1, 0.01, 0.001, 0.0001 |
negRisk | boolean | No | V2 market context flag |
funderAddress | string | No | V2 funder address |
postOnly | boolean | No | Post-only order flag |
deferExec | boolean | No | Defer execution flag |
owner | string | No | Polymarket owner (default uses wallet credential apiKey) |
feeAmount | number | No | Market order fee (isLimitOrder=false only) |
order:
| Field | Type | Required | Description |
|---|---|---|---|
| maker | string | Yes | Maker wallet address |
| signer | string | Yes | Signing wallet address |
| taker | string | Yes | Taker address, usually zero address for open orders |
| tokenId | string | Yes | Polymarket CLOB token ID |
| makerAmount | string | Yes | Maker amount in 6-decimal integer precision |
| takerAmount | string | Yes | Taker amount in 6-decimal integer precision |
| side | string | Yes | BUY or SELL |
| expiration | string | Yes | Expiration timestamp in seconds |
| nonce | string | Yes (V1 only) | Unique nonce |
| feeRateBps | string | Yes (V1 only) | Fee rate in basis points |
| signature | string | Yes | EIP712 signature |
| salt | number | Yes | Random salt |
| signatureType | integer | Yes | 0=EOA, 1=PolymarketProxy, 2=GnosisSafe, 3=POLY_1271 |
| timestamp | string | Yes (V2 only) | Unix timestamp in milliseconds |
| metadata | string | Yes (V2 only) | V2 metadata (bytes32 hex) |
| builder | string | Yes (V2 only) | V2 builder (bytes32 hex) |
| Code | Meaning |
|---|---|
400 | Invalid payload, bad market/outcome, or invalid order object |
401 | Invalid API key |
429 | Rate limited |
500 | Server-side failure |
success to determine downstream execution result)GET /markets/context/:marketId - Pre-trade risk analysisGET /markets/orders/open - Monitor pending ordersPOST /markets/orders/cancel - Cancel unfilled ordersGET /agents/me - Check daily trade quota usedPOST /markets/redeem - Claim rewards on settled marketsBearer authentication header of the form Bearer <token>, where <token> is your auth token.
Market conditionId (persisted to mk_order)
"0xf64f880b571d7a70d858649d30f0843aa57307e304aeb617349df74ce34d044e"
Market question (persisted to mk_order)
250"Will Crude Oil (CL) hit (HIGH) $120 by end of March?"
Outcome direction
YES, NO Order size (contracts), persisted to mk_order.orderSize
1
Order price per contract, persisted to mk_order.price
0.54
Trading venue (default polymarket)
50true=createOrder (limit); false=createMarketOrder (market)
Order type (default GTC for limit, FAK for market)
GTC, FOK, GTD, FAK Wallet address (optional; falls back to order.signer)
^0x[a-fA-F0-9]{40}$Polymarket owner (optional, defaults to apiKey from credentials)
128Defer execution flag
Order version: 1=legacy V1, 2=Polymarket V2 (auto-inferred when omitted)
1, 2 V2 tickSize hint
0.1, 0.01, 0.001, 0.0001 V2 negRisk flag
V2 funder address (optional)
^0x[a-fA-F0-9]{40}$Post-only flag
Market-order fee (only when isLimitOrder=false)
Trade reasoning text (max 1000 chars)
1000Source tag (suggested format sdk:strategy-name)
100Skill identifier for attribution
100Limit order expiration in milliseconds (mk_order.expirationTime)