Ledger balances

Create balance monitor

How to create a balance monitor in Blnk.

POST/balance-monitors

Authorization

If set, the API uses an API key for authentication. Include the following header in your requests: X-blnk-key: <api-key>.

Replace <api-key> with your secret API key. Ensure the key is kept secure and not exposed in public repositories or client-side code.

See also: Core API key.

Body

balance_idstringrequiredbody

Specifies the balance id of the ledger balance to be monitored.

conditionobjectrequiredbody

Defines the criteria for monitoring a specific balance type.

triggerstringdefault edgebody

How you want the monitor to behave. edge notifies you once when the rule first matches, then stays quiet until the amount no longer matches.

level notifies you on every transaction that updates the balance while the rule still matches.

descriptionstringbody

A brief explanation of the purpose of the monitor.

Response

monitor_idstring

The unique id of the balance monitor.

triggerstring

edge or level.

condition_stateboolean

Last value of the condition. Present when trigger is edge. Omitted when trigger is level.

created_atstring

Date and time when the monitor was created.

condition.precise_valuenumber

Minor units Blnk compares against. value multiplied by precision.