Get Orders
curl --request GET \
--url https://api.ondoperps.xyz/v1/perps/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ondoperps.xyz/v1/perps/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ondoperps.xyz/v1/perps/orders', 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.ondoperps.xyz/v1/perps/orders",
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>"
],
]);
$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.ondoperps.xyz/v1/perps/orders"
req, _ := http.NewRequest("GET", url, nil)
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.ondoperps.xyz/v1/perps/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/perps/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"result": [
{
"orderId": "197ec08e001658690721be129e7fa595",
"side": "buy",
"price": "227.50",
"size": "10.00",
"market": "AAPL-USD.P",
"filledSize": "5.00",
"lastFillSize": "2.50",
"filledCost": "1137.50",
"fee": "0.57",
"status": "open",
"createdAt": "2025-03-05T14:30:00Z",
"type": "limit",
"timeInForce": "GTC",
"reduceOnly": false
}
],
"pageInfo": {
"nextCursor": "NQ5WWO3THN3Q====",
"prevCursor": "O4ZTGM3RGM2DG==="
}
}{
"success": false,
"error": "Description of the error",
"error_code": "bad_query_param"
}{
"success": false,
"error": "Description of the error",
"error_code": "auth_missing"
}{
"success": false,
"error": "Description of the error",
"error_code": "account_not_allowed"
}{
"success": false,
"error": "Description of the error",
"error_code": "too_many_requests"
}{
"success": false,
"error": "Description of the error",
"error_code": "unknown"
}Orders
Get Orders
Returns a paginated list of orders matching the given parameters.
GET
/
v1
/
perps
/
orders
Get Orders
curl --request GET \
--url https://api.ondoperps.xyz/v1/perps/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ondoperps.xyz/v1/perps/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ondoperps.xyz/v1/perps/orders', 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.ondoperps.xyz/v1/perps/orders",
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>"
],
]);
$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.ondoperps.xyz/v1/perps/orders"
req, _ := http.NewRequest("GET", url, nil)
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.ondoperps.xyz/v1/perps/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/perps/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"result": [
{
"orderId": "197ec08e001658690721be129e7fa595",
"side": "buy",
"price": "227.50",
"size": "10.00",
"market": "AAPL-USD.P",
"filledSize": "5.00",
"lastFillSize": "2.50",
"filledCost": "1137.50",
"fee": "0.57",
"status": "open",
"createdAt": "2025-03-05T14:30:00Z",
"type": "limit",
"timeInForce": "GTC",
"reduceOnly": false
}
],
"pageInfo": {
"nextCursor": "NQ5WWO3THN3Q====",
"prevCursor": "O4ZTGM3RGM2DG==="
}
}{
"success": false,
"error": "Description of the error",
"error_code": "bad_query_param"
}{
"success": false,
"error": "Description of the error",
"error_code": "auth_missing"
}{
"success": false,
"error": "Description of the error",
"error_code": "account_not_allowed"
}{
"success": false,
"error": "Description of the error",
"error_code": "too_many_requests"
}{
"success": false,
"error": "Description of the error",
"error_code": "unknown"
}Authorizations
BearerAuthApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Maximum number of results to return
Example:
1000
Pagination cursor
Example:
"NQ5WWO3THN3Q===="
Filter by trading market
Example:
"AAPL-USD.P"
Filter by order status
Available options:
open, canceled, fullyfilled Example:
"open"
Filter orders placed at or after this time (UTC milliseconds)
Example:
1684814400000
Filter orders placed at or before this time (UTC milliseconds)
Example:
1672549200000
Response
Paginated list of orders, reverse chronological
Whether the request was successful
Example:
true
Error message, present only on failure
Example:
""
Semantic error code. See each endpoint's error responses for the specific codes it can return.
Deprecation notice, if applicable
Example:
""
Show child attributes
Show child attributes
Show child attributes
Show child attributes