Create LSPS1 order
curl --request POST \
--url http://localhost:8000/api/v1/lsps1/create_order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_pubkey": "03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad",
"lsp_balance_sat": 150000,
"client_balance_sat": 50000,
"required_channel_confirmations": 3,
"funding_confirms_within_blocks": 144,
"channel_expiry_blocks": 4032,
"announce_channel": true,
"asset_id": "rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB",
"client_asset_amount": 2500,
"rfq_id": "8e6635fb-ab37-4aed-89f4-bc9c98fb8b49",
"refund_onchain_address": "tb1qexampleaddress0000000000000000000000000",
"email": "ops@kaleidoswap.com"
}
'import requests
url = "http://localhost:8000/api/v1/lsps1/create_order"
payload = {
"client_pubkey": "03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad",
"lsp_balance_sat": 150000,
"client_balance_sat": 50000,
"required_channel_confirmations": 3,
"funding_confirms_within_blocks": 144,
"channel_expiry_blocks": 4032,
"announce_channel": True,
"asset_id": "rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB",
"client_asset_amount": 2500,
"rfq_id": "8e6635fb-ab37-4aed-89f4-bc9c98fb8b49",
"refund_onchain_address": "tb1qexampleaddress0000000000000000000000000",
"email": "ops@kaleidoswap.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client_pubkey: '03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad',
lsp_balance_sat: 150000,
client_balance_sat: 50000,
required_channel_confirmations: 3,
funding_confirms_within_blocks: 144,
channel_expiry_blocks: 4032,
announce_channel: true,
asset_id: 'rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB',
client_asset_amount: 2500,
rfq_id: '8e6635fb-ab37-4aed-89f4-bc9c98fb8b49',
refund_onchain_address: 'tb1qexampleaddress0000000000000000000000000',
email: 'ops@kaleidoswap.com'
})
};
fetch('http://localhost:8000/api/v1/lsps1/create_order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/api/v1/lsps1/create_order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_pubkey' => '03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad',
'lsp_balance_sat' => 150000,
'client_balance_sat' => 50000,
'required_channel_confirmations' => 3,
'funding_confirms_within_blocks' => 144,
'channel_expiry_blocks' => 4032,
'announce_channel' => true,
'asset_id' => 'rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB',
'client_asset_amount' => 2500,
'rfq_id' => '8e6635fb-ab37-4aed-89f4-bc9c98fb8b49',
'refund_onchain_address' => 'tb1qexampleaddress0000000000000000000000000',
'email' => 'ops@kaleidoswap.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/api/v1/lsps1/create_order"
payload := strings.NewReader("{\n \"client_pubkey\": \"03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad\",\n \"lsp_balance_sat\": 150000,\n \"client_balance_sat\": 50000,\n \"required_channel_confirmations\": 3,\n \"funding_confirms_within_blocks\": 144,\n \"channel_expiry_blocks\": 4032,\n \"announce_channel\": true,\n \"asset_id\": \"rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB\",\n \"client_asset_amount\": 2500,\n \"rfq_id\": \"8e6635fb-ab37-4aed-89f4-bc9c98fb8b49\",\n \"refund_onchain_address\": \"tb1qexampleaddress0000000000000000000000000\",\n \"email\": \"ops@kaleidoswap.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8000/api/v1/lsps1/create_order")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_pubkey\": \"03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad\",\n \"lsp_balance_sat\": 150000,\n \"client_balance_sat\": 50000,\n \"required_channel_confirmations\": 3,\n \"funding_confirms_within_blocks\": 144,\n \"channel_expiry_blocks\": 4032,\n \"announce_channel\": true,\n \"asset_id\": \"rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB\",\n \"client_asset_amount\": 2500,\n \"rfq_id\": \"8e6635fb-ab37-4aed-89f4-bc9c98fb8b49\",\n \"refund_onchain_address\": \"tb1qexampleaddress0000000000000000000000000\",\n \"email\": \"ops@kaleidoswap.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/api/v1/lsps1/create_order")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_pubkey\": \"03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad\",\n \"lsp_balance_sat\": 150000,\n \"client_balance_sat\": 50000,\n \"required_channel_confirmations\": 3,\n \"funding_confirms_within_blocks\": 144,\n \"channel_expiry_blocks\": 4032,\n \"announce_channel\": true,\n \"asset_id\": \"rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB\",\n \"client_asset_amount\": 2500,\n \"rfq_id\": \"8e6635fb-ab37-4aed-89f4-bc9c98fb8b49\",\n \"refund_onchain_address\": \"tb1qexampleaddress0000000000000000000000000\",\n \"email\": \"ops@kaleidoswap.com\"\n}"
response = http.request(request)
puts response.read_body{
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"client_pubkey": "03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad",
"lsp_balance_sat": 150000,
"client_balance_sat": 50000,
"required_channel_confirmations": 3,
"funding_confirms_within_blocks": 144,
"channel_expiry_blocks": 4032,
"token": "",
"created_at": "2026-03-11T12:00:00Z",
"announce_channel": true,
"order_state": "CREATED",
"payment": {
"bolt11": {
"state": "EXPECT_PAYMENT",
"expires_at": "2026-03-11T12:15:00Z",
"fee_total_sat": 500,
"order_total_sat": 50500,
"invoice": "lnbc1example"
},
"onchain": {
"state": "EXPECT_PAYMENT",
"expires_at": "2026-03-11T12:15:00Z",
"fee_total_sat": 500,
"order_total_sat": 50500,
"address": "tb1qmakerdeposit0000000000000000000000000",
"min_fee_for_0conf": 253,
"min_onchain_payment_confirmations": 0,
"refund_onchain_address": "tb1qexampleaddress0000000000000000000000000"
}
},
"asset_id": "rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB",
"client_asset_amount": 2500,
"rfq_id": "8e6635fb-ab37-4aed-89f4-bc9c98fb8b49",
"access_token": "ord_live_3rCkP9dG7mN4"
}{
"error_code": "LSPS1_INVALID_PARAMS",
"message": "RFQ ID is required when purchasing assets (client_asset_amount > 0). Please request a quote first.",
"details": {
"code": -32602,
"property": "rfq_id",
"message": "RFQ ID is required when purchasing assets (client_asset_amount > 0). Please request a quote first."
},
"request_id": "req_01HV8Q9X7G0Q7Y3Z"
}{
"error": "missing_api_key"
}{
"error_code": "ASSET_NOT_FOUND",
"message": "Asset not found: rgb:unknown",
"details": {},
"request_id": "req_01HV8Q9X7G0Q7Y3Z"
}{
"detail": [
{
"loc": [
"body",
"rfq_id"
],
"msg": "Field required",
"type": "missing"
}
]
}{
"error_code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests",
"details": {
"retry_after": 60
},
"request_id": "req_01HV8Q9X7G0Q7Y3Z"
}{
"error_code": "INTERNAL_ERROR",
"message": "Internal Server Error",
"details": {},
"request_id": "req_01HV8Q9X7G0Q7Y3Z"
}{
"error_code": "LSPS1_NODE_UNREACHABLE",
"message": "LSP node unreachable",
"details": {
"code": 102,
"message": "LSP node is unreachable"
},
"request_id": "req_01HV8Q9X7G0Q7Y3Z"
}lsps1
Create LSPS1 order
Create an LSPS1 channel order. When the client is purchasing assets, a fresh rfq_id must be supplied and is extended to remain valid through the payment window. The response includes a per-order access_token for later polling or rate decisions. Treat this call as non-idempotent.
POST
/
api
/
v1
/
lsps1
/
create_order
Create LSPS1 order
curl --request POST \
--url http://localhost:8000/api/v1/lsps1/create_order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_pubkey": "03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad",
"lsp_balance_sat": 150000,
"client_balance_sat": 50000,
"required_channel_confirmations": 3,
"funding_confirms_within_blocks": 144,
"channel_expiry_blocks": 4032,
"announce_channel": true,
"asset_id": "rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB",
"client_asset_amount": 2500,
"rfq_id": "8e6635fb-ab37-4aed-89f4-bc9c98fb8b49",
"refund_onchain_address": "tb1qexampleaddress0000000000000000000000000",
"email": "ops@kaleidoswap.com"
}
'import requests
url = "http://localhost:8000/api/v1/lsps1/create_order"
payload = {
"client_pubkey": "03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad",
"lsp_balance_sat": 150000,
"client_balance_sat": 50000,
"required_channel_confirmations": 3,
"funding_confirms_within_blocks": 144,
"channel_expiry_blocks": 4032,
"announce_channel": True,
"asset_id": "rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB",
"client_asset_amount": 2500,
"rfq_id": "8e6635fb-ab37-4aed-89f4-bc9c98fb8b49",
"refund_onchain_address": "tb1qexampleaddress0000000000000000000000000",
"email": "ops@kaleidoswap.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client_pubkey: '03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad',
lsp_balance_sat: 150000,
client_balance_sat: 50000,
required_channel_confirmations: 3,
funding_confirms_within_blocks: 144,
channel_expiry_blocks: 4032,
announce_channel: true,
asset_id: 'rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB',
client_asset_amount: 2500,
rfq_id: '8e6635fb-ab37-4aed-89f4-bc9c98fb8b49',
refund_onchain_address: 'tb1qexampleaddress0000000000000000000000000',
email: 'ops@kaleidoswap.com'
})
};
fetch('http://localhost:8000/api/v1/lsps1/create_order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/api/v1/lsps1/create_order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_pubkey' => '03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad',
'lsp_balance_sat' => 150000,
'client_balance_sat' => 50000,
'required_channel_confirmations' => 3,
'funding_confirms_within_blocks' => 144,
'channel_expiry_blocks' => 4032,
'announce_channel' => true,
'asset_id' => 'rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB',
'client_asset_amount' => 2500,
'rfq_id' => '8e6635fb-ab37-4aed-89f4-bc9c98fb8b49',
'refund_onchain_address' => 'tb1qexampleaddress0000000000000000000000000',
'email' => 'ops@kaleidoswap.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/api/v1/lsps1/create_order"
payload := strings.NewReader("{\n \"client_pubkey\": \"03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad\",\n \"lsp_balance_sat\": 150000,\n \"client_balance_sat\": 50000,\n \"required_channel_confirmations\": 3,\n \"funding_confirms_within_blocks\": 144,\n \"channel_expiry_blocks\": 4032,\n \"announce_channel\": true,\n \"asset_id\": \"rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB\",\n \"client_asset_amount\": 2500,\n \"rfq_id\": \"8e6635fb-ab37-4aed-89f4-bc9c98fb8b49\",\n \"refund_onchain_address\": \"tb1qexampleaddress0000000000000000000000000\",\n \"email\": \"ops@kaleidoswap.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8000/api/v1/lsps1/create_order")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_pubkey\": \"03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad\",\n \"lsp_balance_sat\": 150000,\n \"client_balance_sat\": 50000,\n \"required_channel_confirmations\": 3,\n \"funding_confirms_within_blocks\": 144,\n \"channel_expiry_blocks\": 4032,\n \"announce_channel\": true,\n \"asset_id\": \"rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB\",\n \"client_asset_amount\": 2500,\n \"rfq_id\": \"8e6635fb-ab37-4aed-89f4-bc9c98fb8b49\",\n \"refund_onchain_address\": \"tb1qexampleaddress0000000000000000000000000\",\n \"email\": \"ops@kaleidoswap.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/api/v1/lsps1/create_order")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_pubkey\": \"03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad\",\n \"lsp_balance_sat\": 150000,\n \"client_balance_sat\": 50000,\n \"required_channel_confirmations\": 3,\n \"funding_confirms_within_blocks\": 144,\n \"channel_expiry_blocks\": 4032,\n \"announce_channel\": true,\n \"asset_id\": \"rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB\",\n \"client_asset_amount\": 2500,\n \"rfq_id\": \"8e6635fb-ab37-4aed-89f4-bc9c98fb8b49\",\n \"refund_onchain_address\": \"tb1qexampleaddress0000000000000000000000000\",\n \"email\": \"ops@kaleidoswap.com\"\n}"
response = http.request(request)
puts response.read_body{
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"client_pubkey": "03e7156ae33b0a208d0744199163177e909e80176e55d97a2f221ede0f934dd9ad",
"lsp_balance_sat": 150000,
"client_balance_sat": 50000,
"required_channel_confirmations": 3,
"funding_confirms_within_blocks": 144,
"channel_expiry_blocks": 4032,
"token": "",
"created_at": "2026-03-11T12:00:00Z",
"announce_channel": true,
"order_state": "CREATED",
"payment": {
"bolt11": {
"state": "EXPECT_PAYMENT",
"expires_at": "2026-03-11T12:15:00Z",
"fee_total_sat": 500,
"order_total_sat": 50500,
"invoice": "lnbc1example"
},
"onchain": {
"state": "EXPECT_PAYMENT",
"expires_at": "2026-03-11T12:15:00Z",
"fee_total_sat": 500,
"order_total_sat": 50500,
"address": "tb1qmakerdeposit0000000000000000000000000",
"min_fee_for_0conf": 253,
"min_onchain_payment_confirmations": 0,
"refund_onchain_address": "tb1qexampleaddress0000000000000000000000000"
}
},
"asset_id": "rgb:2NZGjyz-pJePUgegh-RLHbpx1Hy-iZMagWiZZ-qY4AxGymW-yCEYwwB",
"client_asset_amount": 2500,
"rfq_id": "8e6635fb-ab37-4aed-89f4-bc9c98fb8b49",
"access_token": "ord_live_3rCkP9dG7mN4"
}{
"error_code": "LSPS1_INVALID_PARAMS",
"message": "RFQ ID is required when purchasing assets (client_asset_amount > 0). Please request a quote first.",
"details": {
"code": -32602,
"property": "rfq_id",
"message": "RFQ ID is required when purchasing assets (client_asset_amount > 0). Please request a quote first."
},
"request_id": "req_01HV8Q9X7G0Q7Y3Z"
}{
"error": "missing_api_key"
}{
"error_code": "ASSET_NOT_FOUND",
"message": "Asset not found: rgb:unknown",
"details": {},
"request_id": "req_01HV8Q9X7G0Q7Y3Z"
}{
"detail": [
{
"loc": [
"body",
"rfq_id"
],
"msg": "Field required",
"type": "missing"
}
]
}{
"error_code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests",
"details": {
"retry_after": 60
},
"request_id": "req_01HV8Q9X7G0Q7Y3Z"
}{
"error_code": "INTERNAL_ERROR",
"message": "Internal Server Error",
"details": {},
"request_id": "req_01HV8Q9X7G0Q7Y3Z"
}{
"error_code": "LSPS1_NODE_UNREACHABLE",
"message": "LSP node unreachable",
"details": {
"code": 102,
"message": "LSP node is unreachable"
},
"request_id": "req_01HV8Q9X7G0Q7Y3Z"
}Authorizations
Pass a Kaleido API key such as kld_live_c_....
Body
application/json
Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 1Required range:
x >= 1Optional email for notifications
Response
LSPS1 order created successfully.
Available options:
CREATED, CHANNEL_OPENING, COMPLETED, FAILED, PENDING_RATE_DECISION Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I