List exchange withdrawable assets
curl --request GET \
--url https://api.calmtreasury.xyz/v1/exchange/{exchange}/assets \
--header 'x-calm-publishable-key: <api-key>'import requests
url = "https://api.calmtreasury.xyz/v1/exchange/{exchange}/assets"
headers = {"x-calm-publishable-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-calm-publishable-key': '<api-key>'}};
fetch('https://api.calmtreasury.xyz/v1/exchange/{exchange}/assets', 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.calmtreasury.xyz/v1/exchange/{exchange}/assets",
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-calm-publishable-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.calmtreasury.xyz/v1/exchange/{exchange}/assets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-calm-publishable-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.calmtreasury.xyz/v1/exchange/{exchange}/assets")
.header("x-calm-publishable-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.calmtreasury.xyz/v1/exchange/{exchange}/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-calm-publishable-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"balances": [
{
"amount": 123,
"amount_in_fiat": 123,
"asset": "<string>",
"networks": [
{
"chain_id": 0,
"display_name": "<string>",
"id": "<string>",
"max_withdrawal": "<string>",
"min_withdrawal": "<string>",
"name": "<string>"
}
]
}
],
"last_sync_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Exchange
List withdrawable assets
List the assets and networks the connected exchange pays out to.
GET
/
v1
/
exchange
/
{exchange}
/
assets
List exchange withdrawable assets
curl --request GET \
--url https://api.calmtreasury.xyz/v1/exchange/{exchange}/assets \
--header 'x-calm-publishable-key: <api-key>'import requests
url = "https://api.calmtreasury.xyz/v1/exchange/{exchange}/assets"
headers = {"x-calm-publishable-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-calm-publishable-key': '<api-key>'}};
fetch('https://api.calmtreasury.xyz/v1/exchange/{exchange}/assets', 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.calmtreasury.xyz/v1/exchange/{exchange}/assets",
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-calm-publishable-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.calmtreasury.xyz/v1/exchange/{exchange}/assets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-calm-publishable-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.calmtreasury.xyz/v1/exchange/{exchange}/assets")
.header("x-calm-publishable-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.calmtreasury.xyz/v1/exchange/{exchange}/assets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-calm-publishable-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"balances": [
{
"amount": 123,
"amount_in_fiat": 123,
"asset": "<string>",
"networks": [
{
"chain_id": 0,
"display_name": "<string>",
"id": "<string>",
"max_withdrawal": "<string>",
"min_withdrawal": "<string>",
"name": "<string>"
}
]
}
],
"last_sync_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}What the connected exchange can pay out, and for each asset the networks it
withdraws to with their live limits. Read it before quoting so you only offer
reachable combinations.
Authorizations
Publishable key identifying the calling app.
Path Parameters
Available options:
coinbase Query Parameters
Pattern:
^0x[a-fA-F0-9]{40}$