Create the debit and credit accounts first via the create_accounts operation, specifying ledger (an integer you define per currency), code (account type), and flags such as debits_must_not_exceed_credits for asset accounts
Construct a Transfer object with id (unique u128), debit_account_id, credit_account_id, amount, ledger, code, and a user_data field for your internal reference; set pending_id to zero for a posted transfer
Submit the transfer via create_transfers; TigerBeetle atomically validates that the debit account will not violate its balance constraints before posting
Query account balances using lookup_accounts with the account id to retrieve debits_posted, credits_posted, and the derived balance
For two-phase (pending/post) flows, first create a transfer with flags.pending = true, then post or void it with a second transfer referencing the pending_id
Run periodic reconciliation by summing all transfers in a ledger and verifying that total debits equal total credits across all accounts
Known gotchas
TigerBeetle amounts are unsigned integers; all values are in the smallest denomination of your currency (e.g., cents), so define your ledger unit convention before writing any data
Transfer IDs must be globally unique u128 values — reusing an ID returns an error code rather than idempotently succeeding, unlike some other ledger APIs
TigerBeetle does not store arbitrary metadata beyond user_data_128 and user_data_64; store full context in your application database and reference it via these fields
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp