Skip to main content
POST
Plan best order split

Body

application/json

Request for liquidity distribution

tokens
Tokens · object
required

Token identifiers for the same outcome across platforms. Supported keys: polymarket, opinion, probable, predictfun, limitless. Recommended format is object with token_id (and market_id where applicable).

Example:
direction
string
required

Trade direction: buy or sell.

Example:

"buy"

amount_usd
number | null

Order size in USD. Provide either amount_usd or amount_tokens.

Required range: x > 0
Example:

100

amount_tokens
number | null

Order size in tokens. Provide either amount_usd or amount_tokens.

Required range: x > 0
Example:

250

include_fees
boolean
default:true

Include platform fees in price calculation.

enforce_min_orders
boolean
default:true

Apply platform minimum order constraints.

optimize_gas
boolean
default:false

Prefer fewer sources when estimating execution.

gas_cost_per_source
number
default:5

Estimated gas cost per additional source in USD.

Response

Optimal distribution calculated

Response with optimal liquidity distribution

combined
PlatformDistribution · object
required

Distribution for a single platform

platforms
Platforms · object
required
distributions
PlatformDistribution · object[]
required
avg_price
number
required
orderbook
Orderbook · object | null
error
string | null