RGB LSPS1 APIs
The RGB LSPS1 APIs enable management of channels and liquidity services following the Lightning Service Provider Specification (LSPS1). This section provides details on available endpoints and their usage.Get LSP Information
Endpoint
GET /api/v1/lsps1/get_info
Description
Retrieve information about the RGB Lightning Service Provider, including available assets, liquidity options, and channel configurations.Response Structure
options: Configuration settings for orders and channels.assets: List of assets managed by the LSP.
Example Response
Create Order
Endpoint
POST /api/v1/lsps1/create_order
Description
Create a new order for a channel with the RGB Lightning Service Provider.Request Body
| Field | Type | Description |
|---|---|---|
client_pubkey | String | Public key of the client (required). |
lsp_balance_sat | Integer | Balance in satoshis for the LSP side of the channel. |
client_balance_sat | Integer | Balance in satoshis for the client side of the channel. |
required_channel_confirmations | Integer | Number of confirmations required for the channel. |
funding_confirms_within_blocks | Integer | Number of blocks within which funding should be confirmed. |
channel_expiry_blocks | Integer | Number of blocks after which the channel expires. |
announce_channel | Boolean | Whether to announce the channel publicly. |
asset_id (optional) | String | ID of the RGB asset for the channel. |
lsp_asset_amount (optional) | Integer | Amount of RGB asset for the LSP side. |
client_asset_amount (optional) | Integer | Amount of RGB asset for the client side. |
Example Request
Response Body
| Field | Type | Description |
|---|---|---|
order_id | String | Unique identifier for the created order. |
client_pubkey | String | The public key of the client. |
lsp_balance_sat | Integer | The balance in satoshis for the LSP side of the channel. |
client_balance_sat | Integer | The balance in satoshis for the client side of the channel. |
required_channel_confirmations | Integer | The number of confirmations required for the channel. |
funding_confirms_within_blocks | Integer | The number of blocks within which funding should be confirmed. |
channel_expiry_blocks | Integer | The number of blocks after which the channel expires. |
token | String / Null | The token associated with the order (if provided). |
created_at | String date-time | Timestamp of order creation. |
expires_at | String date-time | Timestamp when the order expires. |
announce_channel | Boolean | Whether the channel will be announced publicly. |
order_state | String | Current state of the order (e.g., “CREATED”). |
payment | Object | Payment details including fees, invoice or on-chain address. |
channel (optional) | Object / Null | Channel details if the channel has been created. |
asset_id (optional) | String / Null | The ID of the RGB asset for the channel. |
lsp_asset_amount (optional) | Integer / Null | The amount of RGB asset for the LSP side. |
client_asset_amount (optional) | Integer / Null | The amount of RGB asset for the client side. |
Example Response
Get Order
Endpoint
POST /api/v1/lsps1/get_order
Description
Retrieve information about an existing order.Request Body
| Field | Type | Description |
|---|---|---|
order_id | String | Unique identifier of the order. |
Example Request
Example Response
The response structure is identical to thecreate_order endpoint.
For more details about trading and market operations, proceed to Market APIs.