Skip to main content
POST
Build a signable open intent targeting a fixed base-asset exposure

Body

application/json
trader
string
required

The trader (position owner). USDC collateral is pulled from and paid out to this address.

side
enum<string>
required

Position direction: long or short.

Available options:
long,
short
collateralUsdc
required

Collateral (margin) in USDC, human units — e.g. 100 = 100 USDC. Position size = collateral × leverage.

leverage
required

Leverage as a plain multiplier (10 = 10x).

coinExposure
required

Position exposure in base-asset units (e.g. 0.5 = 0.5 ETH on ETH/USD).

pairIndex
integer

Pair index (alternative to pair).

Required range: x >= 0
pair
string

Pair symbol, e.g. ETH/USD (separators /, -, _ accepted; case-insensitive).

Minimum string length: 1
nonce

Replay-protection nonce (uint256; unordered Permit2-style bitmap, not sequential). A random one is generated when omitted — only pass a value to pre-reserve or deterministically retry an intent. Check availability via GET /v2/nonce.

deadlineMs

Intent expiry as a unix timestamp in MILLISECONDS (not seconds). Defaults to now + the service value shown in /v2/meta → defaults.intentDeadlineMs.

orderType
enum<string>
default:market

Open order type: market (immediate), limit / stop_limit (queued at openPrice), or market_pnl (zero-fee, profit-share on close).

Available options:
market,
stop_limit,
limit,
market_pnl,
market_zero_fee
slippagePercent
default:1

Max slippage in percent (1 = 1%).

openPrice

Entry price in USD. Market orders: optional override, resolved from the live price feed when omitted. Limit / stop-limit orders: the trigger price (required).

takeProfit

Take-profit price in USD. 0 or omitted = no take-profit (0 also removes an existing one on updates).

stopLoss

Stop-loss price in USD. 0 or omitted = no stop-loss (0 also removes an existing one on updates).

minLeverage

Lowest fill leverage you accept; defaults to the pair minimum.

maxLeverage

Highest fill leverage you accept; defaults to the pair maximum.

skipValidation
default:false

Skip server-side pre-trade validation (listing, min position, leverage bounds, liquidity, market hours) and just encode the call. The chain still enforces all limits.

Response

Success envelope: ok is true and data carries the payload documented below.

ok
enum<boolean>
required

Always true on success.

Available options:
true
data
object
required

A ready-to-sign EIP-712 payload. Sign {domain, types, primaryType, message} with signTypedData (trader or a registered delegate, per signerRule) and hand the 65-byte r||s||v signature to the Avantis service that executes this intent kind.