Skip to main content
GET
/
rate
Get Rate
curl --request GET \
  --url https://staging-api.getpartna.com/v4/rate \
  --header 'x-api-key: <api-key>' \
  --header 'x-api-user: <api-key>'
import requests

url = "https://staging-api.getpartna.com/v4/rate"

headers = {
"x-api-key": "<api-key>",
"x-api-user": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>', 'x-api-user': '<api-key>'}};

fetch('https://staging-api.getpartna.com/v4/rate', 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://staging-api.getpartna.com/v4/rate",
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-api-key: <api-key>",
"x-api-user: <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://staging-api.getpartna.com/v4/rate"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-user", "<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://staging-api.getpartna.com/v4/rate")
.header("x-api-key", "<api-key>")
.header("x-api-user", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://staging-api.getpartna.com/v4/rate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-user"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "data": {
    "rate": {
      "ETH_to_USD": {
        "fromAmount": 1,
        "fromCurrency": "ETH",
        "key": "2400-ETH_to_USD-5ddc8f46-1755873777",
        "rate": 2400,
        "toAmount": 2400,
        "toCurrency": "USD"
      },
      "USDT_to_USD": {
        "fromAmount": 1,
        "fromCurrency": "USDT",
        "key": "1-USDT_to_USD-bbfcdc61-1755873777",
        "rate": 1,
        "toAmount": 1,
        "toCurrency": "USD"
      },
      "USD_to_ETH": {
        "fromAmount": 2500,
        "fromCurrency": "USD",
        "key": "0.0004-USD_to_ETH-c5375bfb-1755873777",
        "rate": 0.0004,
        "toAmount": 1,
        "toCurrency": "ETH"
      }
    }
  },
  "message": "success"
}
{
"message": "Rates not available, please try again later"
}

Authorizations

x-api-key
string
header
required
x-api-user
string
header
required

Query Parameters

fromCurrency
string
toCurrency
string
fromAmount
string
toAmount
string

Response

get rate ok

data
object
message
string