For the complete documentation index, see llms.txt. This page is also available as Markdown.

GET /markets/{market_id}/trades

Get recent trades

Get recent trades.

operationId: fetchTrades · CCXT method: fetchTrades

Authentication: none — this operation is public.

Parameters

Name
In
Type
Required
Default
Description

market_id

path

string

Yes

Market identifier (e.g. BTC-USDX-PERP, ETH-USDX-PERP). Uppercase ASCII alphanumeric segments joined by single hyphens, at most 64 characters. A value outside that set is rejected with 400 (INVALID_MARKET_ID) before any store is read — it cannot name a market, so an empty result would assert that nothing traded rather than that the question was malformed. A well-formed identifier that names no listed market is a 404, not a 400.

limit

query

integer

No

100

Trades per page (default 100, capped at the 10,000-trade retained window). Bounds one page, not a cursor walk — see “Cursor pagination”.

cursor

query

string

No

Opaque pagination cursor returned in the previous response's X-Next-Cursor header. Omit to fetch the first page. Treat the token as opaque: its format is not part of the contract and may change. Cursors do not expire. A malformed (unparseable) cursor is not an error — the server serves the first page. A well-formed cursor whose exact position has since been evicted from the retained window is not reset to the first page: pagination resumes at the nearest surviving boundary, so a resumed response is a continuation, not a fresh first page. A cursor is not bound to an operation or an account, so use it only with the operation that issued it. See “Cursor pagination” in the API description for how a walk terminates and what it does and does not guarantee.

Responses

Status
Body
Meaning

200

array of Trade

Recent trades for the market.

400

(no schema declared)

429

(no schema declared)

Example

curl -X GET 'https://exchange.nexus.xyz/api/exchange/markets/BTC-USDX-PERP/trades'
import requests


response = requests.get("https://exchange.nexus.xyz/api/exchange/markets/BTC-USDX-PERP/trades")
response.raise_for_status()
print(response.json())
const response = await fetch("https://exchange.nexus.xyz/api/exchange/markets/BTC-USDX-PERP/trades", {
  method: "GET",
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log(await response.json());

Generated from eng/apps/exchange/api/openapi.json (spec 0.9.36). Do not edit by hand — regenerate with python3 product/docs/tools/api-reference/generate.py. Hand-authored context lives in the Guides pages.

Last updated