Skip to main content
GET
/
quote
Get quote
curl --request GET \
  --url https://api.leokit.dev/quote \
  --header 'Api-Key: <api-key>'
import requests

url = "https://api.leokit.dev/quote"

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.leokit.dev/quote', 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.leokit.dev/quote",
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.leokit.dev/quote"

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.leokit.dev/quote")
.header("Api-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.leokit.dev/quote")

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
{
  "quotes": [
    {
      "protocol": "near",
      "data": {
        "total_swap_seconds": 490,
        "expected_amount_out": 3342470,
        "fees": [
          {
            "type": "Network Fee",
            "asset": "USD",
            "amount": 0,
            "usd": "5.75"
          }
        ],
        "route": [],
        "protocol": "near"
      },
      "expectedAmountOutNum": 3342470,
      "totalFeesUsd": 5.75,
      "totalSwapSeconds": 490,
      "flags": [
        "FASTEST",
        "CHEAPEST",
        "OPTIMAL"
      ]
    },
    {
      "protocol": "thorchain",
      "data": {
        "protocol": "thorchain",
        "expected_amount_out": 3338260,
        "route": [
          "ETH.ETH",
          "BTC.BTC"
        ],
        "fees": [
          {
            "type": "Affiliate Fee",
            "asset": "BTC.BTC",
            "amount": 0,
            "usd": 0
          },
          {
            "type": "Outbound Fee",
            "asset": "BTC.BTC",
            "amount": 0.00001815,
            "usd": 1.5934358179613117
          },
          {
            "type": "Network Fee",
            "asset": "BTC.BTC",
            "amount": 0.00006691,
            "usd": 5.874203337729551
          }
        ]
      },
      "expectedAmountOutNum": 3338260,
      "totalFeesUsd": 7.467639155690862,
      "totalSwapSeconds": null,
      "flags": []
    },
    {
      "protocol": "mayachain",
      "data": {
        "protocol": "mayachain",
        "expected_amount_out": 3315430,
        "route": [
          "ETH.ETH",
          "BTC.BTC"
        ],
        "fees": [
          {
            "type": "Affiliate Fee",
            "asset": "BTC.BTC",
            "amount": 0,
            "usd": 0
          },
          {
            "type": "Outbound Fee",
            "asset": "BTC.BTC",
            "amount": 0.00003,
            "usd": 2.6337782115063004
          },
          {
            "type": "Network Fee",
            "asset": "BTC.BTC",
            "amount": 0.00015052,
            "usd": 13.21454321319761
          }
        ]
      },
      "expectedAmountOutNum": 3315430,
      "totalFeesUsd": 15.84832142470391,
      "totalSwapSeconds": null,
      "flags": []
    }
  ],
  "timestamp": "2025-12-23T18:18:14.213Z",
  "quote_id": "019b4c6e-d6c2-7000-b851-48a863f2f4b7"
}
{
"message": "<string>",
"code": "<string>"
}

Authorizations

Api-Key
string
header
required

Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4

Query Parameters

from_asset
string
default:ETH.ETH
required

Input asset identifier.

to_asset
string
default:BTC.BTC
required

Output asset identifier.

origin
string
default:0xacd9a974065de9c7a19873f95af7595e1d632167
required

From wallet address.

destination
string
default:bc1q2hk2q3zy7pdh0tp4awzn4k5lyetedaue5zt88r
required

To wallet address.

amount
string
default:1
required

Amount to swap (Example: 1 ETH)

Response

Quote response across multiple protocols. The response may include a subset of protocols depending on availability.

quotes
object[]
required

Quotes returned by available protocols. May be empty.

timestamp
string<date-time>
required

Timestamp when the quote was generated.

quote_id
string<uuid>
required

Quote identifier. Use this in subsequent /deposit and /status calls.