class Trader::BaseBackend

Attributes

name[R]

Public Class Methods

new(_name) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 8
def initialize(_name)
  @name = _name
end

Public Instance Methods

cancel_order(_session, _id) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 48
def cancel_order(_session, _id)
  not_supported :cancel_order
end
create_order(_session, _pair, _volume, _price, _type) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 40
def create_order(_session, _pair, _volume, _price, _type)
  not_supported :create_order
end
fetch_order(_session, _id) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 44
def fetch_order(_session, _id)
  not_supported :fetch_order
end
fill_book(_book) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 16
def fill_book(_book)
  not_supported :book
end
generate_endpoint(_session, _currency) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 28
def generate_endpoint(_session, _currency)
  not_supported :deposit
end
get_available_markets() click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 12
def get_available_markets
  []
end
get_balance(_session, _currency) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 24
def get_balance(_session, _currency)
  not_supported :get_balance
end
get_orders(_session, _pair) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 36
def get_orders(_session, _pair)
  not_supported :list_orders
end
get_session(_credentials) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 20
def get_session(_credentials)
  _credentials
end
listen_transactions(_pair, &_block) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 52
def listen_transactions(_pair, &_block)
  not_supported :listen_transactions
end
not_supported(_feature) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 56
def not_supported(_feature)
  raise NotSupportedError.new name, _feature
end
withdraw_to_endpoint(_session, _currency, _amount, _endpoint) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 32
def withdraw_to_endpoint(_session, _currency, _amount, _endpoint)
  not_supported :withdraw
end

Private Instance Methods

error(_messsage) click to toggle source
# File lib/trade-o-matic/adapters/base_backend.rb, line 62
def error(_messsage)
  raise BackendError.new name, _messsage
end