Execute market orders

Execute a "marketable limit order" against the orderbook with built-in slippage protection.

Key Features:

  • Slippage Protection: Requires limit_price to prevent execution at unfavorable prices
  • Immediate Execution: Fills immediately against available liquidity (IOC/FOK)
  • Multi-Asset: Supports both options and perpetual futures

Unlike traditional market orders, Kyan's market orders won't execute beyond your limit_price, protecting you from excessive slippage during volatile conditions.

Important Constraints:

  • Price Increment: The limit_price must be divisible by the minimum price increment for the base asset (see GET /api/v1/exchange_infoorderConstraints.priceIncrements)
  • Size Increment: Order size in contracts (canonical for both options and perpetuals; or the legacy amount for perpetuals) must be divisible by the size increment (see GET /api/v1/exchange_infoorderConstraints.options.sizeIncrements or orderConstraints.perpetuals.sizeIncrements)
  • Order size: Both options and perpetual orders use contracts (base contracts) as the canonical size field; for perpetuals the legacy amount field (USD notional) is still accepted for backward compatibility (supply exactly one of contracts or amount). The notional amount model is deprecated and will be removed in a future release — migrate to contracts
  • Minimum Size: Order size must meet the per-asset minimum. Perpetual minimum size equals the size increment, in base contracts: BTC 0.0001, ETH 0.001, ARB 1
  • Max Slippage: Order will be rejected if limit_price exceeds the maximum allowed slippage from fair value

Authentication Options:

  • Signature: Include signature and signature_deadline fields in the request
  • One-click session: Include x-one-click header with session hash (no signature needed)

When using one-click sessions, the signature fields can be omitted from the request.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Market Order Trade Request

Executes "marketable limit orders" with slippage protection. Unlike traditional market orders
that execute at any price, Kyan's market orders include a limit_price for safety.

This prevents execution at unfavorable prices during volatile market conditions or low liquidity.
Supports both options and perpetual futures trading.

Example Option Trade:

{
  "market_order": {
    "instrument_name": "BTC_USDC-31OCT25-130000-C",
    "contracts": 1.5,
    "direction": "buy"
  },
  "limit_price": 300,
  "type": "fill_or_kill",
  "taker": "0xf1808cc5298036762329b56b261246c0b77EBb18",
  "signature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",
  "signature_deadline": 1735689600
}

Example Perpetual Trade:

{
  "market_order": {
    "instrument_name": "BTC_USDC-PERPETUAL",
    "contracts": 0.02,
    "direction": "buy"
  },
  "limit_price": 50000,
  "type": "immediate_or_cancel",
  "taker": "0xf1808cc5298036762329b56b261246c0b77EBb18",
  "signature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",
  "signature_deadline": 1735689600
}

market_order
required

Market order details for either options or perpetuals

double
required

Slippage protection price for market orders

This acts as a safety mechanism to prevent execution at unfavorable prices:

  • For BUY orders: Maximum price you're willing to pay
  • For SELL orders: Minimum price you're willing to accept

Market orders will only fill against orderbook levels that meet this price requirement, protecting you from excessive slippage during volatile conditions or low liquidity.

string
enum
required

Order type

Allowed:
string
required
^0x[a-fA-F0-9]{40}$

Ethereum address in hexadecimal format

string
^0x[a-fA-F0-9]{130}$

EIP-712 signature for the trade request. This signature is generated by
signing a structured hash of the trade parameters according to the EIP-712 standard.

int64
1704067200 to 2019686400

Signature deadline in Unix seconds

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json