Class: Abot::Info::DatabaseTable
- Inherits:
-
Object
- Object
- Abot::Info::DatabaseTable
- Defined in:
- lib/abot/info/database_table.rb
Constant Summary collapse
- DB_PATH =
Info::OptionParser.instance.[:db_path]
- BASE_CONNECTION =
ActiveRecord::Base.connection
- API_KEY_TABLE =
BASE_CONNECTION.execute('SELECT * FROM api_key').freeze
- API_KEY =
API_KEY_TABLE.first['api'].freeze
- SECRET_KEY =
API_KEY_TABLE.first['secret'].freeze
Class Method Summary collapse
Class Method Details
.data_coins ⇒ Object
19 20 21 |
# File 'lib/abot/info/database_table.rb', line 19 def data_coins BASE_CONNECTION.execute('SELECT * FROM symbols WHERE statusOrder IS NOT "NO_ORDER"') end |
.data_daily_profit ⇒ Object
27 28 29 |
# File 'lib/abot/info/database_table.rb', line 27 def data_daily_profit BASE_CONNECTION.execute("SELECT quote, sum(profit) FROM daily_profit GROUP BY quote") end |
.data_settings ⇒ Object
23 24 25 |
# File 'lib/abot/info/database_table.rb', line 23 def data_settings BASE_CONNECTION.execute('SELECT * FROM trade_params').first end |