GuidesBuild schemas by venue
Echoed build results
Polymarket, Opinion, and Predict.fun may echo their venue SDK build result at the top level or
nested under buildResult. The server validates the venue-specific shape, re-derives the EIP-712
structHash, and stores only the clean subset needed for submission.
| Field | Venue scope | Type |
|---|---|---|
order.salt | all three | uint256 decimal string |
order.maker / signer | all three | EVM address |
order.tokenId | all three | uint256 decimal string |
order.makerAmount / takerAmount | all three | uint256 decimal string (atomic) |
order.expiration | all three | uint256 decimal string |
order.side | all three | venue BUY/SELL form |
order.signatureType | all three | see per-venue rules below |
order.timestamp | Polymarket V2 only | uint256 Unix milliseconds |
order.metadata / builder | Polymarket V2 only | bytes32 hex |
order.taker / nonce / feeRateBps | Opinion and Predict.fun only | venue V1 fields; rejected for Polymarket V2 |
domain | all three | { name, version, chainId, verifyingContract } |
structHash | all three | 32-byte hex digest |
exchangeAddress / currencyAddress | all three | EVM addresses |
currencyDecimal is shape-validated (integer 0–36) but is never the notional divisor. The
divisor is server-derived — from the signed V2 verifyingContract on Polymarket, from the pinned
collateral on Opinion and Predict.fun — because a client-declared decimals value is not part of the
signed order and could otherwise be inflated to evade spend caps.
Polymarket V2 (Polygon, chain 137) additionally requires:
order.signatureTypemust be'0'(EOA). A Proxy or Safe order is rejected:polymarket signatureType must be EOA (0) — only client-signed EOA orders are accepted (no Proxy/Safe).makermust equalsigner; V2 has no signedtakerfield.- The domain version must be
2, and the complete 11-field V2 signed order is required. Supplying V1-onlytaker,nonce, orfeeRateBpsis rejected. orderType: one ofGTC,GTD,FOK,FAK—orderType must be one of GTC|GTD|FOK|FAK.currencyAddressmust be pUSD-Polygon; other collateral is rejected.order.saltmust stay within the safe-integer range (the relay serializes it as a number, so a larger salt would no longer be byte-exact to what you signed).- Supply a
conditionId(or catalog market context) so the lane can bind live market fee and token-level NegRisk truth. Optional compatibility metadata includescategoryandmarketId. - Collateral is 6 decimals, not 18 — notional is
makerAmount / 1e6.
Opinion (BSC) differs on three points:
order.signatureTypemay be'0'(EOA) or'2'(Safe). A Safe order wheremakerdiffers fromsignermust use'2'; that is enforced at submit.order.takerdefaults to the zero address when omitted.currencyDecimalis required here, andmarketId(integer),orderType(integer), andprice(non-empty string) are required.postOnlyis an optional boolean —postOnly must be a boolean when provided. A collateral whose decimals are not armed in this deployment is rejected with a message beginningunsupported opinion collateral currency — its decimals are not armed.
Predict.fun (BNB Chain, chain 56) differs again:
- EOA only, same invariant as Polymarket with the message
…(no Safe/proxy). strategyis required:strategy must be 'MARKET' or 'LIMIT'.pricePerShareis required as auint256decimal string.- Optional controls, each type-checked exactly:
slippageBps(a uint decimal string, not a number),isFillOrKill,isPostOnly,isMinAmountOut(booleans),reservedBalancePolicy(REJECT_MARKET_ORDER|SKIP_RESERVED_BALANCE_CHECKS), andselfTradePrevention(CANCEL_MAKER|CANCEL_TAKER|CANCEL_BOTH). - Collateral is pinned to USDT-BSC at 18 decimals, not 6.