Class: Ubea::Exchange::AnxBtcBase
- Inherits:
-
Base
- Object
- Base
- Ubea::Exchange::AnxBtcBase
show all
- Defined in:
- lib/ubea/exchanges/anx_btc_base.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
#name ⇒ Object
6
7
8
|
# File 'lib/ubea/exchanges/anx_btc_base.rb', line 6
def name
"ANXBTC (#{fiat_currency})"
end
|
#refresh_order_book! ⇒ Object
14
15
16
17
18
19
20
21
22
|
# File 'lib/ubea/exchanges/anx_btc_base.rb', line 14
def refresh_order_book!
json = get_json("https://anxpro.com/api/2/BTC#{fiat_currency}/money/depth/full") or return
asks = format_asks_bids(json["data"]["asks"])
bids = format_asks_bids(json["data"]["bids"])
mark_as_refreshed
@order_book = OrderBook.new(asks: asks, bids: bids)
end
|
#trade_fee ⇒ Object
10
11
12
|
# File 'lib/ubea/exchanges/anx_btc_base.rb', line 10
def trade_fee
BigDecimal.new("0.005").freeze end
|