Skip to main content
POST
/
cancelOrders
cancelOrders
curl --request POST \
  --url https://api.jup.ag/trigger/v1/cancelOrders \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "maker": "jdocuPgEAjMfihABsPgKEvYtsmMzjUHeq9LX4Hvs7f3",
  "orders": [
    "6fe8ByaiFHisjnYnH5qdpyiNtkn89mMBQUemRkVmKhro",
    "9jwzPKHxcrSozdrTYzPnTqy7psRvNGxaYUAiiyxwZKjj"
  ],
  "computeUnitPrice": {
    "type": "string",
    "default": "auto"
  }
}
'
{
  "requestId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "transactions": [
    "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAEN..."
  ]
}

Authorizations

x-api-key
string
header
required

Get API key via https://portal.jup.ag

Body

application/json
maker
string
default:jdocuPgEAjMfihABsPgKEvYtsmMzjUHeq9LX4Hvs7f3
required
computeUnitPrice
string
default:auto

In microlamports, defaults to 95th percentile of priority fees

orders
string[]

Array of orders to cancel, if none is provided, the API will generate cancel instructions for all open orders belonging to the maker

Response

Returns the base64-encoded unsigned transaction(s) of all open orders associated to the provided "maker"

  • If no orders were specified, it will batch 5 cancel order instructions in 1 transaction
requestId
string
required

Required to make a request to /execute

transactions
string[]
required

Array of unsigned base-64 encoded transaction(s)