Module: Bitfinex::RESTv2Utils
- Included in:
- RESTv2
- Defined in:
- lib/rest/v2/utils.rb
Instance Method Summary collapse
-
#calc_avg_price(symbol = 'tBTCUSD', amount = 0, period = 0, rate_limit = nil) ⇒ Array
Calculate the average execution rate for Trading or Margin funding.
Instance Method Details
#calc_avg_price(symbol = 'tBTCUSD', amount = 0, period = 0, rate_limit = nil) ⇒ Array
Calculate the average execution rate for Trading or Margin funding.
@example:
client.calc_avg_price('tBTCUSD', 1000, 1000)
15 16 17 18 19 20 21 22 23 |
# File 'lib/rest/v2/utils.rb', line 15 def calc_avg_price(symbol = 'tBTCUSD', amount = 0, period = 0, rate_limit = nil) params = { symbol: symbol, amount: amount.to_s, period: period.to_s } params[:rateLimit] = rate_limit.to_s unless rate_limit.nil? get("calc/trade/avg",params) end |