curl --request GET \
--url https://api.0xarchive.io/v1/lighter/trades/{symbol}/recent \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.0xarchive.io/v1/lighter/trades/{symbol}/recent"
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.0xarchive.io/v1/lighter/trades/{symbol}/recent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.0xarchive.io/v1/lighter/trades/{symbol}/recent"
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))
}{
"success": true,
"data": [
{
"coin": "BTC",
"symbol": "BTC",
"side": "B",
"price": "64708.5",
"size": "0.00005",
"timestamp": "2026-07-26T14:47:59.174Z",
"trade_id": 26121110211,
"crossed": false,
"source": "bucket",
"tx_hash": "000000197b6fd6e90000019f9ee5a9c6000000000000000000000000000000000000000000000000",
"order_id": 844421856609148,
"fee": "0.000028",
"account_index": "513030",
"position_size_before": -0.94632,
"position_size_after": -0.94627,
"entry_quote_before": 61179.114686,
"initial_margin_fraction_before": 0.02,
"allocated_margin_before": 0,
"allocated_margin_after": 0,
"position_sign_changed": false,
"trade_type": "trade",
"is_maker": true,
"counterparty_address": "710765",
"client_id": 46758119273906,
"realized_pnl": -0.00295,
"integrator_fee": 0,
"fee_account_id": 0,
"l2_block_height": 300075269,
"transaction_time_us": 1785077279174437,
"usdc_amount": 3.235425
}
],
"meta": {
"count": 123,
"next_cursor": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"finalized_through": "2023-11-07T05:31:56Z",
"requested_end": "2023-11-07T05:31:56Z",
"clamped_to": "2023-11-07T05:31:56Z",
"preliminary_row_count": 123
}
}{
"code": 400,
"error": "Failed to deserialize query string: limit: invalid digit found in string",
"error_code": "invalid_query_params",
"request_id": "3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05"
}{
"code": 401,
"error": "Missing or invalid API key. Provide X-API-Key header."
}{
"code": 429,
"error": "Rate limit exceeded"
}Get recent Lighter trades
0xArchive API reference for Get recent Lighter trades. Includes authentication, parameters, response shape, examples, and route-safe implementation notes.
curl --request GET \
--url https://api.0xarchive.io/v1/lighter/trades/{symbol}/recent \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.0xarchive.io/v1/lighter/trades/{symbol}/recent"
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.0xarchive.io/v1/lighter/trades/{symbol}/recent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.0xarchive.io/v1/lighter/trades/{symbol}/recent"
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))
}{
"success": true,
"data": [
{
"coin": "BTC",
"symbol": "BTC",
"side": "B",
"price": "64708.5",
"size": "0.00005",
"timestamp": "2026-07-26T14:47:59.174Z",
"trade_id": 26121110211,
"crossed": false,
"source": "bucket",
"tx_hash": "000000197b6fd6e90000019f9ee5a9c6000000000000000000000000000000000000000000000000",
"order_id": 844421856609148,
"fee": "0.000028",
"account_index": "513030",
"position_size_before": -0.94632,
"position_size_after": -0.94627,
"entry_quote_before": 61179.114686,
"initial_margin_fraction_before": 0.02,
"allocated_margin_before": 0,
"allocated_margin_after": 0,
"position_sign_changed": false,
"trade_type": "trade",
"is_maker": true,
"counterparty_address": "710765",
"client_id": 46758119273906,
"realized_pnl": -0.00295,
"integrator_fee": 0,
"fee_account_id": 0,
"l2_block_height": 300075269,
"transaction_time_us": 1785077279174437,
"usdc_amount": 3.235425
}
],
"meta": {
"count": 123,
"next_cursor": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"finalized_through": "2023-11-07T05:31:56Z",
"requested_end": "2023-11-07T05:31:56Z",
"clamped_to": "2023-11-07T05:31:56Z",
"preliminary_row_count": 123
}
}{
"code": 400,
"error": "Failed to deserialize query string: limit: invalid digit found in string",
"error_code": "invalid_query_params",
"request_id": "3f2a9c71-5b0e-4d68-9a4c-7e1d2b6f8a05"
}{
"code": 401,
"error": "Missing or invalid API key. Provide X-API-Key header."
}{
"code": 429,
"error": "Rate limit exceeded"
}Authorizations
API key for authentication. Get yours at https://0xarchive.io/dashboard
Path Parameters
Trading pair symbol (e.g., ETH, BTC)
"ETH"
Query Parameters
Number of trades to return (default: 100, max: 1000)
x <= 1000Response
List of recent trades
API response containing an array of Lighter trades. History responses serve canonical rows only and clamp end to finalized_through; /recent responses serve preliminary rows and report preliminary_row_count.
true
Hide child attributes
Hide child attributes
Trading pair symbol (deprecated, use symbol instead)
"BTC"
Trading pair symbol
"BTC"
Trade side of the account this row belongs to: 'B' (buy) or 'A' (sell/ask)
A, B "B"
Execution price
"64708.5"
Trade size in base units
"0.00005"
Execution timestamp (UTC)
"2026-07-26T14:47:59.174Z"
Unique Lighter trade ID. Each trade produces two rows (one per counterparty) sharing this ID.
26121110211
True if this account was the taker (crossed the spread), false if maker
false
Row provenance: 'bucket' = canonical (finalized by the daily Lighter Foundation reconcile), 'ws' = preliminary real-time capture
bucket, ws "bucket"
Lighter settlement transaction hash (fixed-width hex). Canonical rows only.
"000000197b6fd6e90000019f9ee5a9c6000000000000000000000000000000000000000000000000"
Order ID of this account's order. Canonical rows only.
844421856609148
This account's fee for the fill. Canonical rows only.
"0.000028"
Lighter numeric account index this row belongs to (serialized as a string)
"513030"
This account's signed position size before the fill (long positive, short negative)
-0.94632
Signed position size after the fill (derived: position_size_before plus/minus size by side)
-0.94627
This account's position entry quote value before the fill
61179.114686
This account's initial margin fraction before the fill
0.02
Isolated-margin allocation before the fill (0 for cross)
0
Isolated-margin allocation after the fill (0 for cross)
0
True if the fill flipped this account's position between long and short
false
Upstream trade type. Canonical rows only.
"trade"
True if this account was the maker. Canonical rows only.
true
Counterparty's Lighter account index (serialized as a string). Canonical rows only.
"710765"
Client-assigned order ID. Canonical rows only.
46758119273906
Matching-engine realized PnL for this fill. Canonical rows only.
-0.00295
Integrator fee charged on the fill. Canonical rows only.
0
Account credited with the fee. Canonical rows only.
0
Lighter L2 block height containing the trade. Canonical rows only.
300075269
Intra-block transaction time in microseconds. Canonical rows only.
1785077279174437
Notional value of the fill in USDC. Canonical rows only.
3.235425
Hide child attributes
Hide child attributes
Number of records returned
Cursor for pagination. Use this value as the cursor parameter to fetch the next page. History endpoint only.
Unique request ID for support
Timestamp through which canonical (bucket-reconciled) data is available.
The end the caller requested, echoed when it was clamped. History endpoint only.
Effective end after clamping to finalized_through. History endpoint only.
Number of preliminary (source: "ws") rows in this response. /recent endpoint only.
Was this page helpful?