Get perp quote
Execution
Get Perp Quote
Get a non-binding quote for opening a perpetual position on a supported DEX (Gains Network, Lighter). Quotes do not authenticate the caller and are not used by the execution flow; they are purely informational and exposed to help clients pick a DEX, price, or slippage before building a real payload.
POST
Get perp quote
Quotes are informational only. Execution uses the
/2/perp/payloads/<action> → /2/perp/execute-v2 flow. Use the quote endpoint to preview fills, fees, and which DEX would route best; then call /2/perp/payloads/create-order to build the actual signed payload you submit.Request Body
string
required
Wallet address of the trader. Used to scope the quote (e.g., Lighter account lookup).
Quote is unauthenticated. Unlike the payload endpoints,
/2/perp/quote does not take a signature field — only user is required. The quote endpoint is purely informational; nothing is signed or executed.string
required
Base token address, symbol, or Mobula asset id (e.g.,
ETH, 0x...).string
required
Quote token of the market. Semantics differ per DEX:
- Lighter — pass the ERC-20 collateral symbol (
USDC). - Gains — pass the synthetic quote (
USD).
marketId (e.g. gains-btc-usd, lighter-btc-usd) — the field is derived server-side from the market.number
required
Leverage multiplier (e.g.,
10 for 10x).boolean
required
true for long, false for short. String form ("true"/"false") is also accepted.boolean
required
true if the order should only reduce an existing position (never increase exposure).number
required
Collateral to commit, denominated in the
quote token units (e.g., 100 USDC).string
One of
market, limit, stop_limit. Default market.number
Trigger/limit price. Required for
limit and stop_limit.number
Take-profit price. Must be directionally valid (above open for long, below for short).
number
Stop-loss price. Must be directionally valid (below open for long, above for short).
number
Raw position size in base-token units. If omitted, derived from
collateralAmount * leverage.number
Max slippage in percent (e.g.,
0.5 = 0.5%).string[]
Routing hint, not a strict filter. If the matching market is not deployed on any of the requested chains, the router falls back to a chain that hosts it (e.g.
chainIds: ['evm:42161'] for a Base-only market silently returns chainId: 'evm:8453'). Always trust the response chainId. Omit to search all supported chains.string[]
Restrict routing to specific DEXs. Values:
gains, lighter. Omit to consider all.number
0 = cross, 1 = isolated. DEX-specific; ignored when not applicable.string
Referrer wallet address for fee sharing.
Response
object
Errors
The
errors field lists per-DEX failures, formatted as "<dex> - <error>".Body
application/json
Wallet address of the trader. Used to scope the quote (e.g., Lighter account lookup).
Base token address, symbol, or Mobula asset id.
Quote/collateral token (typically USDC).
Available options:
market, limit, stop_limit Available options:
gains, lighter