Skip to main content
The REST API is in beta. This endpoint’s response shape may change.
Returns a paginated list of trades for a brokerage connection. Trades are fetched live from the brokerage provider. No investment data is stored on Redbark servers.
This endpoint requires brokerage access. Trialing subscriptions on any plan receive full brokerage access. Outside a trial, brokerage access requires an active (or past_due) subscription on a Professional price. A key with no general API access (for example a Saver-plan key) gets a 403 with "code": "plan_upgrade_required". A Developer-plan key that has API access but not brokerage gets a 403 with "code": "professional_required" on this endpoint.

Request

Headers

Trialing subscriptions on any plan receive full brokerage access, so you can evaluate /holdings and /trades during a trial. Outside a trial, brokerage access requires an active (or past_due) subscription on a Professional price.

Query parameters

connectionId must refer to a brokerage connection. Passing a banking connection ID returns a 400 error. Use the List Connections endpoint to find your brokerage connection IDs.

Response limits

To bound memory under wide date ranges, the service stops fetching upstream pages once it has roughly 5,000 matching rows for a single request. When this happens:
  • pagination.hasMore is true and pagination.total is null (the exact total isn’t known when paging stops early). There is no dedicated header for this; the row ceiling surfaces only through the pagination fields.
  • Continue paginating with the next offset + limit window. The same cap applies per request, not per session.

Response

Responses are not cached; every request fetches live from the brokerage provider.

Trade object

All monetary and quantity fields are strings to preserve decimal precision. Parse them as decimals in your application.

Pagination object

Error responses

Errors use the standard envelope { "error": { "message": string, "code"?: string, "details"?: string[] } }. The optional code field is set for the structured cases below — clients should branch on code rather than parsing message. Example error body:

Date validation

The from and to parameters accept:
  • Date strings: 2026-03-01
  • Full ISO 8601 / RFC 3339 with explicit timezone: 2026-03-01T00:00:00Z or 2026-03-01T00:00:00+10:00
Naive datetimes with no Z and no ±HH:MM offset are explicitly rejected. Invalid formats return a 400 with details:

Examples

All trades for a connection

Filter by date range

Paginate

Python: fetch all pages

JavaScript: fetch all pages