Skip to main content

createOrder

POST 

https://api.jup.ag/trigger/v1/createOrder

Request for a base64-encoded unsigned trigger order creation transaction to be used in POST /trigger/v1/execute

note

Request

Body

    inputMintstringrequired
    outputMintstringrequired
    makerstringrequired
    payerstringrequired
    params objectrequired
    makingAmountstringrequired

    Amount of input mint to swap

    takingAmountstringrequired

    Amount of output mint to receive

    expiredAtstring
    feeBpsstring

    Requires the feeAccount parameter, the amount of fees in bps that will be sent to the fee account

    computeUnitPricestring

    In microlamports, defaults to 95th percentile of priority fees

    Default value: auto
    feeAccountstring
    • A token account (via the Referral Program) that will receive the fees
    • Refer to Referral Program Github for more information
    wrapAndUnwrapSolboolean

    If either input or output mint is native SOL

    Default value: true

Responses

Returns the base64-encoded unsigned transaction from the provided request body.

Schema
    requestIdstringrequired

    Required to make a request to /execute

    transactionstringrequired

    Unsigned base-64 encoded transaction

    orderstring

    Base-58 account which is the Trigger Order account

curl -L 'https://api.jup.ag/trigger/v1/createOrder' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"maker": "jdocuPgEAjMfihABsPgKEvYtsmMzjUHeq9LX4Hvs7f3",
"payer": "jdocuPgEAjMfihABsPgKEvYtsmMzjUHeq9LX4Hvs7f3",
"inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"outputMint": "So11111111111111111111111111111111111111112",
"params": {
"makingAmount": "100000000",
"takingAmount": "50000000"
},
"computeUnitPrice": "auto"
}'
Request Collapse all
Base URL
https://api.jup.ag/trigger/v1
Body
{
  "maker": "jdocuPgEAjMfihABsPgKEvYtsmMzjUHeq9LX4Hvs7f3",
  "payer": "jdocuPgEAjMfihABsPgKEvYtsmMzjUHeq9LX4Hvs7f3",
  "inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "outputMint": "So11111111111111111111111111111111111111112",
  "params": {
    "makingAmount": "100000000",
    "takingAmount": "50000000"
  },
  "computeUnitPrice": "auto"
}
ResponseClear

Click the Send API Request button above and see the response here!