Skip to main content

Webhook Events

Every webhook delivery follows a generic structure. The data field changes depending on the event category.

10 Event Types Available

Kryptos supports Integration, Transfer Detection, and Cost Basis webhook events.

Generic Structure

{
"id": "whd_<unique_id>",
"event": "<category>.<action>",
"timestamp": "ISO 8601 timestamp",
"data": {
"uid": "user_<id>",
...
}
}
FieldTypeDescription
idstringUnique delivery ID (format: whd_*)
eventstringEvent type in <category>.<action> format
timestampstringISO 8601 timestamp of when the event occurred
dataobjectEvent-specific payload; always includes uid

The data object always contains a uid field identifying the user. The remaining fields depend on the event category — see below.


Integration Events

Triggered when a user's wallet or exchange connection changes. The data fields match the response format of the Integrations API.

Events

EventDescription
integration.createdA user connected a new wallet or exchange
integration.updatedAn existing integration was updated or synced
integration.deletedA user removed a wallet or exchange connection
integration.failedAn integration sync encountered an error

Example Payload

{
"id": "whd_abc123def456",
"event": "integration.created",
"timestamp": "2025-02-19T12:00:00.000Z",
"data": {
"uid": "user_123",
"provider": "binance",
"providerPublicName": "Binance",
"publicAddress": null,
"walletId": "wallet_abc123",
"logoUrl": "https://storage.googleapis.com/kryptos-public/logos/binance.png",
"isContract": false,
"alias": "Main Trading Account",
"status": "active",
"addedOn": 1640995200000,
"lastSyncedAt": 1672531200000,
"category": "exchange",
"type": "api",
"totalTransactions": 0
}
}

Data Fields

FieldTypeDescription
uidstringThe user ID associated with the integration
providerstringProvider identifier (e.g., binance, ethereum)
providerPublicNamestringHuman-readable provider name
publicAddressstringWallet address (for blockchain wallets), null otherwise
walletIdstringUnique wallet/integration identifier
logoUrlstringProvider logo URL
isContractbooleanWhether the address is a smart contract
aliasstringUser-defined alias for the integration
statusstringIntegration status: QUEUED, ONGOING, COMPLETED, FAILED
addedOnnumberTimestamp when integration was added (ms)
lastSyncedAtnumberTimestamp of last successful sync (ms)
categorystringCategory: exchange, wallet, blockchain, unknown
typestringIntegration type: api or csv
totalTransactionsnumberTotal number of transactions from this integration

Integration Categories

CategoryDescription
exchangeCentralized exchanges (Binance, Coinbase, Kraken)
walletSoftware/hardware wallets (MetaMask, Ledger)
blockchainDirect blockchain connections (Ethereum, Bitcoin)
unknownUnclassified integrations

Integration Types

TypeDescription
apiConnected via API keys or OAuth
csvImported via CSV file upload

Transfer Detection Events

Triggered during the transfer detection process. Transfer detection identifies movements of assets between a user's own wallets/exchanges (internal transfers) so they are not incorrectly treated as taxable disposals.

Events

EventDescription
transfer_detection.startedTransfer detection analysis has begun for a user
transfer_detection.completedTransfer detection analysis finished successfully
transfer_detection.failedTransfer detection encountered an error

Example Payload

{
"id": "whd_8cbe199e6ae5fe275320c2b0",
"event": "transfer_detection.started",
"timestamp": "2026-02-20T18:09:07.962Z",
"data": {
"uid": "8efe14a679fa4fe390b03dfa",
"action": "DETECT_TRANSFER",
"status": "started",
"reason": null,
"timestamp": 1771610947808
}
}

Data Fields

FieldTypeDescription
uidstringThe user ID associated with the operation
actionstringAlways DETECT_TRANSFER for this event category
statusstringCurrent status: started, completed, or failed
reasonstring | nullError reason if the status is failed, otherwise null
timestampnumberUnix timestamp (ms) of when the status changed

Cost Basis Events

Triggered during the cost basis calculation process. Cost basis (also known as Account Manager) computes acquisition costs, gains, and losses across a user's portfolio for tax reporting.

Events

EventDescription
costbasis.startedCost basis calculation has begun for a user
costbasis.completedCost basis calculation finished successfully
costbasis.failedCost basis calculation encountered an error

Example Payload

{
"id": "whd_4e1f0937c274e70d738f65f7",
"event": "costbasis.started",
"timestamp": "2026-02-20T18:09:39.628Z",
"data": {
"uid": "8efe14a679fa4fe390b03dfa",
"action": "ACCOUNT_MANAGER",
"status": "started",
"reason": null,
"timestamp": 1771610979502
}
}

Data Fields

FieldTypeDescription
uidstringThe user ID associated with the operation
actionstringAlways ACCOUNT_MANAGER for this event category
statusstringCurrent status: started, completed, or failed
reasonstring | nullError reason if the status is failed, otherwise null
timestampnumberUnix timestamp (ms) of when the status changed

Event Lifecycle

Transfer Detection and Cost Basis events follow a predictable lifecycle. You can use these events to track progress and notify users in your application.

┌─────────────┐     ┌─────────────┐
│ started │────▶│ completed │ (success path)
└─────────────┘ └─────────────┘

│ ┌─────────────┐
└───────────▶│ failed │ (error path)
└─────────────┘
Processing Order

When a full portfolio recalculation is triggered, events typically fire in this order:

  1. transfer_detection.started — Identify internal transfers
  2. transfer_detection.completed — Transfers matched
  3. costbasis.started — Calculate gains/losses
  4. costbasis.completed — Calculation finished