Class: Devilicious::Market::HitBtc
- Defined in:
- lib/devilicious/markets/hit_btc.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#fiat_currency ⇒ Object
NOTE: hitbtc-com.github.io/hitbtc-api/.
- #refresh_order_book! ⇒ Object
- #trade_fee ⇒ Object
Methods inherited from Base
Instance Method Details
#fiat_currency ⇒ Object
8 9 10 |
# File 'lib/devilicious/markets/hit_btc.rb', line 8 def fiat_currency "EUR" end |
#refresh_order_book! ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/devilicious/markets/hit_btc.rb', line 16 def refresh_order_book! json = get_json("https://api.hitbtc.com/api/1/public/BTC#{fiat_currency}/orderbook") or return asks = format_asks_bids(json["asks"]) bids = format_asks_bids(json["bids"]) mark_as_refreshed @order_book = OrderBook.new(asks: asks, bids: bids) end |
#trade_fee ⇒ Object
12 13 14 |
# File 'lib/devilicious/markets/hit_btc.rb', line 12 def trade_fee BigDecimal.new("0.001").freeze # 0.1% - see https://hitbtc.com/fees-and-limits end |