bin/cryptum-forecast in cryptum-0.0.321 vs bin/cryptum-forecast in cryptum-0.0.322
- old
+ new
@@ -9,11 +9,11 @@
class Choice
attr_accessor :autotrade_percent,
:cycles_complete,
:driver_name,
:proxy,
- :repo_root,
+ :session_root,
:sandbox,
:symbol,
:tpm,
:total_holdings
@@ -58,13 +58,13 @@
'<Optional - HTTP Proxy e.g. "http://127.0.0.1:8080">'
) { |p| option_choice.proxy = p }
options.on(
'-rPATH',
- '--repo-root=PATH',
+ '--session-root=PATH',
'<Optional - Directory of Cloned Repo (Defaults to Dir.pwd)">'
- ) { |r| option_choice.repo_root = r }
+ ) { |r| option_choice.session_root = r }
options.on(
'-tTPM',
'--target-profit-margin=TPM',
'<Optional - Target Profit Margin % (Defaults to Value in Respective Bot Conf)'
@@ -81,30 +81,30 @@
if option_choice.symbol.nil?
usage = true
reason = :symbol
end
- option_choice.repo_root = Dir.pwd if option_choice.repo_root.nil?
+ option_choice.session_root = Dir.pwd if option_choice.session_root.nil?
if option_choice.autotrade_percent.to_f > 100
usage = true
reason = :autotrade_percent
end
- unless Dir.exist?(option_choice.repo_root)
+ unless Dir.exist?(option_choice.session_root)
usage = true
- reason = :repo_root
+ reason = :session_root
end
if usage
case reason
when :autotrade_percent
puts 'ERROR: --autotrade PERCENT value cannot exceed 100'
when :symbol
puts "ERROR: --symbol Flag is Required.\n\n"
- when :repo_root
- puts "ERROR: #{option_choice.repo_root} does not exist.\n\n"
+ when :session_root
+ puts "ERROR: #{option_choice.session_root} does not exist.\n\n"
end
puts `#{option_choice.driver_name} --help`
exit 1
end
@@ -123,10 +123,10 @@
env: env
)
# crypto = products.last[:base_currency]
fiat = products.last[:quote_currency]
- fiat_portfolio_file = "#{option_choice.repo_root}/order_books/#{fiat}_PORTFOLIO.json"
+ fiat_portfolio_file = "#{option_choice.session_root}/order_books/#{fiat}_PORTFOLIO.json"
# portfolio = Cryptum::API.get_portfolio(
# option_choice: option_choice,
# env: env,
# crypto: crypto,