NEW PATHSThe
/limit/v2
path will be deprecated soon, please update your API calls to use the /trigger/v1
path immediately.When updating to the new path, please refer to the documentation as there are some breaking changes./execute
endpoint is introduced./createOrder
endpoint now includes an additionalrequestId
parameter to be used with the/execute
endpoint./cancelOrder
endpoint only builds the transaction for 1 order, while/cancelOrders
endpoint builds the transaction for multiple orders.- The
tx
field in the responses are nowtransaction
ortransactions
. /getTriggerOrders
endpoint is introduced to get either active or historical orders (based on the query parameters) in a new format.
NOTE
- Lite URL:
https://lite-api.jup.ag/trigger/v1/createOrder
- Pro URL:
https://api.jup.ag/trigger/v1/createOrder
Create Order
This is a POST request to/createOrder
endpoint, where you pass in the necessary parameters and our backend will create the transaction for you to sign and send to the network seamlessly.
OPTIONAL PARAMETERSDo note that there are a few optional parameters that you can use, such as:
- Adding slippage to the order: This corresponds to the “Ultra” mode on jup.ag frontend. Higher slippage increases execution success rate but may result in less favorable prices. Omitting this parameter (or setting it to 0) corresponds to “Exact” mode. Learn more about UI modes vs API implementation.
- Setting an expiry date on the order.
- Adding fees through our referral program, please ensure that your
feeAccount
has the necessaryreferralTokenAccount
s of the output mint of the limit order for it to work, you can learn more about creating them dynamically in the Add Fees To Swap guide. (Note that the fees are transferred only after the trigger order has been executed.)
/createOrder
endpoint.
/execute
endpoint to do it for you.