API Reference
Check swap execution status
Retrieves the current status of a swap using the unique deposit address from the quote, if quote response included deposit memo, it is required as well.
The response includes the state of the swap (e.g., pending, processing, success, refunded) and any associated swap and transaction details.
GET
/
v0
/
status
Check swap execution status
curl --request GET \
--url https://1click.chaindefuser.com/v0/status \
--header 'X-API-Key: <api-key>'import requests
url = "https://1click.chaindefuser.com/v0/status"
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://1click.chaindefuser.com/v0/status', 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://1click.chaindefuser.com/v0/status",
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://1click.chaindefuser.com/v0/status"
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://1click.chaindefuser.com/v0/status")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://1click.chaindefuser.com/v0/status")
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{
"correlationId": "550e8400-e29b-41d4-a716-446655440000",
"quoteResponse": {
"correlationId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2019-08-24T14:15:22Z",
"signature": "<string>",
"quoteRequest": {
"dry": true,
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near",
"depositType": "ORIGIN_CHAIN",
"destinationAsset": "nep141:sol-5ce3bf3a31af18be40ba30f721101b4341690186.omft.near",
"amount": "1000",
"refundTo": "0x2527D02599Ba641c19FEa793cD0F167589a0f10D",
"refundType": "ORIGIN_CHAIN",
"recipient": "13QkxhNMrTPxoCkRdYdJ65tFuwXPhL5gLS2Z5Nr6gjRK",
"recipientType": "DESTINATION_CHAIN",
"deadline": "2019-08-24T14:15:22Z",
"depositMode": "SIMPLE",
"connectedWallets": [
"0x123...",
"0x456..."
],
"sessionId": "session_abc123",
"virtualChainRecipient": "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C",
"virtualChainRefundRecipient": "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C",
"customRecipientMsg": "smart-contract-recipient.near",
"confidentiality": "basic",
"referral": "ledger",
"rebates": [
{
"recipient": "rebate-recipient.near",
"share": 20
},
{
"recipient": "partner-2.near",
"share": 80
}
],
"quoteWaitingTimeMs": 3000,
"appFees": [
{
"recipient": "recipient.near",
"fee": 100
}
],
"insured": false
},
"quote": {
"amountIn": "1000000",
"amountInFormatted": "1",
"amountInUsd": "1",
"minAmountIn": "995000",
"amountOut": "9950000",
"amountOutFormatted": "9.95",
"amountOutUsd": "9.95",
"minAmountOut": "9900000",
"timeEstimate": 120,
"depositAddress": "0x76b4c56085ED136a8744D52bE956396624a730E8",
"depositMemo": "1111111",
"chainDepositAddresses": [
{
"blockchain": "eth",
"address": "0x76b4c56085ED136a8744D52bE956396624a730E8",
"memo": "1111111"
}
],
"deadline": "2025-03-04T15:00:00Z",
"timeWhenInactive": "2025-03-04T15:00:00Z",
"virtualChainRecipient": "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C",
"virtualChainRefundRecipient": "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C",
"customRecipientMsg": "smart-contract-recipient.near",
"refundFee": "10000",
"withdrawFee": "10000"
}
},
"status": "KNOWN_DEPOSIT_TX",
"updatedAt": "2023-11-07T05:31:56Z",
"swapDetails": {
"intentHashes": [
"<string>"
],
"nearTxHashes": [
"<string>"
],
"originChainTxHashes": [
{
"hash": "0x123abc456def789",
"explorerUrl": "<string>"
}
],
"destinationChainTxHashes": [
{
"hash": "0x123abc456def789",
"explorerUrl": "<string>"
}
],
"amountIn": "1000",
"amountInFormatted": "0.1",
"amountInUsd": "0.1",
"amountOut": "9950000",
"amountOutFormatted": "9.95",
"amountOutUsd": "9.95",
"slippage": 50,
"refundedAmount": "1000",
"refundedAmountFormatted": "0.1",
"refundedAmountUsd": "0.1",
"refundReason": "PARTIAL_DEPOSIT",
"depositedAmount": "<string>",
"depositedAmountFormatted": "<string>",
"depositedAmountUsd": "<string>",
"withdrawFee": "10000",
"referral": "referral"
}
}{
"message": "error message"
}Authorizations
X-API-KeyJWT-auth
API key for partner authentication (recommended)
Response
Unique identifier for request tracing and debugging
Example:
"550e8400-e29b-41d4-a716-446655440000"
Quote response from the original request
Show child attributes
Show child attributes
Available options:
KNOWN_DEPOSIT_TX, PENDING_DEPOSIT, INCOMPLETE_DEPOSIT, PROCESSING, SUCCESS, REFUNDED, FAILED Last time the state was updated
Details of actual swaps and withdrawals
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Check swap execution status
curl --request GET \
--url https://1click.chaindefuser.com/v0/status \
--header 'X-API-Key: <api-key>'import requests
url = "https://1click.chaindefuser.com/v0/status"
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://1click.chaindefuser.com/v0/status', 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://1click.chaindefuser.com/v0/status",
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://1click.chaindefuser.com/v0/status"
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://1click.chaindefuser.com/v0/status")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://1click.chaindefuser.com/v0/status")
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{
"correlationId": "550e8400-e29b-41d4-a716-446655440000",
"quoteResponse": {
"correlationId": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2019-08-24T14:15:22Z",
"signature": "<string>",
"quoteRequest": {
"dry": true,
"swapType": "EXACT_INPUT",
"slippageTolerance": 100,
"originAsset": "nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near",
"depositType": "ORIGIN_CHAIN",
"destinationAsset": "nep141:sol-5ce3bf3a31af18be40ba30f721101b4341690186.omft.near",
"amount": "1000",
"refundTo": "0x2527D02599Ba641c19FEa793cD0F167589a0f10D",
"refundType": "ORIGIN_CHAIN",
"recipient": "13QkxhNMrTPxoCkRdYdJ65tFuwXPhL5gLS2Z5Nr6gjRK",
"recipientType": "DESTINATION_CHAIN",
"deadline": "2019-08-24T14:15:22Z",
"depositMode": "SIMPLE",
"connectedWallets": [
"0x123...",
"0x456..."
],
"sessionId": "session_abc123",
"virtualChainRecipient": "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C",
"virtualChainRefundRecipient": "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C",
"customRecipientMsg": "smart-contract-recipient.near",
"confidentiality": "basic",
"referral": "ledger",
"rebates": [
{
"recipient": "rebate-recipient.near",
"share": 20
},
{
"recipient": "partner-2.near",
"share": 80
}
],
"quoteWaitingTimeMs": 3000,
"appFees": [
{
"recipient": "recipient.near",
"fee": 100
}
],
"insured": false
},
"quote": {
"amountIn": "1000000",
"amountInFormatted": "1",
"amountInUsd": "1",
"minAmountIn": "995000",
"amountOut": "9950000",
"amountOutFormatted": "9.95",
"amountOutUsd": "9.95",
"minAmountOut": "9900000",
"timeEstimate": 120,
"depositAddress": "0x76b4c56085ED136a8744D52bE956396624a730E8",
"depositMemo": "1111111",
"chainDepositAddresses": [
{
"blockchain": "eth",
"address": "0x76b4c56085ED136a8744D52bE956396624a730E8",
"memo": "1111111"
}
],
"deadline": "2025-03-04T15:00:00Z",
"timeWhenInactive": "2025-03-04T15:00:00Z",
"virtualChainRecipient": "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C",
"virtualChainRefundRecipient": "0xb4c2fbec9d610F9A3a9b843c47b1A8095ceC887C",
"customRecipientMsg": "smart-contract-recipient.near",
"refundFee": "10000",
"withdrawFee": "10000"
}
},
"status": "KNOWN_DEPOSIT_TX",
"updatedAt": "2023-11-07T05:31:56Z",
"swapDetails": {
"intentHashes": [
"<string>"
],
"nearTxHashes": [
"<string>"
],
"originChainTxHashes": [
{
"hash": "0x123abc456def789",
"explorerUrl": "<string>"
}
],
"destinationChainTxHashes": [
{
"hash": "0x123abc456def789",
"explorerUrl": "<string>"
}
],
"amountIn": "1000",
"amountInFormatted": "0.1",
"amountInUsd": "0.1",
"amountOut": "9950000",
"amountOutFormatted": "9.95",
"amountOutUsd": "9.95",
"slippage": 50,
"refundedAmount": "1000",
"refundedAmountFormatted": "0.1",
"refundedAmountUsd": "0.1",
"refundReason": "PARTIAL_DEPOSIT",
"depositedAmount": "<string>",
"depositedAmountFormatted": "<string>",
"depositedAmountUsd": "<string>",
"withdrawFee": "10000",
"referral": "referral"
}
}{
"message": "error message"
}