Skip to main content
Price orders execute a swap when a token’s USD price crosses a threshold: limit orders, take-profit, and stop-loss. This page covers the create call and its order types. The vault and deposit setup is shared with DCA: the example below includes it inline, and Vault & Deposit is the full reference.
For a working reference of the full order creation flow, see how jup.ag handles it. The frontend implements the same API with validation, error handling, and UX patterns you can use as a guide.

Order types

Set orderType on the create call to choose the variant.
On the create call, orderType is the variant (single, oco, otoco). That is different from the deposit’s orderType (price or dca). Craft the deposit with orderType: "price" and an orderSubType that matches the create orderType.

Quick start

Creating a price order is four calls: authenticate, get your vault, craft and sign the deposit, then submit the order.
Install the signing dependencies:
You also need a Jupiter API key and a funded wallet. The example below loads the wallet from BS58_PRIVATE_KEY and the key from JUPITER_API_KEY in your .env. For the browser-wallet (signMessage / signTransaction) version of authentication and signing, see Authentication and Vault & Deposit.
Never commit private keys. Use environment variables for testing and a proper key-management solution in production.
The deposit lands on-chain during the create call. The response is { id, txSignature, depositConfirmed }: id is the order identifier you use to track, update, or cancel it, txSignature is the on-chain deposit signature, and depositConfirmed is true once the deposit has landed and the order is active:
The vault address is resolved from your JWT, so you never pass it. The deposit requestId is single-use and is consumed by the create call as depositRequestId.

Other order types

The OCO and OTOCO bodies replace step 4’s create call. Each needs its deposit crafted with the matching orderSubType.

OCO (One-Cancels-Other)

An OCO order creates a take-profit and stop-loss pair sharing one deposit. When one side fills, the other cancels automatically.
The take-profit price must be greater than the stop-loss price.

OTOCO (One-Triggers-One-Cancels-Other)

An OTOCO order has a parent trigger that executes first. Once filled, it automatically activates a TP/SL pair (OCO) on the output tokens.

Trailing stop loss

A trailing stop loss is a single order that tracks the market instead of using a fixed price. Set trailingBps instead of triggerPriceUsd: the trigger follows the price in your favour and holds when the price reverses. Provide exactly one of triggerPriceUsd (static) or trailingBps (trailing). trailingBps is the trail distance in basis points, from 50 to 9000 (0.5% to 90%). triggerCondition sets the direction: At create, the API seeds the trigger from the current market price. The keeper then tracks a running watermark (the high for below, the low for above) and rewrites the trigger as the watermark moves in your favour. The trigger never moves against you. Watermark updates are batched, not per price tick. Craft the deposit with orderSubType: "single", then submit a single order with trailingBps and no triggerPriceUsd:
slippageBps is the execution buffer beneath the trigger, the same as a static order. Track the live trigger and watermark with Order History (triggerPriceUsd, trailingBps, highWatermark/lowWatermark), and change the trail distance later by updating trailingBps.
Trailing rules: provide exactly one of triggerPriceUsd or trailingBps (else 400 "exactly one of triggerPriceUsd or trailingBps must be set"); trailingBps must be 50–9000; and triggerMint must be the inputMint for below or the outputMint for above.

Order parameters reference

Common fields (all order types)

Single order fields

OCO order fields

OTOCO order fields

Default slippage

If slippage is not specified, defaults vary by order type and trigger condition: Stop-loss orders use a higher default because execution certainty is more important than price precision when cutting losses.

Validation rules

  • Minimum order size: 10 USD
  • Input and output mints must be different
  • Slippage: 0-10000 basis points
  • expiresAt is required and must be a future timestamp (milliseconds)
  • OCO/OTOCO: take-profit price must be greater than stop-loss price
  • Trailing: set exactly one of triggerPriceUsd or trailingBps; trailingBps must be 50–9000; triggerMint must be inputMint for below or outputMint for above
Unlike V1 where orders could exist indefinitely, V2 requires an expiration on every order. Adding a TTL allows the system to prune orders that are unlikely to fill, improving execution quality for active orders. For long-lived orders, use a far-future timestamp (e.g. 30 days).

Vault & Deposit

Resolve your vault and craft the deposit this call consumes.

Order History

Track order state, fills, and events.

Manage Orders

Update trigger prices or cancel and withdraw.

Create Order (API)

Full create request and response schema.