Skip to content
Skip to main content

Cash Transactions

Cash movements on a TradeZero account - locate fees and credits, margin interest, platform fees, dividends, and other ledger entries - are available as a paginated history read:

  • GET /v1/api/accounts/{accountId}/cash-transactions/start-date/{startDate} - cash ledger rows under the cashHistory key, plus a pagination object (currentLimit, currentOffset, totalRecords).

This endpoint pairs with Account Information: account detail and P&L give you balances and day totals; cash transactions give you the individual ledger lines behind those cash changes. Authentication uses the same API key headers as the rest of the Trading API - see Authentication.


What this endpoint is for

Use GET /cash-transactions/start-date/{startDate} when you need:

  • Cash ledger history - fee, credit, interest, dividend, and adjustment rows for an account.
  • A bounded date window - start from a YYYY-MM-DD path date and look forward up to 365 days (numberOfDays, default 30).
  • Paginated downloads - page through large histories with offset / limit using pagination.totalRecords.

What this endpoint does not do

The route is a read-only cash history. It does not move money, place trades, or stream updates.

You needUse instead
Current cash, buying power, equityGET /v1/api/account/{accountId}
Day and total P&LGET /v1/api/accounts/{accountId}/pnl or the P&L Stream
Fills and order historyGET /orders or paginated historical orders
Closed position lifecyclesClosed Positions
Locate quote / accept / inventoryShort Locates
Real-time balance pushP&L Stream - re-read cash transactions when you need ledger detail

Filling an order or accepting a locate does not push a cash row over WebSocket. Re-query this endpoint (or read account aggregates such as totalLocateCosts) when you need ledger confirmation.


At a glance

MethodPathWhat it does
GET/v1/api/accounts/{accountId}/cash-transactions/start-date/{startDate}Retrieve cash transaction history - paginated ledger rows with deposit, withdraw, cash type, and note.

Full OpenAPI reference: Retrieve Cash Transaction History Paginated.


Quick start

Read cash transactions
curl 'https://webapi.trade0.click/v1/api/accounts/TTE12345678/cash-transactions/start-date/2026-04-01?numberOfDays=90&limit=100&offset=0' \
-H 'Accept: application/json' \
-H 'TZ-API-KEY-ID: {YOUR_PUBLIC_KEY}' \
-H 'TZ-API-SECRET-KEY: {YOUR_SECRET}'

The base URL is https://webapi.trade0.click. Path parameters are {accountId} and {startDate} (YYYY-MM-DD). Query parameters control the lookback window and page size.

Use a live account id when you expect populated history. Paper accounts return the same envelope with an empty cashHistory array - see Paper vs live.


Request parameters

ParameterInRequiredDefaultNotes
accountIdpathYesAccount identifier. Each row’s accountId echoes the canonical form.
startDatepathYesWindow start in YYYY-MM-DD. Invalid values (for example not-a-date or 2026-13-40) return 404 Not Found.
numberOfDaysqueryNo30Days to include from startDate, up to 365. Omitting the query matches an explicit numberOfDays=30. Values above 365 are accepted but do not expand the documented one-year window.
offsetqueryNo0Number of cash rows to skip before returning results.
limitqueryNo100Maximum rows in this page. Maximum 10000. Values above 10000 are clamped (pagination.currentLimit returns 10000).

The result window is [startDate, startDate + numberOfDays) in calendar days. Narrow numberOfDays when you only need a short slice - for example numberOfDays=7 on a recent startDate returns only that week’s rows and a matching totalRecords.


Response envelope

Successful responses are JSON objects with two top-level keys:

  • cashHistory - array of cash transaction rows for the current page, ordered oldest → newest by entryDate within the requested window.
  • pagination - { currentLimit, currentOffset, totalRecords } describing this page and the full result set size for the requested window.
Response - cash history page
{
"cashHistory": [
{
"accountId": "TTE60626",
"cashType": "Locate Fees",
"currency": "USD",
"deposit": 0.0,
"entryDate": "2026-04-14T00:00:00",
"note": "Locate 100 BB @ 0.0045 per share",
"withdraw": 0.45
}
],
"pagination": {
"currentLimit": 100,
"currentOffset": 0,
"totalRecords": 140
}
}

An empty window still returns the envelope: cashHistory is [] and pagination.totalRecords is 0.


Field reference

Cash row (cashHistory[])

FieldTypeDescription
accountIdstringAccount identifier for the row.
cashTypestringCategory of the movement. See Cash types.
currencystringCurrency name. Live USD accounts return "USD".
depositnumberAmount added to the account in this transaction.
withdrawnumberAmount removed from the account in this transaction.
entryDatestring (date-time)Ledger date. Values are calendar dates at midnight (…T00:00:00) - there is no intraday timestamp on the row.
notestringHuman-readable description (fee formula, interest day, dividend detail, etc.).

deposit and withdraw are mutually exclusive on a given row. One side carries the amount; the other is 0. There are no rows where both are non-zero, and no rows where both are zero.

DirectionPatternExamples
Money outwithdraw > 0, deposit = 0Locate fee, margin interest, platform fee, overnight borrow charge
Money indeposit > 0, withdraw = 0Locate credit (sold inventory), dividend, cash credit / adjustment

Pagination (pagination)

FieldTypeDescription
currentLimitintegerLimit applied to this response (echo of the effective limit, after clamping).
currentOffsetintegerOffset applied to this response.
totalRecordsintegerTotal cash rows available for the requested startDate / numberOfDays window (not just this page).

Cash types

cashType is a free-form category string from the ledger. Live accounts commonly include the types below. Treat the list as observed categories, not a closed enum - new labels can appear as the back office posts additional activity.

cashTypeTypical directionWhat the note looks like
Locate Feeswithdraw (charge) or deposit (credit)Charge: Locate 100 BB @ 0.0045 per share. Credit after selling locate inventory: Locate credit 100 OPEN @ 0.0012 per share.
Locate & Borrow ChargewithdrawOvernight borrow / locate carry, for example ONB 1 BB ($-0.00288) for 05/26.
MarginwithdrawDaily margin interest, for example Daily Margin interest - 11/01/2025.
Software & DatawithdrawPlatform / data fees, for example Professional Platform Fees 2025-08.
DividenddepositDividend credit, for example Div (1) shares KO - Rate (0.510000000000) - Div ExDate 20250915.
GeneraleitherManual or back-office cash adjustments (credits and debits).

Filter or group in your client by cashType and/or by parsing note - the API does not accept a cashType query parameter.


When rows appear (locate fees)

Accepting a locate updates locate inventory and account aggregates before the matching cash ledger row is always visible on this endpoint.

SurfaceTiming after a filled locate accept
GET /locates/historyRow reaches locateStatus: 50 (Filled) promptly.
GET /locates/inventoryavailable shares appear promptly.
GET /account/{accountId}Aggregates such as totalLocateCosts can update promptly.
GET /cash-transactions/...The Locate Fees row may not appear immediately. Re-query later (including on a subsequent calendar day) with a window that covers the activity date.

Do not treat an empty cash page in the seconds after accept as proof that no fee was charged. Confirm the fill on locates history / inventory (and account aggregates), then poll cash history with an appropriate startDate / numberOfDays.

Equity orders do not create cash-history rows by themselves. Commissions and trade economics live on order / fill history; this endpoint is the cash ledger, not a per-fill blotter.


Pagination

  1. Call with offset=0 and your chosen limit (default 100, max 10000).
  2. Read pagination.totalRecords.
  3. While offset + cashHistory.length < totalRecords, request the next page with offset increased by limit.
Second page
curl 'https://webapi.trade0.click/v1/api/accounts/TTE12345678/cash-transactions/start-date/2026-04-01?numberOfDays=90&limit=100&offset=100' \
-H 'Accept: application/json' \
-H 'TZ-API-KEY-ID: {YOUR_PUBLIC_KEY}' \
-H 'TZ-API-SECRET-KEY: {YOUR_SECRET}'

totalRecords stays constant across pages for the same window; only currentOffset and the slice of cashHistory change. The pagination model matches paginated historical orders: rows in an array, page metadata under pagination. Cash uses cashHistory instead of tradingHistory, and cash limit may be set as high as 10000 (orders pagination caps at 100).

Under burst traffic the route can return 429 Too Many Requests. Space page requests; see API Rate Limits for platform-wide guidance.


Paper vs live

AccountBehavior
LiveReturns cash ledger rows for the requested window (Locate Fees, margin interest, platform fees, dividends, and other types present on the account).
PaperReturns the same envelope shape. Paper accounts have no cash ledger history: cashHistory is [] and totalRecords is 0, even after paper orders. Locates are live-only for a full quote → accept → fee lifecycle.

Validate request wiring and pagination on paper, then use a live account when you need populated cash history.


Error handling

SituationBehavior
Missing or invalid API key / secret404 Not Found (same pattern as most Trading API reads - not a JSON 401)
Account id your key does not own, or a non-existent account id200 OK with an empty envelope (cashHistory: [], totalRecords: 0) - not a 404
Invalid startDate path value404 Not Found
Trailing slash on the pathSupported - same 200 envelope as without the slash
Account id casingCase-insensitive in the path
Unknown query parametersIgnored - the request still returns 200 with the normal envelope
HEAD / PUT / PATCH405 Method Not Allowed
POST / DELETE404 Not Found
OPTIONS200 OK
Burst / rate limit429 Too Many Requests

Stick to GET. Use account ids from GET /v1/api/accounts so you do not mistake an empty ledger for “no access.”


Worked examples

Locate fee charge

{
"accountId": "TTE60626",
"cashType": "Locate Fees",
"currency": "USD",
"deposit": 0.0,
"entryDate": "2026-04-14T00:00:00",
"note": "Locate 100 BB @ 0.0045 per share",
"withdraw": 0.45
}

withdraw equals shares × per-share price (100 × 0.0045 = 0.45). Pair with Short Locates when reconciling accepts to fees.

Locate credit (sold inventory)

{
"accountId": "TTE60626",
"cashType": "Locate Fees",
"currency": "USD",
"deposit": 0.12,
"entryDate": "2025-07-30T00:00:00",
"note": "Locate credit 100 OPEN @ 0.0012 per share",
"withdraw": 0.0
}

Same cashType as a locate charge; direction is on deposit vs withdraw, and the note prefix is Locate credit.

Dividend

{
"accountId": "TTE60626",
"cashType": "Dividend",
"currency": "USD",
"deposit": 0.51,
"entryDate": "2025-10-02T00:00:00",
"note": "Div (1) shares KO - Rate (0.510000000000) - Div ExDate 20250915",
"withdraw": 0.0
}