# Loop

[Lightning Loop](https://lightning.engineering/posts/2020-02-05-loop-beta/) is a service that allows users to make a Lightning transaction to an onchain Bitcoin address (Loop Out), or send on-chain Bitcoin directly into a Lightning channel (Loop In). Loop can help manage channel liquidity, for example, by emptying out a channel and [acquiring inbound capacity](https://docs.lightning.engineering/the-lightning-network/liquidity/how-to-get-inbound-capacity-on-the-lightning-network) (or refilling a depleted channel).

Lightning Loop uses submarine swaps to transact non-custodially, meaning that Loop is trustless. Loop Out transactions are batched to save on transaction fees.

Loop uses [L402s](https://docs.lightning.engineering/the-lightning-network/l402/l402) for authentication.

{% content-ref url="loop/get-started" %}
[get-started](https://docs.lightning.engineering/lightning-network-tools/loop/get-started)
{% endcontent-ref %}

{% content-ref url="loop/the-loop-cli" %}
[the-loop-cli](https://docs.lightning.engineering/lightning-network-tools/loop/the-loop-cli)
{% endcontent-ref %}

{% content-ref url="loop/autoloop" %}
[autoloop](https://docs.lightning.engineering/lightning-network-tools/loop/autoloop)
{% endcontent-ref %}

{% content-ref url="loop/static-loop-in-addresses" %}
[static-loop-in-addresses](https://docs.lightning.engineering/lightning-network-tools/loop/static-loop-in-addresses)
{% endcontent-ref %}

{% content-ref url="loop/instant-loop-outs" %}
[instant-loop-outs](https://docs.lightning.engineering/lightning-network-tools/loop/instant-loop-outs)
{% endcontent-ref %}

{% content-ref url="loop/peer-with-loop" %}
[peer-with-loop](https://docs.lightning.engineering/lightning-network-tools/loop/peer-with-loop)
{% endcontent-ref %}

{% embed url="<https://lightning.engineering/api-docs/api/loop/>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lightning.engineering/lightning-network-tools/loop.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
