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

GET /fills

List your fills

List your fills.

operationId: fetchMyTrades · CCXT method: fetchMyTrades · Rate-limit cost: 5

Declared server: https://api.testnet.nexus.xyz/v1. See Networks.

Authentication: agentAuth, hmacAuth.

List your fills

get
/fills

Returns up to 1000 fills for the authenticated account, newest first. Fills are trade executions resulting from order matches — each fill carries the matched price, quantity, fee, and whether it was the taker or maker side.

Authorizations
X-API-KeystringRequired

HMAC API key authentication. Send three headers:

  • X-API-Key: your key ID (e.g. nx_a1b2c3...)
  • X-Timestamp: current time in unix milliseconds
  • X-Signature: hex(hmac_sha256(secret, timestamp + "\n" + METHOD + "\n" + path + "\n" + query + "\n" + sha256_hex(body)))

Timestamp must be within 30 seconds of server time.

The key is network-scoped; the signature is not. The canonical string above has no network component, so the same signed request is byte-identical on every host. What stops a testnet key from authenticating against mainnet is that the key does not exist in that host's key store — sign only for the host that minted the key, and never replay a signed payload against another network. Presented to the wrong host, a key is refused with the same opaque 401 as an unknown key and must not be retried there. See “API keys are bound to one network” in the API description.

Query parameters
limitinteger · max: 1000Optional

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

Default: 100
order_idstringOptional

Return only the fills of this order. Exact match; an id that matches nothing returns an empty array rather than a 404. Narrows the same 1,000-fill retained window the unfiltered call serves, so fills that have aged out of that window are not reachable through it. One caveat worth knowing: a self-trade is served as a single netted row carrying the taker leg’s order_id, so filtering on the maker side of your own self-trade matches nothing.

cursorstringOptional

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
200

Array of fills, newest first

application/json
get/fills
GET /v1/fills HTTP/1.1
Host: api.testnet.nexus.xyz
X-API-Key: YOUR_API_KEY
Accept: */*
[
  {
    "id": "cf72c7f3-1234-5678-abcd-ef0123456789",
    "order_id": "ord_a1b2c3d4e5f6...",
    "market_id": "BTC-USDX-PERP",
    "side": "buy",
    "price": "84250.00",
    "size": "0.01",
    "fee": "0.84",
    "taker_or_maker": "taker",
    "timestamp": 1779225381434,
    "is_liquidation": false
  }
]

Test it cannot sign this request. X-Signature is an HMAC computed per call: see Authentication, or use an SDK.


API version 0.9.131

Last updated