Pattern 1 — Chain abstracted (one call)
OnegetAction request with actionType=polymarket swaps any token on any
chain into collateral and places the order when funds arrive. The only setup
is a one-time createOrFetchPolymarketUser call your app makes behind the
scenes to provision the user’s deposit wallet. Full parameter reference:
Place Order (Chain Abstracted).
Pattern 2 — Direct (three steps)
The direct flow separates account setup, funding, and ordering. Once the deposit wallet is funded, orders execute immediately against the CLOB with no swap in the critical path.Step 1 — Deploy the deposit wallet
CallPOST /createOrFetchPolymarketUser
with the user’s evmEoa. It returns the userId and a deposit (proxy) wallet
keyed to that EOA, deploying one if it doesn’t exist yet.
Check proxyWalletStatus before trading:
Step 2 — Fund the deposit wallet
Fund the wallet with Polymarket collateral — pUSD on Polygon (0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB, chain 137). From any other
token or chain, use a standard getAction swap
with the deposit wallet as the recipient:
Step 3 — Place the order
CallPOST /placeOrder with the
order details and an EIP-712 signatureByEvmEoa produced by the user’s EOA —
Swaps verifies the signature and relays the order to the Polymarket CLOB. See
the Polymarket Signing Guide
for the typed-data schema and a working example.
After the order
Both patterns converge on the same lifecycle: track execution withGET /workflows/getStatus,
then manage positions with sell, redeem, merge, and withdraw. See the
Transaction Lifecycle
for the end-to-end walkthrough.