> ## Documentation Index
> Fetch the complete documentation index at: https://docs.swaps.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Place Order (Chain Abstracted)

> Place a Polymarket order with a single getAction call — any token, any chain, straight from the user's existing wallet.

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`](/swap-api-reference/get-action) 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](/swap-api-reference/get-action).

## Prerequisites

* A `userId` for the trader's EOA. Call
  [`POST /createOrFetchPolymarketUser`](/prediction-market-reference/create-or-fetch-user)
  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](/prediction-market-reference/search-markets) 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:

| Parameter       | Required | Description                                                             |
| --------------- | -------- | ----------------------------------------------------------------------- |
| `actionType`    | Yes      | Must be `polymarket`.                                                   |
| `userId`        | Yes      | Polymarket user ID returned by `createOrFetchPolymarketUser`.           |
| `side`          | Yes      | `BUY` or `SELL`.                                                        |
| `tokenID`       | Yes      | Polymarket CLOB token ID of the outcome to trade.                       |
| `orderType`     | Yes      | `FOK` (Fill-Or-Kill) or `FAK` (Fill-And-Kill) — market orders.          |
| `tickSize`      | Yes      | Price tick size from the market details (`0.01`, `0.001`, or `0.0001`). |
| `negRisk`       | Yes      | Negative-risk flag from the market details (`true` or `false`).         |
| `amount`        | Yes      | Exact-in amount of the source token (base units).                       |
| `swapDirection` | No       | Defaults to `exact-amount-in` (recommended).                            |
| `recipient`     | Yes      | The user's deposit (proxy) wallet address.                              |

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

```bash theme={null}
curl "https://api-v2.swaps.xyz/api/getAction?\
actionType=polymarket&\
sender=0xB9519a08267d7B259eCA6DbD8F7286B1f176A41f&\
srcChainId=8453&\
srcToken=0x0000000000000000000000000000000000000000&\
dstChainId=137&\
dstToken=0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB&\
amount=10000000000000000&\
swapDirection=exact-amount-in&\
slippage=100&\
recipient=0x0797bfec6d2d4f733d461bbee8125805e9e9c892&\
userId=0x0797bfec6d2d4f733d461bbee8125805e9e9c892&\
side=BUY&\
tokenID=90234889617199443673709150877675264662915065327694355570468014972602766235849&\
orderType=FOK&\
tickSize=0.01&\
negRisk=true" \
  -H "x-api-key: $API_KEY"
```

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`](/swap-api-reference/get-action): 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`](/prediction-market-reference/get-workflow-status)
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](/prediction-market-reference/integration-patterns) for
a comparison with the direct (three-step) flow, which offers more control in
exchange for explicit funding and EIP-712 signing.
