Alpha — This endpoint is part of the Prediction Markets API, currently in early access. May change without notice.
Request Body
The order object from the Order Build response’s typedData.message.
USDC amount (6-decimal fixed-point).
Token amount (6-decimal fixed-point).
Fee rate in basis points.
"0" for BUY, "1" for SELL.
The EIP-712 signature of the order.
CLOB API key (obtained from Auth Derive).
CLOB API secret (obtained from Auth Derive).
CLOB API passphrase (obtained from Auth Derive).
Order owner address. Defaults to maker if not provided.
Order type: GTC (Good Til Cancelled), GTD (Good Til Date), or FOK (Fill Or Kill).
Response
CLOB order response.
Whether the order was successfully submitted.
Order status: live, matched, or delayed.
On-chain transaction hashes (if order was matched immediately).
Request processing time in milliseconds.
Usage Example
curl -X POST "https://api.mobula.io/api/2/pm/order/submit" \
-H "Content-Type: application/json" \
-d '{
"order": {
"salt": "123456789",
"maker": "0xYourSafeAddress",
"signer": "0xYourWalletAddress",
"taker": "0x0000000000000000000000000000000000000000",
"tokenId": "71321...",
"makerAmount": "35000000",
"takerAmount": "100000000",
"expiration": "0",
"nonce": "0",
"feeRateBps": "0",
"side": "0",
"signatureType": "0"
},
"signature": "0xabc123...",
"apiKey": "your-clob-api-key",
"apiSecret": "your-clob-api-secret",
"apiPassphrase": "your-clob-passphrase",
"orderType": "GTC"
}'
Complete Trading Flow
// Prerequisites: account deployed, tokens approved, CLOB credentials obtained
// 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 order
const submitRes = await fetch('https://api.mobula.io/api/2/pm/order/submit', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
order: typedData.message,
signature,
apiKey: clobCredentials.apiKey,
apiSecret: clobCredentials.apiSecret,
apiPassphrase: clobCredentials.apiPassphrase,
orderType: 'GTC'
})
});
const result = await submitRes.json();