API
Hydro
Mutations
Recurring Plan

Recurring Plan

More info on plans here.

The pubkey field in the mutation input is optional. If included, the setup will be based on that specific node. If omitted, the setup defaults to the pubkey associated with the user's account.

Mutation

mutation CreateLiquidityPlan($input: CreateLiquidityPlanInput) {
  createLiquidityPlan(input: $input) {
    id
    metric
    pubkey
    is_enabled
    is_deleted
    recurring_plan {
      demand
      frequency_minutes
    }
  }
}

Variables

Hydro utilizes the frequency_minutes field to determine the frequency at which it checks whether your Plan should be activated. The minimum checking interval is set to hourly, equivalent to 60 minutes.

{
  "input": {
    "recurring_plan": {
      "demand": number,
      "frequency_minutes": number,
      "metric": "RECURRING",
      "pubkey": string
    }
  }
}

Authenticated Endpoint: requires an API key

See it in the Apollo Explorer here (opens in a new tab).