Request Body
The wallet address that will approve tokens.
Reserved. Currently ignored; both standard and neg-risk exchange approvals are always returned.
Response
Array of transaction calldata objects to send on-chain. Show Approval Transaction
Contract address to call.
Encoded function call data (0x-prefixed hex).
Chain ID (137 for Polygon).
Request processing time in milliseconds.
Transactions Returned
Always returns 4 approval transactions (both standard and neg-risk exchange contracts).
USDC.approve() for the CTF Exchange contract
ConditionalTokens.setApprovalForAll() for the CTF Exchange contract
USDC.approve() for the Neg-Risk CTF Exchange contract
ConditionalTokens.setApprovalForAll() for the Neg-Risk CTF Exchange contract
Usage Example
curl -X POST "https://api.mobula.io/api/2/pm/approval/build" \
-H "Content-Type: application/json" \
-d '{ "address": "0xYourWalletAddress" }'
Integration Example
// Build approval transactions
const res = await fetch ( 'https://api.mobula.io/api/2/pm/approval/build' , {
method: 'POST' ,
headers: { 'Content-Type' : 'application/json' },
body: JSON . stringify ({ address: walletAddress })
});
const { data : approvals } = await res . json ();
// Send each approval transaction on-chain (Polygon)
for ( const tx of approvals ) {
await walletClient . sendTransaction ({
to: tx . to ,
data: tx . calldata ,
chain: polygon
});
}
The approval transaction is sent by the EOA (not the Safe). The EOA approves the exchange contracts to transfer USDC and conditional tokens on behalf of the Safe.
Approvals only need to be done once per wallet. After approval, you can place unlimited orders without re-approving.