Class: Ubea::Exchange::BitcoinDeEur

Inherits:
Base
  • Object
show all
Defined in:
lib/ubea/exchanges/bitcoin_de_eur.rb

Instance Attribute Summary

Attributes inherited from Base

#last_rtt, #order_book, #updated_at

Instance Method Summary collapse

Methods inherited from Base

#balance, #id, #name, #short_name

Instance Method Details

#fiat_currencyObject



4
5
6
# File 'lib/ubea/exchanges/bitcoin_de_eur.rb', line 4

def fiat_currency
  "EUR"
end

#refresh_order_book!Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ubea/exchanges/bitcoin_de_eur.rb', line 12

def refresh_order_book!
  html = get_html("https://www.bitcoin.de/en/market") or return

  asks = format_asks_bids(html, "offer")
  bids = format_asks_bids(html, "order")

  return if asks.empty? || asks.size != bids.size

  mark_as_refreshed
  @order_book = OrderBook.new(asks: asks, bids: bids)
end

#trade_feeObject



8
9
10
# File 'lib/ubea/exchanges/bitcoin_de_eur.rb', line 8

def trade_fee
  BigDecimal.new("0.005").freeze # 0.5% - see https://www.bitcoin.de/en/infos#gebuehren
end