Get a trade

View as MarkdownOpen in Claude
One trade by its id. This is the endpoint to poll while an order is `approved` or `executing` — it is how you learn the outcome, and the only safe thing to do after an ambiguous `502` or `504` on `/trade/approve`. Scoped to the user: a `tradeId` belonging to someone else is a `404`, indistinguishable from one that does not exist.

Authentication

AuthorizationBearer

A 15-minute token from /auth. Required on every endpoint except /auth.

Headers

X-Request-IdstringOptional

Correlation id. Generated if omitted, echoed on every response, and written to the audit log. /send is the exception — there it is required, and it doubles as the idempotency key.

X-USER-IDstringOptionalformat: "^[0-9a-fA-F]{24}$"

Optional. When present it overrides any userId in the body.

Request

This endpoint expects an object.
userIdstringRequiredformat: "^[0-9a-fA-F]{24}$"

24-character hex id, returned by /create.

tradeIdstringRequiredformat: "^[0-9a-fA-F]{24}$"

24-character hex id of a trade, returned by /order and /sell.

Response

OK
resultobject

One trade, whichever side it is.

cryptoAmount, fiatAmount and price are the best known figures: what executed if it has, else what you approved, else what was quoted. quote always holds the original quoted leg, so you can show both. Every amount and price is cut — not rounded — to at most 6 decimal places, with trailing zeros trimmed, so 100.00 is returned as 100.

requestIdstring

Echo of the inbound X-Request-Id, or a generated one.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error