Lightning Labs Lightning API

The Lightning API from Lightning Labs — 64 operation(s) for lightning.

Operations 71

GET /v1/aliases/list lncli: `listaliases` ListAliases returns the set of all aliases that have ever existed with their confirmed SCID (if it exists) and/or the base SCID (in the case of zero conf). #
GET /v1/balance/blockchain lncli: `walletbalance` WalletBalance returns total unspent outputs(confirmed and unconfirmed), all confirmed unspent outputs and all unconfirmed unspent outputs under control of th #
GET /v1/balance/channels lncli: `channelbalance` ChannelBalance returns a report on the total funds across all open channels, categorized in local/remote, pending local/remote and unsettled local/remote ba #
GET /v1/channels lncli: `listchannels` ListChannels returns a description of all the open channels that this node is a participant in. #
POST /v1/channels OpenChannelSync is a synchronous version of the OpenChannel RPC call. This call is meant to be consumed by clients to the REST proxy. As with all other sync calls, all byte slices #
DELETE /v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index} lncli: `abandonchannel` AbandonChannel removes all channel state from the database except for a close summary. This method can be used to get rid of permanently unusable channels d #
POST /v1/channels/acceptor ChannelAcceptor dispatches a bi-directional streaming RPC in which OpenChannel requests are sent to the client and the client responds with a boolean that tells LND whether or not #
GET /v1/channels/backup ExportAllChannelBackups returns static channel backups for all existing channels known to lnd. A set of regular singular static channel backups for each channel are returned. Addit #
POST /v1/channels/backup/restore lncli: `restorechanbackup` RestoreChannelBackups accepts a set of singular channel backups, or a single encrypted multi-chan backup and attempts to recover any funds remaining with #
GET /v1/channels/backup/subscribe SubscribeChannelBackups allows a client to sub-subscribe to the most up to date information concerning the state of all channel backups. Each time a new channel is added, we return #
POST /v1/channels/backup/verify lncli: `verifychanbackup` VerifyChanBackup allows a caller to verify the integrity of a channel backup snapshot. This method will accept either a packed Single or a packed Multi. S #
GET /v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index} lncli: `exportchanbackup` ExportChannelBackup attempts to return an encrypted static channel backup for the target channel identified by it channel point. The backup is encrypted w #
POST /v1/channels/batch lncli: `batchopenchannel` BatchOpenChannel attempts to open multiple single-funded channels in a single transaction in an atomic way. This means either all channel open requests su #
GET /v1/channels/closed lncli: `closedchannels` ClosedChannels returns a description of all the closed channels that this node was a participant in. #
GET /v1/channels/pending lncli: `pendingchannels` PendingChannels returns a list of all the channels that are currently considered "pending". A channel is pending if it has finished the funding workflow an #
POST /v1/channels/stream lncli: `openchannel` OpenChannel attempts to open a singly funded channel specified in the request to a remote peer. Users are able to specify a target number of blocks that the fu #
GET /v1/channels/subscribe SubscribeChannelEvents creates a uni-directional stream from the server to the client in which any updates relevant to the state of the channels are sent over. Events include new a #
POST /v1/channels/transaction-stream lncli: `sendpayment` Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a bi-directional streaming RPC for sending payments through the Lightning Network. A single RPC #
POST /v1/channels/transactions Deprecated, use routerrpc.SendPaymentV2. SendPaymentSync is the synchronous non-streaming version of SendPayment. This RPC is intended to be consumed by clients of the REST proxy. #
POST /v1/channels/transactions/route Deprecated, use routerrpc.SendToRouteV2. SendToRouteSync is a synchronous version of SendToRoute. It Will block until the payment either fails or succeeds. #
DELETE /v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index} lncli: `closechannel` CloseChannel attempts to close an active channel identified by its channel outpoint (ChannelPoint). The actions of this method can additionally be augmented t #
POST /v1/chanpolicy lncli: `updatechanpolicy` UpdateChannelPolicy allows the caller to update the fee schedule and channel policies for all channels globally, or a particular channel. #
POST /v1/custommessage lncli: `sendcustom` SendCustomMessage sends a custom peer message. #
GET /v1/custommessage/subscribe lncli: `subscribecustom` SubscribeCustomMessages subscribes to a stream of incoming custom peer messages. #
POST /v1/debuglevel lncli: `debuglevel` DebugLevel allows a caller to programmatically set the logging verbosity of lnd. The logging can be targeted according to a coarse daemon-wide logging level, or #
GET /v1/fees lncli: `feereport` FeeReport allows the caller to obtain a report detailing the current fee schedule enforced by the node globally for each channel. #
POST /v1/funding/step FundingStateStep is an advanced funding related call that allows the caller to either execute some preparatory steps for a funding workflow, or manually progress a funding workflow #
GET /v1/getdebuginfo lncli: 'getdebuginfo' GetDebugInfo returns debug information concerning the state of the daemon and its subsystems. This includes the full configuration and the latest log entries #
GET /v1/getinfo lncli: `getinfo` GetInfo returns general information concerning the lightning node including it's identity pubkey, alias, the chains it is connected to, and information concerning #
GET /v1/getrecoveryinfo * lncli: `getrecoveryinfo` GetRecoveryInfo returns information concerning the recovery mode including whether it's in a recovery mode, whether the recovery is finished, and the pro #
GET /v1/graph lncli: `describegraph` DescribeGraph returns a description of the latest graph state from the point of view of the node. The graph information is partitioned into two components: a #
GET /v1/graph/edge/{chan_id} lncli: `getchaninfo` GetChanInfo returns the latest authenticated network announcement for the given channel identified by its channel ID: an 8-byte integer which uniquely identifi #
GET /v1/graph/info lncli: `getnetworkinfo` GetNetworkInfo returns some basic stats about the known channel graph from the point of view of the node. #
GET /v1/graph/node/{pub_key} lncli: `getnodeinfo` GetNodeInfo returns the latest advertised, aggregated, and authenticated channel information for the specified node identified by its public key. #
GET /v1/graph/nodemetrics lncli: `getnodemetrics` GetNodeMetrics returns node metrics calculated from the graph. Currently the only supported metric is betweenness centrality of individual nodes. #
GET /v1/graph/routes/{pub_key}/{amt} lncli: `queryroutes` QueryRoutes attempts to query the daemon's Channel Router for a possible route to a target destination capable of carrying a specific amount of satoshis. The r #
POST /v1/graph/routes/{pub_key}/{amt} lncli: `queryroutes` QueryRoutes attempts to query the daemon's Channel Router for a possible route to a target destination capable of carrying a specific amount of satoshis. The r #
GET /v1/graph/subscribe SubscribeChannelGraph launches a streaming RPC that allows the caller to receive notifications upon any changes to the channel graph topology from the point of view of the respondi #
GET /v1/htlc-resolution/{chan_id}/{htlc_index} LookupHtlcResolution retrieves a final htlc resolution from the database. If the htlc has no final resolution yet, a NotFound grpc status code is returned. #
GET /v1/invoice/{r_hash_str} lncli: `lookupinvoice` LookupInvoice attempts to look up an invoice according to its payment hash. The passed payment hash *must* be exactly 32 bytes, if not, an error is returned. #
GET /v1/invoices lncli: `listinvoices` ListInvoices returns a list of all the invoices currently stored within the database. Any active debug invoices are ignored. It has full support for paginated #
DELETE /v1/invoices lncli: `deletecanceledinvoice` DeleteCanceledInvoice removes a canceled invoice from the database. If the invoice is not in the canceled state, an error will be returned. #
POST /v1/invoices lncli: `addinvoice` AddInvoice attempts to add a new invoice to the invoice database. Any duplicated invoices are rejected, therefore all invoices *must* have a unique payment prei #
GET /v1/invoices/subscribe SubscribeInvoices returns a uni-directional stream (server -> client) for notifying the client of newly added/settled invoices. The caller can optionally specify the add_index and/ #
POST /v1/macaroon lncli: `bakemacaroon` BakeMacaroon allows the creation of a new macaroon with custom read and write permissions. No first-party caveats are added since this can be done offline. #
POST /v1/macaroon/checkpermissions CheckMacaroonPermissions checks whether the provided macaroon contains all the provided permissions. If the macaroon is valid (e.g. all caveats are satisfied), and all permissions #
GET /v1/macaroon/ids lncli: `listmacaroonids` ListMacaroonIDs returns all root key IDs that are in use. #
GET /v1/macaroon/permissions lncli: `listpermissions` ListPermissions lists all RPC method URIs and their required macaroon permissions to access them. #
DELETE /v1/macaroon/{root_key_id} lncli: `deletemacaroonid` DeleteMacaroonID deletes the specified macaroon ID and invalidates all macaroons derived from that ID. #
POST /v1/middleware RegisterRPCMiddleware adds a new gRPC middleware to the interceptor chain. A gRPC middleware is software component external to lnd that aims to add additional business logic to lnd #
GET /v1/newaddress lncli: `newaddress` NewAddress creates a new address under control of the local wallet. #
POST /v1/onionmessage lncli: `sendonion` SendOnionMessage sends an onion message to a peer. #
GET /v1/onionmessage/subscribe lncli: `subscribeonion` SubscribeOnionMessages subscribes to a stream of incoming onion messages. #
DELETE /v1/payment lncli: `deletepayments` DeletePayment deletes an outgoing payment from DB. Note that it will not attempt to delete an In-Flight payment, since that would be unsafe. #
GET /v1/payments lncli: `listpayments` ListPayments returns a list of all outgoing payments. #
DELETE /v1/payments lncli: `deletepayments --all` DeleteAllPayments deletes all outgoing payments from DB. Note that it will not attempt to delete In-Flight payments, since that would be unsafe. #
GET /v1/payreq/{pay_req} lncli: `decodepayreq` DecodePayReq takes an encoded payment request string and attempts to decode it, returning a full description of the conditions encoded within the payment requ #
GET /v1/peers lncli: `listpeers` ListPeers returns a verbose listing of all currently active peers. #
POST /v1/peers lncli: `connect` ConnectPeer attempts to establish a connection to a remote peer. This is at the networking level, and is used for communication between nodes. This is distinct fro #
GET /v1/peers/subscribe SubscribePeerEvents creates a uni-directional stream from the server to the client in which any events relevant to the state of peers are sent over. Events include peers going onli #
DELETE /v1/peers/{pub_key} lncli: `disconnect` DisconnectPeer attempts to disconnect one peer from another identified by a given pubKey. In the case that we currently have a pending or active channel with th #
POST /v1/signmessage lncli: `signmessage` SignMessage signs a message with this node's private key. The returned signature string is `zbase32` encoded and pubkey recoverable, meaning that only the mess #
POST /v1/stop lncli: `stop` StopDaemon will send a shutdown request to the interrupt handler, triggering a graceful shutdown of the daemon. #
POST /v1/switch lncli: `fwdinghistory` ForwardingHistory allows the caller to query the htlcswitch for a record of all HTLCs forwarded within the target time range, and integer offset within that #
GET /v1/transactions lncli: `listchaintxns` GetTransactions returns a list describing all the known transactions relevant to the wallet. #
POST /v1/transactions lncli: `sendcoins` SendCoins executes a request to send coins to a particular address. Unlike SendMany, this RPC call only allows creating a single output at a time. If neither tar #
GET /v1/transactions/fee lncli: `estimatefee` EstimateFee asks the chain backend to estimate the fee rate and total fees for a transaction that pays to multiple specified outputs. #
POST /v1/transactions/many lncli: `sendmany` SendMany handles a request for a transaction that creates multiple specified outputs in parallel. If neither target_conf, or sat_per_vbyte are set, then the inter #
GET /v1/transactions/subscribe SubscribeTransactions creates a uni-directional stream from the server to the client in which any newly discovered transactions relevant to the wallet are sent over. #
GET /v1/utxos lncli: `listunspent` Deprecated, use walletrpc.ListUnspent instead. #
POST /v1/verifymessage lncli: `verifymessage` VerifyMessage verifies a signature over a message and recovers the signer's public key. The signature is only deemed valid if the recovered public key corres #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lightning-labs-lightning-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lightning-labs-lightning-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Labs LND Lightning API
  description: REST API for the Lightning Network Daemon (lnd) by Lightning Labs, providing programmatic access to Lightning Network nodes for sending and receiving Bitcoin payments, channel management, wallet operations, and routing.
  version: 1.0.0
tags:
- name: Lightning
paths:
  /v1/aliases/list:
    get:
      summary: 'lncli: `listaliases`

        ListAliases returns the set of all aliases that have ever existed with

        their confirmed SCID (if it exists) and/or the base SCID (in the case of

        zero conf).'
      operationId: Lightning_ListAliases
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcListAliasesResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
  /v1/balance/blockchain:
    get:
      summary: 'lncli: `walletbalance`

        WalletBalance returns total unspent outputs(confirmed and unconfirmed), all

        confirmed unspent outputs and all unconfirmed unspent outputs under control

        of the wallet.'
      operationId: Lightning_WalletBalance
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcWalletBalanceResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      parameters:
      - name: account
        description: 'The wallet account the balance is shown for.

          If this is not specified, the balance of the "default" account is shown.'
        in: query
        required: false
        schema:
          type: string
      - name: min_confs
        description: 'The minimum number of confirmations each one of your outputs used for the

          funding transaction must satisfy. If this is not specified, the default

          value of 1 is used.'
        in: query
        required: false
        schema:
          type: integer
          format: int32
      tags:
      - Lightning
  /v1/balance/channels:
    get:
      summary: 'lncli: `channelbalance`

        ChannelBalance returns a report on the total funds across all open channels,

        categorized in local/remote, pending local/remote and unsettled local/remote

        balances.'
      operationId: Lightning_ChannelBalance
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcChannelBalanceResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
  /v1/channels:
    get:
      summary: 'lncli: `listchannels`

        ListChannels returns a description of all the open channels that this node

        is a participant in.'
      operationId: Lightning_ListChannels
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcListChannelsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      parameters:
      - name: active_only
        in: query
        required: false
        schema:
          type: boolean
      - name: inactive_only
        in: query
        required: false
        schema:
          type: boolean
      - name: public_only
        in: query
        required: false
        schema:
          type: boolean
      - name: private_only
        in: query
        required: false
        schema:
          type: boolean
      - name: peer
        description: 'Filters the response for channels with a target peer''s pubkey. If peer is

          empty, all channels will be returned.'
        in: query
        required: false
        schema:
          type: string
          format: byte
      - name: peer_alias_lookup
        description: 'Informs the server if the peer alias lookup per channel should be

          enabled. It is turned off by default in order to avoid degradation of

          performance for existing clients.'
        in: query
        required: false
        schema:
          type: boolean
      tags:
      - Lightning
    post:
      summary: 'OpenChannelSync is a synchronous version of the OpenChannel RPC call. This

        call is meant to be consumed by clients to the REST proxy. As with all

        other sync calls, all byte slices are intended to be populated as hex

        encoded strings.'
      operationId: Lightning_OpenChannelSync
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcChannelPoint'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/lnrpcOpenChannelRequest'
        required: true
  /v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}:
    delete:
      summary: 'lncli: `abandonchannel`

        AbandonChannel removes all channel state from the database except for a

        close summary. This method can be used to get rid of permanently unusable

        channels due to bugs fixed in newer versions of lnd. This method can also be

        used to remove externally funded channels where the funding transaction was

        never broadcast. Only available for non-externally funded channels in dev

        build.'
      operationId: Lightning_AbandonChannel
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcAbandonChannelResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      parameters:
      - name: channel_point.funding_txid_str
        description: 'Hex-encoded string representing the byte-reversed hash of the funding

          transaction.'
        in: path
        required: true
        schema:
          type: string
      - name: channel_point.output_index
        description: The index of the output of the funding transaction
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: channel_point.funding_txid_bytes
        description: 'Txid of the funding transaction. When using REST, this field must be

          encoded as base64.'
        in: query
        required: false
        schema:
          type: string
          format: byte
      - name: pending_funding_shim_only
        in: query
        required: false
        schema:
          type: boolean
      - name: i_know_what_i_am_doing
        description: 'Override the requirement for being in dev mode by setting this to true and

          confirming the user knows what they are doing and this is a potential foot

          gun to lose funds if used on active channels.'
        in: query
        required: false
        schema:
          type: boolean
      tags:
      - Lightning
  /v1/channels/acceptor:
    post:
      summary: 'ChannelAcceptor dispatches a bi-directional streaming RPC in which

        OpenChannel requests are sent to the client and the client responds with

        a boolean that tells LND whether or not to accept the channel. This allows

        node operators to specify their own criteria for accepting inbound channels

        through a single persistent connection.'
      operationId: Lightning_ChannelAcceptor
      responses:
        '200':
          description: A successful response.(streaming responses)
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/lnrpcChannelAcceptRequest'
                  error:
                    $ref: '#/components/schemas/rpcStatus'
                title: Stream result of lnrpcChannelAcceptRequest
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/lnrpcChannelAcceptResponse'
        description: ' (streaming inputs)'
        required: true
  /v1/channels/backup:
    get:
      summary: 'ExportAllChannelBackups returns static channel backups for all existing

        channels known to lnd. A set of regular singular static channel backups for

        each channel are returned. Additionally, a multi-channel backup is returned

        as well, which contains a single encrypted blob containing the backups of

        each channel.'
      operationId: Lightning_ExportAllChannelBackups
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcChanBackupSnapshot'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
  /v1/channels/backup/restore:
    post:
      summary: 'lncli: `restorechanbackup`

        RestoreChannelBackups accepts a set of singular channel backups, or a

        single encrypted multi-chan backup and attempts to recover any funds

        remaining within the channel. If we are able to unpack the backup, then the

        new channel will be shown under listchannels, as well as pending channels.'
      operationId: Lightning_RestoreChannelBackups
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcRestoreBackupResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/lnrpcRestoreChanBackupRequest'
        required: true
  /v1/channels/backup/subscribe:
    get:
      summary: 'SubscribeChannelBackups allows a client to sub-subscribe to the most up to

        date information concerning the state of all channel backups. Each time a

        new channel is added, we return the new set of channels, along with a

        multi-chan backup containing the backup info for all channels. Each time a

        channel is closed, we send a new update, which contains new new chan back

        ups, but the updated set of encrypted multi-chan backups with the closed

        channel(s) removed.'
      operationId: Lightning_SubscribeChannelBackups
      responses:
        '200':
          description: A successful response.(streaming responses)
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/lnrpcChanBackupSnapshot'
                  error:
                    $ref: '#/components/schemas/rpcStatus'
                title: Stream result of lnrpcChanBackupSnapshot
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
  /v1/channels/backup/verify:
    post:
      summary: 'lncli: `verifychanbackup`

        VerifyChanBackup allows a caller to verify the integrity of a channel backup

        snapshot. This method will accept either a packed Single or a packed Multi.

        Specifying both will result in an error.'
      operationId: Lightning_VerifyChanBackup
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcVerifyChanBackupResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/lnrpcChanBackupSnapshot'
        required: true
  /v1/channels/backup/{chan_point.funding_txid_str}/{chan_point.output_index}:
    get:
      summary: 'lncli: `exportchanbackup`

        ExportChannelBackup attempts to return an encrypted static channel backup

        for the target channel identified by it channel point. The backup is

        encrypted with a key generated from the aezeed seed of the user. The

        returned backup can either be restored using the RestoreChannelBackup

        method once lnd is running, or via the InitWallet and UnlockWallet methods

        from the WalletUnlocker service.'
      operationId: Lightning_ExportChannelBackup
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcChannelBackup'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      parameters:
      - name: chan_point.funding_txid_str
        description: 'Hex-encoded string representing the byte-reversed hash of the funding

          transaction.'
        in: path
        required: true
        schema:
          type: string
      - name: chan_point.output_index
        description: The index of the output of the funding transaction
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: chan_point.funding_txid_bytes
        description: 'Txid of the funding transaction. When using REST, this field must be

          encoded as base64.'
        in: query
        required: false
        schema:
          type: string
          format: byte
      tags:
      - Lightning
  /v1/channels/batch:
    post:
      summary: 'lncli: `batchopenchannel`

        BatchOpenChannel attempts to open multiple single-funded channels in a

        single transaction in an atomic way. This means either all channel open

        requests succeed at once or all attempts are aborted if any of them fail.

        This is the safer variant of using PSBTs to manually fund a batch of

        channels through the OpenChannel RPC.'
      operationId: Lightning_BatchOpenChannel
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcBatchOpenChannelResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/lnrpcBatchOpenChannelRequest'
        required: true
  /v1/channels/closed:
    get:
      summary: 'lncli: `closedchannels`

        ClosedChannels returns a description of all the closed channels that

        this node was a participant in.'
      operationId: Lightning_ClosedChannels
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcClosedChannelsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      parameters:
      - name: cooperative
        in: query
        required: false
        schema:
          type: boolean
      - name: local_force
        in: query
        required: false
        schema:
          type: boolean
      - name: remote_force
        in: query
        required: false
        schema:
          type: boolean
      - name: breach
        in: query
        required: false
        schema:
          type: boolean
      - name: funding_canceled
        in: query
        required: false
        schema:
          type: boolean
      - name: abandoned
        in: query
        required: false
        schema:
          type: boolean
      tags:
      - Lightning
  /v1/channels/pending:
    get:
      summary: 'lncli: `pendingchannels`

        PendingChannels returns a list of all the channels that are currently

        considered "pending". A channel is pending if it has finished the funding

        workflow and is waiting for confirmations for the funding txn, or is in the

        process of closure, either initiated cooperatively or non-cooperatively.'
      operationId: Lightning_PendingChannels
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcPendingChannelsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      parameters:
      - name: include_raw_tx
        description: 'Indicates whether to include the raw transaction hex for

          waiting_close_channels.'
        in: query
        required: false
        schema:
          type: boolean
      tags:
      - Lightning
  /v1/channels/stream:
    post:
      summary: 'lncli: `openchannel`

        OpenChannel attempts to open a singly funded channel specified in the

        request to a remote peer. Users are able to specify a target number of

        blocks that the funding transaction should be confirmed in, or a manual fee

        rate to us for the funding transaction. If neither are specified, then a

        lax block confirmation target is used. Each OpenStatusUpdate will return

        the pending channel ID of the in-progress channel. Depending on the

        arguments specified in the OpenChannelRequest, this pending channel ID can

        then be used to manually progress the channel funding flow.'
      operationId: Lightning_OpenChannel
      responses:
        '200':
          description: A successful response.(streaming responses)
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/lnrpcOpenStatusUpdate'
                  error:
                    $ref: '#/components/schemas/rpcStatus'
                title: Stream result of lnrpcOpenStatusUpdate
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/lnrpcOpenChannelRequest'
        required: true
  /v1/channels/subscribe:
    get:
      summary: 'SubscribeChannelEvents creates a uni-directional stream from the server to

        the client in which any updates relevant to the state of the channels are

        sent over. Events include new active channels, inactive channels, and closed

        channels.'
      operationId: Lightning_SubscribeChannelEvents
      responses:
        '200':
          description: A successful response.(streaming responses)
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/lnrpcChannelEventUpdate'
                  error:
                    $ref: '#/components/schemas/rpcStatus'
                title: Stream result of lnrpcChannelEventUpdate
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
  /v1/channels/transaction-stream:
    post:
      summary: 'lncli: `sendpayment`

        Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a

        bi-directional streaming RPC for sending payments through the Lightning

        Network. A single RPC invocation creates a persistent bi-directional

        stream allowing clients to rapidly send payments through the Lightning

        Network with a single persistent connection.'
      operationId: Lightning_SendPayment
      responses:
        '200':
          description: A successful response.(streaming responses)
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/lnrpcSendResponse'
                  error:
                    $ref: '#/components/schemas/rpcStatus'
                title: Stream result of lnrpcSendResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/lnrpcSendRequest'
        description: ' (streaming inputs)'
        required: true
  /v1/channels/transactions:
    post:
      summary: 'Deprecated, use routerrpc.SendPaymentV2. SendPaymentSync is the synchronous

        non-streaming version of SendPayment. This RPC is intended to be consumed by

        clients of the REST proxy. Additionally, this RPC expects the destination''s

        public key and the payment hash (if any) to be encoded as hex strings.'
      operationId: Lightning_SendPaymentSync
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcSendResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/lnrpcSendRequest'
        required: true
  /v1/channels/transactions/route:
    post:
      summary: 'Deprecated, use routerrpc.SendToRouteV2. SendToRouteSync is a synchronous

        version of SendToRoute. It Will block until the payment either fails or

        succeeds.'
      operationId: Lightning_SendToRouteSync
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcSendResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/lnrpcSendToRouteRequest'
        required: true
  /v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}:
    delete:
      summary: 'lncli: `closechannel`

        CloseChannel attempts to close an active channel identified by its channel

        outpoint (ChannelPoint). The actions of this method can additionally be

        augmented to attempt a force close after a timeout period in the case of an

        inactive peer. If a non-force close (cooperative closure) is requested,

        then the user can specify either a target number of blocks until the

        closure transaction is confirmed, or a manual fee rate. If neither are

        specified, then a default lax, block confirmation target is used.'
      operationId: Lightning_CloseChannel
      responses:
        '200':
          description: A successful response.(streaming responses)
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/lnrpcCloseStatusUpdate'
                  error:
                    $ref: '#/components/schemas/rpcStatus'
                title: Stream result of lnrpcCloseStatusUpdate
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      parameters:
      - name: channel_point.funding_txid_str
        description: 'Hex-encoded string representing the byte-reversed hash of the funding

          transaction.'
        in: path
        required: true
        schema:
          type: string
      - name: channel_point.output_index
        description: The index of the output of the funding transaction
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: channel_point.funding_txid_bytes
        description: 'Txid of the funding transaction. When using REST, this field must be

          encoded as base64.'
        in: query
        required: false
        schema:
          type: string
          format: byte
      - name: force
        description: 'If true, then the channel will be closed forcibly. This means the

          current commitment transaction will be signed and broadcast.'
        in: query
        required: false
        schema:
          type: boolean
      - name: target_conf
        description: 'The target number of blocks that the closure transaction should be

          confirmed by.'
        in: query
        required: false
        schema:
          type: integer
          format: int32
      - name: sat_per_byte
        description: 'Deprecated, use sat_per_vbyte.

          A manual fee rate set in sat/vbyte that should be used when crafting the

          closure transaction.'
        in: query
        required: false
        schema:
          type: string
          format: int64
      - name: delivery_address
        description: 'An optional address to send funds to in the case of a cooperative close.

          If the channel was opened with an upfront shutdown script and this field

          is set, the request to close will fail because the channel must pay out

          to the upfront shutdown addresss.'
        in: query
        required: false
        schema:
          type: string
      - name: sat_per_vbyte
        description: 'A manual fee rate set in sat/vbyte that should be used when crafting the

          closure transaction.'
        in: query
        required: false
        schema:
          type: string
          format: uint64
      - name: max_fee_per_vbyte
        description: 'The maximum fee rate the closer is willing to pay.


          NOTE: This field is only respected if we''re the initiator of the channel.'
        in: query
        required: false
        schema:
          type: string
          format: uint64
      - name: no_wait
        description: 'If true, then the rpc call will not block while it awaits a closing txid

          to be broadcasted to the mempool. To obtain the closing tx one has to

          listen to the stream for the particular updates. Moreover if a coop close

          is specified and this flag is set to true the coop closing flow will be

          initiated even if HTLCs are active on the channel. The channel will wait

          until all HTLCs are resolved and then start the coop closing process. The

          channel will be disabled in the meantime and will disallow any new HTLCs.'
        in: query
        required: false
        schema:
          type: boolean
      tags:
      - Lightning
  /v1/chanpolicy:
    post:
      summary: 'lncli: `updatechanpolicy`

        UpdateChannelPolicy allows the caller to update the fee schedule and

        channel policies for all channels globally, or a particular channel.'
      operationId: Lightning_UpdateChannelPolicy
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcPolicyUpdateResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/lnrpcPolicyUpdateRequest'
        required: true
  /v1/custommessage:
    post:
      summary: 'lncli: `sendcustom`

        SendCustomMessage sends a custom peer message.'
      operationId: Lightning_SendCustomMessage
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/lnrpcSendCustomMessageResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
      tags:
      - Lightning
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/lnrpcSendCustomMessageRequest'
        required: true
  /v1/custommessage/subscribe:
    get:
      summary: 'lncli: `subscribecustom`

        SubscribeCustomMessages subscribes to a stream of incoming custom peer

        messages.'
      description: 'To include messages with type outside of the custom range (>= 32768) lnd

        needs to be compiled with  the `dev` build tag, and the message type to

        override should be specified in lnd''s experimental protocol configuration.'
      operationId: Lightning_SubscribeCustomMessages
      responses:
        '200':
          description: A successful response.(streaming responses)
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/lnrpcCustomMessage'
                  error:
                    $ref: '#/components/schemas/rpcStatus'
                title: Stream result of lnrpcCustomMessage
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas

# --- truncated at 32 KB (284 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/lightning-labs/refs/heads/main/openapi/lightning-labs-lightning-api-openapi.yml