Appearance
EVM Convert Token to EUR
POST
/v5/offramp/crypto-to-card/evm-token-to-eur
Estimate an EVM offramp using a token-denominated amount.
Authorizations
ApiKeyAuth
Type
API Key (header: X-Api-Key)
Request Body
application/json
JSON
{
"toToken": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"decimals": 6
},
"fromToken": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"decimals": 6
},
"tokenAmount": "string",
"eurAmount": "string",
"fromAddress": "string",
"destReceived": "string",
"network": "ethereum",
"additionalProperties": "string"
}
Responses
OK
application/json
JSON
{
"status": "ok",
"payload": {
"transferData": {
"data": "string",
"allowanceTarget": "string",
"to": "string",
"value": "string",
"buyAmount": "string",
"sellAmount": "string",
"slippage": "string",
"swapperName": "string",
"additionalProperties": "string"
},
"tokenAmount": "string",
"EURAmount": "string"
}
}
Code examples
bash
curl -X POST https://api.brrr.network/v5/offramp/crypto-to-card/evm-token-to-eur \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"toToken": {
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"decimals": 6
},
"fromToken": {
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"decimals": 6
},
"tokenAmount": "10",
"fromAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"destReceived": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"network": "ethereum"
}'javascript
const response = await fetch('https://api.brrr.network/v5/offramp/crypto-to-card/evm-token-to-eur', {
method: 'POST',
headers: {
'X-Api-Key': process.env.BRRR_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
'toToken': {
'address': '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
'decimals': 6
},
'fromToken': {
'address': '0xdac17f958d2ee523a2206206994597c13d831ec7',
'decimals': 6
},
'tokenAmount': '10',
'fromAddress': '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
'destReceived': '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
'network': 'ethereum'
}),
});
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/offramp/crypto-to-card/evm-token-to-eur',
headers={
'X-Api-Key': os.environ['BRRR_API_KEY'],
'Content-Type': 'application/json',
},
json={
"toToken": {
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"decimals": 6
},
"fromToken": {
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"decimals": 6
},
"tokenAmount": "10",
"fromAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"destReceived": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"network": "ethereum"
},
)
response.raise_for_status()
print(response.json()['payload'])