hydra

Create or update a Hydra in-head low-balance rule. (admin access required)

Changed on

Upserts a rule (keyed by participant + asset) that alerts when the participant's own in-head balance for the asset falls below the threshold, and optionally auto-tops-up from its assigned funding wallet.

post/hydra/low-balance

Request

  • Base URL: ./../api/v1/ (relative, and the document was published on a file host, not at the API’s origin)
  • URL: ./../api/v1/hydra/low-balance
  • Auth: API key in header token

Request body

hydraLocalParticipantIdstring required

Local participant whose in-head balance to monitor

assetUnitstring required

"lovelace" or a policyId+assetName hex unit

thresholdAmountstring required

Alert when the in-head balance falls below this

enabledboolean
topupEnabledboolean

Auto top-up from the assigned funding wallet when low

topupAmountstring

Exact amount deposited by each auto top-up (carved into its own L1 UTxO first)

Example request

{
  "hydraLocalParticipantId": "cuid_v2_auto_generated",
  "assetUnit": "lovelace",
  "thresholdAmount": "50000000",
  "enabled": true,
  "topupEnabled": false
}

Response

Upserted rule

status'success' required

Example response

{
  "status": "success",
  "data": {
    "rule": {
      "id": "cuid_v2_auto_generated",
      "createdAt": "1970-01-01T00:00:00.000Z",
      "updatedAt": "1970-01-01T00:00:00.000Z",
      "hydraLocalParticipantId": "cuid_v2_auto_generated",
      "assetUnit": "lovelace",
      "thresholdAmount": "50000000",
      "enabled": true,
      "topupEnabled": false,
      "topupAmount": null,
      "status": "Unknown",
      "lastKnownAmount": null,
      "lastCheckedAt": null,
      "lastAlertedAt": null
    }
  }
}

Changes