Use the blnk balances command to create and manage balances in your Blnk server.

Ensure that your Blnk server is running and connected to the CLI to use this command.

1. Create new balance

To create a new balance:

Shell
blnk balances create
Output
? Ledger ID: <ledger-id>
? Currency: <currency>
? Metadata (JSON format): <metadata>
FieldDescription
<ledger-id>The unique id of the ledger that this balance belongs to.
<currency>The currency in which transactions recorded in this balance will be recorded.
<metadata>Custom info written in JSON format, e.g. {"first_name":"Sandra", "last_name":"Baileys"}. If you have no metadata, you can leave it blank like this: {}

A new balance is now created and added to your ledger.

2. View balances

To view all of the balances in your server:

Shell
blnk balances list

3. Search balances

Search is used to query and find data in your Blnk server. To search your balances with the Blnk CLI, you can use the following options with the blnk balances list command.

OptionsDescription
-p or --page <number>Page number (default: “1”)
--per-page <number>Results per page (default: “10”)
-s or --search <term>What you are searching for (default: ”*“)
-q or --query-by <fields>Fields to query your search term by (default: “currency, balance_id”)

For example, the command below searches for a ledger balance with a specific balance_id in your Blnk server:

Shell
blnk balances list -s "<balance_id>"

Read our Search docs to learn more about Search.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool.

To ask questions or discuss issues, please join our Discord community.

Get access to Blnk Cloud.

Manage your Blnk Ledger and explore advanced features (access control & collaboration, anomaly detection, secure storage & file management, etc.) in one dashboard.

Was this page helpful?