Skip to content

Get Buying Rate

GET
/v5/config/buying-rate

Retrieve the informational USD/EUR FX rate used in Card API UX.

Authorizations

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

Parameters

Query Parameters

code*
Type
string
Required
Example"EUR"
direction
Type
string
Valid values
"buy""sell"
Default
"buy"

Responses

OK

application/json
JSON
{
"status": "ok",
"payload": {
"code": "EUR",
"direction": "buy",
"rate": "0.9210",
"quote": {
"base": "USD",
"counter": "EUR"
},
"timestamp": 1724247261
}
}

Playground

Authorization
Variables
Key
Value

Samples

Powered by VitePress OpenAPI

Code examples

bash
curl -X GET "https://api.brrr.network/v5/config/buying-rate?code=EUR&direction=buy" \
  -H "X-Api-Key: YOUR_API_KEY"
javascript
const response = await fetch('https://api.brrr.network/v5/config/buying-rate?code=EUR&direction=buy', {
  headers: {
    'X-Api-Key': process.env.BRRR_API_KEY,
  },
});

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

const data = await response.json();
console.log(data.payload);
python
import os
import httpx

response = httpx.get(
    'https://api.brrr.network/v5/config/buying-rate?code=EUR&direction=buy',
    headers={'X-Api-Key': os.environ['BRRR_API_KEY']},
)
response.raise_for_status()
print(response.json()['payload'])