Skip to main content
GET
/
api
/
SameChainSwap
/
{chainId}
/
tx
/
{transactionHash}
Retrieves the SameChainSwapDTO object for a given transaction hash.
curl --request GET \
  --url https://dln-api.debridge.finance/api/SameChainSwap/{chainId}/tx/{transactionHash}
import requests

url = "https://dln-api.debridge.finance/api/SameChainSwap/{chainId}/tx/{transactionHash}"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://dln-api.debridge.finance/api/SameChainSwap/{chainId}/tx/{transactionHash}', 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://dln-api.debridge.finance/api/SameChainSwap/{chainId}/tx/{transactionHash}",
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;
}
package main

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

func main() {

url := "https://dln-api.debridge.finance/api/SameChainSwap/{chainId}/tx/{transactionHash}"

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

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://dln-api.debridge.finance/api/SameChainSwap/{chainId}/tx/{transactionHash}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://dln-api.debridge.finance/api/SameChainSwap/{chainId}/tx/{transactionHash}")

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
{
  "swapId": {
    "bytesValue": "aSDinaTvuI8gbWludGxpZnk=",
    "bytesArrayValue": "<string>",
    "stringValue": "<string>"
  },
  "chainId": {
    "bytesValue": "aSDinaTvuI8gbWludGxpZnk=",
    "bytesArrayValue": "<string>",
    "bigIntegerValue": 123,
    "stringValue": "<string>"
  },
  "sender": {
    "Base64Value": "aSDinaTvuI8gbWludGxpZnk=",
    "bytesArrayValue": "<string>",
    "stringValue": "<string>"
  },
  "recipient": {
    "Base64Value": "aSDinaTvuI8gbWludGxpZnk=",
    "bytesArrayValue": "<string>",
    "stringValue": "<string>"
  },
  "tokenIn": {
    "tokenAddress": {
      "Base64Value": "aSDinaTvuI8gbWludGxpZnk=",
      "bytesArrayValue": "<string>",
      "stringValue": "<string>"
    },
    "amount": {
      "bytesValue": "aSDinaTvuI8gbWludGxpZnk=",
      "bytesArrayValue": "<string>",
      "bigIntegerValue": 123,
      "stringValue": "<string>"
    },
    "metadata": {
      "decimals": 123,
      "name": "<string>",
      "symbol": "<string>",
      "logoURI": "<string>"
    }
  },
  "tokenOut": {
    "tokenAddress": {
      "Base64Value": "aSDinaTvuI8gbWludGxpZnk=",
      "bytesArrayValue": "<string>",
      "stringValue": "<string>"
    },
    "amount": {
      "bytesValue": "aSDinaTvuI8gbWludGxpZnk=",
      "bytesArrayValue": "<string>",
      "bigIntegerValue": 123,
      "stringValue": "<string>"
    },
    "metadata": {
      "decimals": 123,
      "name": "<string>",
      "symbol": "<string>",
      "logoURI": "<string>"
    }
  },
  "transactionHash": {
    "bytesValue": "aSDinaTvuI8gbWludGxpZnk=",
    "bytesArrayValue": "<string>",
    "stringValue": "<string>"
  },
  "blockTimeStamp": 123,
  "affiliateFee": {
    "affiliateFee": {
      "tokenAddress": {
        "Base64Value": "aSDinaTvuI8gbWludGxpZnk=",
        "bytesArrayValue": "<string>",
        "stringValue": "<string>"
      },
      "amount": {
        "bytesValue": "aSDinaTvuI8gbWludGxpZnk=",
        "bytesArrayValue": "<string>",
        "bigIntegerValue": 123,
        "stringValue": "<string>"
      },
      "metadata": {
        "decimals": 123,
        "name": "<string>",
        "symbol": "<string>",
        "logoURI": "<string>"
      }
    },
    "beneficiarySrc": {
      "Base64Value": "aSDinaTvuI8gbWludGxpZnk=",
      "bytesArrayValue": "<string>",
      "stringValue": "<string>"
    }
  },
  "swapFee": {
    "tokenAddress": {
      "Base64Value": "aSDinaTvuI8gbWludGxpZnk=",
      "bytesArrayValue": "<string>",
      "stringValue": "<string>"
    },
    "amount": {
      "bytesValue": "aSDinaTvuI8gbWludGxpZnk=",
      "bytesArrayValue": "<string>",
      "bigIntegerValue": 123,
      "stringValue": "<string>"
    },
    "metadata": {
      "decimals": 123,
      "name": "<string>",
      "symbol": "<string>",
      "logoURI": "<string>"
    }
  },
  "referralCode": 123,
  "swapRouterInfo": {
    "address": {
      "Base64Value": "aSDinaTvuI8gbWludGxpZnk=",
      "bytesArrayValue": "<string>",
      "stringValue": "<string>"
    },
    "name": "<string>",
    "logoUri": "<string>"
  }
}
{
"message": "<string>",
"errorCode": 123
}
{
"message": "<string>",
"errorCode": 123
}
{
"message": "<string>",
"errorCode": 123
}

Path Parameters

chainId
integer<int32>
required

Chain or IAAS subscription id

transactionHash
string
required

The hash of the transaction the swap was executed in.

Response

OK

Represents a Data Transfer Object (DTO) used to encapsulate the details of a swap operation on one blockchain (NOT cross-chain).

swapId
object

Id of the swap

chainId
object
sender
object
recipient
object
tokenIn
object

Info about a token

tokenOut
object

Info about a token

transactionHash
object

Transaction Hash property

blockTimeStamp
integer<int64>

Timestamp of the block in which the event was recorded, represented as a Unix time in seconds.

affiliateFee
object

Represents details regarding the affiliate fee for same chain swap.

swapFee
object

Info about a token

referralCode
integer<int32>

Referral program code

swapRouterInfo
object

Information about the router used for executing the token swap