Get Price
A referência da API está em inglês. Os guias, a autenticação, os webhooks e os códigos de erro estão em português.
Gets the conversion price between two currencies (crypto or fiat).
Conversion types: same_currency, crypto_to_fiat, fiat, crypto_to_crypto, reversed_* (the inverse of a stored quote, e.g. reversed_crypto_to_fiat for USD to USDT). price is always a string in pt-BR number format: comma as decimal separator and dot as thousands separator. Decimals: same_currency is always "1,00"; fiat has 6 decimals; crypto_to_fiat, crypto_to_crypto and reversed_* have 2 decimals when the value is 1 or more ("65.432,10") and 8 significant digits below 1 ("0,000012340000" for a token worth 0.00001234), so low-value tokens never read as zero. Do not parseFloat it directly ("65.432,10" would read as 65.432): remove the dots, then replace the comma with a dot. Identical currency codes always answer same_currency, even for a code that is not listed.
https://bridge.bifrostcrypto.com/v1/get-priceprices:read(chave nova sem lista é somente leitura)"O Oráculo de Mimir conhece o valor de cada moeda nos nove reinos. Consulte-o para conhecer as taxas de câmbio entre os mundos digital e mortal."Mímir, Guardião do Poço da Sabedoria
Headers
| Key | Value | Description |
|---|---|---|
X-Bifrost-Invoke | {{api_key}} | Private API key |
Query Parameters
| Parameter | Example | Description |
|---|---|---|
currency1required | USDT | Source currency (crypto or fiat). Letters and digits, 2 to 16 characters; trimmed and uppercased before lookup, so usdt is accepted. |
currency2required | USD | Target currency (crypto or fiat). Same format as currency1. |
cURL Example
curl -X GET "https://bridge.bifrostcrypto.com/v1/get-price?currency1=USDT¤cy2=USD" \
-H "X-Bifrost-Invoke: YOUR_API_KEY"Response Example
{
"success": true,
"data": {
"from": "USDT",
"to": "USD",
"price": "1,00",
"type": "crypto_to_fiat",
"last_updated": "2026-01-16T10:00:00-03:00"
}
}Errors
Every error has the shape error.code, error.message and, when useful, error.details. Authentication, scope and rate-limit errors (401, 403, 429) apply to every endpoint and are described under Authentication.
| Status | Code | When | What to do |
|---|---|---|---|
| 400 | missing_parameters | currency1 or currency2 is missing or empty. | Fix the request before sending it again. |
| 400 | invalid_parameters | A parameter was sent more than once. | Fix the request before sending it again. |
| 400 | invalid_currency | A code is not 2 to 16 letters and digits. | Fix the request before sending it again. |
| 404 | price_not_found | No quote links the two currencies, directly or inverted. | Check the pair with GET /v1/get-currencies. |
| 500 | internal_error | Unexpected failure. | Nothing was changed. Retry later. |
Outras respostas
Respostas que não são o caminho feliz e ainda assim precisam de tratamento na sua integração.
Price not found
No stored quote links the two currencies, directly or inverted. A quote stored as zero counts as missing.
{
"error": {
"code": "price_not_found",
"message": "Price not found for USDT/XYZ"
}
}Invalid parameters
missing_parameters: currency1 or currency2 absent or empty. invalid_parameters: a parameter sent more than once as an array (currency1[]=...). invalid_currency: a code outside 2 to 16 letters and digits. An unexpected failure answers 500 internal_error.
{
"error": {
"code": "invalid_currency",
"message": "Parameter currency2 is not a valid currency code"
}
}