Build a deterministic close plan with decision points and estimates.
curl --request POST \
--url https://api.lumenwipe.com/v1/{network}/close/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "GABC...XYZ",
"destination": "GDEF...UVW",
"decisions": [
{}
]
}
'import requests
url = "https://api.lumenwipe.com/v1/{network}/close/plan"
payload = {
"source": "GABC...XYZ",
"destination": "GDEF...UVW",
"decisions": [{}]
}
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({source: 'GABC...XYZ', destination: 'GDEF...UVW', decisions: [{}]})
};
fetch('https://api.lumenwipe.com/v1/{network}/close/plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lumenwipe.com/v1/{network}/close/plan",
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([
'source' => 'GABC...XYZ',
'destination' => 'GDEF...UVW',
'decisions' => [
[
]
]
]),
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 := "https://api.lumenwipe.com/v1/{network}/close/plan"
payload := strings.NewReader("{\n \"source\": \"GABC...XYZ\",\n \"destination\": \"GDEF...UVW\",\n \"decisions\": [\n {}\n ]\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("https://api.lumenwipe.com/v1/{network}/close/plan")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"GABC...XYZ\",\n \"destination\": \"GDEF...UVW\",\n \"decisions\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lumenwipe.com/v1/{network}/close/plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": \"GABC...XYZ\",\n \"destination\": \"GDEF...UVW\",\n \"decisions\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"planHash": "<string>",
"status": "ready",
"steps": [
{
"index": 123,
"type": "NORMALIZE_SIGNERS",
"title": "<string>",
"description": "<string>",
"operationCount": 123,
"estimatedFeeLumens": "0.0000100",
"txXdr": "<string>",
"status": "pending",
"txHash": "<string>",
"error": "<string>",
"actualFeeLumens": "<string>",
"affectedAsset": "<string>",
"affectedContract": "<string>",
"fallbackToIssuer": true
}
],
"decisionPoints": [
{
"id": "<string>",
"type": "asset_disposition",
"subject": {},
"options": [
{
"id": "<string>",
"recommended": true,
"quote": {
"estimatedReceive": "42.5000000",
"path": [
"<string>"
],
"source": "soroswap",
"expiresAtLedger": 123
},
"note": "<string>"
}
],
"default": "<string>",
"required": true
}
],
"blockers": [
{
"code": "<string>",
"message": "<string>",
"helpUrl": "<string>"
}
],
"estimate": {
"feeStroops": "<string>",
"freedReserveXlm": "<string>",
"feeParts": {
"classicStroops": "<string>",
"sorobanSimulatedStroops": "<string>",
"sorobanBoundStroops": "<string>"
},
"exitPayouts": {
"targets": [
{
"protocol": "blend",
"contract": "<string>",
"parts": [
{
"asset": "native",
"stroops": "57213000"
}
]
}
],
"quotes": {}
}
},
"execution": {
"estimatedTransactionCount": 123,
"transactions": [
{
"order": 123,
"covers": [
"NORMALIZE_SIGNERS"
],
"reason": "op_batch"
}
]
}
}{
"error": {
"code": "invalid_network",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "key_network_not_allowed",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "account_not_found",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "state_changed",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "payload_too_large",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "unsupported_media_type",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "account_too_large",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "rate_limited",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "plan_failed",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "provider_response_unusable",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "destination_read_failed",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}Close
Build a deterministic close plan with decision points and estimates.
POST
/
v1
/
{network}
/
close
/
plan
Build a deterministic close plan with decision points and estimates.
curl --request POST \
--url https://api.lumenwipe.com/v1/{network}/close/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "GABC...XYZ",
"destination": "GDEF...UVW",
"decisions": [
{}
]
}
'import requests
url = "https://api.lumenwipe.com/v1/{network}/close/plan"
payload = {
"source": "GABC...XYZ",
"destination": "GDEF...UVW",
"decisions": [{}]
}
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({source: 'GABC...XYZ', destination: 'GDEF...UVW', decisions: [{}]})
};
fetch('https://api.lumenwipe.com/v1/{network}/close/plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lumenwipe.com/v1/{network}/close/plan",
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([
'source' => 'GABC...XYZ',
'destination' => 'GDEF...UVW',
'decisions' => [
[
]
]
]),
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 := "https://api.lumenwipe.com/v1/{network}/close/plan"
payload := strings.NewReader("{\n \"source\": \"GABC...XYZ\",\n \"destination\": \"GDEF...UVW\",\n \"decisions\": [\n {}\n ]\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("https://api.lumenwipe.com/v1/{network}/close/plan")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"GABC...XYZ\",\n \"destination\": \"GDEF...UVW\",\n \"decisions\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lumenwipe.com/v1/{network}/close/plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": \"GABC...XYZ\",\n \"destination\": \"GDEF...UVW\",\n \"decisions\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"planHash": "<string>",
"status": "ready",
"steps": [
{
"index": 123,
"type": "NORMALIZE_SIGNERS",
"title": "<string>",
"description": "<string>",
"operationCount": 123,
"estimatedFeeLumens": "0.0000100",
"txXdr": "<string>",
"status": "pending",
"txHash": "<string>",
"error": "<string>",
"actualFeeLumens": "<string>",
"affectedAsset": "<string>",
"affectedContract": "<string>",
"fallbackToIssuer": true
}
],
"decisionPoints": [
{
"id": "<string>",
"type": "asset_disposition",
"subject": {},
"options": [
{
"id": "<string>",
"recommended": true,
"quote": {
"estimatedReceive": "42.5000000",
"path": [
"<string>"
],
"source": "soroswap",
"expiresAtLedger": 123
},
"note": "<string>"
}
],
"default": "<string>",
"required": true
}
],
"blockers": [
{
"code": "<string>",
"message": "<string>",
"helpUrl": "<string>"
}
],
"estimate": {
"feeStroops": "<string>",
"freedReserveXlm": "<string>",
"feeParts": {
"classicStroops": "<string>",
"sorobanSimulatedStroops": "<string>",
"sorobanBoundStroops": "<string>"
},
"exitPayouts": {
"targets": [
{
"protocol": "blend",
"contract": "<string>",
"parts": [
{
"asset": "native",
"stroops": "57213000"
}
]
}
],
"quotes": {}
}
},
"execution": {
"estimatedTransactionCount": 123,
"transactions": [
{
"order": 123,
"covers": [
"NORMALIZE_SIGNERS"
],
"reason": "op_batch"
}
]
}
}{
"error": {
"code": "invalid_network",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "key_network_not_allowed",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "account_not_found",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "state_changed",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "payload_too_large",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "unsupported_media_type",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "account_too_large",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "rate_limited",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "plan_failed",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "provider_response_unusable",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}{
"error": {
"code": "destination_read_failed",
"message": "<string>",
"details": {},
"requestId": "<string>"
}
}Body
application/json
Response
Plan with pending decision points, fee and freed-reserve estimate.