Skip to main content
POST
/
orders
/
limit
cURL
curl --request POST \
  --url https://lite-api.jup.ag/perps/v1/orders/limit \
  --header 'Content-Type: application/json' \
  --data '{
  "asset": "SOL",
  "includeSerializedTx": true,
  "inputToken": "USDC",
  "inputTokenAmount": "1000000000",
  "leverage": "10",
  "side": "long",
  "sizeUsdDelta": "10000000",
  "triggerPrice": "20000000",
  "walletAddress": "<string>"
}'
{
  "positionPubkey": "<string>",
  "quote": {
    "averagePriceUsd": "10000000",
    "collateralUsdDelta": "1124450000",
    "leverage": "2.99",
    "liquidationPriceUsd": "13240000",
    "openFeeUsd": "100000",
    "outstandingBorrowFeeUsd": "100000",
    "positionCollateralUsd": "100000000",
    "positionSizeUsd": "10000000",
    "priceImpactFeeBps": "100",
    "priceImpactFeeUsd": "13301",
    "side": "long",
    "sizeUsdDelta": "1124450000",
    "sizeTokenDelta": "14420000"
  },
  "serializedTxBase64": "<string>",
  "txMetadata": {
    "blockhash": "<string>",
    "lastValidBlockHeight": "<string>",
    "transactionFeeLamports": "5000",
    "accountRentLamports": "2039280"
  }
}

Body

application/json
asset
enum<string>
required

The asset or market to trade against for the limit order.

Available options:
BTC,
ETH,
SOL
Example:

"SOL"

inputToken
enum<string>
required

The token symbol for the input token used to fund the limit order.

Available options:
BTC,
ETH,
SOL,
USDC
Example:

"USDC"

inputTokenAmount
string
required

The amount of tokens for the input token. NOTE: The token amount needs to be an integer and must conform to the token mint decimals specified onchain. For example, to deposit 1 SOL, the value would be '1000000000' (9 decimals).

Example:

"1000000000"

side
enum<string>
required

Required when creating a limit order request.

Available options:
long,
short
triggerPrice
string
required

Trigger price at which the limit order will be executed (raw value with 6 decimal places). For example, to set a trigger price of $20, pass in 20000000.

Example:

"20000000"

includeSerializedTx
boolean
default:true

Sets whether to return a serialized transaction (serializedTxBase64) in the response.

leverage
string

Leverage of the limit order. Either provide leverage or sizeUsdDelta.

Example:

"10"

sizeUsdDelta
string

The amount in USD for the size of the limit order (raw value with 6 decimal places). Either provide leverage or sizeUsdDelta.

Example:

"10000000"

walletAddress
string

The wallet address / public key for the trader. Required when creating a limit order that returns a serialized transaction.

Response

200 OK

positionPubkey
string | null
required

The unique identifier (i.e. a program derived address) for the position account. Use this address to find the position account onchain.

quote
object
required
serializedTxBase64
string | null
required

The serialized transaction (base64 encoded) containing the instructions and given parameters for the limit order. The transaction can be deserialized, signed by the owner of walletAddress and submitted onchain to execute the request

txMetadata
object | null
required

Contains relevant metadata for the serialized transaction. Null if no wallet address passed in.