Get Contracts
curl --request GET \
--url https://api.ondoperps.xyz/v1/perps/contracts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ondoperps.xyz/v1/perps/contracts"
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/contracts', 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/contracts",
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/contracts"
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/contracts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/perps/contracts")
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": [
{
"market": "AAPL-USD.P",
"productType": "perpetual",
"contractType": "linear",
"baseCurrency": "AAPL",
"quoteCurrency": "USDC",
"disabled": false,
"lastPrice": "227.50",
"baseVolume": "12500.00",
"quoteVolume": "2843750.00",
"usdVolume": "2843750.00",
"bid": "227.40",
"ask": "227.60",
"high": "230.00",
"low": "225.00",
"openInterest": "2394.23",
"openInterestUsd": "544683.50",
"indexPrice": "227.55",
"indexCurrency": "USD",
"fundingRate": "0.0000125",
"nextFundingRate": "0.0000130",
"nextFundingRateTimestamp": "2025-03-05T16:00:00Z",
"makerFee": "0.0002",
"takerFee": "0.0005",
"priceChangePercent": "1.12"
}
]
}{
"success": false,
"error": "Description of the error",
"error_code": "bad_query_param"
}{
"success": false,
"error": "Description of the error",
"error_code": "too_many_requests"
}{
"success": false,
"error": "Description of the error",
"error_code": "unknown"
}Market Data
Get Contracts
Gets a list of perpetual futures contracts and their current market data. For the list of supported markets, see Markets.
GET
/
v1
/
perps
/
contracts
Get Contracts
curl --request GET \
--url https://api.ondoperps.xyz/v1/perps/contracts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ondoperps.xyz/v1/perps/contracts"
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/contracts', 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/contracts",
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/contracts"
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/contracts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/perps/contracts")
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": [
{
"market": "AAPL-USD.P",
"productType": "perpetual",
"contractType": "linear",
"baseCurrency": "AAPL",
"quoteCurrency": "USDC",
"disabled": false,
"lastPrice": "227.50",
"baseVolume": "12500.00",
"quoteVolume": "2843750.00",
"usdVolume": "2843750.00",
"bid": "227.40",
"ask": "227.60",
"high": "230.00",
"low": "225.00",
"openInterest": "2394.23",
"openInterestUsd": "544683.50",
"indexPrice": "227.55",
"indexCurrency": "USD",
"fundingRate": "0.0000125",
"nextFundingRate": "0.0000130",
"nextFundingRateTimestamp": "2025-03-05T16:00:00Z",
"makerFee": "0.0002",
"takerFee": "0.0005",
"priceChangePercent": "1.12"
}
]
}{
"success": false,
"error": "Description of the error",
"error_code": "bad_query_param"
}{
"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
If true, include sparkline price data in the response
Example:
false
Response
List of perpetual futures contracts
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
⌘I