Get Recent Trades
curl --request GET \
--url https://api.tide.ag/trades \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.tide.ag/trades"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.tide.ag/trades', 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.tide.ag/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.tide.ag/trades"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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.tide.ag/trades")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tide.ag/trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"trades": [
{
"id": "<string>",
"symbol": "BTC-USD",
"exchange": "hyperliquid",
"price": "<string>",
"size": "<string>",
"side": "BUY",
"timestamp": 123
}
]
}Market Data
Get Recent Trades
Get recent public trades for a symbol
GET
/
trades
Get Recent Trades
curl --request GET \
--url https://api.tide.ag/trades \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.tide.ag/trades"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.tide.ag/trades', 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.tide.ag/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.tide.ag/trades"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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.tide.ag/trades")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tide.ag/trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"trades": [
{
"id": "<string>",
"symbol": "BTC-USD",
"exchange": "hyperliquid",
"price": "<string>",
"size": "<string>",
"side": "BUY",
"timestamp": 123
}
]
}Retrieve recent public trade executions for a specific trading pair. This endpoint provides historical trade data with exchange attribution.
Features
- Real-time trade data: Recent trade executions across exchanges
- Exchange filtering: Filter trades by specific exchanges
- Configurable limit: Control the number of trades returned
- Trade details: Price, size, side, and timestamp for each trade
Request
- Method:
GET - Endpoint:
/trades - Query Parameters:
symbol(required),limit,exchanges[]
curl -X GET "https://api.tide.ag/trades?symbol=BTC-USD&limit=50" \
-H "Content-Type: application/json"
Use Cases
- Display recent trade history in trading interfaces
- Analyze trading patterns and volume distribution
- Calculate volume-weighted average prices (VWAP)
- Monitor market activity and liquidity
For real-time trade updates, use the WebSocket
trades:{symbol} topic for live trade streams.Authorizations
Query Parameters
Trading pair symbol
Example:
"BTC-USD"
Filter by exchanges
Available options:
hyperliquid, aster, lighter, pacifica Number of trades to return
Required range:
1 <= x <= 500Response
200 - application/json
Recent trades
Show child attributes
Show child attributes