Get a live derived quote (not persisted)
curl --request GET \
--url https://api.fiet.finance/v1/quote \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.fiet.finance/v1/quote"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.fiet.finance/v1/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.fiet.finance/v1/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 => [
"Authorization: Basic <encoded-value>"
],
]);
$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.fiet.finance/v1/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.fiet.finance/v1/quote")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fiet.finance/v1/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"asOf": {
"timestamp": "2023-11-07T05:31:56Z",
"blockNumber": 19500000
},
"expiresAt": "2023-11-07T05:31:56Z",
"chainId": 1,
"tokenIn": "0x742d35Cc6634C0532925a3b844Bc9e7595f5fE4b",
"tokenOut": "0x742d35Cc6634C0532925a3b844Bc9e7595f5fE4b",
"tradeType": "EXACT_IN",
"amountIn": "1000000",
"amountOut": "999000",
"fees": {},
"route": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>"
}API Reference
Quote
GET
/
v1
/
quote
Get a live derived quote (not persisted)
curl --request GET \
--url https://api.fiet.finance/v1/quote \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.fiet.finance/v1/quote"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.fiet.finance/v1/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.fiet.finance/v1/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 => [
"Authorization: Basic <encoded-value>"
],
]);
$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.fiet.finance/v1/quote"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.fiet.finance/v1/quote")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fiet.finance/v1/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"asOf": {
"timestamp": "2023-11-07T05:31:56Z",
"blockNumber": 19500000
},
"expiresAt": "2023-11-07T05:31:56Z",
"chainId": 1,
"tokenIn": "0x742d35Cc6634C0532925a3b844Bc9e7595f5fE4b",
"tokenOut": "0x742d35Cc6634C0532925a3b844Bc9e7595f5fE4b",
"tradeType": "EXACT_IN",
"amountIn": "1000000",
"amountOut": "999000",
"fees": {},
"route": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>"
}This endpoint returns a live derived quote. Quotes are not persisted as entities.
For quoting semantics, see Quote.
Authorizations
Basic Auth (assumed at gateway for MVP)
Query Parameters
Example:
1
Pattern:
^0x[a-fA-F0-9]{40}$Example:
"0x742d35Cc6634C0532925a3b844Bc9e7595f5fE4b"
Pattern:
^0x[a-fA-F0-9]{40}$Example:
"0x742d35Cc6634C0532925a3b844Bc9e7595f5fE4b"
Available options:
EXACT_IN, EXACT_OUT Amount (smallest units) as string. Interpretation depends on tradeType.
Required range:
0 <= x <= 5000Response
Quote
Show child attributes
Show child attributes
Example:
1
Pattern:
^0x[a-fA-F0-9]{40}$Example:
"0x742d35Cc6634C0532925a3b844Bc9e7595f5fE4b"
Pattern:
^0x[a-fA-F0-9]{40}$Example:
"0x742d35Cc6634C0532925a3b844Bc9e7595f5fE4b"
Available options:
EXACT_IN, EXACT_OUT Exact input amount (smallest units as a string)
Example:
"1000000"
Exact output amount (smallest units as a string)
Example:
"999000"
Fee breakdown (protocol, gas estimate, etc.)
Router/path details (implementation-defined)