Skip to main content
The chain-abstracted flow lets users transact on Polymarket with any token on any chain, directly from the wallet they already have — no Polymarket trading account to set up and no pUSD to acquire. One call to GET /getAction with actionType=polymarket returns a transaction that swaps the user’s token into Polymarket collateral and places the order once funds arrive. No separate funding step and no EIP-712 signature are required. This page documents the polymarket variant of getAction. The canonical endpoint reference — including all base parameters and the full response schema — lives in the Swap API Reference.

Prerequisites

  • A userId for the trader’s EOA. Call POST /createOrFetchPolymarketUser once from your app: it returns the userId and a deposit (proxy) wallet keyed to the user’s EOA, which you pass as recipient. This is a single API call your app makes behind the scenes — the user never signs up for anything.
  • A market to trade. Use the market discovery endpoints to find the CLOB tokenID, tickSize, and negRisk for the outcome you want.

Request

GET /getAction with the standard base parameters (sender, srcChainId, srcToken, dstChainId, dstToken, slippage) plus: The source token can be any token on any supported chain — Swaps routes it into Polymarket collateral on Polygon as part of the action.

Example

This example spends 0.01 ETH on Base to buy an outcome token; the destination is Polymarket collateral on Polygon (137) delivered to the user’s deposit wallet.

Minimum order size

For BUY orders (FOK/FAK), the collateral amount that would arrive after the swap (amountOutMin) is validated before a transaction is returned:
  1. Orders below $1 are always rejected.
  2. The amount must also clear the market’s own minimum order size on the Polymarket CLOB.
Requests that fail validation return a getAction error response indicating the amount is too low, the market is unavailable, or the price moved out of range — raise the input amount or refresh the quote and retry.

Response and tracking

The response is a standard getAction ActionResponse: a transaction to sign and broadcast, quoted amounts, and a txId. After the user broadcasts the transaction, Swaps completes the swap, delivers collateral to the deposit wallet, and places the order on the CLOB. Track end-to-end progress with GET /workflows/getStatus using the txId.

When to use this pattern

Use the chain-abstracted flow whenever the user’s funds start outside the deposit wallet — it turns “hold ETH on Base, bet on Polymarket” into one signature. See Integration Patterns for a comparison with the direct (three-step) flow, which offers more control in exchange for explicit funding and EIP-712 signing.