curl --request POST \
--url https://skala-sandbox.ripio.com/api/v1/quotes/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "8142b065-79c4-4f48-9e33-11b17bc658d4",
"fromCurrency": "ARS",
"toCurrency": "USDC",
"fromAmount": "1500",
"chain": "ETHEREUM_SEPOLIA",
"paymentMethodType": "bank_transfer"
}
'import requests
url = "https://skala-sandbox.ripio.com/api/v1/quotes/"
payload = {
"customerId": "8142b065-79c4-4f48-9e33-11b17bc658d4",
"fromCurrency": "ARS",
"toCurrency": "USDC",
"fromAmount": "1500",
"chain": "ETHEREUM_SEPOLIA",
"paymentMethodType": "bank_transfer"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: '8142b065-79c4-4f48-9e33-11b17bc658d4',
fromCurrency: 'ARS',
toCurrency: 'USDC',
fromAmount: '1500',
chain: 'ETHEREUM_SEPOLIA',
paymentMethodType: 'bank_transfer'
})
};
fetch('https://skala-sandbox.ripio.com/api/v1/quotes/', 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://skala-sandbox.ripio.com/api/v1/quotes/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customerId' => '8142b065-79c4-4f48-9e33-11b17bc658d4',
'fromCurrency' => 'ARS',
'toCurrency' => 'USDC',
'fromAmount' => '1500',
'chain' => 'ETHEREUM_SEPOLIA',
'paymentMethodType' => 'bank_transfer'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://skala-sandbox.ripio.com/api/v1/quotes/"
payload := strings.NewReader("{\n \"customerId\": \"8142b065-79c4-4f48-9e33-11b17bc658d4\",\n \"fromCurrency\": \"ARS\",\n \"toCurrency\": \"USDC\",\n \"fromAmount\": \"1500\",\n \"chain\": \"ETHEREUM_SEPOLIA\",\n \"paymentMethodType\": \"bank_transfer\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://skala-sandbox.ripio.com/api/v1/quotes/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"8142b065-79c4-4f48-9e33-11b17bc658d4\",\n \"fromCurrency\": \"ARS\",\n \"toCurrency\": \"USDC\",\n \"fromAmount\": \"1500\",\n \"chain\": \"ETHEREUM_SEPOLIA\",\n \"paymentMethodType\": \"bank_transfer\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://skala-sandbox.ripio.com/api/v1/quotes/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"8142b065-79c4-4f48-9e33-11b17bc658d4\",\n \"fromCurrency\": \"ARS\",\n \"toCurrency\": \"USDC\",\n \"fromAmount\": \"1500\",\n \"chain\": \"ETHEREUM_SEPOLIA\",\n \"paymentMethodType\": \"bank_transfer\"\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "8142b065-79c4-4f48-9e33-11b17bc658d4",
"fromCurrency": "ARS",
"toCurrency": "USDC",
"fromAmount": "1500.00000000",
"finalFromAmount": "1400.00000000",
"toAmount": "1.42857143",
"finalToAmount": "1.32857143",
"rate": "1050.00000000",
"expiration": "2024-04-10T18:17:07.702533Z",
"fees": [
{
"amount": "0.37",
"name": "operational_fee",
"type": "Gas Price",
"currency": "ARS",
"appliesOnFromAmount": true,
"appliesOnToAmount": true,
"appliesOnFirstOrder": true,
"amountInUSD": "1.01"
}
]
}Create Quote
Obtains a held price quote for a cryptocurrency conversion, valid for a limited time (e.g., 30 seconds). This quote includes the exchange rate and applicable fees, serving as the basis for on-ramp and off-ramp operations.
Quotes are scoped to a customer: customerId is required, so create the customer before requesting a quote.
For an on-ramp quote, chain must be one your account can withdraw toCurrency on. Get Withdrawal Networks lists them; any other pair is rejected with 400 / 20103.
The fees must leave a positive amount for the customer to receive. When they take the whole amount, or more (finalToAmount would be zero or negative), the quote is rejected with 400 / 20104. This applies to on-ramp and off-ramp quotes alike.
curl --request POST \
--url https://skala-sandbox.ripio.com/api/v1/quotes/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "8142b065-79c4-4f48-9e33-11b17bc658d4",
"fromCurrency": "ARS",
"toCurrency": "USDC",
"fromAmount": "1500",
"chain": "ETHEREUM_SEPOLIA",
"paymentMethodType": "bank_transfer"
}
'import requests
url = "https://skala-sandbox.ripio.com/api/v1/quotes/"
payload = {
"customerId": "8142b065-79c4-4f48-9e33-11b17bc658d4",
"fromCurrency": "ARS",
"toCurrency": "USDC",
"fromAmount": "1500",
"chain": "ETHEREUM_SEPOLIA",
"paymentMethodType": "bank_transfer"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: '8142b065-79c4-4f48-9e33-11b17bc658d4',
fromCurrency: 'ARS',
toCurrency: 'USDC',
fromAmount: '1500',
chain: 'ETHEREUM_SEPOLIA',
paymentMethodType: 'bank_transfer'
})
};
fetch('https://skala-sandbox.ripio.com/api/v1/quotes/', 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://skala-sandbox.ripio.com/api/v1/quotes/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customerId' => '8142b065-79c4-4f48-9e33-11b17bc658d4',
'fromCurrency' => 'ARS',
'toCurrency' => 'USDC',
'fromAmount' => '1500',
'chain' => 'ETHEREUM_SEPOLIA',
'paymentMethodType' => 'bank_transfer'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://skala-sandbox.ripio.com/api/v1/quotes/"
payload := strings.NewReader("{\n \"customerId\": \"8142b065-79c4-4f48-9e33-11b17bc658d4\",\n \"fromCurrency\": \"ARS\",\n \"toCurrency\": \"USDC\",\n \"fromAmount\": \"1500\",\n \"chain\": \"ETHEREUM_SEPOLIA\",\n \"paymentMethodType\": \"bank_transfer\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://skala-sandbox.ripio.com/api/v1/quotes/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"8142b065-79c4-4f48-9e33-11b17bc658d4\",\n \"fromCurrency\": \"ARS\",\n \"toCurrency\": \"USDC\",\n \"fromAmount\": \"1500\",\n \"chain\": \"ETHEREUM_SEPOLIA\",\n \"paymentMethodType\": \"bank_transfer\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://skala-sandbox.ripio.com/api/v1/quotes/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"8142b065-79c4-4f48-9e33-11b17bc658d4\",\n \"fromCurrency\": \"ARS\",\n \"toCurrency\": \"USDC\",\n \"fromAmount\": \"1500\",\n \"chain\": \"ETHEREUM_SEPOLIA\",\n \"paymentMethodType\": \"bank_transfer\"\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "8142b065-79c4-4f48-9e33-11b17bc658d4",
"fromCurrency": "ARS",
"toCurrency": "USDC",
"fromAmount": "1500.00000000",
"finalFromAmount": "1400.00000000",
"toAmount": "1.42857143",
"finalToAmount": "1.32857143",
"rate": "1050.00000000",
"expiration": "2024-04-10T18:17:07.702533Z",
"fees": [
{
"amount": "0.37",
"name": "operational_fee",
"type": "Gas Price",
"currency": "ARS",
"appliesOnFromAmount": true,
"appliesOnToAmount": true,
"appliesOnFirstOrder": true,
"amountInUSD": "1.01"
}
]
}Authorizations
Access token obtained via /oauth2/token/. Use as Authorization: Bearer <access_token>.
Body
Details for the quote request.
Payload for creating a quote. Quotes are always tied to an existing customer, so you must create the customer before requesting a quote.
Unique identifier of the customer the quote is for. The customer must already exist and be active.
"8142b065-79c4-4f48-9e33-11b17bc658d4"
The source currency for the conversion.
"ARS"
The target currency for the conversion.
"USDC"
The amount of the source currency to be converted.
"1500"
The blockchain network to be used for the conversion (applicable for certain cryptocurrencies).
"ETHEREUM_SEPOLIA"
The desired payment method for the conversion (e.g., bank_transfer, breb, r2p_bancolombia, r2p_nequi, pix). Note: breb, r2p_bancolombia and r2p_nequi are only available for Colombia; pix is only available for Brazil. Additionally, r2p_bancolombia and r2p_nequi are only available for on-ramp operations.
"bank_transfer"
Response
Quote created successfully.
Unique identifier for the quote.
"8142b065-79c4-4f48-9e33-11b17bc658d4"
The source currency for the conversion.
"ARS"
The target currency for the conversion.
"USDC"
The amount of the source currency to be converted.
"1500.00000000"
The amount of the source currency after fees deduction.
"1400.00000000"
The amount of the target currency received after the conversion.
"1.42857143"
The amount of the target currency after fees deduction.
"1.32857143"
The exchange rate applied for the conversion.
"1050.00000000"
The date and time when the quote expires (UTC).
"2024-04-10T18:17:07.702533Z"
Show child attributes
Show child attributes
Was this page helpful?