Ledger balances
Create balance monitor
How to create a balance monitor in Blnk.
/balance-monitorsAuthorization
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_idstring
Specifies the balance id of the ledger balance to be monitored.
conditionobject
Defines the criteria for monitoring a specific balance type.
triggerstring
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.
descriptionstring
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.