curl --request GET \
--url https://api-sandbox.superbank.co/v0/rates \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api-sandbox.superbank.co/v0/rates"
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://api-sandbox.superbank.co/v0/rates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"source_currency": "USDC",
"destination_currency": "CAD",
"mid_market_rate": 1.3788,
"inverted_mid_market_rate": 0.7252,
"effective_rate": 1.3712,
"source_amount": 1000,
"destination_amount": 1371.2,
"fee": {
"total": 9.97,
"currency": "USDC"
}
}Get an exchange rate
Returns the exchange rate for a currency pair with your platform fee applied on top. Pass exactly one of source_amount or destination_amount; the other side is computed. This is an indicative rate and does not lock a quote.
curl --request GET \
--url https://api-sandbox.superbank.co/v0/rates \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api-sandbox.superbank.co/v0/rates"
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://api-sandbox.superbank.co/v0/rates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"source_currency": "USDC",
"destination_currency": "CAD",
"mid_market_rate": 1.3788,
"inverted_mid_market_rate": 0.7252,
"effective_rate": 1.3712,
"source_amount": 1000,
"destination_amount": 1371.2,
"fee": {
"total": 9.97,
"currency": "USDC"
}
}Authorizations
Query Parameters
Source currency code, e.g. USDC, USDT, EURC, USD.
"USDC"
Source rail / chain, e.g. SOLANA, TRON, POLYGON, ETHEREUM, ACH.
"SOLANA"
Destination currency code, e.g. USD, CAD, EUR, USDC.
"CAD"
Destination rail, e.g. ACH, RTP, DOMESTIC_WIRE, LOCAL, SOLANA.
"LOCAL"
ISO 3166-1 alpha-2 country code of the destination. Required when the destination is a fiat currency.
"CA"
ISO 3166-1 alpha-2 country code of the source. Required when the source is a fiat currency (on-ramp).
"US"
Amount in the source currency to convert. Mutually exclusive with destination_amount.
1000
Amount in the destination currency to receive. Mutually exclusive with source_amount.
1000
Response
Rate retrieved successfully
"USDC"
"CAD"
Destination units per one source unit, before fees.
1.3788
Inverse of mid_market_rate.
0.7252
All-in rate the customer receives per source unit, after all fees.
1.3712
Amount debited in the source currency.
1000
Amount credited in the destination currency.
1371.2
Show child attributes
Show child attributes