Exchanges

Retrieve information about exchanges connected to Totle.

get
/exchanges

https://api.totle.com/exchanges
This endpoint returns a map of exchange names to exchange IDs.
Request
Response
Request
Response
200: OK
Exchange information successfully retrieved.
{
"exchanges": [
{
"id": 2,
"name": "Kyber",
"enabled": true,
"iconUrl": "https:\/\/s3.amazonaws.com\/totle-dex-icons\/Kyber.png"
},
{
"id": 4,
"name": "Bancor",
"enabled": true,
"iconUrl": "https:\/\/s3.amazonaws.com\/totle-dex-icons\/Bancor.png"
},
{
//...
}
],
"success": true
}

Parameter Response

Description

exchanges

The list of exchanges on which Totle trades

id

The ID of the exchange

name

The common name of the exchange

enabled

Whether the swap endpoint can return trades that will settle on that exchange

iconURL

URL of the source for exchange's icon

cURL
Node
Ruby
JavaScript
Python
cURL
curl --request GET \
--url https://api.totle.com/exchanges
Node
var request = require("request");
var options = {method: 'GET', url: 'https://api.totle.com/exchanges'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
Ruby
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.totle.com/exchanges")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
JavaScript
var data = null;
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.totle.com/exchanges");
xhr.send(data);
Python
import requests
url = "https://api.totle.com/exchanges"
response = requests.request("GET", url)
print(response.text)