Skip to content

Numscript

Programming language for financial ledgers.

Self-hostedNot yet verified
Report issueDemo online
Apache-2.0

Open the official app on numscript.org

This tool is hosted by its maintainers. Click below to open numscript.org in a new tab — it's their official demo.

Browse finance tools →

What's next with Numscript?

Choose how you want to get started.

Use it free

Open the official tool or demo — no account needed.

Free

Self-host it

Run the open-source version on your own infrastructure.

Open

What is Numscript?

Numscript is a domain-specific language (DSL) embedded within the Formance Ledger platform, designed to model and execute financial transactions programmatically. It enables developers to define complex financial workflows with atomic multi-posting transactions, ensuring consistency and accuracy in asset management. Formance Ledger, which hosts Numscript, serves as a programmable financial core for fintech applications, offering account-based modeling and state management for assets. This tool is primarily used by fintech developers and financial service providers who require precise control over financial operations, such as managing user balances or digital asset exchanges. Numscript addresses the challenge of maintaining centralized, auditable records of financial transactions while supporting customizable business logic through its scripting capabilities.

How it works

Numscript is a built-in DSL within Formance Ledger that allows developers to define financial transactions and workflows. It abstracts the complexity of ledger operations, enabling precise control over asset movements and account states. Its primary purpose is to facilitate atomic, multi-posting transactions that ensure data integrity in financial systems. By using Numscript, developers can model intricate financial scenarios while leveraging the state management of Formance Ledger. Numscript supports account-based modeling, allowing developers to represent financial entities and their interactions. It enables the creation of complex transaction logic, such as conditional transfers or multi-party settlements, through a declarative syntax.

How to use it

  1. 1Install Formance Ledger and configure the environment to support Numscript scripts. 2. Define financial entities and transaction rules using Numscript syntax within the ledger's configuration. 3. Test scripts in a sandboxed environment to validate transaction logic. 4. Deploy validated scripts to the production ledger for real-time financial operations. Practical tips include using the ledger's CLI tools for script execution, leveraging pre-built templates for common financial workflows, and monitoring transaction logs for debugging.

What it can do

  • ledger programming

Use cases

Assumptions and limitations

Assumptions

  • source: https://github.com/numary/ledger
  • license: Apache-2.0 — free to use
  • privacy: Self-hosted — you control your data

Limitations

  • Limited community support due to niche use case
  • Requires expertise in financial modeling and DSL syntax
  • Dependent on Formance Ledger's ecosystem for full functionality
  • Scalability constraints in high-throughput environments
  • Lack of standardized tooling for script development

Understanding the result

Programming language for financial ledgers.

Tool details

  • Clearly flagged when a network request is needed.
  • No account, no sign-up, and no tracking of your content.
  • Powered by (Apache-2.0).
Built with
(numary/ledger)
License
Apache-2.0
Runs locally
No — requires a network request
Verification
Not yet verified
Input
Query
Output
Text
Open-source source & license

Built with numary/ledger. OpenToolVault provides the discovery and browser interface while crediting the original project maintainers.

Built with
License
Apache-2.0
View source on GitHub

Open-source project

OpenToolVault is an independent directory. We are not affiliated with or endorsed by this project.

References

Frequently asked

What is Numscript used for?

Numscript is used to define financial transactions and workflows within Formance Ledger. It enables developers to model complex financial operations, such as multi-party settlements or conditional transfers, while ensuring atomicity and data integrity in financial systems.

How does Numscript handle transaction consistency?

Numscript leverages Formance Ledger's atomic transaction framework to ensure all operations within a single script execute as a single, indivisible unit. If any part of the transaction fails, the entire operation is rolled back, preserving the ledger's consistency and preventing partial updates.

How do I implement a conditional transfer using Numscript?

To implement a conditional transfer, define a script that checks a condition (e.g., account balance) and executes the transfer only if the condition is met. Example: `if account('user123').balance > 1000 then transfer 500 from user123 to vendorX`.

How does Numscript compare to SQL for financial modeling?

Numscript is tailored for financial workflows with built-in support for atomic multi-posting transactions, whereas SQL is a general-purpose query language. Numscript abstracts ledger operations, making it more efficient for financial applications, while SQL requires manual handling of transaction consistency.

What should I do if my Numscript script fails?

Check the error logs for syntax or runtime issues. Verify that all referenced accounts exist and have sufficient balances. Simplify the script to isolate the problem, then gradually rebuild complexity. Use the ledger's debugging tools to trace transaction execution steps.

Spotted something wrong with Numscript, or want to maintain it? See how to help.