Class: Devilicious::Market::Bitstamp
- Defined in:
- lib/devilicious/markets/bitstamp.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#fiat_currency ⇒ Object
NOTE: www.bitstamp.net/
8 9 10 |
# File 'lib/devilicious/markets/bitstamp.rb', line 8 def fiat_currency "USD" end |
#refresh_order_book! ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/devilicious/markets/bitstamp.rb', line 16 def refresh_order_book! json = get_json("https://www.bitstamp.net/api/order_book/") 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/bitstamp.rb', line 12 def trade_fee BigDecimal.new("0.005").freeze # 0.5% - see https://www.bitstamp.net/fee_schedule/ end |