userCompletedTradesByTime | Hyperliquid Info API
curl --request POST \
--url https://hypercore.goldrushdata.com/info \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"user": "<string>",
"startTime": 123,
"endTime": 123,
"cursor": "<string>",
"builder": "<string>",
"dex": "<string>",
"limit": 123
}
'import requests
url = "https://hypercore.goldrushdata.com/info"
payload = {
"type": "<string>",
"user": "<string>",
"startTime": 123,
"endTime": 123,
"cursor": "<string>",
"builder": "<string>",
"dex": "<string>",
"limit": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
user: '<string>',
startTime: 123,
endTime: 123,
cursor: '<string>',
builder: '<string>',
dex: '<string>',
limit: 123
})
};
fetch('https://hypercore.goldrushdata.com/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://hypercore.goldrushdata.com/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' => '<string>',
'user' => '<string>',
'startTime' => 123,
'endTime' => 123,
'cursor' => '<string>',
'builder' => '<string>',
'dex' => '<string>',
'limit' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://hypercore.goldrushdata.com/info"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"startTime\": 123,\n \"endTime\": 123,\n \"cursor\": \"<string>\",\n \"builder\": \"<string>\",\n \"dex\": \"<string>\",\n \"limit\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://hypercore.goldrushdata.com/info")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"startTime\": 123,\n \"endTime\": 123,\n \"cursor\": \"<string>\",\n \"builder\": \"<string>\",\n \"dex\": \"<string>\",\n \"limit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hypercore.goldrushdata.com/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"startTime\": 123,\n \"endTime\": 123,\n \"cursor\": \"<string>\",\n \"builder\": \"<string>\",\n \"dex\": \"<string>\",\n \"limit\": 123\n}"
response = http.request(request)
puts response.read_body{
"user": "<string>",
"coin": "<string>",
"position_type": "<string>",
"gross_pnl": "<string>",
"net_pnl": "<string>",
"funding_pnl": "<string>",
"entry_px": "<string>",
"exit_px": "<string>",
"position_closed_size": "<string>",
"fees": "<string>",
"fills": 123,
"open_time": 123,
"close_time": 123,
"duration_ms": 123,
"max_position_size": "<string>",
"maker_fills": 123,
"builder": {},
"tx_index": 123
}Info API
userCompletedTradesByTime | Hyperliquid Info API
Hyperliquid userCompletedTradesByTime: fetch a wallet’s fully-closed round-trip trades within a close-time window, oldest-first, with a keyset cursor for forward paging.
POST
/
info
userCompletedTradesByTime | Hyperliquid Info API
curl --request POST \
--url https://hypercore.goldrushdata.com/info \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"user": "<string>",
"startTime": 123,
"endTime": 123,
"cursor": "<string>",
"builder": "<string>",
"dex": "<string>",
"limit": 123
}
'import requests
url = "https://hypercore.goldrushdata.com/info"
payload = {
"type": "<string>",
"user": "<string>",
"startTime": 123,
"endTime": 123,
"cursor": "<string>",
"builder": "<string>",
"dex": "<string>",
"limit": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
user: '<string>',
startTime: 123,
endTime: 123,
cursor: '<string>',
builder: '<string>',
dex: '<string>',
limit: 123
})
};
fetch('https://hypercore.goldrushdata.com/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://hypercore.goldrushdata.com/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' => '<string>',
'user' => '<string>',
'startTime' => 123,
'endTime' => 123,
'cursor' => '<string>',
'builder' => '<string>',
'dex' => '<string>',
'limit' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://hypercore.goldrushdata.com/info"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"startTime\": 123,\n \"endTime\": 123,\n \"cursor\": \"<string>\",\n \"builder\": \"<string>\",\n \"dex\": \"<string>\",\n \"limit\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://hypercore.goldrushdata.com/info")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"startTime\": 123,\n \"endTime\": 123,\n \"cursor\": \"<string>\",\n \"builder\": \"<string>\",\n \"dex\": \"<string>\",\n \"limit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hypercore.goldrushdata.com/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"user\": \"<string>\",\n \"startTime\": 123,\n \"endTime\": 123,\n \"cursor\": \"<string>\",\n \"builder\": \"<string>\",\n \"dex\": \"<string>\",\n \"limit\": 123\n}"
response = http.request(request)
puts response.read_body{
"user": "<string>",
"coin": "<string>",
"position_type": "<string>",
"gross_pnl": "<string>",
"net_pnl": "<string>",
"funding_pnl": "<string>",
"entry_px": "<string>",
"exit_px": "<string>",
"position_closed_size": "<string>",
"fees": "<string>",
"fills": 123,
"open_time": 123,
"close_time": 123,
"duration_ms": 123,
"max_position_size": "<string>",
"maker_fills": 123,
"builder": {},
"tx_index": 123
}Credit Cost
10 per call
Processing
Realtime
type: "userCompletedTradesByTime" is used to fetch a wallet’s fully-closed round-trip trades within a close-time window, oldest-first, with a keyset cursor for forward paging.
Estimate your monthly cost for this API using the Pricing Calculator.
- GoldRush custom analytics product. Not available on the public Hyperliquid node - there is no
POST api.hyperliquid.xyz/infoequivalent. Served only fromPOST hypercore.goldrushdata.com/info. - Each record is one fully-closed round-trip position (opened, then brought fully flat), reconstructed from the wallet’s fills, windowed on
close_timeand returned oldest-first. - Page forward with the keyset
cursor: pass"{close_time}_{tx_index}"built from the last row of the previous page to fetch the next page. Repeat until fewer thanlimitrecords return. startTimeis required unless acursoris supplied. Returns up tolimitrecords per page (default100, max500).- For the latest N trades without a window, use
userCompletedTrades. For one aggregate roll-up, useuserPnlSummary.
close_time falls in a [startTime, endTime] window, ordered oldest-first. Each record has the same shape as userCompletedTrades plus a tx_index ordinal. Use this to walk a wallet’s full trade history forward in time - PnL recaps, tax-lot reconstruction, or backfills - paging with the keyset cursor rather than the latest N records.
User-keyed. GoldRush-native, so there is no upstream Hyperliquid /info equivalent.
Endpoint
POST https://hypercore.goldrushdata.com/info
Authorization: Bearer <GOLDRUSH_API_KEY>
Content-Type: application/json
Request
Unix timestamp in milliseconds. Inclusive lower bound on
close_time. Required unless a cursor is supplied.Unix timestamp in milliseconds. Inclusive upper bound on
close_time. Defaults to current server time when omitted.Pagination cursor in the form
"{close_time}_{tx_index}". When set, returns records strictly after this keyset (still oldest-first). Build it from the close_time and tx_index of the last row in the previous page.Optional filter. When set, returns only trades whose closing fill was routed through this builder address (
0x-prefixed 42-character hex).Optional perp-DEX scope.
main_dex for the canonical Hyperliquid perp DEX, or a HIP-3 DEX identifier. Omit to include trades across every DEX.Maximum number of records per page. Default
100, maximum 500. Values above the maximum are clamped.Example
curl -X POST https://hypercore.goldrushdata.com/info \
-H "Authorization: Bearer $GOLDRUSH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "userCompletedTradesByTime",
"user": "0x31ca8395cf837de08b24da3f660e77761dfb974b",
"startTime": 1735689600000
}'
const response = await fetch("https://hypercore.goldrushdata.com/info", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GOLDRUSH_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "userCompletedTradesByTime",
user: "0x31ca8395cf837de08b24da3f660e77761dfb974b",
startTime: 1735689600000,
}),
});
const trades = await response.json();
// Page forward: build the next cursor from the last row.
const last = trades[trades.length - 1];
const cursor = `${last.close_time}_${last.tx_index}`;
import os, requests
response = requests.post(
"https://hypercore.goldrushdata.com/info",
headers={"Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}"},
json={
"type": "userCompletedTradesByTime",
"user": "0x31ca8395cf837de08b24da3f660e77761dfb974b",
"startTime": 1735689600000,
},
)
trades = response.json()
# Page forward: build the next cursor from the last row.
last = trades[-1]
cursor = f"{last['close_time']}_{last['tx_index']}"
Response
An array of completed-trade objects, oldest-first by(close_time, tx_index).
[
{
"user": "0x31ca8395cf837de08b24da3f660e77761dfb974b",
"coin": "BTC",
"position_type": "Long",
"gross_pnl": "505.25",
"net_pnl": "498.11",
"funding_pnl": "0.98",
"entry_px": "63642.5",
"exit_px": "64150.75",
"position_closed_size": "1.0171",
"fees": "8.12",
"fills": 12,
"open_time": 1735689600000,
"close_time": 1735776000000,
"duration_ms": 86400000,
"max_position_size": "1.0171",
"maker_fills": 4,
"builder": null,
"tx_index": 0
}
]
Field descriptions
The PnL, price, size, and fee fields (
gross_pnl, net_pnl, funding_pnl, entry_px, exit_px, position_closed_size, fees, max_position_size) are returned as decimal strings, preserving full precision. Counts (fills, maker_fills, tx_index) and timestamps (open_time, close_time, duration_ms) are JSON numbers. Do not parse the decimal strings as floats - keep them as strings or use a fixed-precision decimal type.Asset symbol - e.g.
"BTC", "ETH" for perps; HIP-3 markets use the dex:SYM form (e.g. "xyz:GOLD").Volume-weighted average entry price across the opening fills (carried at 10 decimal places, then trimmed of trailing zeros).
Volume-weighted average exit price across the closing fills (carried at 10 decimal places, then trimmed of trailing zeros).
Peak absolute position size reached during the round-trip - the same value as
max_position_size.Builder address routed through by the closing fill (
0x-prefixed hex), or null when the closing fill carried no builder code.Per-
(user, close_time) ordinal (0-based) that disambiguates trades sharing a close_time. Combine with close_time as "{close_time}_{tx_index}" to build the next-page cursor. This is a GoldRush paging ordinal, not Hyperliquid’s block transaction index.Related endpoints
userCompletedTrades
fetch a wallet’s most recent fully-closed round-trip trades, newest-first, each with realized PnL, funding, fees, and volume-weighted entry/exit prices.
userFillsByTime
fetch a user’s trade fills within a time window for P&L recaps and tax ledger reconstruction.
userTwapSliceFillsByTime
fetch a user’s TWAP slice fills within a time window for execution-quality reconciliation on algorithmic orders.
userAbstraction
fetch a user’s account-abstraction mode.
/info and /ws APIs at hypercore.goldrushdata.com, with no rate limits and every fill, order, trade, funding and ledger event retained from the start of HyperCore coverage.
Last reviewed: 2026-08-17