Skip to main content

Transactions

The transaction record, with filtering across labels, types, accounts, assets, addresses and time.

Base URL: https://api-v2.kryptos.io · Required Permission: transactions:read

EndpointReturns
GET/v1/transactionsFiltered, paginated list
GET/v1/transactions/countsCounts by label and type
GET/v1/transactions/{id}One transaction
GET/v1/transactions/{id}/ledgersIts ledger legs

Transactions and ledgers use a different response envelope from the rest of the API — { data, meta } with no success field, and errors nested as { error: { code, message } }. See API Overview.

List transactions

curl -X GET "https://api-v2.kryptos.io/v1/transactions?limit=50&types=trade" \
-H "Authorization: Bearer ACCESS_TOKEN"

Query Parameters

Comma-separated list parameters — pass ?labels=Buy,Sell:

ParameterDescription
labelsTransaction labels. See Labels
typesCanonical types: deposit, withdrawal, trade, transfer, payment
walletIdsConnected account ids
assetIdsKryptos asset ids
providersProvider ids, e.g. binance
importSourceTypesAPI, CSV, Manual
ledgerTypesincoming, outgoing, fee
tagsUser tags
fromAddresses, toAddresses, addressesOn-chain addresses

Every one of those has an exclusion twin — notLabels, notTypes, notWalletIds, notAssetIds, notProviders, notImportSourceTypes, notLedgerTypes, notTags, notFromAddresses, notToAddresses — so you can filter a category out rather than in.

Boolean flags (pass true):

ParameterDefaultDescription
isDefiTrxDeFi transactions only
isNFTTrxNFT transactions only
isManualManually created only
isEditedEdited only
includeSpamfalseInclude spam-labelled transactions
includeIgnoredfalseInclude Ignore-labelled transactions
hasMissingPriceMissing a price on at least one leg
hasMissingAssetAn unresolved asset on at least one leg
isMissingTransactionRunning balance went negative here — missing acquisition history
isHighPnLReviewedAlready reviewed for unusually high P&L
isUncategorisedIgnoredDismissed from the uncategorised queue
isMissingPriceIgnoredDismissed from the missing-price queue

Spam- and Ignore-labelled transactions are excluded by default. Totals computed from an unfiltered list will not match a UI that shows them.

Ranges, sorting and paging:

ParameterTypeDefaultDescription
startTime, endTimenumberUnix milliseconds
minValue, maxValuenumberTransaction fiat value bounds
minTotalGainsnumberMinimum realized gain — use to find high-P&L transactions
searchstringFree text
coaTagStatusstringtagged, partial, untagged (enterprise)
coaSyncStatusstringsynced, unsynced (enterprise)
sortBystringtimestamptimestamp, netValue, totalGains, createdAt
sortOrderstringdescasc or desc
limitinteger501–200
offsetinteger0Rows to skip

Response

{
"data": [
{
"id": "8f14e45f-ceea-467a-9a3b-1c2f0d7e5a91",
"workspaceId": "ws_12ab",
"transactionPlatformId": "0x9c2f...",
"timestamp": 1721088000000,
"type": "trade",
"label": "Trade",
"description": "Swap USDC for ETH",
"notes": null,
"importSource": { "type": "API", "importedAt": 1721088300000, "walletId": "int_9f2c", "syncId": "sync_7712", "functionName": "fetchTrades" },
"isManual": false,
"isEdited": false,
"isDefiTrx": false,
"isNFTTrx": false,
"isMissingTransaction": false,
"protocol": null,
"tags": [],
"comments": [],
"netValue": { "fiatValue": 3200, "currency": "USD" },
"totalCostbasis": 3100,
"totalGains": 100,
"explorerLink": "https://etherscan.io/tx/0x9c2f...",
"incomingAssets": [
{
"id": "led_31c9",
"assetId": "a3f1c8e0-9d42-4b17-8c55-6e0b2f7a1d34",
"assetRaw": { "symbol": "ETH" },
"quantity": "1.000000000000000000",
"baseCurrency": "USD",
"price": { "price": 3200, "baseCurrency": "USD", "timestamp": 1721088000000, "source": "cmc" },
"value": 3200,
"fromAccount": null,
"toAccount": { "provider": "binance", "walletId": "int_9f2c" },
"label": "Buy",
"asset": { "symbol": "ETH", "name": "Ethereum", "logoUrl": "https://...", "type": "crypto" }
}
],
"outgoingAssets": [],
"fee": []
}
],
"meta": { "limit": 50, "offset": 0, "hasMore": true, "total": 1284 }
}

Response Fields

FieldTypeDescription
idstringTransaction UUID
transactionPlatformIdstringOn-chain hash or exchange-side id
timestampnumberUnix milliseconds
typestring | nullCanonical type derived from the label; null when the label maps to none
labelstringTransaction label
description, notesstringFree text
importSourceobjecttype (API/CSV/Manual), importedAt, walletId, csvLink, syncId, functionName
isManual, isEdited, isDefiTrx, isNFTTrxbooleanProvenance and classification flags
isMissingTransactionbooleanSet by the balance stage — the running balance went negative here
protocolobjectDeFi protocol context, when applicable
tagsarrayUser tags
commentsarray{ id, text, timestamp, author }
netValueobject{ fiatValue, currency }; fiatValue is null when unpriced
totalCostbasisnumberCost basis consumed
totalGainsnumberRealized gain or loss
explorerLinkstring | nullBlock-explorer URL; null for exchange transactions and unknown chains
incomingAssets, outgoingAssets, feearrayLedger legs, see below
coaJournal, coaStatusobjectChart-of-accounts state — enterprise workspaces only, absent otherwise

Ledger legs

Each entry in incomingAssets, outgoingAssets and fee:

FieldTypeDescription
idstringLedger id
assetIdstring | nullResolved Kryptos asset; null while unresolved
assetRawobjectAs reported by the source, before resolution
quantitystringDecimal string, up to 18 places
baseCurrencystringFiat currency for price and value
priceobject | null{ price, baseCurrency, timestamp, source }; null when unpriced
valuenumber | nullquantity × price, derived on read; null when unpriced
fromAccount, toAccountobject | nullCounterparty accounts
label, description, internalLabelstringPer-leg annotations
assetobject | nullResolved display data: symbol, name, logoUrl, type

quantity is a string, not a number, deliberately — crypto quantities carry up to 18 decimal places and JSON numbers are IEEE-754 doubles. Parsing it into a float silently loses precision on large or high-precision balances. Use a decimal library. value is a number because it is a rounded fiat amount.

Which account field a leg populates follows the direction: incoming legs carry toAccount, outgoing and fee legs carry fromAccount, and a transfer between two of the user's own accounts carries both.

Counts

curl -X GET "https://api-v2.kryptos.io/v1/transactions/counts" \
-H "Authorization: Bearer ACCESS_TOKEN"

Returns { data } with per-label and per-type counts for the workspace — cheaper than paging the list to build a summary.

One transaction

GET /v1/transactions/{id} returns { data } with a single transaction in the shape above, or 404 { "error": { "code": "NOT_FOUND", "message": "…" } }.

For enterprise workspaces the single-transaction fetch also includes coaJournal.lines, which the list response omits.

Its ledger legs

GET /v1/transactions/{id}/ledgers returns { data } — an array of the transaction's legs. It is the same data as the three leg arrays above, flattened, which is convenient when you want the legs without re-parsing the transaction. To query legs across many transactions, use GET /v1/ledgers.

Errors

StatusCodeMeaning
404NOT_FOUNDNo such transaction in this workspace
500INTERNAL_ERRORUnexpected server error
{ "error": { "code": "NOT_FOUND", "message": "Transaction not found" } }