1. CRX
  2. API reference
  3. Account
  4. Read your event tape

Read your event tape

GET/trades

Lists your past events, oldest first. For the next page, pass the returned seq as after. Granted viewers can call it.

Authentication

  • x-crx-address x-crx-ts x-crx-sig
  • x-crx-address x-crx-signer x-crx-ts x-crx-sig
  • x-crx-session

Parameters

NameInTypeDescription
afterqueryintegerminimum 0default 0

Events with a seq above this value. Defaults to 0, from your first event.

limitqueryinteger1 to 1000default 100

Page size, 1 to 1000. Defaults to 100; other values return 400.

Responses

200

OK.

FieldTypeDescription
trades requiredarray of object

Events, oldest first.

Event

trades[].seq requiredinteger
trades[].ts requiredintegerminimum 0

Unix time in milliseconds.

trades[].type requiredstring

Event name, such as trade.opened.

trades[].data requiredobject

Event fields for your account. Book a trade only on trade.opened with no provisional key; trade.retracted can reverse a provisional one. trade.refused, rfq.expired and rfq.cancelled carry outcome and message; on trade.refused, read outcome, not the deprecated reason and reject_code. trade.settled carries fixing_source: market or set_by_crx. deposit.* carries tx and index_in_tx. leg_id is your leg, or null if you have none. rfq.opened, rfq.expired and rfq.cancelled omit it when you hold no leg on the RFQ.

seq requiredintegerminimum 0

Next after value. Fewer rows than limit means no more events.

400

bad_request, invalid_signature.

code bad_request invalid_signature

401

unauthorized: a header is missing or malformed, x-crx-ts is out of range, the call was already used, the signature does not match, or the caller lacks access.

code unauthorized

403

not_whitelisted: the account is not approved for this call.

code not_whitelisted

408

timeout: no answer within 30 seconds.

code timeout

409

conflict: after is above your latest sequence number; details carries after and head.

code conflict

429

rate_limited: retry after Retry-After seconds.

code rate_limited

HeaderTypeDescription
Retry-Afterinteger

Seconds until the next call is accepted.

ratelimit-limitinteger

Maximum calls in a burst.

ratelimit-remaininginteger

Calls remaining before the limit.

ratelimit-resetinteger

Seconds until the full limit is restored.

ratelimit-refillinteger

Calls restored per minute.

502

upstream: a chain read failed. Retry shortly.

code upstream