Class: Devilicious::Market::Kraken
- Defined in:
- lib/devilicious/markets/kraken.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#fiat_currency ⇒ Object
6 7 8 |
# File 'lib/devilicious/markets/kraken.rb', line 6 def fiat_currency "EUR" end |
#refresh_order_book! ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/devilicious/markets/kraken.rb', line 14 def refresh_order_book! json = get_json("https://api.kraken.com/0/public/Depth?pair=XBT#{fiat_currency}") or return asks = format_asks_bids(json["result"]["XXBTZ#{fiat_currency}"]["asks"]) bids = format_asks_bids(json["result"]["XXBTZ#{fiat_currency}"]["bids"]) mark_as_refreshed @order_book = OrderBook.new(asks: asks, bids: bids) end |
#trade_fee ⇒ Object
10 11 12 |
# File 'lib/devilicious/markets/kraken.rb', line 10 def trade_fee BigDecimal.new("0.0035").freeze # 0.35% end |