Module: NOWPayments::API::Estimation
- Included in:
- Client
- Defined in:
- lib/nowpayments/api/estimation.rb
Overview
Estimation and calculation endpoints
Instance Method Summary collapse
-
#estimate(amount:, currency_from:, currency_to:) ⇒ Hash
Estimate price for currency pair GET /v1/estimate.
-
#min_amount(currency_from:, currency_to:) ⇒ Hash
Get minimum payment amount for currency pair GET /v1/min-amount.
Instance Method Details
#estimate(amount:, currency_from:, currency_to:) ⇒ Hash
Estimate price for currency pair GET /v1/estimate
25 26 27 28 29 30 31 |
# File 'lib/nowpayments/api/estimation.rb', line 25 def estimate(amount:, currency_from:, currency_to:) get("estimate", params: { amount: amount, currency_from: currency_from, currency_to: currency_to }).body end |
#min_amount(currency_from:, currency_to:) ⇒ Hash
Get minimum payment amount for currency pair GET /v1/min-amount
12 13 14 15 16 17 |
# File 'lib/nowpayments/api/estimation.rb', line 12 def min_amount(currency_from:, currency_to:) get("min-amount", params: { currency_from: currency_from, currency_to: currency_to }).body end |