text: var search_data = {"index":{"searchIndex":["exchange","exchangekraken","exchangesimulation","kraken","client","krakenapierror","strategy","timer","timersimulation","add_order()","asset_pairs()","assets()","balance()","cancel_order()","cancel_order()","cancel_order()","closed_orders()","create_buy_thread()","create_sell_thread()","encode_options()","finish()","generate_hmac()","generate_message()","generate_signature()","get_avg_buy_price()","get_avg_sell_price()","get_balance()","get_balance()","get_buy_price()","get_buy_price_history()","get_buy_price_priv()","get_order_status()","get_order_status()","get_public()","get_sell_price()","get_sell_price_history()","get_sell_price_priv()","get_slope_buy_price()","get_slope_sell_price()","get_statistics()","get_time()","get_time()","ledgers_info()","new()","new()","new()","new()","new()","new()","new()","nonce()","open_orders()","open_positions()","order_book()","place_limit_order()","place_limit_order()","place_market_order()","place_market_order()","post_private()","query_ledgers()","query_orders()","query_trades()","reset()","reset()","server_time()","set_time()","show_data()","sleep()","sleep()","spread()","start()","start()","start()","start()","stop()","stop()","stop()","stop()","tick()","ticker()","trade_balance()","trade_history()","trade_volume()","trades()","update_balance()","url_path()","wait_for_order_status()","readme"],"longSearchIndex":["exchange","exchangekraken","exchangesimulation","kraken","kraken::client","kraken::krakenapierror","strategy","timer","timersimulation","kraken::client#add_order()","kraken::client#asset_pairs()","kraken::client#assets()","kraken::client#balance()","exchangekraken#cancel_order()","exchangesimulation#cancel_order()","kraken::client#cancel_order()","kraken::client#closed_orders()","strategy#create_buy_thread()","strategy#create_sell_thread()","kraken::client#encode_options()","strategy#finish()","kraken::client#generate_hmac()","kraken::client#generate_message()","kraken::client#generate_signature()","exchange#get_avg_buy_price()","exchange#get_avg_sell_price()","exchangekraken#get_balance()","exchangesimulation#get_balance()","exchange#get_buy_price()","exchange#get_buy_price_history()","exchange#get_buy_price_priv()","exchangekraken#get_order_status()","exchangesimulation#get_order_status()","kraken::client#get_public()","exchange#get_sell_price()","exchange#get_sell_price_history()","exchange#get_sell_price_priv()","exchange#get_slope_buy_price()","exchange#get_slope_sell_price()","strategy#get_statistics()","timer#get_time()","timersimulation#get_time()","kraken::client#ledgers_info()","exchange::new()","exchangekraken::new()","exchangesimulation::new()","kraken::client::new()","strategy::new()","timer::new()","timersimulation::new()","kraken::client#nonce()","kraken::client#open_orders()","kraken::client#open_positions()","kraken::client#order_book()","exchangekraken#place_limit_order()","exchangesimulation#place_limit_order()","exchangekraken#place_market_order()","exchangesimulation#place_market_order()","kraken::client#post_private()","kraken::client#query_ledgers()","kraken::client#query_orders()","kraken::client#query_trades()","exchange#reset()","exchangesimulation#reset()","kraken::client#server_time()","timersimulation#set_time()","exchangesimulation#show_data()","timer#sleep()","timersimulation#sleep()","kraken::client#spread()","exchange#start()","exchangekraken#start()","timer#start()","timersimulation#start()","exchange#stop()","exchangekraken#stop()","timer#stop()","timersimulation#stop()","strategy#tick()","kraken::client#ticker()","kraken::client#trade_balance()","kraken::client#trade_history()","kraken::client#trade_volume()","kraken::client#trades()","exchangesimulation#update_balance()","kraken::client#url_path()","strategy#wait_for_order_status()",""],"info":[["Exchange","","Exchange.html","","<p>This class is the parent class for all exchange classes.  To support a\nparticular exchange, one needs …\n"],["ExchangeKraken","","ExchangeKraken.html","","<p>This class is for trading on the Kraken Exchange.\n"],["ExchangeSimulation","","ExchangeSimulation.html","","<p>This class simulates an exchange. Use it for backtesting.\n"],["Kraken","","Kraken.html","","<p>Module for interacting with the Kraken Exchange. It is based on the\nthird-party Ruby library KrakenRuby …\n"],["Kraken::Client","","Kraken/Client.html","","<p>This class provides methods to access public and private data on the Kraken\nExchange via the Kraken API …\n"],["Kraken::KrakenAPIError","","Kraken/KrakenAPIError.html","","<p>This class represents any error when interacting with the Kraken API.\n"],["Strategy","","Strategy.html","","<p>This is an example implementation of a trading strategy.\n<p>ScroogeMcDuck strategy:\n<p>place a <strong>buy</strong> order with …\n"],["Timer","","Timer.html","","<p>Class responsible to run the trading strategy with a certain frequency.\n"],["TimerSimulation","","TimerSimulation.html","","<p>Class responsible to run the trading strategy with a certain frequency in\nsimulation mode. This class …\n"],["add_order","Kraken::Client","Kraken/Client.html#method-i-add_order","(opts={})",""],["asset_pairs","Kraken::Client","Kraken/Client.html#method-i-asset_pairs","(opts={})",""],["assets","Kraken::Client","Kraken/Client.html#method-i-assets","(opts={})",""],["balance","Kraken::Client","Kraken/Client.html#method-i-balance","(opts={})",""],["cancel_order","ExchangeKraken","ExchangeKraken.html#method-i-cancel_order","(tx_id)","<p>Cancel an order. Check with get_order_status if the order has been\ncanceled.\n<p><strong>Params:</strong>\n<p><code>tx_id</code> &mdash; the transaction …\n"],["cancel_order","ExchangeSimulation","ExchangeSimulation.html#method-i-cancel_order","(order_id)","<p>Cancel an order.\n<p><strong>Params:</strong>\n<p><code>order_id</code> &mdash; the order ID to be canceled (this is in fact the transaction ID)\n"],["cancel_order","Kraken::Client","Kraken/Client.html#method-i-cancel_order","(txid)",""],["closed_orders","Kraken::Client","Kraken/Client.html#method-i-closed_orders","(opts={})",""],["create_buy_thread","Strategy","Strategy.html#method-i-create_buy_thread","(investment, fee_in_base_currency)","<p>Creates a thread which places a buy market order.\n<p><strong>Params:</strong>\n<p><code>investment</code> &mdash; volume in base currency\n"],["create_sell_thread","Strategy","Strategy.html#method-i-create_sell_thread","(investment, fee_in_base_currency, position)","<p>Creates a thread which places a sell market order.\n<p><strong>Params:</strong>\n<p><code>investment</code> &mdash; volume in base currency\n"],["encode_options","Kraken::Client","Kraken/Client.html#method-i-encode_options","(opts)",""],["finish","Strategy","Strategy.html#method-i-finish","()","<p>This method closes all open positions and waits for all threads to finish.\n"],["generate_hmac","Kraken::Client","Kraken/Client.html#method-i-generate_hmac","(key, message)",""],["generate_message","Kraken::Client","Kraken/Client.html#method-i-generate_message","(method, opts, data)",""],["generate_signature","Kraken::Client","Kraken/Client.html#method-i-generate_signature","(method, post_data, opts={})",""],["get_avg_buy_price","Exchange","Exchange.html#method-i-get_avg_buy_price","(vol, start_time, end_time)","<p>Returns the median of the buy price for the requested volume in a given\ntime interval.\n<p><strong>Params:</strong>\n<p><code>vol</code> &mdash; volume …\n"],["get_avg_sell_price","Exchange","Exchange.html#method-i-get_avg_sell_price","(vol, start_time, end_time)","<p>Returns the median of the sell price for the requested volume in a given\ntime interval.\n<p><strong>Params:</strong>\n<p><code>vol</code> &mdash; volume …\n"],["get_balance","ExchangeKraken","ExchangeKraken.html#method-i-get_balance","()","<p>Returns the current balance on the Kraken Exchange.\n<p><strong>Returns:</strong>\n<p><code>base_currency_balance</code> &mdash; base currency balance …\n"],["get_balance","ExchangeSimulation","ExchangeSimulation.html#method-i-get_balance","()","<p>Returns the current balance on the simulated exchange.\n<p><strong>Returns:</strong>\n<p><code>base_currency_balance</code> &mdash; base currency balance …\n"],["get_buy_price","Exchange","Exchange.html#method-i-get_buy_price","(vol)","<p>Returns the current buy price for the requested volume.\n<p><strong>Params:</strong>\n<p><code>vol</code> &mdash; volume in base currency\n"],["get_buy_price_history","Exchange","Exchange.html#method-i-get_buy_price_history","(vol, start_time, end_time)","<p>Returns the history of buy prices for the requested volume in a given time\ninterval.\n<p><strong>Params:</strong>\n<p><code>vol</code> &mdash; volume …\n"],["get_buy_price_priv","Exchange","Exchange.html#method-i-get_buy_price_priv","(vol, asks)","<p>Returns the weighted buy price for the requested volume given the asks from\nan order book\n<p><strong>Params:</strong>\n<p><code>vol</code> &mdash; "],["get_order_status","ExchangeKraken","ExchangeKraken.html#method-i-get_order_status","(tx_id)","<p>Get the status of an order.\n<p><strong>Params:</strong>\n<p><code>tx_id</code> &mdash; the transaction ID of the order for which the status is requested …\n"],["get_order_status","ExchangeSimulation","ExchangeSimulation.html#method-i-get_order_status","(order_id)","<p>Get the status of an order.\n<p><strong>Params:</strong>\n<p><code>order_id</code> &mdash; the order ID for which the status is requested (this is in …\n"],["get_public","Kraken::Client","Kraken/Client.html#method-i-get_public","(method, opts={})",""],["get_sell_price","Exchange","Exchange.html#method-i-get_sell_price","(vol)","<p>Returns the current sell price for the requested volume.\n<p><strong>Params:</strong>\n<p><code>vol</code> &mdash; volume in base currency\n"],["get_sell_price_history","Exchange","Exchange.html#method-i-get_sell_price_history","(vol, start_time, end_time)","<p>Returns the history of sell prices for the requested volume in a given time\ninterval.\n<p><strong>Params:</strong>\n<p><code>vol</code> &mdash; volume …\n"],["get_sell_price_priv","Exchange","Exchange.html#method-i-get_sell_price_priv","(vol, bids)","<p>Returns the weighted sell price for the requested volume given the bids\nfrom an order book\n<p><strong>Params:</strong>\n<p><code>vol</code> … &mdash; "],["get_slope_buy_price","Exchange","Exchange.html#method-i-get_slope_buy_price","(vol, start_time, end_time)","<p>Returns the slope of the buy price for the requested volume in a given time\ninterval.\n<p><strong>Params:</strong>\n<p><code>vol</code> &mdash; volume …\n"],["get_slope_sell_price","Exchange","Exchange.html#method-i-get_slope_sell_price","(vol, start_time, end_time)","<p>Returns the slope of the sell price for the requested volume in a given\ntime interval.\n<p><strong>Params:</strong>\n<p><code>vol</code> &mdash; volume …\n"],["get_statistics","Strategy","Strategy.html#method-i-get_statistics","(from_position_id)","<p>This method returns performance statistics and the number of errors of\nclosed positions.\n<p><strong>Params:</strong>\n<p><code>from_position_id</code> … &mdash; "],["get_time","Timer","Timer.html#method-i-get_time","()","<p>Returns the current time.\n<p><strong>Returns:</strong>\n<p><code>time</code> &mdash; the current time\n"],["get_time","TimerSimulation","TimerSimulation.html#method-i-get_time","()","<p>Returns the simulation time.\n<p><strong>Returns:</strong>\n<p><code>time</code> &mdash; the simulation time\n"],["ledgers_info","Kraken::Client","Kraken/Client.html#method-i-ledgers_info","(opts={})",""],["new","Exchange","Exchange.html#method-c-new","(timer, base_currency, quote_currency)","<p>Initialize exchange (usually called by a child class).\n<p><strong>Params:</strong>\n<p><code>timer</code> &mdash; Timer instance\n"],["new","ExchangeKraken","ExchangeKraken.html#method-c-new","(timer, base_currency, quote_currency, update_interval, database_max_age, simulation_mode)","<p>Initializes the exchange.\n<p><strong>Params:</strong>\n<p><code>timer</code> &mdash; Timer instance\n"],["new","ExchangeSimulation","ExchangeSimulation.html#method-c-new","(timer, base_currency, quote_currency, asks_data_file, bids_data_file)","<p>Initializes the exchange.\n<p><strong>Params:</strong>\n<p><code>timer</code> &mdash; Timer instance\n"],["new","Kraken::Client","Kraken/Client.html#method-c-new","(api_key=nil, api_secret=nil, options={})",""],["new","Strategy","Strategy.html#method-c-new","(timer, exchange)","<p>Initializes the trading strategy class.\n<p><strong>Params:</strong>\n<p><code>timer</code> &mdash; Timer instance\n"],["new","Timer","Timer.html#method-c-new","(sampling_rate)","<p>Initializes the Timer class.\n<p><strong>Params:</strong>\n<p><code>sampling_rate</code> &mdash; the sampling rate in [Hz] with which the trading strategy …\n"],["new","TimerSimulation","TimerSimulation.html#method-c-new","(sampling_rate)","<p>Initializes the Timer class.\n<p><strong>Params:</strong>\n<p><code>sampling_rate</code> &mdash; the simulated sampling rate in [Hz] with which the trading …\n"],["nonce","Kraken::Client","Kraken/Client.html#method-i-nonce","()","<p>Generate a 64-bit nonce where the 48 high bits come directly from the\ncurrent timestamp and the low 16 …\n"],["open_orders","Kraken::Client","Kraken/Client.html#method-i-open_orders","(opts={})",""],["open_positions","Kraken::Client","Kraken/Client.html#method-i-open_positions","(tx_ids, opts={})",""],["order_book","Kraken::Client","Kraken/Client.html#method-i-order_book","(pair, opts={})",""],["place_limit_order","ExchangeKraken","ExchangeKraken.html#method-i-place_limit_order","(type, volume, limit, fee_in_base_currency)","<p>Places a limit order. Check with get_order_status if the order has been\nexecuted.\n<p><strong>Params:</strong>\n<p><code>type</code> &mdash; specify …\n"],["place_limit_order","ExchangeSimulation","ExchangeSimulation.html#method-i-place_limit_order","(type, volume, limit, fee_in_base_currency)","<p>Places a limit order. The order will be executed in a time interval\nstarting at the simulated time of …\n"],["place_market_order","ExchangeKraken","ExchangeKraken.html#method-i-place_market_order","(type, volume, fee_in_base_currency)","<p>Places a market order. Check with get_order_status if the order has been\nexecuted.\n<p><strong>Params:</strong>\n<p><code>type</code> &mdash; specify …\n"],["place_market_order","ExchangeSimulation","ExchangeSimulation.html#method-i-place_market_order","(type, volume, fee_in_base_currency)","<p>Places a market order. The order will be executed in a time interval\nstarting at the simulated time of …\n"],["post_private","Kraken::Client","Kraken/Client.html#method-i-post_private","(method, opts={})","<p>Generate signed post request.\n"],["query_ledgers","Kraken::Client","Kraken/Client.html#method-i-query_ledgers","(ledger_ids, opts={})",""],["query_orders","Kraken::Client","Kraken/Client.html#method-i-query_orders","(opts={})",""],["query_trades","Kraken::Client","Kraken/Client.html#method-i-query_trades","(tx_ids, opts={})",""],["reset","Exchange","Exchange.html#method-i-reset","()","<p>Resets the internal state of the exchange instance. This method is only\nrequired if the exchange is used …\n"],["reset","ExchangeSimulation","ExchangeSimulation.html#method-i-reset","()","<p>Resets the internal state of the exchange instance.\n"],["server_time","Kraken::Client","Kraken/Client.html#method-i-server_time","()",""],["set_time","TimerSimulation","TimerSimulation.html#method-i-set_time","(time)","<p>Sets the simulation time.\n<p><strong>Params:</strong>\n<p><code>time</code> &mdash; the simulation time\n"],["show_data","ExchangeSimulation","ExchangeSimulation.html#method-i-show_data","(plot_file)","<p>Write a plot of buy and sell prices in an HTML file\n<p><strong>Params:</strong>\n<p><code>plot_file</code> &mdash; file name of HTML output file\n"],["sleep","Timer","Timer.html#method-i-sleep","(duration)","<p>Suspends the execution.\n<p><strong>Params:</strong>\n<p><code>duration</code> &mdash; number of seconds to suspend the execution\n"],["sleep","TimerSimulation","TimerSimulation.html#method-i-sleep","(duration)","<p>Suspends the execution.\n<p><strong>Params:</strong>\n<p><code>duration</code> &mdash; number of seconds to suspend the execution\n"],["spread","Kraken::Client","Kraken/Client.html#method-i-spread","(pair, opts={})",""],["start","Exchange","Exchange.html#method-i-start","()","<p>Starts the exchange. Use this method to start collecting price data.\n"],["start","ExchangeKraken","ExchangeKraken.html#method-i-start","()","<p>Starts the data collection thread which polls the orderbook from the Kraken\nExchange every @<code>update_interval</code> …\n"],["start","Timer","Timer.html#method-i-start","()","<p>Starts the trading strategy sampling thread. This thread calls the\nStrategy#tick method.\n"],["start","TimerSimulation","TimerSimulation.html#method-i-start","()","<p>Starts the trading strategy sampling thread. This thread calls the\nStrategy#tick method.\n"],["stop","Exchange","Exchange.html#method-i-stop","()","<p>Shuts down the exchange.\n"],["stop","ExchangeKraken","ExchangeKraken.html#method-i-stop","()","<p>Stops the data collection and database maintenance threads and blocks until\nthey are finished.\n"],["stop","Timer","Timer.html#method-i-stop","()","<p>Stops the trading strategy sampling thread. It blocks until the thread is\nfinished.\n"],["stop","TimerSimulation","TimerSimulation.html#method-i-stop","()","<p>Stops the trading strategy sampling thread. It blocks until the thread is\nfinished.\n"],["tick","Strategy","Strategy.html#method-i-tick","(time)","<p>This is the main method of the trading strategy class. It is called from\nthe Timer instance with a certain …\n"],["ticker","Kraken::Client","Kraken/Client.html#method-i-ticker","(pairs)",""],["trade_balance","Kraken::Client","Kraken/Client.html#method-i-trade_balance","(opts={})",""],["trade_history","Kraken::Client","Kraken/Client.html#method-i-trade_history","(opts={})",""],["trade_volume","Kraken::Client","Kraken/Client.html#method-i-trade_volume","(asset_pairs)",""],["trades","Kraken::Client","Kraken/Client.html#method-i-trades","(pair, opts={})",""],["update_balance","ExchangeSimulation","ExchangeSimulation.html#method-i-update_balance","(order)","<p>Update the balance on the simulated exchange with the effects of an order.\n<p><strong>Params:</strong>\n<p><code>order</code> &mdash; @<code>Order</code> struct …\n"],["url_path","Kraken::Client","Kraken/Client.html#method-i-url_path","(method)",""],["wait_for_order_status","Strategy","Strategy.html#method-i-wait_for_order_status","(order_id, status, max_waiting_time)","<p>This method blocks until an order changes its status.\n<p><strong>Params:</strong>\n<p><code>order_id</code> &mdash; order or transaction ID\n"],["README","","README_rdoc.html","","<p>Trabo\n<p>Trabo (TRAdinBOt) is collection of tools for automatic trading on Kraken\ncrypto exchange. It comprises …\n"]]}}