cURL
curl --request POST \ --url https://api.hypermid.io/v1/onramp/quote \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --data ' { "fiatAmount": 100, "fiatCurrency": "USD", "cryptoToken": "ETH", "cryptoChain": "ethereum", "walletAddress": "<string>", "paymentMode": "card", "userCountry": "US" } '
{ "data": { "fiatCurrency": "USD", "fiatAmount": 100, "cryptoAsset": "ETH", "chainId": 1, "cryptoAmount": "0.029615", "exchangeRate": 3376.65, "fees": { "networkFee": 2.50, "processingFee": 3.49, "partnerFee": 0.30, "totalFee": 6.29 }, "totalFiatAmount": 106.29, "paymentMethod": "credit_card", "expiresAt": 1711234877 }, "error": null, "meta": { "requestId": "q7f8a9b0-c1d2-3456-0123-567890123456", "timestamp": 1711234577, "rateLimit": { "limit": 2000, "remaining": 1983, "reset": 1711234627 } } }
Get a fiat-to-crypto conversion quote
USD
EUR
GBP
ETH
USDC
BTC
1
credit_card
debit_card
bank_transfer
const quote = await client.getOnrampQuote({ fiatCurrency: "USD", cryptoAsset: "ETH", chainId: 1, fiatAmount: 100, paymentMethod: "credit_card", walletAddress: "0xYourAddress", }); console.log(`$100 USD = ${quote.data.cryptoAmount} ETH`); console.log(`Total charge: $${quote.data.totalFiatAmount}`); console.log(`Fees: $${quote.data.fees.totalFee}`);
Partner API key. Optional for public endpoints, required for /v1/partner/*.
100
"USD"
"ETH"
"ethereum"
"card"
"US"
Quote returned
Response payload (null on error)
Show child attributes