Request Body
Your EOA wallet address. The Safe trading address is derived automatically and returned in safeAddress.
Signer address. For Safe wallets (signatureType 2), this is your EOA address. Defaults to maker if not provided.
The outcome token ID to trade.
Order price (must be greater than 0 and at most 1).
Number of tokens to buy or sell. Must be positive.
Set to true for neg-risk (multi-outcome) markets.
Fee rate in basis points (0 = no fee).
Order nonce for replay protection.
Expiration timestamp in seconds. 0 means no expiration.
Tick size for rounding. If omitted, uses market default.
Signature type. Use 0 for EOA signatures, 2 for EIP-1271 (Safe wallet) signatures.
Response
Order typed data and metadata.
EIP-712 typed data to sign.
EIP-712 domain with exchange contract as verifying contract.
EIP-712 type definitions for Order.
Order message fields.
Random salt for uniqueness.
Taker address (zero = any).
USDC amount in 6-decimal fixed-point.
Conditional token amount in 6-decimal fixed-point.
Fee rate in basis points.
"0" for BUY, "1" for SELL.
Tick size used for this order.
Fee rate in basis points used for this order.
The Safe proxy address that will be the maker of the order.
Request processing time in milliseconds.
Usage Example
curl -X POST "https://api.mobula.io/api/2/pm/order/build" \
-H "Content-Type: application/json" \
-d '{
"maker": "0xYourWalletAddress",
"tokenId": "71321045533314185944161150504789982525459828614995786377552078351132518100924",
"side": "BUY",
"price": 0.35,
"size": 100,
"isNegRisk": false
}'
Integration Example
// 1. Build order
const buildRes = await fetch('https://api.mobula.io/api/2/pm/order/build', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
maker: walletAddress,
tokenId: outcomeTokenId,
side: 'BUY',
price: 0.35,
size: 100
})
});
const { data: { typedData } } = await buildRes.json();
// 2. Sign the order
const signature = await walletClient.signTypedData(typedData);
// 3. Submit the signed order (see Order Submit)
The makerAmount and takerAmount in the order message are computed from price and size:
- BUY:
makerAmount = price * size (USDC you pay), takerAmount = size (tokens you receive)
- SELL:
makerAmount = size (tokens you give), takerAmount = price * size (USDC you receive)
Both amounts are in 6-decimal fixed-point format (multiplied by 10^6).
Order endpoints currently support Polymarket only. The platform parameter is not required — all orders are routed to Polymarket’s CLOB on Polygon.
Available options:
BUY,
SELL