Module: Minter::Api::EstimateResource

Included in:
Client
Defined in:
lib/minter/api/resources/estimate_resource.rb

Instance Method Summary collapse

Instance Method Details

#estimate_coin_buy(coinToSell:, valueToBuy:, coinToBuy:, height: 1) ⇒ Object



6
7
8
9
10
# File 'lib/minter/api/resources/estimate_resource.rb', line 6

def estimate_coin_buy(coinToSell:, valueToBuy:, coinToBuy:, height: 1)
  params = { coinToSell: coinToSell, valueToBuy: valueToBuy, coinToBuy: coinToBuy, height: height }.compact
  path = "/estimate_coin_buy"
  get(path, params)
end

#estimate_coin_sell(coinToSell:, valueToSell:, coinToBuy:, height: nil) ⇒ Object



12
13
14
15
16
# File 'lib/minter/api/resources/estimate_resource.rb', line 12

def estimate_coin_sell(coinToSell:, valueToSell:, coinToBuy:, height: nil)
  params = { coinToSell: coinToSell, valueToSell: valueToSell, coinToBuy: coinToBuy, height: height }.compact
  path = "/estimate_coin_sell"
  get(path, params)
end

#estimate_coin_sell_all(coinToSell:, valueToSell:, coinToBuy:, gasPrice:, height: nil) ⇒ Object



18
19
20
21
22
# File 'lib/minter/api/resources/estimate_resource.rb', line 18

def estimate_coin_sell_all(coinToSell:, valueToSell:, coinToBuy:, gasPrice:, height: nil)
  path = "/estimate_coin_sell_all"
  params = { coinToSell: coinToSell, valueToSell: valueToSell, coinToBuy: coinToBuy, gasPrice: gasPrice, height: height }.compact
  get(path, params)
end

#estimate_tx_comission(transaction:) ⇒ Object



24
25
26
27
28
# File 'lib/minter/api/resources/estimate_resource.rb', line 24

def estimate_tx_comission(transaction:)
  path = "/estimate_tx_commission"
  params = { transaction: transaction }
  get(path, params)
end