Alpha — This endpoint is part of the Prediction Markets API, currently in early access. May change without notice.
Request Body
The wallet address (EOA) that will send the deposit.
Amount of USDC to deposit. Must be positive.
Response
Transaction calldata for the deposit. The USDC contract address on Polygon.
Encoded transfer(safeAddress, amount) calldata (0x-prefixed hex).
Chain ID (137 for Polygon).
The Safe trading account that will receive the USDC.
Request processing time in milliseconds.
Usage Example
curl -X POST "https://api.mobula.io/api/2/pm/deposit/build" \
-H "Content-Type: application/json" \
-d '{ "address": "0xYourWalletAddress", "amount": 100 }'
Integration Example
// Build deposit transaction
const res = await fetch ( 'https://api.mobula.io/api/2/pm/deposit/build' , {
method: 'POST' ,
headers: { 'Content-Type' : 'application/json' },
body: JSON . stringify ({ address: walletAddress , amount: 100 })
});
const { data : depositTx } = await res . json ();
// Send the deposit on-chain (Polygon)
await walletClient . sendTransaction ({
to: depositTx . to ,
data: depositTx . calldata ,
chain: polygon
});
This builds a simple USDC transfer() from the EOA to the Safe. The user must have sufficient USDC balance in their wallet. The Safe address is deterministically derived from the EOA address.