Create a Ledger via POST /api/ledgers with a name and optional description; a ledger represents a single consistent accounting namespace (e.g., one per currency or one per business unit)
Create Ledger Accounts via POST /api/ledger_accounts within the ledger: define a normal_balance (debit or credit) and a currency; create at minimum an assets account, a liabilities account, and a revenue account
Post a Ledger Transaction via POST /api/ledger_transactions with an array of ledger_entries; each entry specifies ledger_account_id, amount, direction (debit or credit), and currency; the transaction must balance (total debits = total credits)
Use metadata on the ledger transaction to attach your internal payment ID, customer ID, or correlation ID for later lookup; query ledger transactions by metadata using GET /api/ledger_transactions?metadata[key]=value
Retrieve an account's running balance via GET /api/ledger_accounts/{id} — the response includes pending_balance, posted_balance, and available_balance; use posted_balance for reconciliation
Subscribe to ledger_transaction.created and ledger_account_balance_monitors webhooks to react to balance changes in real time rather than polling
Known gotchas
Ledger transactions that do not balance are rejected by Modern Treasury at submission time — always validate that your entries sum to zero net before submitting
Pending ledger transactions affect pending_balance but not posted_balance; if you use posted_balance for account limits enforcement, a large pending debit will not block an overdraft until the transaction is posted
Ledger accounts are currency-specific; you cannot post a USD debit against a GBP credit account — create separate ledger accounts per currency and handle cross-currency entries with explicit FX conversion entries
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