SuggestSwaps returns a list of recommended swaps based on the current
state of your node's channels and it's liquidity manager parameters.
Note that only loop out suggestions are currently supported.
[EXPERIMENTAL]: endpoint is subject to change.
$ loop suggestswaps --help NAME: loop suggestswaps - show a list of suggested swaps USAGE: loop suggestswaps [arguments...] DESCRIPTION: Displays a list of suggested swaps that aim to obtain the liquidity balance as specified by the rules setin the liquidity manager.
The asset id to use to pay for the swap invoice. If set an asset client is needed to set to be able to pay the invoice.
bytes
string
asset_edge_node
The node identity public key of the peer to ask for a quote for sending out the assets and converting them to satoshis. This must be specified if an asset id is set.
bytes
string
max_limit_multiplier
An optional maximum multiplier for the rfq rate. If not set, the default will be 1.1. This means if we request a loop out quote for 1 BTC, the off chain cost will be at most 1.1 BTC.
double
number
expiry
An optional expiry unix timestamp for when the rfq quote should expire.
Requested swap amount in sat. This does not include the swap and miner fee.
int64
string
max_swap_fee
Maximum we are willing to pay the server for the swap. This value is not disclosed in the swap initiation call, but if the server asks for a higher fee, we abort the swap. Typically this value is taken from the response of the GetQuote call.
int64
string
max_miner_fee
Maximum in on-chain fees that we are willing to spend. If we want to publish the on-chain htlc and the fee estimate turns out higher than this value, we cancel the swap. max_miner_fee is typically taken from the response of the GetQuote call.
int64
string
last_hop
The last hop to use for the loop in swap. If empty, the last hop is selected based on the lowest routing fee for the swap payment from the server.
bytes
string
external_htlc
If external_htlc is true, we expect the htlc to be published by an external actor.
bool
boolean
htlc_conf_target
The number of blocks that the on chain htlc should confirm within.
int32
integer
label
An optional label for this swap. This field is limited to 500 characters and may not be one of the reserved values in loop/labels Reserved list.
string
string
initiator
An optional identification string that will be appended to the user agent string sent to the server to give information about the usage of loop. This initiator part is meant for user interfaces to add their name to give the full picture of the binary used (loopd, LiT) and the method used for triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI).
string
string
route_hints
Optional route hints to reach the destination through private channels.
Private indicates whether the destination node should be considered private. In which case, loop will generate hophints to assist with probing and payment.
Requested swap amount in sat. This does not include the swap and miner fee.
int64
string
dest
Base58 encoded destination address for the swap.
string
string
max_swap_routing_fee
Maximum off-chain fee in sat that may be paid for swap payment to the server. This limit is applied during path finding. Typically this value is taken from the response of the GetQuote call.
int64
string
max_prepay_routing_fee
Maximum off-chain fee in sat that may be paid for the prepay to the server. This limit is applied during path finding. Typically this value is taken from the response of the GetQuote call.
int64
string
max_swap_fee
Maximum we are willing to pay the server for the swap. This value is not disclosed in the swap initiation call, but if the server asks for a higher fee, we abort the swap. Typically this value is taken from the response of the GetQuote call. It includes the prepay amount.
int64
string
max_prepay_amt
Maximum amount of the swap fee that may be charged as a prepayment.
int64
string
max_miner_fee
Maximum in on-chain fees that we are willing to spend. If we want to sweep the on-chain htlc and the fee estimate turns out higher than this value, we cancel the swap. If the fee estimate is lower, we publish the sweep tx. If the sweep tx is not confirmed, we are forced to ratchet up fees until it is swept. Possibly even exceeding max_miner_fee if we get close to the htlc timeout. Because the initial publication revealed the preimage, we have no other choice. The server may already have pulled the off-chain htlc. Only when the fee becomes higher than the swap amount, we can only wait for fees to come down and hope - if we are past the timeout - that the server is not publishing the revocation. max_miner_fee is typically taken from the response of the GetQuote call.
int64
string
loop_out_channeldeprecated
Deprecated, use outgoing_chan_set. The channel to loop out, the channel to loop out is selected based on the lowest routing fee for the swap payment to the server.
uint64
string
outgoing_chan_set
A restriction on the channel set that may be used to loop out. The actual channel(s) that will be used are selected based on the lowest routing fee for the swap payment to the server.
uint64[]
array
sweep_conf_target
The number of blocks from the on-chain HTLC's confirmation height that it should be swept within.
int32
integer
htlc_confirmations
The number of confirmations that we require for the on chain htlc that will be published by the server before we reveal the preimage.
int32
integer
swap_publication_deadline
The latest time (in unix seconds) we allow the server to wait before publishing the HTLC on chain. Setting this to a larger value will give the server the opportunity to batch multiple swaps together, and wait for low-fee periods before publishing the HTLC, potentially resulting in a lower total swap fee.
uint64
string
label
An optional label for this swap. This field is limited to 500 characters and may not start with the prefix [reserved], which is used to tag labels produced by the daemon.
string
string
initiator
An optional identification string that will be appended to the user agent string sent to the server to give information about the usage of loop. This initiator part is meant for user interfaces to add their name to give the full picture of the binary used (loopd, LiT) and the method used for triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI).
string
string
account
An alternative destination address source for the swap. This field represents the name of the account in the backing lnd instance. Refer to lnd's wallet import functions for reference.
string
string
account_addr_type
The address type of the account specified in the account field.
A flag indicating whether the defined destination address does not belong to the wallet. This is used to flag whether this loop out swap could have its associated sweep batched.
bool
boolean
reservation_ids
The reservations to use for the swap. If this field is set, loop will try to use the instant out flow using the given reservations. If the reservations are not sufficient, the swap will fail. The swap amount must be equal to the sum of the amounts of the reservations.
bytes[]
array
payment_timeout
The timeout in seconds to use for off-chain payments. Note that the swap payment is attempted multiple times where each attempt will set this value as the timeout for the payment.
uint32
integer
asset_info
The optional asset information to use for the swap. If set, the swap will be paid in the specified asset using the provided edge node. An Asset client must be connected to the loop client to use this feature.
Budget not started indicates that we do not recommend any swaps because the start time for our budget has not arrived yet.
1
AUTO_REASON_SWEEP_FEES
Sweep fees indicates that the estimated fees to sweep swaps are too high right now.
2
AUTO_REASON_BUDGET_ELAPSED
Budget elapsed indicates that the autoloop budget for the period has been elapsed.
3
AUTO_REASON_IN_FLIGHT
In flight indicates that the limit on in-flight automatically dispatched swaps has already been reached.
4
AUTO_REASON_SWAP_FEE
Swap fee indicates that the server fee for a specific swap is too high.
5
AUTO_REASON_MINER_FEE
Miner fee indicates that the miner fee for a specific swap is to high.
6
AUTO_REASON_PREPAY
Prepay indicates that the prepay fee for a specific swap is too high.
7
AUTO_REASON_FAILURE_BACKOFF
Failure backoff indicates that a swap has recently failed for this target, and the backoff period has not yet passed.
8
AUTO_REASON_LOOP_OUT
Loop out indicates that a loop out swap is currently utilizing the channel, so it is not eligible.
9
AUTO_REASON_LOOP_IN
Loop In indicates that a loop in swap is currently in flight for the peer, so it is not eligible.
10
AUTO_REASON_LIQUIDITY_OK
Liquidity ok indicates that a target meets the liquidity balance expressed in its rule, so no swap is needed.
11
AUTO_REASON_BUDGET_INSUFFICIENT
Budget insufficient indicates that we cannot perform a swap because we do not have enough pending budget available. This differs from budget elapsed, because we still have some budget available, but we have allocated it to other swaps.
12
AUTO_REASON_FEE_INSUFFICIENT
Fee insufficient indicates that the fee estimate for a swap is higher than the portion of total swap amount that we allow fees to consume.