info (twapHistory)
curl --request POST \
--url https://api.hyperliquid.xyz/info \
--header 'Content-Type: application/json' \
--data '
{
"type": "twapHistory",
"user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"
}
'import requests
url = "https://api.hyperliquid.xyz/info"
payload = {
"type": "twapHistory",
"user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({type: 'twapHistory', user: '0x1442ad477ded1b0028b57621aa7b6f7eadb8f568'})
};
fetch('https://api.hyperliquid.xyz/info', 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.hyperliquid.xyz/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'twapHistory',
'user' => '0x1442ad477ded1b0028b57621aa7b6f7eadb8f568'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperliquid.xyz/info"
payload := strings.NewReader("{\n \"type\": \"twapHistory\",\n \"user\": \"0x1442ad477ded1b0028b57621aa7b6f7eadb8f568\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperliquid.xyz/info")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"twapHistory\",\n \"user\": \"0x1442ad477ded1b0028b57621aa7b6f7eadb8f568\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperliquid.xyz/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"twapHistory\",\n \"user\": \"0x1442ad477ded1b0028b57621aa7b6f7eadb8f568\"\n}"
response = http.request(request)
puts response.read_body[
{
"time": 123,
"state": {},
"status": {},
"twapId": 123
}
]Hyperliquid node API
twapHistory | Hyperliquid info
The info endpoint with type: “twapHistory” returns a user’s TWAP order history on Hyperliquid.
POST
/
info
info (twapHistory)
curl --request POST \
--url https://api.hyperliquid.xyz/info \
--header 'Content-Type: application/json' \
--data '
{
"type": "twapHistory",
"user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"
}
'import requests
url = "https://api.hyperliquid.xyz/info"
payload = {
"type": "twapHistory",
"user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({type: 'twapHistory', user: '0x1442ad477ded1b0028b57621aa7b6f7eadb8f568'})
};
fetch('https://api.hyperliquid.xyz/info', 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.hyperliquid.xyz/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'twapHistory',
'user' => '0x1442ad477ded1b0028b57621aa7b6f7eadb8f568'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperliquid.xyz/info"
payload := strings.NewReader("{\n \"type\": \"twapHistory\",\n \"user\": \"0x1442ad477ded1b0028b57621aa7b6f7eadb8f568\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperliquid.xyz/info")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"twapHistory\",\n \"user\": \"0x1442ad477ded1b0028b57621aa7b6f7eadb8f568\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperliquid.xyz/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"twapHistory\",\n \"user\": \"0x1442ad477ded1b0028b57621aa7b6f7eadb8f568\"\n}"
response = http.request(request)
puts response.read_body[
{
"time": 123,
"state": {},
"status": {},
"twapId": 123
}
]You can only use this endpoint on the official Hyperliquid public API. It is not available through Chainstack, as the open-source node implementation does not support it yet. See Hyperliquid methods for the full availability breakdown.
info endpoint with type: "twapHistory" returns a user’s TWAP (time-weighted average price) order history — each record’s creation time, state, and current status.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
Request body
type(string, required) — The request type. Must be"twapHistory".user(string, required) — Address in 42-character hexadecimal format.
Response
Returns an array of TWAP history records. Each record contains:time(integer) — Creation time of the record (seconds since epoch).state(object) — The state of the TWAP order (coin, size, executed amounts, side, and related fields).status(object) — The current status, for example{"status": "finished"},{"status": "activated"},{"status": "terminated"}, or{"status": "error", "description": "..."}.twapId(integer) — The ID of the TWAP order.
Example request
curl -X POST \
-H "Content-Type: application/json" \
-d '{"type": "twapHistory", "user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"}' \
https://api.hyperliquid.xyz/info
from hyperliquid.info import Info
from hyperliquid.utils import constants
info = Info(constants.MAINNET_API_URL, skip_ws=True)
# The SDK has no dedicated twapHistory helper, so post the request directly.
twap_history = info.post("/info", {
"type": "twapHistory",
"user": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568",
})
print(twap_history)
import { HttpTransport, InfoClient } from "@nktkas/hyperliquid";
const transport = new HttpTransport();
const info = new InfoClient({ transport });
const twapHistory = await info.twapHistory({
user: "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568",
});
console.log(twapHistory);
Example response
[]
Use cases
Theinfo endpoint with type: "twapHistory" is useful for:
- Auditing a user’s past TWAP orders
- Trading dashboards that show TWAP execution history
- Analyzing TWAP order outcomes over time
Body
application/json
Last modified on June 24, 2026
Was this page helpful?