GET

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.

GEThttps://bridge.bifrostcrypto.com/v1/get-price
Escopo exigido:prices: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

KeyValue
X-Bifrost-Invoke{{api_key}}

Query Parameters

ParameterExample
currency1required
USDT
currency2required
USD

cURL Example

bash
curl -X GET "https://bridge.bifrostcrypto.com/v1/get-price?currency1=USDT&currency2=USD" \
  -H "X-Bifrost-Invoke: YOUR_API_KEY"

Response Example

json
{
  "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.

StatusCodeWhenWhat to do
400missing_parameterscurrency1 or currency2 is missing or empty.Fix the request before sending it again.
400invalid_parametersA parameter was sent more than once.Fix the request before sending it again.
400invalid_currencyA code is not 2 to 16 letters and digits.Fix the request before sending it again.
404price_not_foundNo quote links the two currencies, directly or inverted.Check the pair with GET /v1/get-currencies.
500internal_errorUnexpected 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.

404

Price not found

No stored quote links the two currencies, directly or inverted. A quote stored as zero counts as missing.

json
{
  "error": {
    "code": "price_not_found",
    "message": "Price not found for USDT/XYZ"
  }
}
400

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.

json
{
  "error": {
    "code": "invalid_currency",
    "message": "Parameter currency2 is not a valid currency code"
  }
}