get_onramp_quote()¶
- async Client.get_onramp_quote()¶
Request a price quote for purchasing cryptocurrency via an onramp provider.
Usable by Users Bots- Parameters:
provider (
str) – The onramp provider ID.crypto_currency (
str) – The cryptocurrency code (e.g. “TON”).base_currency (
str) – The fiat currency code (e.g. “USD”).base_amount (
str, optional) – The fiat currency amount to spend.crypto_amount (
str, optional) – The cryptocurrency amount to buy.payment_method (
str, optional) – The payment method identifier.
- Returns:
OnrampQuote– On success, the price quotation is returned.
Example
# Get quote quote = await app.get_onramp_quote( provider="provider_id", crypto_currency="TON", base_currency="USD", base_amount="50", )