Class: Devilicious::Market::BitNz

Inherits:
Base
  • Object
show all
Defined in:
lib/devilicious/markets/bit_nz.rb

Instance Attribute Summary

Attributes inherited from Base

#order_book

Instance Method Summary collapse

Methods inherited from Base

#to_s

Instance Method Details

#fiat_currencyObject

NOTE: bitnz.com/



8
9
10
# File 'lib/devilicious/markets/bit_nz.rb', line 8

def fiat_currency
  "NZD"
end

#refresh_order_book!Object



16
17
18
19
20
21
22
23
24
# File 'lib/devilicious/markets/bit_nz.rb', line 16

def refresh_order_book!
  json = get_json("https://bitnz.com/api/0/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_feeObject



12
13
14
# File 'lib/devilicious/markets/bit_nz.rb', line 12

def trade_fee
  BigDecimal.new("0.005").freeze # 0.5% - see https://bitnz.com/fees
end