Class: StockFighter::Api

Inherits:
Object
  • Object
show all
Includes:
ApiMixin
Defined in:
lib/stock_fighter/api.rb

Instance Method Summary collapse

Methods included from ApiMixin

included

Methods included from StockFighter::ApiMixin::GameMasterApi

#list_levels, #restart_instance, #resume_instance, #show_instance, #start_current_level, #stop_instance

Methods included from StockFighter::ApiMixin::TradingApi

#cancel_order, #get_orderbook, #get_quote, #list_account_orders, #list_account_stock_orders, #list_stocks, #place_order, #send_heartbeat, #send_venue_heartbeat, #set_api_key, #show_order

Constructor Details

#initialize(api_key) ⇒ Api

Returns a new instance of Api.



5
6
7
# File 'lib/stock_fighter/api.rb', line 5

def initialize api_key
  self.set_api_key api_key
end

Instance Method Details

#connect_to_level(level_name) ⇒ Object



9
10
11
# File 'lib/stock_fighter/api.rb', line 9

def connect_to_level level_name
  Level.new level_name, self
end