Class: Ubea::Exchange::BitNzNzd
- Inherits:
-
Base
- Object
- Base
- Ubea::Exchange::BitNzNzd
show all
- Defined in:
- lib/ubea/exchanges/bit_nz_nzd.rb
Instance Attribute Summary
Attributes inherited from Base
#last_rtt, #order_book, #updated_at
Instance Method Summary
collapse
Methods inherited from Base
#balance, #id, #short_name
Instance Method Details
#fiat_currency ⇒ Object
12
13
14
|
# File 'lib/ubea/exchanges/bit_nz_nzd.rb', line 12
def fiat_currency
"NZD"
end
|
#name ⇒ Object
8
9
10
|
# File 'lib/ubea/exchanges/bit_nz_nzd.rb', line 8
def name
"bitNZ"
end
|
#refresh_order_book! ⇒ Object
20
21
22
23
24
25
26
27
28
|
# File 'lib/ubea/exchanges/bit_nz_nzd.rb', line 20
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_fee ⇒ Object
16
17
18
|
# File 'lib/ubea/exchanges/bit_nz_nzd.rb', line 16
def trade_fee
BigDecimal.new("0.005").freeze end
|
#website ⇒ Object
4
5
6
|
# File 'lib/ubea/exchanges/bit_nz_nzd.rb', line 4
def website
"https://bitnz.com/".freeze
end
|