Get TWAP Order Fills
curl --request GET \
--url https://api.ondoperps.xyz/v1/perps/twap/order/{orderID}/fills \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ondoperps.xyz/v1/perps/twap/order/{orderID}/fills"
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/twap/order/{orderID}/fills', 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/twap/order/{orderID}/fills",
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/twap/order/{orderID}/fills"
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/twap/order/{orderID}/fills")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/perps/twap/order/{orderID}/fills")
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": [
{
"id": "70a37d8f972f2494837f9dba8364cbb4",
"orderId": "child_abc123",
"parentOrderID": "twap_70a37d8f972f2494837f9dba8364cbb4",
"market": "AAPL-USD.P",
"price": "227.50",
"size": "0.33",
"side": "buy",
"filledCost": "75.08",
"fee": "0.04",
"time": "2025-03-05T14:01:00Z",
"isMaker": false
}
]
}{
"success": false,
"error": "Description of the error",
"error_code": "feature_disabled"
}{
"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"
}TWAP Orders
Get TWAP Order Fills
Returns all fills for all child orders of a TWAP order. For how TWAP execution works, see TWAP orders.
GET
/
v1
/
perps
/
twap
/
order
/
{orderID}
/
fills
Get TWAP Order Fills
curl --request GET \
--url https://api.ondoperps.xyz/v1/perps/twap/order/{orderID}/fills \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ondoperps.xyz/v1/perps/twap/order/{orderID}/fills"
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/twap/order/{orderID}/fills', 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/twap/order/{orderID}/fills",
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/twap/order/{orderID}/fills"
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/twap/order/{orderID}/fills")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/perps/twap/order/{orderID}/fills")
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": [
{
"id": "70a37d8f972f2494837f9dba8364cbb4",
"orderId": "child_abc123",
"parentOrderID": "twap_70a37d8f972f2494837f9dba8364cbb4",
"market": "AAPL-USD.P",
"price": "227.50",
"size": "0.33",
"side": "buy",
"filledCost": "75.08",
"fee": "0.04",
"time": "2025-03-05T14:01:00Z",
"isMaker": false
}
]
}{
"success": false,
"error": "Description of the error",
"error_code": "feature_disabled"
}{
"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.
Path Parameters
TWAP order ID (prefixed with twap_)
Example:
"twap_70a37d8f972f2494837f9dba8364cbb4"
Response
List of fills for all child orders
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