Get Quote by ID
curl --request GET \
--url https://app.sandbox.rio.trade/api/quotes/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://app.sandbox.rio.trade/api/quotes/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.sandbox.rio.trade/api/quotes/{id}', 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://app.sandbox.rio.trade/api/quotes/{id}",
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>"
],
]);
$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://app.sandbox.rio.trade/api/quotes/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-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://app.sandbox.rio.trade/api/quotes/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/quotes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"fees": {
"processingFeeFiat": 0,
"transferFeeFiat": 0.17832524656482562,
"platformFeeFiat": 20
},
"userId": "66290ac8bd3903485989f82e",
"crypto": "USDC",
"side": "buy",
"fiat": "USD",
"paymentMethod": "bankTransfer",
"expiresAt": "2024-06-04T15:07:13.097Z",
"country": "MX",
"amountFiat": 1000,
"amountCrypto": 54.77,
"marketPrice": 0.0560773092573,
"createdAt": "2024-06-04T15:02:13.097Z",
"quoteInCrypto": false,
"reissueAfterExpiration": true,
"netPrice": 0.97671,
"twoWaySettlementType": "default",
"twoWaySettlementDateOffset": 1,
"twoWaySettlementDate": "2024-06-04T15:02:13.097Z",
"effectiveTwoWaySettlementDateOffset": 1,
"paymentDueDate": "2024-06-04T15:02:13.097Z",
"orderType": "market",
"limitNetPrice": 0.0555,
"timeInForceStartsAt": "2024-06-04T15:02:13.097Z",
"timeInForceEndsAt": "2024-06-04T15:02:13.097Z",
"id": "665f2c75d6c964829d6398f4"
}{
"errors": [
{
"code": 21,
"message": "Quote not found"
}
]
}Quotes API
Get Quote by ID
GET
/
api
/
quotes
/
{id}
Get Quote by ID
curl --request GET \
--url https://app.sandbox.rio.trade/api/quotes/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://app.sandbox.rio.trade/api/quotes/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.sandbox.rio.trade/api/quotes/{id}', 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://app.sandbox.rio.trade/api/quotes/{id}",
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>"
],
]);
$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://app.sandbox.rio.trade/api/quotes/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-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://app.sandbox.rio.trade/api/quotes/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/quotes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"fees": {
"processingFeeFiat": 0,
"transferFeeFiat": 0.17832524656482562,
"platformFeeFiat": 20
},
"userId": "66290ac8bd3903485989f82e",
"crypto": "USDC",
"side": "buy",
"fiat": "USD",
"paymentMethod": "bankTransfer",
"expiresAt": "2024-06-04T15:07:13.097Z",
"country": "MX",
"amountFiat": 1000,
"amountCrypto": 54.77,
"marketPrice": 0.0560773092573,
"createdAt": "2024-06-04T15:02:13.097Z",
"quoteInCrypto": false,
"reissueAfterExpiration": true,
"netPrice": 0.97671,
"twoWaySettlementType": "default",
"twoWaySettlementDateOffset": 1,
"twoWaySettlementDate": "2024-06-04T15:02:13.097Z",
"effectiveTwoWaySettlementDateOffset": 1,
"paymentDueDate": "2024-06-04T15:02:13.097Z",
"orderType": "market",
"limitNetPrice": 0.0555,
"timeInForceStartsAt": "2024-06-04T15:02:13.097Z",
"timeInForceEndsAt": "2024-06-04T15:02:13.097Z",
"id": "665f2c75d6c964829d6398f4"
}{
"errors": [
{
"code": 21,
"message": "Quote not found"
}
]
}v1 (legacy). This page documents the API before the v2 update. The v1
format is not enabled for new accounts and must be enabled on your account by
your account manager. New integrations should use the
current documentation. To update an existing integration,
follow the migration guide.
Note: Quotes that have not been used in the settlement of an order are
deleted after 7 days.
Response
OK