Preview quote (no order created)
curl --request GET \
--url https://sandbox.elementpay.net/quoteimport requests
url = "https://sandbox.elementpay.net/quote"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.elementpay.net/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://sandbox.elementpay.net/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://sandbox.elementpay.net/quote"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.elementpay.net/quote")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elementpay.net/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Quote computed",
"data": {
"rate": 132.712345,
"token_amount": 0.753621,
"fiat_paid": 100,
"symbol": "USDC",
"decimals": 6
}
}Quote
Preview quote
Public endpoint — no API key required.
Returns:
- rate: KES per token after markup
- token_amount: tokens user would receive (OnRamp) / must send (OffRamp)
- fiat_paid: echo of amount_fiat
- symbol/decimals: metadata (no chain implied)
GET
/
quote
Preview quote (no order created)
curl --request GET \
--url https://sandbox.elementpay.net/quoteimport requests
url = "https://sandbox.elementpay.net/quote"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.elementpay.net/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://sandbox.elementpay.net/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://sandbox.elementpay.net/quote"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.elementpay.net/quote")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elementpay.net/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Quote computed",
"data": {
"rate": 132.712345,
"token_amount": 0.753621,
"fiat_paid": 100,
"symbol": "USDC",
"decimals": 6
}
}Public endpoint to preview a quote without creating an order.
Parameters
order_type: OnRamp|OffRamp or 0|1amount_fiat(KES): positive numbertoken(enum): USDC | USDT | WXM
rate: KES per token after markuptoken_amount: tokens the user would receive (OnRamp) or must send (OffRamp)fiat_paid: echo of inputdecimals,symbol
Retry-After.
