Skip to content

Get exchange rate

GET
/api/v4/partner/rates/{currency}/{network}/{token}

Retrieve the current crypto-to-fiat and fiat-to-crypto exchange rate for a specific token, network, and settlement currency.

Authorizations

ApiKeyAuth
Type
API Key (header: X-Api-Key)

Parameters

Path Parameters

currency*

settlement currency (EUR constant for EUR, GBP constant for GBP)

Type
string
Required
network*

network of token (ethereum)

Type
string
Required
token*

address of token

Type
string
Required

Responses

OK

application/json
JSON
{
"status": "ok",
"payload": {
"rate": "0.9175"
}
}

Playground

Authorization
Variables
Key
Value

Samples

Powered by VitePress OpenAPI

Code examples

bash
# Get the EUR rate for USDC on Ethereum
curl -X GET "https://api.brrr.network/api/v4/partner/rates/EUR/ethereum/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" \
  -H "X-Api-Key: YOUR_API_KEY"
javascript
const currency = 'EUR';
const network = 'ethereum';
const token = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'; // USDC on Ethereum

const response = await fetch(
  `https://api.brrr.network/api/v4/partner/rates/${currency}/${network}/${token}`,
  {
    headers: {
      'X-Api-Key': process.env.BRRR_API_KEY,
    },
  }
);

if (!response.ok) {
  const error = await response.json();
  throw new Error(`Rate fetch failed: ${error.errorCode}`);
}

const data = await response.json();
const { rate } = data.payload;

// rate — token → EUR rate (how many EUR per token)
console.log('Token → EUR rate:', rate);
python
import os
import httpx

currency = 'EUR'
network = 'ethereum'
token = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'  # USDC on Ethereum

response = httpx.get(
    f'https://api.brrr.network/api/v4/partner/rates/{currency}/{network}/{token}',
    headers={'X-Api-Key': os.environ['BRRR_API_KEY']},
)
response.raise_for_status()
data = response.json()

rate = data['payload']['rate']

# rate — token → EUR rate
print(f"Token → EUR rate: {rate}")