curl --request GET \
--url https://api.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains \
--header 'Api-Key: <api-key>'import requests
url = "https://api.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains"
headers = {"Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Key': '<api-key>'}};
fetch('https://api.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains', 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.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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://api.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("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://api.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains")
.header("Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 1,
"data": [
{
"id": "la_123",
"amount": "100.25",
"customer_id": "cust_123",
"liquidation_address_id": "la_456",
"currency": "usdc",
"state": "funds_received",
"created_at": "2020-01-01T00:00:00.000Z",
"updated_at": "2020-01-01T00:00:00.000Z",
"deposit_tx_hash": "0xc13d7905be5c989378a945487cd2a1193627ae606009e28e296d48ddaec66162",
"destination": {
"payment_rail": "ethereum",
"currency": "usdt",
"to_address": "0xb794f5ea0ba39494ce839613fffba74279579268"
},
"destination_tx_hash": "0xdeadbeef",
"receipt": {
"initial_amount": "100.25",
"developer_fee": "0.2",
"subtotal_amount": "100.05",
"exchange_rate": "1.000000",
"converted_amount": "100.05",
"outgoing_amount": "100.05",
"destination_currency": "usd",
"url": "https://dashboard.bridge.xyz/transaction/00000000-0000-0000-0000-000000000000/receipt/00000000-0000-0000-0000-000000000000"
}
}
]
}Get drain history of a Liquidation Address
Get drain history of a Liquidation Address
curl --request GET \
--url https://api.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains \
--header 'Api-Key: <api-key>'import requests
url = "https://api.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains"
headers = {"Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Key': '<api-key>'}};
fetch('https://api.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains', 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.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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://api.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("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://api.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains")
.header("Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bridge.xyz/v0/customers/{customerID}/liquidation_addresses/{liquidationAddressID}/drains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 1,
"data": [
{
"id": "la_123",
"amount": "100.25",
"customer_id": "cust_123",
"liquidation_address_id": "la_456",
"currency": "usdc",
"state": "funds_received",
"created_at": "2020-01-01T00:00:00.000Z",
"updated_at": "2020-01-01T00:00:00.000Z",
"deposit_tx_hash": "0xc13d7905be5c989378a945487cd2a1193627ae606009e28e296d48ddaec66162",
"destination": {
"payment_rail": "ethereum",
"currency": "usdt",
"to_address": "0xb794f5ea0ba39494ce839613fffba74279579268"
},
"destination_tx_hash": "0xdeadbeef",
"receipt": {
"initial_amount": "100.25",
"developer_fee": "0.2",
"subtotal_amount": "100.05",
"exchange_rate": "1.000000",
"converted_amount": "100.05",
"outgoing_amount": "100.05",
"destination_currency": "usd",
"url": "https://dashboard.bridge.xyz/transaction/00000000-0000-0000-0000-000000000000/receipt/00000000-0000-0000-0000-000000000000"
}
}
]
}Path Parameters
Query Parameters
This is a drain id. If this is specified, the next page that starts with a drain right AFTER the specified drain id on the drain timeline, which is always ordered from the newest to the oldest by creation time, will be returned. This also implies that drains older than the specified drain id will be returned (shouldn't be set if ending_before is set)
This is a drain id. If this is specified, the previous page that ends with a drain right BEFORE the specified drain id on the drain timeline, which is always ordered from the newest to the oldest by creation time, will be returned. This also implies that drains newer than the specified drain id will be returned (shouldn't be set if starting_after is set)
Was this page helpful?