API
Hydro
Mutations

Hydro Mutations

Create a Value Check Plan

Value check plans are either the capacity or the inbound liquidity plans.

Query

Authenticated Endpoint: requires an API key

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

mutation CreateLiquidityPlan($input: CreateLiquidityPlanInput) {
  createLiquidityPlan(input: $input) {
    id
    value_check_plan {
      frequency_minutes
      operator
      trigger_value
    }
  }
}

Variables

{
  "input": {
    "value_check_plan": {
      "frequency_minutes": number,
      "metric": "CAPACITY" || "INBOUND_LIQUIDITY",
      "pubkey": string,
      "trigger_value": number
    }
  }
}

Create a Recurring Plan

More info on recurring plans here.

Query

Authenticated Endpoint: requires an API key

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

mutation CreateLiquidityPlan($input: CreateLiquidityPlanInput) {
  createLiquidityPlan(input: $input) {
    id
    recurring_plan {
      demand
      frequency_minutes
    }
  }
}

Variables

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

Create a One Time Plan

More info on one-time plans here.

Query

Authenticated Endpoint: requires an API key

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

mutation CreateLiquidityPlan($input: CreateLiquidityPlanInput) {
  createLiquidityPlan(input: $input) {
    id
    one_time_plan {
      date
      demand
    }
  }
}

Variables

{
  "input": {
    "one_time_plan": {
      "date": ISO FORMATTED DATE, // Example: 2023-11-01T13:26:35Z
      "demand": number,
      "metric": "ONE_TIME",
      "pubkey": string
    }
  }
}