Skip to main content
PATCH
/
orders
/
price
/
{orderId}
Update price order
curl --request PATCH \
  --url https://api.jup.ag/trigger/v2/orders/price/{orderId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "orderType": "single",
  "triggerPriceUsd": 210,
  "slippageBps": 150
}
'
import requests

url = "https://api.jup.ag/trigger/v2/orders/price/{orderId}"

payload = {
"orderType": "single",
"triggerPriceUsd": 210,
"slippageBps": 150
}
headers = {
"x-api-key": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {
'x-api-key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({orderType: 'single', triggerPriceUsd: 210, slippageBps: 150})
};

fetch('https://api.jup.ag/trigger/v2/orders/price/{orderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jup.ag/trigger/v2/orders/price/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'orderType' => 'single',
'triggerPriceUsd' => 210,
'slippageBps' => 150
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.jup.ag/trigger/v2/orders/price/{orderId}"

payload := strings.NewReader("{\n \"orderType\": \"single\",\n \"triggerPriceUsd\": 210,\n \"slippageBps\": 150\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.jup.ag/trigger/v2/orders/price/{orderId}")
.header("x-api-key", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"orderType\": \"single\",\n \"triggerPriceUsd\": 210,\n \"slippageBps\": 150\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.jup.ag/trigger/v2/orders/price/{orderId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orderType\": \"single\",\n \"triggerPriceUsd\": 210,\n \"slippageBps\": 150\n}"

response = http.request(request)
puts response.read_body
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Authorizations

x-api-key
string
header
required
Authorization
string
header
required

JWT token from the challenge-response auth flow

Path Parameters

orderId
string
required

Order UUID

Body

application/json
orderType
enum<string>
required
Available options:
single,
oco,
otoco
triggerPriceUsd
number
slippageBps
number
tpPriceUsd
number
slPriceUsd
number
tpSlippageBps
number
slSlippageBps
number

Response

Order updated

id
string
required