Get swap status
curl --request GET \
--url https://lightswap.me/api/partner/v1/swap/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://lightswap.me/api/partner/v1/swap/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lightswap.me/api/partner/v1/swap/{id}")
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{
"id": "AB12CD34EF56",
"externalId": "order-123",
"status": "waiting_deposit",
"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-19T10:03:30.000Z"
},
"payout": {
"address": "TNDzfERDpxLDS2w1q6yaFC7pzqaSQ3Bg3r",
"memo": null,
"network": "tron",
"token": "USDT",
"estimatedAmount": "100"
},
"quote": {
"id": "pq_aaaaaaaaaaaaaaaaaaaaaaaa",
"rate": "10000",
"estimatedTimeSeconds": 900
},
"createdAt": "2026-04-19T10:00:30.000Z",
"updatedAt": "2026-04-19T10:00:30.000Z",
"customerId": "u_123"
}{
"error": {
"code": "validation_error",
"message": "quoteId is invalid.",
"details": {}
},
"requestId": "req_123"
}{
"error": {
"code": "rate_limited",
"message": "Too many API requests. Please wait a moment and try again.",
"details": {}
},
"requestId": "req_123"
}API Reference
Swap status
Fetch the latest LightSwap swap status, payout details, refund data, and lifecycle timestamps for your own records.
GET
/
swap
/
{id}
Get swap status
curl --request GET \
--url https://lightswap.me/api/partner/v1/swap/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://lightswap.me/api/partner/v1/swap/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lightswap.me/api/partner/v1/swap/{id}")
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{
"id": "AB12CD34EF56",
"externalId": "order-123",
"status": "waiting_deposit",
"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-19T10:03:30.000Z"
},
"payout": {
"address": "TNDzfERDpxLDS2w1q6yaFC7pzqaSQ3Bg3r",
"memo": null,
"network": "tron",
"token": "USDT",
"estimatedAmount": "100"
},
"quote": {
"id": "pq_aaaaaaaaaaaaaaaaaaaaaaaa",
"rate": "10000",
"estimatedTimeSeconds": 900
},
"createdAt": "2026-04-19T10:00:30.000Z",
"updatedAt": "2026-04-19T10:00:30.000Z",
"customerId": "u_123"
}{
"error": {
"code": "validation_error",
"message": "quoteId is invalid.",
"details": {}
},
"requestId": "req_123"
}{
"error": {
"code": "rate_limited",
"message": "Too many API requests. Please wait a moment and try again.",
"details": {}
},
"requestId": "req_123"
}Authorizations
API key. Keep this key on your backend.
Path Parameters
LightSwap swap ID returned by POST /swap.
Pattern:
^[A-Z0-9]{12}$Example:
"AB12CD34EF56"
Response
Latest swap status.
Pattern:
^[A-Z0-9]{12}$Example:
"AB12CD34EF56"
Example:
"order-123"
Available options:
waiting_deposit, deposit_detected, underpaid, processing, completed, refunded, failed, expired Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
"u_123"
⌘I

