Skip to content

Estimate Onramp Transaction

POST
/v5/onramp/estimate

Estimate fees and output for a Card API onramp transaction.

Authorizations

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

Request Body

application/json
JSON
{
"network": "string",
"token": "string",
"amountEUR": "string",
"beneficiaryAddress": "string"
}

Responses

OK

application/json
JSON
{
"status": "ok",
"payload": {
"feeEUR": "string",
"expectedAmount": "string"
}
}

Playground

Authorization
Body

Samples

Powered by VitePress OpenAPI

Code examples

bash
curl -X POST https://api.brrr.network/v5/onramp/estimate \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "network": "ethereum",
  "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "amountEUR": "1",
  "beneficiaryAddress": "0x45FB5699C0BFFC5e7D7F0c4947417833cc0623aa"
}'
javascript
const response = await fetch('https://api.brrr.network/v5/onramp/estimate', {
  method: 'POST',
  headers: {
    'X-Api-Key': process.env.BRRR_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  'network': 'ethereum',
  'token': '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
  'amountEUR': '1',
  'beneficiaryAddress': '0x45FB5699C0BFFC5e7D7F0c4947417833cc0623aa'
}),
});

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.post(
    'https://api.brrr.network/v5/onramp/estimate',
    headers={
        'X-Api-Key': os.environ['BRRR_API_KEY'],
        'Content-Type': 'application/json',
    },
    json={
    "network": "ethereum",
    "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "amountEUR": "1",
    "beneficiaryAddress": "0x45FB5699C0BFFC5e7D7F0c4947417833cc0623aa"
},
)
response.raise_for_status()
print(response.json()['payload'])