Class: Money::Arbitrage

Inherits:
Common
  • Object
show all
Defined in:
lib/money/resources/arbitrage.rb

Constant Summary collapse

DEFAULT =
[
  { id: 1, date_added: '2010-07-13T00:00:00.000Z', name: 'Bitcoin', slug: 'bitcoin', symbol: 'BTC' },
  { id: 1027, date_added: '2015-08-07T00:00:00.000Z', name: 'Ethereum', slug: 'ethereum', symbol: 'ETH' },
  { id: 52, date_added: '2013-08-04T00:00:00.000Z', name: 'XRP', slug: 'xrp', symbol: 'XRP' },
  { id: 2, date_added: '2013-04-28T00:00:00.000Z', name: 'Litecoin', slug: 'litecoin', symbol: 'LTC' }
].freeze
RESTART_VALUE =
-9

Instance Attribute Summary

Attributes inherited from Common

#http

Instance Method Summary collapse

Methods inherited from Common

#initialize

Constructor Details

This class inherits a constructor from Money::Common

Instance Method Details

#runObject



14
15
16
17
18
19
20
# File 'lib/money/resources/arbitrage.rb', line 14

def run
  data = cmc(joiner)
  data.reject! { |item| item[:name].downcase.strip == "tether usdt" }
  @log.info("Founded crypto: #{data.map { |item| item[:name] }.join(', ')}")

  validate(data)
end