Module: Trader

Defined in:
lib/trade-o-matic.rb,
lib/trade-o-matic/cli.rb,
lib/trade-o-matic/version.rb,
lib/trade-o-matic/core/market.rb,
lib/trade-o-matic/core/account.rb,
lib/trade-o-matic/core/balance.rb,
lib/trade-o-matic/structs/book.rb,
lib/trade-o-matic/core/exchange.rb,
lib/trade-o-matic/structs/order.rb,
lib/trade-o-matic/structs/price.rb,
lib/trade-o-matic/structs/slope.rb,
lib/trade-o-matic/structs/currency.rb,
lib/trade-o-matic/structs/ask_slope.rb,
lib/trade-o-matic/structs/bid_slope.rb,
lib/trade-o-matic/structs/converter.rb,
lib/trade-o-matic/core/account_order.rb,
lib/trade-o-matic/core/account_proxy.rb,
lib/trade-o-matic/core/market_loader.rb,
lib/trade-o-matic/structs/transaction.rb,
lib/trade-o-matic/adapters/fake_backend.rb,
lib/trade-o-matic/structs/currency_pair.rb,
lib/trade-o-matic/adapters/itbit_backend.rb,
lib/trade-o-matic/adapters/surbtc_backend.rb,
lib/trade-o-matic/services/backend_factory.rb,
lib/trade-o-matic/adapters/base/raw_balance.rb,
lib/trade-o-matic/adapters/bitstamp_backend.rb,
lib/trade-o-matic/converters/sync_converter.rb,
lib/trade-o-matic/adapters/base/raw_resource.rb,
lib/trade-o-matic/converters/fixed_converter.rb,
lib/trade-o-matic/converters/inverse_converter.rb,
lib/trade-o-matic/converters/compound_converter.rb,
lib/trade-o-matic/converters/json_api_converter.rb,
lib/trade-o-matic/support/converter_configurator.rb,
lib/trade-o-matic/adapters/base/raw_account_order.rb

Defined Under Namespace

Modules: ConverterConfigurator, MarketLoader Classes: Account, AccountOrder, AccountProxy, AskSlope, BackendFactory, Balance, BidSlope, BitstampBackend, Book, CLI, CompoundConverter, Converter, Currency, CurrencyPair, Exchange, FakeBackend, FixedConverter, InverseConverter, ItbitBackend, JsonApiConverter, Market, Order, Price, RawAccountOrder, RawBalance, RawResource, Slope, SurbtcBackend, SyncConverter, Transaction

Constant Summary collapse

VERSION =
"0.2.1"

Class Method Summary collapse

Class Method Details

.account(_backend, _credentials) ⇒ Object



43
44
45
# File 'lib/trade-o-matic.rb', line 43

def self.(_backend, _credentials)
  exchange(_backend).(_credentials)
end

.exchange(_backend) ⇒ Object



35
36
37
# File 'lib/trade-o-matic.rb', line 35

def self.exchange(_backend)
  Exchange.new BackendFactory.build(_backend)
end

.market(_backend, _pair, _quote = nil) ⇒ Object



39
40
41
# File 'lib/trade-o-matic.rb', line 39

def self.market(_backend, _pair, _quote=nil)
  exchange(_backend).market_for(_pair, _quote)
end