Skip to main content

API + engineering reference

For engineers building against, extending, or operating the Valura Ledger.

If you want the "what" and "why" instead of the "how", read the Documentation.

What's here

SectionFor
Getting startedLocal install, run, hit an endpoint
EngineDouble-entry core, posting rules, recost, reconciliation
Data modelCoAs + posting worked examples for both books
EndpointsEvery API endpoint with request/response shapes
OperationsConfig, migrations, testing, troubleshooting, deployment
FAQCommon technical Q&A

Ground rules

  • The ledger is the source of truth. Every ingested event becomes ONE Transaction and TWO+ balanced JournalLines. Trial balance = 0 always.
  • The ledger never writes to a broker. Every external call is a GET (except auth-chain POSTs for token exchange). Broker writes belong somewhere else.
  • One codebase, two books. Same FastAPI app, same schema, same migrations — different DB per legal entity. UAE code stays byte-identical on every India change.
  • Idempotency everywhere. (source, source_txn_id) is the unique key on every ingested transaction. Duplicate delivery is a no-op.
  • Pure functions where possible. Posting rules, matchers, aggregators are pure over shaped inputs. Testable without a DB.