Working with Large Integer Values in Formance

Last updated: July 4, 2025

Formance supports storing very large integer values, which is particularly useful when working with cryptocurrencies or other high-precision numerical data. Here's what you need to know about handling large integers in Formance:

Storage Capacity

The Formance ledger can store integers up to 131,072 digits in length. This is more than sufficient for handling cryptocurrency amounts like ETH or other use cases requiring high numerical precision.

JavaScript Integration Considerations

While the Formance API and database can handle very large integers, you may encounter display or processing limitations when working with these numbers in JavaScript-based applications or tools. This is due to JavaScript's inherent number precision limitations.

If you're building integrations that handle large integers, you should either:

  • Use BigInt in JavaScript when available

  • Process the numbers as strings

API String Representation

To help handle large integers in various tools and SDKs, Formance provides an option to receive large integer values as strings instead of numbers. This can be enabled by using a custom header in your API requests (contact support for the specific header details as this feature is being implemented).

Note: The underlying data storage remains the same - this is purely a presentation layer option to ensure compatibility with different tools and frameworks.