askrene-constrain-channel

askrene-constrain-channel -- Command to add channel capacity restrictions to layer

SYNOPSIS

askrene-constrain-channel layer short_channel_id_dir amount_msat [upper]

DESCRIPTION

Command added in v26.12.

The askrene-constrain-channel RPC command adds constraints on the channel's liquidity. An upper constraint tells askrene that the liquidity available for use must not be greater than the value provided. A lower constraint tells askrene that the provided value can be routed with 100% certainty.

  • layer (string): The name of the layer to apply this change to.
  • short_channel_id_dir (short_channel_id_dir): The short channel id and direction to apply this change to.
  • amount_msat (msat): The amount we set as an upper or lower constraint.
  • upper (boolean, optional): Whether this constraint is an upper or a lower value. The default is True.

RETURN VALUE

On success, an object containing constraints is returned. It is an array of objects, where each object contains:

  • short_channel_id_dir (short_channel_id_dir): The short channel id and direction
  • layer (string): The name of the layer to apply this change to.
  • timestamp (u64): The UNIX timestamp when this constraint was created.
  • maximum_msat (msat, optional): The maximum value which this channel could pass.
  • minimum_msat (msat, optional): The minimum value which this channel can pass with 100% certainty.

AUTHOR

Lagrang3 [email protected] is mainly responsible.

SEE ALSO

lightning-getroutes(7), lightning-askrene-channel-observation(7), lightning-askrene-disable-node(7), lightning-askrene-create-channel(7), lightning-askrene-listlayers(7), lightning-askrene-age(7)

RESOURCES

Main web site: https://github.com/ElementsProject/lightning

EXAMPLES

Example 1:

Request:

lightning-cli askrene-constrain-channel -k "layer"="test_layers" "short_channel_id_dir"="0x0x1/1" "amount_msat"=100000 "upper"=False
{
  "id": "example:askrene-constrain-channel#1",
  "method": "askrene-constrain-channel",
  "params": {
    "layer": "test_layers",
    "short_channel_id_dir": "0x0x1/1",
    "amount_msat": 100000,
    "upper": false
  }
}

Response:

{
  "constraints": [
    {
      "layer": "test_layers",
      "short_channel_id_dir": "0x0x1/1",
      "timestamp": 1738000000,
      "minimum_msat": 100000
    }
  ]
}

Core Lightning is Blockstream's open-source implementation of the Lightning Network optimised for performance. It is highly customizable through modular expandability.

© 2026 Core Lightning, a Blockstream project.
All rights reserved.

X Twitter Logo Streamline Icon: https://streamlinehq.com

X

The official Core Lightning X(Twitter) handle to follow project updates and announcements.

Github Logo 2 Streamline Icon: https://streamlinehq.com

Github

Github repository for source code, issues, and contributions. Visit our project here to explore or contibute.

Telegram

Community-driven telegram group where most of the node operators hang out. Go to https://t.me/lightningd to join.

Discord

Community-driven discord server where the devs flock together. Go to https://discord.gg/V6ay9yNhBQ to join.