Speed up deposit
curl --request POST \
--url https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup \
--header 'Content-Type: application/json' \
--header 'X-LS-APIKEY: <api-key>' \
--data '
{
"transaction_id": "<string>"
}
'import requests
url = "https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup"
payload = { "transaction_id": "<string>" }
headers = {
"X-LS-APIKEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-LS-APIKEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({transaction_id: '<string>'})
};
fetch('https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup",
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([
'transaction_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-LS-APIKEY: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup"
payload := strings.NewReader("{\n \"transaction_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-LS-APIKEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup")
.header("X-LS-APIKEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transaction_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-LS-APIKEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "<string>",
"message": "<string>",
"metadata": {}
}
}Swaps
Speed up deposit
Speed up deposit detection with deposit transaction hash.
POST
/
api
/
v2
/
swaps
/
{swapId}
/
deposit_speedup
Speed up deposit
curl --request POST \
--url https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup \
--header 'Content-Type: application/json' \
--header 'X-LS-APIKEY: <api-key>' \
--data '
{
"transaction_id": "<string>"
}
'import requests
url = "https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup"
payload = { "transaction_id": "<string>" }
headers = {
"X-LS-APIKEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-LS-APIKEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({transaction_id: '<string>'})
};
fetch('https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup",
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([
'transaction_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-LS-APIKEY: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup"
payload := strings.NewReader("{\n \"transaction_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-LS-APIKEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup")
.header("X-LS-APIKEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"transaction_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.layerswap.io/api/v2/swaps/{swapId}/deposit_speedup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-LS-APIKEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "<string>",
"message": "<string>",
"metadata": {}
}
}Authorizations
Headers
X-LS-APIKEY
string
default:NDBxG+aon6WlbgIA2LfwmcbLU52qUL9qTnztTuTRPNSohf/VnxXpRaJlA5uLSQVqP8YGIiy/0mz+mMeZhLY4/Q
Path Parameters
Body
application/json
Response
200 - application/json
Success
Show child attributes
Show child attributes
Was this page helpful?
⌘I