Get order history
curl --request POST \
--url https://api.allium.so/api/v1/developer/trading/hyperliquid/info/order/history \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"type": "historicalOrders",
"user": "0x1234567890abcdef1234567890abcdef12345678",
"startTime": 1640995200000,
"endTime": 1641081600000
}
'import requests
url = "https://api.allium.so/api/v1/developer/trading/hyperliquid/info/order/history"
payload = {
"type": "historicalOrders",
"user": "0x1234567890abcdef1234567890abcdef12345678",
"startTime": 1640995200000,
"endTime": 1641081600000
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'historicalOrders',
user: '0x1234567890abcdef1234567890abcdef12345678',
startTime: 1640995200000,
endTime: 1641081600000
})
};
fetch('https://api.allium.so/api/v1/developer/trading/hyperliquid/info/order/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.allium.so/api/v1/developer/trading/hyperliquid/info/order/history",
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' => 'historicalOrders',
'user' => '0x1234567890abcdef1234567890abcdef12345678',
'startTime' => 1640995200000,
'endTime' => 1641081600000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.allium.so/api/v1/developer/trading/hyperliquid/info/order/history"
payload := strings.NewReader("{\n \"type\": \"historicalOrders\",\n \"user\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"startTime\": 1640995200000,\n \"endTime\": 1641081600000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.allium.so/api/v1/developer/trading/hyperliquid/info/order/history")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"historicalOrders\",\n \"user\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"startTime\": 1640995200000,\n \"endTime\": 1641081600000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allium.so/api/v1/developer/trading/hyperliquid/info/order/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"historicalOrders\",\n \"user\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"startTime\": 1640995200000,\n \"endTime\": 1641081600000\n}"
response = http.request(request)
puts response.read_body[
{
"order": {
"coin": "<string>",
"side": "<string>",
"limitPx": "<string>",
"sz": "<string>",
"oid": 123,
"timestamp": 123,
"triggerCondition": "<string>",
"isTrigger": true,
"triggerPx": "<string>",
"children": "<unknown>",
"isPositionTpsl": true,
"reduceOnly": true,
"orderType": "<string>",
"origSz": "<string>",
"tif": "<string>",
"cloid": "<string>"
},
"status": "<string>",
"statusTimestamp": 123
}
]"<string>""<string>"Hyperliquid
Order history
Endpoint providing order history by user address
POST
/
api
/
v1
/
developer
/
trading
/
hyperliquid
/
info
/
order
/
history
Get order history
curl --request POST \
--url https://api.allium.so/api/v1/developer/trading/hyperliquid/info/order/history \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"type": "historicalOrders",
"user": "0x1234567890abcdef1234567890abcdef12345678",
"startTime": 1640995200000,
"endTime": 1641081600000
}
'import requests
url = "https://api.allium.so/api/v1/developer/trading/hyperliquid/info/order/history"
payload = {
"type": "historicalOrders",
"user": "0x1234567890abcdef1234567890abcdef12345678",
"startTime": 1640995200000,
"endTime": 1641081600000
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'historicalOrders',
user: '0x1234567890abcdef1234567890abcdef12345678',
startTime: 1640995200000,
endTime: 1641081600000
})
};
fetch('https://api.allium.so/api/v1/developer/trading/hyperliquid/info/order/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.allium.so/api/v1/developer/trading/hyperliquid/info/order/history",
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' => 'historicalOrders',
'user' => '0x1234567890abcdef1234567890abcdef12345678',
'startTime' => 1640995200000,
'endTime' => 1641081600000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.allium.so/api/v1/developer/trading/hyperliquid/info/order/history"
payload := strings.NewReader("{\n \"type\": \"historicalOrders\",\n \"user\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"startTime\": 1640995200000,\n \"endTime\": 1641081600000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.allium.so/api/v1/developer/trading/hyperliquid/info/order/history")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"historicalOrders\",\n \"user\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"startTime\": 1640995200000,\n \"endTime\": 1641081600000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allium.so/api/v1/developer/trading/hyperliquid/info/order/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"historicalOrders\",\n \"user\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"startTime\": 1640995200000,\n \"endTime\": 1641081600000\n}"
response = http.request(request)
puts response.read_body[
{
"order": {
"coin": "<string>",
"side": "<string>",
"limitPx": "<string>",
"sz": "<string>",
"oid": 123,
"timestamp": 123,
"triggerCondition": "<string>",
"isTrigger": true,
"triggerPx": "<string>",
"children": "<unknown>",
"isPositionTpsl": true,
"reduceOnly": true,
"orderType": "<string>",
"origSz": "<string>",
"tif": "<string>",
"cloid": "<string>"
},
"status": "<string>",
"statusTimestamp": 123
}
]"<string>""<string>"This endpoint provides historical order data for Hyperliquid user addresses.
Drop-in ReplacementThis endpoint is a 1-1 replacement for the
historicalOrders endpoint in Hyperliquid, with no limits on how far back you can query.We include two optional parameters, startTime and endTime, to facilitate flexible time range queries.30-day interval limitThe interval between
startTime and endTime cannot exceed 30 days. Paginate by issuing successive requests with 30-day windows to cover longer ranges.If startTime and endTime are omitted, the endpoint returns the most recent orders.Authorizations
Body
application/json
Request type - must be 'historicalOrders'
Available options:
historicalOrders User's wallet address (hex string)
Start time filter (Unix timestamp in milliseconds). The interval between startTime and endTime cannot exceed 30 days.
End time filter (Unix timestamp in milliseconds). The interval between startTime and endTime cannot exceed 30 days.
Was this page helpful?
⌘I