List swaps
curl --request GET \
--url https://lightswap.me/api/partner/v1/swap \
--header 'x-api-key: <api-key>'import requests
url = "https://lightswap.me/api/partner/v1/swap"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://lightswap.me/api/partner/v1/swap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://lightswap.me/api/partner/v1/swap",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://lightswap.me/api/partner/v1/swap"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://lightswap.me/api/partner/v1/swap")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lightswap.me/api/partner/v1/swap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"swaps": [
{
"id": "AB12CD34EF56",
"externalId": "order-123",
"status": "completed",
"errorMessage": null,
"from": {
"decimals": 8,
"network": "bitcoin",
"token": "BTC",
"amount": "0.01"
},
"to": {
"decimals": 6,
"network": "tron",
"token": "USDT",
"estimatedAmount": "100"
},
"deposit": {
"address": "bc1qdeposit",
"memo": null,
"amount": "0.01",
"network": "bitcoin",
"token": "BTC",
"deadline": "2026-04-19T14:00:30.000Z"
},
"payout": {
"address": "TNDzfERDpxLDS2w1q6yaFC7pzqaSQ3Bg3r",
"memo": null,
"network": "tron",
"token": "USDT",
"estimatedAmount": "100"
},
"quote": {
"id": "pq_aaaaaaaaaaaaaaaaaaaaaaaa",
"rate": "10000",
"estimatedTimeSeconds": 900
},
"commission": {
"bps": 50,
"rewardAmountUsdc": "4.25",
"rewardStatus": "available"
},
"createdAt": "2026-04-19T10:00:30.000Z",
"updatedAt": "2026-04-19T10:05:30.000Z",
"customerId": "u_123"
}
],
"total": 42,
"limit": 50,
"offset": 0
}
API Reference
Swap history
List your past swaps with status and date filters, pagination, totals, and per-swap commission attribution for reconciliation.
GET
/
swap
List swaps
curl --request GET \
--url https://lightswap.me/api/partner/v1/swap \
--header 'x-api-key: <api-key>'import requests
url = "https://lightswap.me/api/partner/v1/swap"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://lightswap.me/api/partner/v1/swap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://lightswap.me/api/partner/v1/swap",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://lightswap.me/api/partner/v1/swap"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://lightswap.me/api/partner/v1/swap")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lightswap.me/api/partner/v1/swap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"swaps": [
{
"id": "AB12CD34EF56",
"externalId": "order-123",
"status": "completed",
"errorMessage": null,
"from": {
"decimals": 8,
"network": "bitcoin",
"token": "BTC",
"amount": "0.01"
},
"to": {
"decimals": 6,
"network": "tron",
"token": "USDT",
"estimatedAmount": "100"
},
"deposit": {
"address": "bc1qdeposit",
"memo": null,
"amount": "0.01",
"network": "bitcoin",
"token": "BTC",
"deadline": "2026-04-19T14:00:30.000Z"
},
"payout": {
"address": "TNDzfERDpxLDS2w1q6yaFC7pzqaSQ3Bg3r",
"memo": null,
"network": "tron",
"token": "USDT",
"estimatedAmount": "100"
},
"quote": {
"id": "pq_aaaaaaaaaaaaaaaaaaaaaaaa",
"rate": "10000",
"estimatedTimeSeconds": 900
},
"commission": {
"bps": 50,
"rewardAmountUsdc": "4.25",
"rewardStatus": "available"
},
"createdAt": "2026-04-19T10:00:30.000Z",
"updatedAt": "2026-04-19T10:05:30.000Z",
"customerId": "u_123"
}
],
"total": 42,
"limit": 50,
"offset": 0
}
Authorizations
API key. Keep this key on your backend.
Query Parameters
Maximum number of swaps to return, from 1 to 100.
Required range:
1 <= x <= 100Example:
50
Number of matching swaps to skip, for pagination.
Required range:
x >= 0Example:
0
Comma-separated swap statuses to include, for example completed,refunded.
Example:
"completed,refunded"
Only swaps created at or after this ISO 8601 date-time.
Example:
"2026-04-01T00:00:00.000Z"
Only swaps created at or before this ISO 8601 date-time.
Example:
"2026-05-01T00:00:00.000Z"

