GET Get the parameters that the daemon's liquidity manager is currently configured with. This may be nil if nothing is configured.
{{baseUrl}}/v1/liquidity/params/:offchainAsset
QUERY PARAMS

offchainAsset
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/liquidity/params/:offchainAsset");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/liquidity/params/:offchainAsset")
require "http/client"

url = "{{baseUrl}}/v1/liquidity/params/:offchainAsset"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/liquidity/params/:offchainAsset"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/liquidity/params/:offchainAsset");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/liquidity/params/:offchainAsset"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/liquidity/params/:offchainAsset HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/liquidity/params/:offchainAsset")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/liquidity/params/:offchainAsset"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/liquidity/params/:offchainAsset")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/liquidity/params/:offchainAsset")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/liquidity/params/:offchainAsset');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/liquidity/params/:offchainAsset'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/liquidity/params/:offchainAsset';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/liquidity/params/:offchainAsset',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/liquidity/params/:offchainAsset")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/liquidity/params/:offchainAsset',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/liquidity/params/:offchainAsset'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/liquidity/params/:offchainAsset');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/liquidity/params/:offchainAsset'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/liquidity/params/:offchainAsset';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/liquidity/params/:offchainAsset"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/liquidity/params/:offchainAsset" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/liquidity/params/:offchainAsset",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/liquidity/params/:offchainAsset');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/liquidity/params/:offchainAsset');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/liquidity/params/:offchainAsset');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/liquidity/params/:offchainAsset' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/liquidity/params/:offchainAsset' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/liquidity/params/:offchainAsset")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/liquidity/params/:offchainAsset"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/liquidity/params/:offchainAsset"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/liquidity/params/:offchainAsset")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/liquidity/params/:offchainAsset') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/liquidity/params/:offchainAsset";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/liquidity/params/:offchainAsset
http GET {{baseUrl}}/v1/liquidity/params/:offchainAsset
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/liquidity/params/:offchainAsset
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/liquidity/params/:offchainAsset")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Get the summary of the cost we paid for swaps.
{{baseUrl}}/v1/cost/summary
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/cost/summary");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/cost/summary")
require "http/client"

url = "{{baseUrl}}/v1/cost/summary"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/cost/summary"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/cost/summary");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/cost/summary"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/cost/summary HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/cost/summary")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/cost/summary"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/cost/summary")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/cost/summary")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/cost/summary');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/cost/summary'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/cost/summary';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/cost/summary',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/cost/summary")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/cost/summary',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/cost/summary'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/cost/summary');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/cost/summary'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/cost/summary';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/cost/summary"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/cost/summary" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/cost/summary",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/cost/summary');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/cost/summary');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/cost/summary');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/cost/summary' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/cost/summary' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/cost/summary")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/cost/summary"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/cost/summary"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/cost/summary")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/cost/summary') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/cost/summary";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/cost/summary
http GET {{baseUrl}}/v1/cost/summary
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/cost/summary
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/cost/summary")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET get -v1-info
{{baseUrl}}/v1/info
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/info");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/info")
require "http/client"

url = "{{baseUrl}}/v1/info"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/info"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/info");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/info"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/info HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/info")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/info"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/info")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/info")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/info');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/info'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/info';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/info',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/info")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/info',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/info'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/info');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/info'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/info';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/info"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/info" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/info",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/info');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/info');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/info');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/info' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/info' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/info")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/info"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/info"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/info")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/info') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/info";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/info
http GET {{baseUrl}}/v1/info
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/info
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/info")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET get -v1-version
{{baseUrl}}/v1/version
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/version");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/version")
require "http/client"

url = "{{baseUrl}}/v1/version"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/version"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/version");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/version"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/version HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/version")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/version"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/version")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/version")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/version');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/version'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/version';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/version',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/version")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/version',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/version'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/version');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/version'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/version';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/version"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/version" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/version",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/version');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/version');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/version');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/version' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/version' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/version")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/version"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/version"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/version")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/version') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/version";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/version
http GET {{baseUrl}}/v1/version
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/version
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/version")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Get suggestion for the swaps.
{{baseUrl}}/v1/auto/suggest/:offchainAsset
QUERY PARAMS

offchainAsset
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/auto/suggest/:offchainAsset");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/auto/suggest/:offchainAsset")
require "http/client"

url = "{{baseUrl}}/v1/auto/suggest/:offchainAsset"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/auto/suggest/:offchainAsset"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/auto/suggest/:offchainAsset");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/auto/suggest/:offchainAsset"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/auto/suggest/:offchainAsset HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/auto/suggest/:offchainAsset")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/auto/suggest/:offchainAsset"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/auto/suggest/:offchainAsset")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/auto/suggest/:offchainAsset")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/auto/suggest/:offchainAsset');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/auto/suggest/:offchainAsset'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/auto/suggest/:offchainAsset';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/auto/suggest/:offchainAsset',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/auto/suggest/:offchainAsset")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/auto/suggest/:offchainAsset',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/auto/suggest/:offchainAsset'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/auto/suggest/:offchainAsset');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/v1/auto/suggest/:offchainAsset'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/auto/suggest/:offchainAsset';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/auto/suggest/:offchainAsset"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/auto/suggest/:offchainAsset" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/auto/suggest/:offchainAsset",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/auto/suggest/:offchainAsset');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/auto/suggest/:offchainAsset');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/auto/suggest/:offchainAsset');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/auto/suggest/:offchainAsset' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/auto/suggest/:offchainAsset' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/auto/suggest/:offchainAsset")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/auto/suggest/:offchainAsset"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/auto/suggest/:offchainAsset"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/auto/suggest/:offchainAsset")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/auto/suggest/:offchainAsset') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/auto/suggest/:offchainAsset";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/auto/suggest/:offchainAsset
http GET {{baseUrl}}/v1/auto/suggest/:offchainAsset
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/auto/suggest/:offchainAsset
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/auto/suggest/:offchainAsset")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST post -v1-loop-in
{{baseUrl}}/v1/loop/in
BODY json

{
  "amount": 0,
  "last_hop": "",
  "channel_id": "",
  "pair_id": "",
  "label": "",
  "max_miner_fee": 0,
  "max_swap_fee": 0,
  "htlc_conf_target": 0
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/loop/in");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/loop/in" {:content-type :json
                                                       :form-params {:amount 0
                                                                     :last_hop ""
                                                                     :channel_id ""
                                                                     :pair_id ""
                                                                     :label ""
                                                                     :max_miner_fee 0
                                                                     :max_swap_fee 0
                                                                     :htlc_conf_target 0}})
require "http/client"

url = "{{baseUrl}}/v1/loop/in"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/loop/in"),
    Content = new StringContent("{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/loop/in");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/loop/in"

	payload := strings.NewReader("{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/loop/in HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 155

{
  "amount": 0,
  "last_hop": "",
  "channel_id": "",
  "pair_id": "",
  "label": "",
  "max_miner_fee": 0,
  "max_swap_fee": 0,
  "htlc_conf_target": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/loop/in")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/loop/in"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/loop/in")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/loop/in")
  .header("content-type", "application/json")
  .body("{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}")
  .asString();
const data = JSON.stringify({
  amount: 0,
  last_hop: '',
  channel_id: '',
  pair_id: '',
  label: '',
  max_miner_fee: 0,
  max_swap_fee: 0,
  htlc_conf_target: 0
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/loop/in');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/loop/in',
  headers: {'content-type': 'application/json'},
  data: {
    amount: 0,
    last_hop: '',
    channel_id: '',
    pair_id: '',
    label: '',
    max_miner_fee: 0,
    max_swap_fee: 0,
    htlc_conf_target: 0
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/loop/in';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"amount":0,"last_hop":"","channel_id":"","pair_id":"","label":"","max_miner_fee":0,"max_swap_fee":0,"htlc_conf_target":0}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/loop/in',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "amount": 0,\n  "last_hop": "",\n  "channel_id": "",\n  "pair_id": "",\n  "label": "",\n  "max_miner_fee": 0,\n  "max_swap_fee": 0,\n  "htlc_conf_target": 0\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/loop/in")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/loop/in',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  amount: 0,
  last_hop: '',
  channel_id: '',
  pair_id: '',
  label: '',
  max_miner_fee: 0,
  max_swap_fee: 0,
  htlc_conf_target: 0
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/loop/in',
  headers: {'content-type': 'application/json'},
  body: {
    amount: 0,
    last_hop: '',
    channel_id: '',
    pair_id: '',
    label: '',
    max_miner_fee: 0,
    max_swap_fee: 0,
    htlc_conf_target: 0
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/loop/in');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  amount: 0,
  last_hop: '',
  channel_id: '',
  pair_id: '',
  label: '',
  max_miner_fee: 0,
  max_swap_fee: 0,
  htlc_conf_target: 0
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/loop/in',
  headers: {'content-type': 'application/json'},
  data: {
    amount: 0,
    last_hop: '',
    channel_id: '',
    pair_id: '',
    label: '',
    max_miner_fee: 0,
    max_swap_fee: 0,
    htlc_conf_target: 0
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/loop/in';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"amount":0,"last_hop":"","channel_id":"","pair_id":"","label":"","max_miner_fee":0,"max_swap_fee":0,"htlc_conf_target":0}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @0,
                              @"last_hop": @"",
                              @"channel_id": @"",
                              @"pair_id": @"",
                              @"label": @"",
                              @"max_miner_fee": @0,
                              @"max_swap_fee": @0,
                              @"htlc_conf_target": @0 };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/loop/in"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/loop/in" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/loop/in",
  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([
    'amount' => 0,
    'last_hop' => '',
    'channel_id' => '',
    'pair_id' => '',
    'label' => '',
    'max_miner_fee' => 0,
    'max_swap_fee' => 0,
    'htlc_conf_target' => 0
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/loop/in', [
  'body' => '{
  "amount": 0,
  "last_hop": "",
  "channel_id": "",
  "pair_id": "",
  "label": "",
  "max_miner_fee": 0,
  "max_swap_fee": 0,
  "htlc_conf_target": 0
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/loop/in');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'amount' => 0,
  'last_hop' => '',
  'channel_id' => '',
  'pair_id' => '',
  'label' => '',
  'max_miner_fee' => 0,
  'max_swap_fee' => 0,
  'htlc_conf_target' => 0
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'amount' => 0,
  'last_hop' => '',
  'channel_id' => '',
  'pair_id' => '',
  'label' => '',
  'max_miner_fee' => 0,
  'max_swap_fee' => 0,
  'htlc_conf_target' => 0
]));
$request->setRequestUrl('{{baseUrl}}/v1/loop/in');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/loop/in' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "amount": 0,
  "last_hop": "",
  "channel_id": "",
  "pair_id": "",
  "label": "",
  "max_miner_fee": 0,
  "max_swap_fee": 0,
  "htlc_conf_target": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/loop/in' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "amount": 0,
  "last_hop": "",
  "channel_id": "",
  "pair_id": "",
  "label": "",
  "max_miner_fee": 0,
  "max_swap_fee": 0,
  "htlc_conf_target": 0
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/loop/in", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/loop/in"

payload = {
    "amount": 0,
    "last_hop": "",
    "channel_id": "",
    "pair_id": "",
    "label": "",
    "max_miner_fee": 0,
    "max_swap_fee": 0,
    "htlc_conf_target": 0
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/loop/in"

payload <- "{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/loop/in")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/loop/in') do |req|
  req.body = "{\n  \"amount\": 0,\n  \"last_hop\": \"\",\n  \"channel_id\": \"\",\n  \"pair_id\": \"\",\n  \"label\": \"\",\n  \"max_miner_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"htlc_conf_target\": 0\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/loop/in";

    let payload = json!({
        "amount": 0,
        "last_hop": "",
        "channel_id": "",
        "pair_id": "",
        "label": "",
        "max_miner_fee": 0,
        "max_swap_fee": 0,
        "htlc_conf_target": 0
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/loop/in \
  --header 'content-type: application/json' \
  --data '{
  "amount": 0,
  "last_hop": "",
  "channel_id": "",
  "pair_id": "",
  "label": "",
  "max_miner_fee": 0,
  "max_swap_fee": 0,
  "htlc_conf_target": 0
}'
echo '{
  "amount": 0,
  "last_hop": "",
  "channel_id": "",
  "pair_id": "",
  "label": "",
  "max_miner_fee": 0,
  "max_swap_fee": 0,
  "htlc_conf_target": 0
}' |  \
  http POST {{baseUrl}}/v1/loop/in \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "amount": 0,\n  "last_hop": "",\n  "channel_id": "",\n  "pair_id": "",\n  "label": "",\n  "max_miner_fee": 0,\n  "max_swap_fee": 0,\n  "htlc_conf_target": 0\n}' \
  --output-document \
  - {{baseUrl}}/v1/loop/in
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "amount": 0,
  "last_hop": "",
  "channel_id": "",
  "pair_id": "",
  "label": "",
  "max_miner_fee": 0,
  "max_swap_fee": 0,
  "htlc_conf_target": 0
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/loop/in")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "id": "tY8iDo"
}
POST post -v1-loop-out
{{baseUrl}}/v1/loop/out
HEADERS

Cookie
{{apiKey}}
BODY json

{
  "channel_ids": [],
  "pair_id": "",
  "address": "",
  "amount": 0,
  "swap_tx_conf_requirement": 0,
  "label": "",
  "max_swap_routing_fee": 0,
  "max_prepay_routing_fee": 0,
  "max_swap_fee": 0,
  "max_prepay_amount": 0,
  "max_miner_fee": 0,
  "sweep_conf_target": 0
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/loop/out");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "cookie: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_COOKIE, "{{apiKey}}");

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/loop/out" {:headers {:cookie "{{apiKey}}"}
                                                        :content-type :json
                                                        :form-params {:channel_ids []
                                                                      :pair_id ""
                                                                      :address ""
                                                                      :amount 0
                                                                      :swap_tx_conf_requirement 0
                                                                      :label ""
                                                                      :max_swap_routing_fee 0
                                                                      :max_prepay_routing_fee 0
                                                                      :max_swap_fee 0
                                                                      :max_prepay_amount 0
                                                                      :max_miner_fee 0
                                                                      :sweep_conf_target 0}})
require "http/client"

url = "{{baseUrl}}/v1/loop/out"
headers = HTTP::Headers{
  "cookie" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var clientHandler = new HttpClientHandler
{
    UseCookies = false,
};
var client = new HttpClient(clientHandler);
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/loop/out"),
    Headers =
    {
        { "cookie", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/loop/out");
var request = new RestRequest("", Method.Post);
request.AddHeader("cookie", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/loop/out"

	payload := strings.NewReader("{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("cookie", "{{apiKey}}")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/loop/out HTTP/1.1
Cookie: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 275

{
  "channel_ids": [],
  "pair_id": "",
  "address": "",
  "amount": 0,
  "swap_tx_conf_requirement": 0,
  "label": "",
  "max_swap_routing_fee": 0,
  "max_prepay_routing_fee": 0,
  "max_swap_fee": 0,
  "max_prepay_amount": 0,
  "max_miner_fee": 0,
  "sweep_conf_target": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/loop/out")
  .setHeader("cookie", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/loop/out"))
    .header("cookie", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/loop/out")
  .post(body)
  .addHeader("cookie", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/loop/out")
  .header("cookie", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}")
  .asString();
const data = JSON.stringify({
  channel_ids: [],
  pair_id: '',
  address: '',
  amount: 0,
  swap_tx_conf_requirement: 0,
  label: '',
  max_swap_routing_fee: 0,
  max_prepay_routing_fee: 0,
  max_swap_fee: 0,
  max_prepay_amount: 0,
  max_miner_fee: 0,
  sweep_conf_target: 0
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/loop/out');
xhr.setRequestHeader('cookie', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/loop/out',
  headers: {cookie: '{{apiKey}}', 'content-type': 'application/json'},
  data: {
    channel_ids: [],
    pair_id: '',
    address: '',
    amount: 0,
    swap_tx_conf_requirement: 0,
    label: '',
    max_swap_routing_fee: 0,
    max_prepay_routing_fee: 0,
    max_swap_fee: 0,
    max_prepay_amount: 0,
    max_miner_fee: 0,
    sweep_conf_target: 0
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/loop/out';
const options = {
  method: 'POST',
  headers: {cookie: '{{apiKey}}', 'content-type': 'application/json'},
  body: '{"channel_ids":[],"pair_id":"","address":"","amount":0,"swap_tx_conf_requirement":0,"label":"","max_swap_routing_fee":0,"max_prepay_routing_fee":0,"max_swap_fee":0,"max_prepay_amount":0,"max_miner_fee":0,"sweep_conf_target":0}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/loop/out',
  method: 'POST',
  headers: {
    cookie: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "channel_ids": [],\n  "pair_id": "",\n  "address": "",\n  "amount": 0,\n  "swap_tx_conf_requirement": 0,\n  "label": "",\n  "max_swap_routing_fee": 0,\n  "max_prepay_routing_fee": 0,\n  "max_swap_fee": 0,\n  "max_prepay_amount": 0,\n  "max_miner_fee": 0,\n  "sweep_conf_target": 0\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/loop/out")
  .post(body)
  .addHeader("cookie", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/loop/out',
  headers: {
    cookie: '{{apiKey}}',
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  channel_ids: [],
  pair_id: '',
  address: '',
  amount: 0,
  swap_tx_conf_requirement: 0,
  label: '',
  max_swap_routing_fee: 0,
  max_prepay_routing_fee: 0,
  max_swap_fee: 0,
  max_prepay_amount: 0,
  max_miner_fee: 0,
  sweep_conf_target: 0
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/loop/out',
  headers: {cookie: '{{apiKey}}', 'content-type': 'application/json'},
  body: {
    channel_ids: [],
    pair_id: '',
    address: '',
    amount: 0,
    swap_tx_conf_requirement: 0,
    label: '',
    max_swap_routing_fee: 0,
    max_prepay_routing_fee: 0,
    max_swap_fee: 0,
    max_prepay_amount: 0,
    max_miner_fee: 0,
    sweep_conf_target: 0
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/loop/out');

req.headers({
  cookie: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  channel_ids: [],
  pair_id: '',
  address: '',
  amount: 0,
  swap_tx_conf_requirement: 0,
  label: '',
  max_swap_routing_fee: 0,
  max_prepay_routing_fee: 0,
  max_swap_fee: 0,
  max_prepay_amount: 0,
  max_miner_fee: 0,
  sweep_conf_target: 0
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/loop/out',
  headers: {cookie: '{{apiKey}}', 'content-type': 'application/json'},
  data: {
    channel_ids: [],
    pair_id: '',
    address: '',
    amount: 0,
    swap_tx_conf_requirement: 0,
    label: '',
    max_swap_routing_fee: 0,
    max_prepay_routing_fee: 0,
    max_swap_fee: 0,
    max_prepay_amount: 0,
    max_miner_fee: 0,
    sweep_conf_target: 0
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/loop/out';
const options = {
  method: 'POST',
  headers: {cookie: '{{apiKey}}', 'content-type': 'application/json'},
  body: '{"channel_ids":[],"pair_id":"","address":"","amount":0,"swap_tx_conf_requirement":0,"label":"","max_swap_routing_fee":0,"max_prepay_routing_fee":0,"max_swap_fee":0,"max_prepay_amount":0,"max_miner_fee":0,"sweep_conf_target":0}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"cookie": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"channel_ids": @[  ],
                              @"pair_id": @"",
                              @"address": @"",
                              @"amount": @0,
                              @"swap_tx_conf_requirement": @0,
                              @"label": @"",
                              @"max_swap_routing_fee": @0,
                              @"max_prepay_routing_fee": @0,
                              @"max_swap_fee": @0,
                              @"max_prepay_amount": @0,
                              @"max_miner_fee": @0,
                              @"sweep_conf_target": @0 };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/loop/out"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/loop/out" in
let headers = Header.add_list (Header.init ()) [
  ("cookie", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/loop/out",
  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([
    'channel_ids' => [
        
    ],
    'pair_id' => '',
    'address' => '',
    'amount' => 0,
    'swap_tx_conf_requirement' => 0,
    'label' => '',
    'max_swap_routing_fee' => 0,
    'max_prepay_routing_fee' => 0,
    'max_swap_fee' => 0,
    'max_prepay_amount' => 0,
    'max_miner_fee' => 0,
    'sweep_conf_target' => 0
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json",
    "cookie: {{apiKey}}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/loop/out', [
  'body' => '{
  "channel_ids": [],
  "pair_id": "",
  "address": "",
  "amount": 0,
  "swap_tx_conf_requirement": 0,
  "label": "",
  "max_swap_routing_fee": 0,
  "max_prepay_routing_fee": 0,
  "max_swap_fee": 0,
  "max_prepay_amount": 0,
  "max_miner_fee": 0,
  "sweep_conf_target": 0
}',
  'headers' => [
    'content-type' => 'application/json',
    'cookie' => '{{apiKey}}',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/loop/out');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'cookie' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'channel_ids' => [
    
  ],
  'pair_id' => '',
  'address' => '',
  'amount' => 0,
  'swap_tx_conf_requirement' => 0,
  'label' => '',
  'max_swap_routing_fee' => 0,
  'max_prepay_routing_fee' => 0,
  'max_swap_fee' => 0,
  'max_prepay_amount' => 0,
  'max_miner_fee' => 0,
  'sweep_conf_target' => 0
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'channel_ids' => [
    
  ],
  'pair_id' => '',
  'address' => '',
  'amount' => 0,
  'swap_tx_conf_requirement' => 0,
  'label' => '',
  'max_swap_routing_fee' => 0,
  'max_prepay_routing_fee' => 0,
  'max_swap_fee' => 0,
  'max_prepay_amount' => 0,
  'max_miner_fee' => 0,
  'sweep_conf_target' => 0
]));
$request->setRequestUrl('{{baseUrl}}/v1/loop/out');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'cookie' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("cookie", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/loop/out' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "channel_ids": [],
  "pair_id": "",
  "address": "",
  "amount": 0,
  "swap_tx_conf_requirement": 0,
  "label": "",
  "max_swap_routing_fee": 0,
  "max_prepay_routing_fee": 0,
  "max_swap_fee": 0,
  "max_prepay_amount": 0,
  "max_miner_fee": 0,
  "sweep_conf_target": 0
}'
$headers=@{}
$headers.Add("cookie", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/loop/out' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "channel_ids": [],
  "pair_id": "",
  "address": "",
  "amount": 0,
  "swap_tx_conf_requirement": 0,
  "label": "",
  "max_swap_routing_fee": 0,
  "max_prepay_routing_fee": 0,
  "max_swap_fee": 0,
  "max_prepay_amount": 0,
  "max_miner_fee": 0,
  "sweep_conf_target": 0
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}"

headers = {
    'cookie': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/v1/loop/out", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/loop/out"

payload = {
    "channel_ids": [],
    "pair_id": "",
    "address": "",
    "amount": 0,
    "swap_tx_conf_requirement": 0,
    "label": "",
    "max_swap_routing_fee": 0,
    "max_prepay_routing_fee": 0,
    "max_swap_fee": 0,
    "max_prepay_amount": 0,
    "max_miner_fee": 0,
    "sweep_conf_target": 0
}
headers = {
    "cookie": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/loop/out"

payload <- "{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), set_cookies(`{{apiKey}}"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/loop/out")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["cookie"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/loop/out') do |req|
  req.headers['cookie'] = '{{apiKey}}'
  req.body = "{\n  \"channel_ids\": [],\n  \"pair_id\": \"\",\n  \"address\": \"\",\n  \"amount\": 0,\n  \"swap_tx_conf_requirement\": 0,\n  \"label\": \"\",\n  \"max_swap_routing_fee\": 0,\n  \"max_prepay_routing_fee\": 0,\n  \"max_swap_fee\": 0,\n  \"max_prepay_amount\": 0,\n  \"max_miner_fee\": 0,\n  \"sweep_conf_target\": 0\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/loop/out";

    let payload = json!({
        "channel_ids": (),
        "pair_id": "",
        "address": "",
        "amount": 0,
        "swap_tx_conf_requirement": 0,
        "label": "",
        "max_swap_routing_fee": 0,
        "max_prepay_routing_fee": 0,
        "max_swap_fee": 0,
        "max_prepay_amount": 0,
        "max_miner_fee": 0,
        "sweep_conf_target": 0
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("cookie", "{{apiKey}}".parse().unwrap());
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/loop/out \
  --header 'content-type: application/json' \
  --header 'cookie: {{apiKey}}' \
  --cookie '{{apiKey}}' \
  --data '{
  "channel_ids": [],
  "pair_id": "",
  "address": "",
  "amount": 0,
  "swap_tx_conf_requirement": 0,
  "label": "",
  "max_swap_routing_fee": 0,
  "max_prepay_routing_fee": 0,
  "max_swap_fee": 0,
  "max_prepay_amount": 0,
  "max_miner_fee": 0,
  "sweep_conf_target": 0
}'
echo '{
  "channel_ids": [],
  "pair_id": "",
  "address": "",
  "amount": 0,
  "swap_tx_conf_requirement": 0,
  "label": "",
  "max_swap_routing_fee": 0,
  "max_prepay_routing_fee": 0,
  "max_swap_fee": 0,
  "max_prepay_amount": 0,
  "max_miner_fee": 0,
  "sweep_conf_target": 0
}' |  \
  http POST {{baseUrl}}/v1/loop/out \
  content-type:application/json \
  cookie:'{{apiKey}}'
wget --quiet \
  --method POST \
  --header 'cookie: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "channel_ids": [],\n  "pair_id": "",\n  "address": "",\n  "amount": 0,\n  "swap_tx_conf_requirement": 0,\n  "label": "",\n  "max_swap_routing_fee": 0,\n  "max_prepay_routing_fee": 0,\n  "max_swap_fee": 0,\n  "max_prepay_amount": 0,\n  "max_miner_fee": 0,\n  "sweep_conf_target": 0\n}' \
  --output-document \
  - {{baseUrl}}/v1/loop/out
import Foundation

let headers = [
  "cookie": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "channel_ids": [],
  "pair_id": "",
  "address": "",
  "amount": 0,
  "swap_tx_conf_requirement": 0,
  "label": "",
  "max_swap_routing_fee": 0,
  "max_prepay_routing_fee": 0,
  "max_swap_fee": 0,
  "max_prepay_amount": 0,
  "max_miner_fee": 0,
  "sweep_conf_target": 0
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/loop/out")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "id": "tY8iDo"
}
GET Get the full history of swaps. This might take long if you have a lots of entries in a database.
{{baseUrl}}/v1/swaps/history
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/swaps/history");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/swaps/history")
require "http/client"

url = "{{baseUrl}}/v1/swaps/history"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/swaps/history"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/swaps/history");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/swaps/history"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/swaps/history HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/swaps/history")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/swaps/history"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/swaps/history")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/swaps/history")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/swaps/history');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/swaps/history'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/swaps/history';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/swaps/history',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/swaps/history")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/swaps/history',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/swaps/history'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/swaps/history');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/swaps/history'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/swaps/history';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/swaps/history"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/swaps/history" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/swaps/history",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/swaps/history');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/swaps/history');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/swaps/history');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/swaps/history' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/swaps/history' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/swaps/history")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/swaps/history"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/swaps/history"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/swaps/history")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/swaps/history') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/swaps/history";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/swaps/history
http GET {{baseUrl}}/v1/swaps/history
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/swaps/history
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/swaps/history")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Get the list of ongoing swaps. (GET)
{{baseUrl}}/v1/swaps/ongoing
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/swaps/ongoing");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/swaps/ongoing")
require "http/client"

url = "{{baseUrl}}/v1/swaps/ongoing"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/swaps/ongoing"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/swaps/ongoing");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/swaps/ongoing"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/swaps/ongoing HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/swaps/ongoing")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/swaps/ongoing"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/swaps/ongoing")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/swaps/ongoing")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/swaps/ongoing');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/swaps/ongoing'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/swaps/ongoing';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/swaps/ongoing',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/swaps/ongoing")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/swaps/ongoing',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/swaps/ongoing'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/swaps/ongoing');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/swaps/ongoing'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/swaps/ongoing';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/swaps/ongoing"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/swaps/ongoing" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/swaps/ongoing",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/swaps/ongoing');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/swaps/ongoing');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/swaps/ongoing');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/swaps/ongoing' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/swaps/ongoing' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/swaps/ongoing")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/swaps/ongoing"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/swaps/ongoing"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/swaps/ongoing")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/swaps/ongoing') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/swaps/ongoing";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/swaps/ongoing
http GET {{baseUrl}}/v1/swaps/ongoing
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/swaps/ongoing
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/swaps/ongoing")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
GET Get the list of ongoing swaps.
{{baseUrl}}/v1/swaps/:id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/swaps/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/v1/swaps/:id")
require "http/client"

url = "{{baseUrl}}/v1/swaps/:id"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/v1/swaps/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/swaps/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/swaps/:id"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/v1/swaps/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/swaps/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/swaps/:id"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/swaps/:id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/swaps/:id")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/v1/swaps/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/v1/swaps/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/swaps/:id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/swaps/:id',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/v1/swaps/:id")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/swaps/:id',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {method: 'GET', url: '{{baseUrl}}/v1/swaps/:id'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/v1/swaps/:id');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {method: 'GET', url: '{{baseUrl}}/v1/swaps/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/swaps/:id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/swaps/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/swaps/:id" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/swaps/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/v1/swaps/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/v1/swaps/:id');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/swaps/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/swaps/:id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/swaps/:id' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/v1/swaps/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/swaps/:id"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/swaps/:id"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/swaps/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/v1/swaps/:id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/swaps/:id";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/v1/swaps/:id
http GET {{baseUrl}}/v1/swaps/:id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/v1/swaps/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/swaps/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
POST Overwrites the current set of parameters for the daemon's liquidity manager.
{{baseUrl}}/v1/liquidity/params/:offchainAsset
BODY json

{
  "parameters": {
    "rules": [
      {
        "incoming_threshold_percent": 0,
        "outgoing_threshold_percent": 0,
        "pubkey": "",
        "channel_id": "",
        "type": ""
      }
    ],
    "fee_ppm": 0,
    "sweep_fee_rate_sat_per_kvbyte": 0,
    "max_swap_fee_ppm": 0,
    "max_routing_fee_ppm": 0,
    "max_prepay_routing_fee_ppm": 0,
    "max_prepay_sat": 0,
    "max_miner_fee_sat": 0,
    "sweep_conf_target": 0,
    "failure_backoff_sec": 0,
    "autoloop": false,
    "auto_max_in_flight": 0,
    "min_swap_amount_loopout": 0,
    "max_swap_amount_loopout": 0,
    "min_swap_amount_loopin": 0,
    "max_swap_amount_loopin": 0,
    "onchain_asset": "",
    "htlc_conf_target": 0
  }
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/liquidity/params/:offchainAsset");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/v1/liquidity/params/:offchainAsset" {:content-type :json
                                                                               :form-params {:parameters {:rules [{:incoming_threshold_percent 0
                                                                                                                   :outgoing_threshold_percent 0
                                                                                                                   :pubkey ""
                                                                                                                   :channel_id ""
                                                                                                                   :type ""}]
                                                                                                          :fee_ppm 0
                                                                                                          :sweep_fee_rate_sat_per_kvbyte 0
                                                                                                          :max_swap_fee_ppm 0
                                                                                                          :max_routing_fee_ppm 0
                                                                                                          :max_prepay_routing_fee_ppm 0
                                                                                                          :max_prepay_sat 0
                                                                                                          :max_miner_fee_sat 0
                                                                                                          :sweep_conf_target 0
                                                                                                          :failure_backoff_sec 0
                                                                                                          :autoloop false
                                                                                                          :auto_max_in_flight 0
                                                                                                          :min_swap_amount_loopout 0
                                                                                                          :max_swap_amount_loopout 0
                                                                                                          :min_swap_amount_loopin 0
                                                                                                          :max_swap_amount_loopin 0
                                                                                                          :onchain_asset ""
                                                                                                          :htlc_conf_target 0}}})
require "http/client"

url = "{{baseUrl}}/v1/liquidity/params/:offchainAsset"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/v1/liquidity/params/:offchainAsset"),
    Content = new StringContent("{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/liquidity/params/:offchainAsset");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/v1/liquidity/params/:offchainAsset"

	payload := strings.NewReader("{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/v1/liquidity/params/:offchainAsset HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 712

{
  "parameters": {
    "rules": [
      {
        "incoming_threshold_percent": 0,
        "outgoing_threshold_percent": 0,
        "pubkey": "",
        "channel_id": "",
        "type": ""
      }
    ],
    "fee_ppm": 0,
    "sweep_fee_rate_sat_per_kvbyte": 0,
    "max_swap_fee_ppm": 0,
    "max_routing_fee_ppm": 0,
    "max_prepay_routing_fee_ppm": 0,
    "max_prepay_sat": 0,
    "max_miner_fee_sat": 0,
    "sweep_conf_target": 0,
    "failure_backoff_sec": 0,
    "autoloop": false,
    "auto_max_in_flight": 0,
    "min_swap_amount_loopout": 0,
    "max_swap_amount_loopout": 0,
    "min_swap_amount_loopin": 0,
    "max_swap_amount_loopin": 0,
    "onchain_asset": "",
    "htlc_conf_target": 0
  }
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/liquidity/params/:offchainAsset")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/v1/liquidity/params/:offchainAsset"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/v1/liquidity/params/:offchainAsset")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/liquidity/params/:offchainAsset")
  .header("content-type", "application/json")
  .body("{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}")
  .asString();
const data = JSON.stringify({
  parameters: {
    rules: [
      {
        incoming_threshold_percent: 0,
        outgoing_threshold_percent: 0,
        pubkey: '',
        channel_id: '',
        type: ''
      }
    ],
    fee_ppm: 0,
    sweep_fee_rate_sat_per_kvbyte: 0,
    max_swap_fee_ppm: 0,
    max_routing_fee_ppm: 0,
    max_prepay_routing_fee_ppm: 0,
    max_prepay_sat: 0,
    max_miner_fee_sat: 0,
    sweep_conf_target: 0,
    failure_backoff_sec: 0,
    autoloop: false,
    auto_max_in_flight: 0,
    min_swap_amount_loopout: 0,
    max_swap_amount_loopout: 0,
    min_swap_amount_loopin: 0,
    max_swap_amount_loopin: 0,
    onchain_asset: '',
    htlc_conf_target: 0
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/v1/liquidity/params/:offchainAsset');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/liquidity/params/:offchainAsset',
  headers: {'content-type': 'application/json'},
  data: {
    parameters: {
      rules: [
        {
          incoming_threshold_percent: 0,
          outgoing_threshold_percent: 0,
          pubkey: '',
          channel_id: '',
          type: ''
        }
      ],
      fee_ppm: 0,
      sweep_fee_rate_sat_per_kvbyte: 0,
      max_swap_fee_ppm: 0,
      max_routing_fee_ppm: 0,
      max_prepay_routing_fee_ppm: 0,
      max_prepay_sat: 0,
      max_miner_fee_sat: 0,
      sweep_conf_target: 0,
      failure_backoff_sec: 0,
      autoloop: false,
      auto_max_in_flight: 0,
      min_swap_amount_loopout: 0,
      max_swap_amount_loopout: 0,
      min_swap_amount_loopin: 0,
      max_swap_amount_loopin: 0,
      onchain_asset: '',
      htlc_conf_target: 0
    }
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/v1/liquidity/params/:offchainAsset';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"parameters":{"rules":[{"incoming_threshold_percent":0,"outgoing_threshold_percent":0,"pubkey":"","channel_id":"","type":""}],"fee_ppm":0,"sweep_fee_rate_sat_per_kvbyte":0,"max_swap_fee_ppm":0,"max_routing_fee_ppm":0,"max_prepay_routing_fee_ppm":0,"max_prepay_sat":0,"max_miner_fee_sat":0,"sweep_conf_target":0,"failure_backoff_sec":0,"autoloop":false,"auto_max_in_flight":0,"min_swap_amount_loopout":0,"max_swap_amount_loopout":0,"min_swap_amount_loopin":0,"max_swap_amount_loopin":0,"onchain_asset":"","htlc_conf_target":0}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/v1/liquidity/params/:offchainAsset',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "parameters": {\n    "rules": [\n      {\n        "incoming_threshold_percent": 0,\n        "outgoing_threshold_percent": 0,\n        "pubkey": "",\n        "channel_id": "",\n        "type": ""\n      }\n    ],\n    "fee_ppm": 0,\n    "sweep_fee_rate_sat_per_kvbyte": 0,\n    "max_swap_fee_ppm": 0,\n    "max_routing_fee_ppm": 0,\n    "max_prepay_routing_fee_ppm": 0,\n    "max_prepay_sat": 0,\n    "max_miner_fee_sat": 0,\n    "sweep_conf_target": 0,\n    "failure_backoff_sec": 0,\n    "autoloop": false,\n    "auto_max_in_flight": 0,\n    "min_swap_amount_loopout": 0,\n    "max_swap_amount_loopout": 0,\n    "min_swap_amount_loopin": 0,\n    "max_swap_amount_loopin": 0,\n    "onchain_asset": "",\n    "htlc_conf_target": 0\n  }\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/v1/liquidity/params/:offchainAsset")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/v1/liquidity/params/:offchainAsset',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  parameters: {
    rules: [
      {
        incoming_threshold_percent: 0,
        outgoing_threshold_percent: 0,
        pubkey: '',
        channel_id: '',
        type: ''
      }
    ],
    fee_ppm: 0,
    sweep_fee_rate_sat_per_kvbyte: 0,
    max_swap_fee_ppm: 0,
    max_routing_fee_ppm: 0,
    max_prepay_routing_fee_ppm: 0,
    max_prepay_sat: 0,
    max_miner_fee_sat: 0,
    sweep_conf_target: 0,
    failure_backoff_sec: 0,
    autoloop: false,
    auto_max_in_flight: 0,
    min_swap_amount_loopout: 0,
    max_swap_amount_loopout: 0,
    min_swap_amount_loopin: 0,
    max_swap_amount_loopin: 0,
    onchain_asset: '',
    htlc_conf_target: 0
  }
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/liquidity/params/:offchainAsset',
  headers: {'content-type': 'application/json'},
  body: {
    parameters: {
      rules: [
        {
          incoming_threshold_percent: 0,
          outgoing_threshold_percent: 0,
          pubkey: '',
          channel_id: '',
          type: ''
        }
      ],
      fee_ppm: 0,
      sweep_fee_rate_sat_per_kvbyte: 0,
      max_swap_fee_ppm: 0,
      max_routing_fee_ppm: 0,
      max_prepay_routing_fee_ppm: 0,
      max_prepay_sat: 0,
      max_miner_fee_sat: 0,
      sweep_conf_target: 0,
      failure_backoff_sec: 0,
      autoloop: false,
      auto_max_in_flight: 0,
      min_swap_amount_loopout: 0,
      max_swap_amount_loopout: 0,
      min_swap_amount_loopin: 0,
      max_swap_amount_loopin: 0,
      onchain_asset: '',
      htlc_conf_target: 0
    }
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/v1/liquidity/params/:offchainAsset');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  parameters: {
    rules: [
      {
        incoming_threshold_percent: 0,
        outgoing_threshold_percent: 0,
        pubkey: '',
        channel_id: '',
        type: ''
      }
    ],
    fee_ppm: 0,
    sweep_fee_rate_sat_per_kvbyte: 0,
    max_swap_fee_ppm: 0,
    max_routing_fee_ppm: 0,
    max_prepay_routing_fee_ppm: 0,
    max_prepay_sat: 0,
    max_miner_fee_sat: 0,
    sweep_conf_target: 0,
    failure_backoff_sec: 0,
    autoloop: false,
    auto_max_in_flight: 0,
    min_swap_amount_loopout: 0,
    max_swap_amount_loopout: 0,
    min_swap_amount_loopin: 0,
    max_swap_amount_loopin: 0,
    onchain_asset: '',
    htlc_conf_target: 0
  }
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/v1/liquidity/params/:offchainAsset',
  headers: {'content-type': 'application/json'},
  data: {
    parameters: {
      rules: [
        {
          incoming_threshold_percent: 0,
          outgoing_threshold_percent: 0,
          pubkey: '',
          channel_id: '',
          type: ''
        }
      ],
      fee_ppm: 0,
      sweep_fee_rate_sat_per_kvbyte: 0,
      max_swap_fee_ppm: 0,
      max_routing_fee_ppm: 0,
      max_prepay_routing_fee_ppm: 0,
      max_prepay_sat: 0,
      max_miner_fee_sat: 0,
      sweep_conf_target: 0,
      failure_backoff_sec: 0,
      autoloop: false,
      auto_max_in_flight: 0,
      min_swap_amount_loopout: 0,
      max_swap_amount_loopout: 0,
      min_swap_amount_loopin: 0,
      max_swap_amount_loopin: 0,
      onchain_asset: '',
      htlc_conf_target: 0
    }
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/v1/liquidity/params/:offchainAsset';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"parameters":{"rules":[{"incoming_threshold_percent":0,"outgoing_threshold_percent":0,"pubkey":"","channel_id":"","type":""}],"fee_ppm":0,"sweep_fee_rate_sat_per_kvbyte":0,"max_swap_fee_ppm":0,"max_routing_fee_ppm":0,"max_prepay_routing_fee_ppm":0,"max_prepay_sat":0,"max_miner_fee_sat":0,"sweep_conf_target":0,"failure_backoff_sec":0,"autoloop":false,"auto_max_in_flight":0,"min_swap_amount_loopout":0,"max_swap_amount_loopout":0,"min_swap_amount_loopin":0,"max_swap_amount_loopin":0,"onchain_asset":"","htlc_conf_target":0}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"parameters": @{ @"rules": @[ @{ @"incoming_threshold_percent": @0, @"outgoing_threshold_percent": @0, @"pubkey": @"", @"channel_id": @"", @"type": @"" } ], @"fee_ppm": @0, @"sweep_fee_rate_sat_per_kvbyte": @0, @"max_swap_fee_ppm": @0, @"max_routing_fee_ppm": @0, @"max_prepay_routing_fee_ppm": @0, @"max_prepay_sat": @0, @"max_miner_fee_sat": @0, @"sweep_conf_target": @0, @"failure_backoff_sec": @0, @"autoloop": @NO, @"auto_max_in_flight": @0, @"min_swap_amount_loopout": @0, @"max_swap_amount_loopout": @0, @"min_swap_amount_loopin": @0, @"max_swap_amount_loopin": @0, @"onchain_asset": @"", @"htlc_conf_target": @0 } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/liquidity/params/:offchainAsset"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/v1/liquidity/params/:offchainAsset" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/v1/liquidity/params/:offchainAsset",
  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([
    'parameters' => [
        'rules' => [
                [
                                'incoming_threshold_percent' => 0,
                                'outgoing_threshold_percent' => 0,
                                'pubkey' => '',
                                'channel_id' => '',
                                'type' => ''
                ]
        ],
        'fee_ppm' => 0,
        'sweep_fee_rate_sat_per_kvbyte' => 0,
        'max_swap_fee_ppm' => 0,
        'max_routing_fee_ppm' => 0,
        'max_prepay_routing_fee_ppm' => 0,
        'max_prepay_sat' => 0,
        'max_miner_fee_sat' => 0,
        'sweep_conf_target' => 0,
        'failure_backoff_sec' => 0,
        'autoloop' => null,
        'auto_max_in_flight' => 0,
        'min_swap_amount_loopout' => 0,
        'max_swap_amount_loopout' => 0,
        'min_swap_amount_loopin' => 0,
        'max_swap_amount_loopin' => 0,
        'onchain_asset' => '',
        'htlc_conf_target' => 0
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/v1/liquidity/params/:offchainAsset', [
  'body' => '{
  "parameters": {
    "rules": [
      {
        "incoming_threshold_percent": 0,
        "outgoing_threshold_percent": 0,
        "pubkey": "",
        "channel_id": "",
        "type": ""
      }
    ],
    "fee_ppm": 0,
    "sweep_fee_rate_sat_per_kvbyte": 0,
    "max_swap_fee_ppm": 0,
    "max_routing_fee_ppm": 0,
    "max_prepay_routing_fee_ppm": 0,
    "max_prepay_sat": 0,
    "max_miner_fee_sat": 0,
    "sweep_conf_target": 0,
    "failure_backoff_sec": 0,
    "autoloop": false,
    "auto_max_in_flight": 0,
    "min_swap_amount_loopout": 0,
    "max_swap_amount_loopout": 0,
    "min_swap_amount_loopin": 0,
    "max_swap_amount_loopin": 0,
    "onchain_asset": "",
    "htlc_conf_target": 0
  }
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/v1/liquidity/params/:offchainAsset');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'parameters' => [
    'rules' => [
        [
                'incoming_threshold_percent' => 0,
                'outgoing_threshold_percent' => 0,
                'pubkey' => '',
                'channel_id' => '',
                'type' => ''
        ]
    ],
    'fee_ppm' => 0,
    'sweep_fee_rate_sat_per_kvbyte' => 0,
    'max_swap_fee_ppm' => 0,
    'max_routing_fee_ppm' => 0,
    'max_prepay_routing_fee_ppm' => 0,
    'max_prepay_sat' => 0,
    'max_miner_fee_sat' => 0,
    'sweep_conf_target' => 0,
    'failure_backoff_sec' => 0,
    'autoloop' => null,
    'auto_max_in_flight' => 0,
    'min_swap_amount_loopout' => 0,
    'max_swap_amount_loopout' => 0,
    'min_swap_amount_loopin' => 0,
    'max_swap_amount_loopin' => 0,
    'onchain_asset' => '',
    'htlc_conf_target' => 0
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'parameters' => [
    'rules' => [
        [
                'incoming_threshold_percent' => 0,
                'outgoing_threshold_percent' => 0,
                'pubkey' => '',
                'channel_id' => '',
                'type' => ''
        ]
    ],
    'fee_ppm' => 0,
    'sweep_fee_rate_sat_per_kvbyte' => 0,
    'max_swap_fee_ppm' => 0,
    'max_routing_fee_ppm' => 0,
    'max_prepay_routing_fee_ppm' => 0,
    'max_prepay_sat' => 0,
    'max_miner_fee_sat' => 0,
    'sweep_conf_target' => 0,
    'failure_backoff_sec' => 0,
    'autoloop' => null,
    'auto_max_in_flight' => 0,
    'min_swap_amount_loopout' => 0,
    'max_swap_amount_loopout' => 0,
    'min_swap_amount_loopin' => 0,
    'max_swap_amount_loopin' => 0,
    'onchain_asset' => '',
    'htlc_conf_target' => 0
  ]
]));
$request->setRequestUrl('{{baseUrl}}/v1/liquidity/params/:offchainAsset');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/liquidity/params/:offchainAsset' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "parameters": {
    "rules": [
      {
        "incoming_threshold_percent": 0,
        "outgoing_threshold_percent": 0,
        "pubkey": "",
        "channel_id": "",
        "type": ""
      }
    ],
    "fee_ppm": 0,
    "sweep_fee_rate_sat_per_kvbyte": 0,
    "max_swap_fee_ppm": 0,
    "max_routing_fee_ppm": 0,
    "max_prepay_routing_fee_ppm": 0,
    "max_prepay_sat": 0,
    "max_miner_fee_sat": 0,
    "sweep_conf_target": 0,
    "failure_backoff_sec": 0,
    "autoloop": false,
    "auto_max_in_flight": 0,
    "min_swap_amount_loopout": 0,
    "max_swap_amount_loopout": 0,
    "min_swap_amount_loopin": 0,
    "max_swap_amount_loopin": 0,
    "onchain_asset": "",
    "htlc_conf_target": 0
  }
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/liquidity/params/:offchainAsset' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "parameters": {
    "rules": [
      {
        "incoming_threshold_percent": 0,
        "outgoing_threshold_percent": 0,
        "pubkey": "",
        "channel_id": "",
        "type": ""
      }
    ],
    "fee_ppm": 0,
    "sweep_fee_rate_sat_per_kvbyte": 0,
    "max_swap_fee_ppm": 0,
    "max_routing_fee_ppm": 0,
    "max_prepay_routing_fee_ppm": 0,
    "max_prepay_sat": 0,
    "max_miner_fee_sat": 0,
    "sweep_conf_target": 0,
    "failure_backoff_sec": 0,
    "autoloop": false,
    "auto_max_in_flight": 0,
    "min_swap_amount_loopout": 0,
    "max_swap_amount_loopout": 0,
    "min_swap_amount_loopin": 0,
    "max_swap_amount_loopin": 0,
    "onchain_asset": "",
    "htlc_conf_target": 0
  }
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/v1/liquidity/params/:offchainAsset", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/v1/liquidity/params/:offchainAsset"

payload = { "parameters": {
        "rules": [
            {
                "incoming_threshold_percent": 0,
                "outgoing_threshold_percent": 0,
                "pubkey": "",
                "channel_id": "",
                "type": ""
            }
        ],
        "fee_ppm": 0,
        "sweep_fee_rate_sat_per_kvbyte": 0,
        "max_swap_fee_ppm": 0,
        "max_routing_fee_ppm": 0,
        "max_prepay_routing_fee_ppm": 0,
        "max_prepay_sat": 0,
        "max_miner_fee_sat": 0,
        "sweep_conf_target": 0,
        "failure_backoff_sec": 0,
        "autoloop": False,
        "auto_max_in_flight": 0,
        "min_swap_amount_loopout": 0,
        "max_swap_amount_loopout": 0,
        "min_swap_amount_loopin": 0,
        "max_swap_amount_loopin": 0,
        "onchain_asset": "",
        "htlc_conf_target": 0
    } }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/v1/liquidity/params/:offchainAsset"

payload <- "{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/v1/liquidity/params/:offchainAsset")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/v1/liquidity/params/:offchainAsset') do |req|
  req.body = "{\n  \"parameters\": {\n    \"rules\": [\n      {\n        \"incoming_threshold_percent\": 0,\n        \"outgoing_threshold_percent\": 0,\n        \"pubkey\": \"\",\n        \"channel_id\": \"\",\n        \"type\": \"\"\n      }\n    ],\n    \"fee_ppm\": 0,\n    \"sweep_fee_rate_sat_per_kvbyte\": 0,\n    \"max_swap_fee_ppm\": 0,\n    \"max_routing_fee_ppm\": 0,\n    \"max_prepay_routing_fee_ppm\": 0,\n    \"max_prepay_sat\": 0,\n    \"max_miner_fee_sat\": 0,\n    \"sweep_conf_target\": 0,\n    \"failure_backoff_sec\": 0,\n    \"autoloop\": false,\n    \"auto_max_in_flight\": 0,\n    \"min_swap_amount_loopout\": 0,\n    \"max_swap_amount_loopout\": 0,\n    \"min_swap_amount_loopin\": 0,\n    \"max_swap_amount_loopin\": 0,\n    \"onchain_asset\": \"\",\n    \"htlc_conf_target\": 0\n  }\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/v1/liquidity/params/:offchainAsset";

    let payload = json!({"parameters": json!({
            "rules": (
                json!({
                    "incoming_threshold_percent": 0,
                    "outgoing_threshold_percent": 0,
                    "pubkey": "",
                    "channel_id": "",
                    "type": ""
                })
            ),
            "fee_ppm": 0,
            "sweep_fee_rate_sat_per_kvbyte": 0,
            "max_swap_fee_ppm": 0,
            "max_routing_fee_ppm": 0,
            "max_prepay_routing_fee_ppm": 0,
            "max_prepay_sat": 0,
            "max_miner_fee_sat": 0,
            "sweep_conf_target": 0,
            "failure_backoff_sec": 0,
            "autoloop": false,
            "auto_max_in_flight": 0,
            "min_swap_amount_loopout": 0,
            "max_swap_amount_loopout": 0,
            "min_swap_amount_loopin": 0,
            "max_swap_amount_loopin": 0,
            "onchain_asset": "",
            "htlc_conf_target": 0
        })});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/v1/liquidity/params/:offchainAsset \
  --header 'content-type: application/json' \
  --data '{
  "parameters": {
    "rules": [
      {
        "incoming_threshold_percent": 0,
        "outgoing_threshold_percent": 0,
        "pubkey": "",
        "channel_id": "",
        "type": ""
      }
    ],
    "fee_ppm": 0,
    "sweep_fee_rate_sat_per_kvbyte": 0,
    "max_swap_fee_ppm": 0,
    "max_routing_fee_ppm": 0,
    "max_prepay_routing_fee_ppm": 0,
    "max_prepay_sat": 0,
    "max_miner_fee_sat": 0,
    "sweep_conf_target": 0,
    "failure_backoff_sec": 0,
    "autoloop": false,
    "auto_max_in_flight": 0,
    "min_swap_amount_loopout": 0,
    "max_swap_amount_loopout": 0,
    "min_swap_amount_loopin": 0,
    "max_swap_amount_loopin": 0,
    "onchain_asset": "",
    "htlc_conf_target": 0
  }
}'
echo '{
  "parameters": {
    "rules": [
      {
        "incoming_threshold_percent": 0,
        "outgoing_threshold_percent": 0,
        "pubkey": "",
        "channel_id": "",
        "type": ""
      }
    ],
    "fee_ppm": 0,
    "sweep_fee_rate_sat_per_kvbyte": 0,
    "max_swap_fee_ppm": 0,
    "max_routing_fee_ppm": 0,
    "max_prepay_routing_fee_ppm": 0,
    "max_prepay_sat": 0,
    "max_miner_fee_sat": 0,
    "sweep_conf_target": 0,
    "failure_backoff_sec": 0,
    "autoloop": false,
    "auto_max_in_flight": 0,
    "min_swap_amount_loopout": 0,
    "max_swap_amount_loopout": 0,
    "min_swap_amount_loopin": 0,
    "max_swap_amount_loopin": 0,
    "onchain_asset": "",
    "htlc_conf_target": 0
  }
}' |  \
  http POST {{baseUrl}}/v1/liquidity/params/:offchainAsset \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "parameters": {\n    "rules": [\n      {\n        "incoming_threshold_percent": 0,\n        "outgoing_threshold_percent": 0,\n        "pubkey": "",\n        "channel_id": "",\n        "type": ""\n      }\n    ],\n    "fee_ppm": 0,\n    "sweep_fee_rate_sat_per_kvbyte": 0,\n    "max_swap_fee_ppm": 0,\n    "max_routing_fee_ppm": 0,\n    "max_prepay_routing_fee_ppm": 0,\n    "max_prepay_sat": 0,\n    "max_miner_fee_sat": 0,\n    "sweep_conf_target": 0,\n    "failure_backoff_sec": 0,\n    "autoloop": false,\n    "auto_max_in_flight": 0,\n    "min_swap_amount_loopout": 0,\n    "max_swap_amount_loopout": 0,\n    "min_swap_amount_loopin": 0,\n    "max_swap_amount_loopin": 0,\n    "onchain_asset": "",\n    "htlc_conf_target": 0\n  }\n}' \
  --output-document \
  - {{baseUrl}}/v1/liquidity/params/:offchainAsset
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["parameters": [
    "rules": [
      [
        "incoming_threshold_percent": 0,
        "outgoing_threshold_percent": 0,
        "pubkey": "",
        "channel_id": "",
        "type": ""
      ]
    ],
    "fee_ppm": 0,
    "sweep_fee_rate_sat_per_kvbyte": 0,
    "max_swap_fee_ppm": 0,
    "max_routing_fee_ppm": 0,
    "max_prepay_routing_fee_ppm": 0,
    "max_prepay_sat": 0,
    "max_miner_fee_sat": 0,
    "sweep_conf_target": 0,
    "failure_backoff_sec": 0,
    "autoloop": false,
    "auto_max_in_flight": 0,
    "min_swap_amount_loopout": 0,
    "max_swap_amount_loopout": 0,
    "min_swap_amount_loopin": 0,
    "max_swap_amount_loopin": 0,
    "onchain_asset": "",
    "htlc_conf_target": 0
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/liquidity/params/:offchainAsset")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()