Skip to main content
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).
When unsure, pass 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
user
string
required

Wallet address of the trader. Used to scope the quote (e.g., Lighter account lookup).

baseToken
string
required

Base token address, symbol, or Mobula asset id.

quote
string
required

Quote/collateral token (typically USDC).

leverage
number
required
long
required
reduceOnly
boolean
required
collateralAmount
number
required
orderType
enum<string>
Available options:
market,
limit,
stop_limit
openPrice
number
tp
number
sl
number
amountRaw
number
maxSlippageP
number
chainIds
string[]
dexes
enum<string>[]
Available options:
gains,
lighter
marginMode
number
referrer
string

Response

200 - application/json

Perp quote response

success
boolean
required
data
object
required