Get order history
curl --request GET \
--url https://api.jup.ag/trigger/v2/orders/history \
--header 'Authorization: Bearer <token>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.jup.ag/trigger/v2/orders/history"
headers = {
"x-api-key": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.jup.ag/trigger/v2/orders/history', 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/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.jup.ag/trigger/v2/orders/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jup.ag/trigger/v2/orders/history")
.header("x-api-key", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jup.ag/trigger/v2/orders/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"orders": [
{
"id": "<string>",
"userPubkey": "<string>",
"inputMint": "<string>",
"outputMint": "<string>",
"rawState": "<string>",
"privyWalletPubkey": "<string>",
"initialInputAmount": "<string>",
"remainingInputAmount": "<string>",
"triggerMint": "<string>",
"triggerPriceUsd": 123,
"slippageBps": 123,
"expiresAt": 123,
"createdAt": 123,
"updatedAt": 123,
"triggeredAt": 123,
"outputAmount": "<string>",
"inputUsed": "<string>",
"fillPercent": 123,
"events": [
{
"timestamp": 123,
"txSignature": "<string>",
"mint": "<string>",
"amount": "<string>",
"outputMint": "<string>",
"outputAmount": "<string>",
"orderContext": "<string>"
}
]
}
],
"pagination": {
"total": 123,
"limit": 123,
"offset": 123
}
}History
Order History
Get historical trigger orders for an account
GET
/
orders
/
history
Get order history
curl --request GET \
--url https://api.jup.ag/trigger/v2/orders/history \
--header 'Authorization: Bearer <token>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.jup.ag/trigger/v2/orders/history"
headers = {
"x-api-key": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.jup.ag/trigger/v2/orders/history', 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/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.jup.ag/trigger/v2/orders/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jup.ag/trigger/v2/orders/history")
.header("x-api-key", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jup.ag/trigger/v2/orders/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"orders": [
{
"id": "<string>",
"userPubkey": "<string>",
"inputMint": "<string>",
"outputMint": "<string>",
"rawState": "<string>",
"privyWalletPubkey": "<string>",
"initialInputAmount": "<string>",
"remainingInputAmount": "<string>",
"triggerMint": "<string>",
"triggerPriceUsd": 123,
"slippageBps": 123,
"expiresAt": 123,
"createdAt": 123,
"updatedAt": 123,
"triggeredAt": 123,
"outputAmount": "<string>",
"inputUsed": "<string>",
"fillPercent": 123,
"events": [
{
"timestamp": 123,
"txSignature": "<string>",
"mint": "<string>",
"amount": "<string>",
"outputMint": "<string>",
"outputAmount": "<string>",
"orderContext": "<string>"
}
]
}
],
"pagination": {
"total": 123,
"limit": 123,
"offset": 123
}
}Authorizations
Get API key via https://developers.jup.ag/portal
JWT token from the challenge-response auth flow
Query Parameters
Filter by order state group
Available options:
active, past Filter by token mint address
Results per page
Required range:
1 <= x <= 100Number of results to skip
Sort field
Available options:
updated_at, created_at, expires_at Sort direction
Available options:
asc, desc Was this page helpful?
⌘I
