Get TWAP order history
curl --request GET \
--url https://api.mainnet.aptoslabs.com/decibel/api/v1/twap_history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mainnet.aptoslabs.com/decibel/api/v1/twap_history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mainnet.aptoslabs.com/decibel/api/v1/twap_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.mainnet.aptoslabs.com/decibel/api/v1/twap_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>"
],
]);
$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.mainnet.aptoslabs.com/decibel/api/v1/twap_history"
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.mainnet.aptoslabs.com/decibel/api/v1/twap_history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mainnet.aptoslabs.com/decibel/api/v1/twap_history")
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{
"items": [
{
"client_order_id": "client_order_123",
"duration_s": 300,
"frequency_s": 30,
"is_buy": true,
"is_reduce_only": true,
"market": "0xmarket123...",
"order_id": "<string>",
"orig_size": 123,
"remaining_size": 123,
"start_unix_ms": 1730841600000,
"status": "<string>",
"transaction_unix_ms": 123,
"transaction_version": 1
}
],
"total_count": 1
}TWAP
Get TWAP order history
Retrieve TWAP order history for a specific user including completed and cancelled orders. Returns historical TWAP orders sorted by most recent first. Supports filtering by timestamp range, sorting by timestamp, and pagination. Page size is capped at 200.
GET
/
api
/
v1
/
twap_history
Get TWAP order history
curl --request GET \
--url https://api.mainnet.aptoslabs.com/decibel/api/v1/twap_history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mainnet.aptoslabs.com/decibel/api/v1/twap_history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mainnet.aptoslabs.com/decibel/api/v1/twap_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.mainnet.aptoslabs.com/decibel/api/v1/twap_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>"
],
]);
$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.mainnet.aptoslabs.com/decibel/api/v1/twap_history"
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.mainnet.aptoslabs.com/decibel/api/v1/twap_history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mainnet.aptoslabs.com/decibel/api/v1/twap_history")
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{
"items": [
{
"client_order_id": "client_order_123",
"duration_s": 300,
"frequency_s": 30,
"is_buy": true,
"is_reduce_only": true,
"market": "0xmarket123...",
"order_id": "<string>",
"orig_size": 123,
"remaining_size": 123,
"start_unix_ms": 1730841600000,
"status": "<string>",
"transaction_unix_ms": 123,
"transaction_version": 1
}
],
"total_count": 1
}Authorizations
Bearer token from Geomi. See Authentication for setup instructions.

