Sha256: 7077fabdbd97c1c6e29136f41be65c5e929ae6555965a1cf006d30499a2fef25
Contents?: true
Size: 2 KB
Versions: 10
Compression:
Stored size: 2 KB
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require 'cryptum' begin start_time = Time.now.strftime('%Y-%m-%d %H:%M:%S%z') # Initialize Driver Name & Parse cryptum Flags driver_name = File.basename($PROGRAM_NAME) option_choice = Cryptum::Option.parser(driver_name: driver_name) # Initialize the Respective Environment / API Authentication Artifacts env = Cryptum::Option.get_env(option_choice: option_choice) # Dump out supported products if --list-products flag is passed and exit if option_choice.list_products Cryptum::Option.list_products_and_exit( option_choice: option_choice, env: env ) end # Instantiate Our Status Indicators & History Objects indicator_status = Cryptum::OrderBook::Indicator.new # Initialize Curses UI terminal_win = Cryptum::UI.init # Generate an Order Book for Session Tracking # Load previous order_book_justification from # Order Book File (if it exists) event_history = Cryptum::OrderBook::Generate.new_order_book( start_time: start_time, option_choice: option_choice, env: env ) # Automatically Create Bot Confs if they don't # Exist and Initialize Automated Trading Parameters bot_conf = Cryptum::BotConf.read( option_choice: option_choice, event_history: event_history ) # Connect to WebSocket # Trigger Events as Event Data # Generated via Coinbase Pro # Web Socket HTTP Responses # Refresh UI with Event Data # Update "Status Indicators" # Leverage "Status Indicators" to Initiate Actions Cryptum::WebSock::EventMachine.run( option_choice: option_choice, env: env, terminal_win: terminal_win, event_history: event_history, indicator_status: indicator_status, bot_conf: bot_conf ) rescue Interrupt # Exit Gracefully if CTRL+C is Pressed During Session Cryptum.exit_gracefully( which_self: self, event_history: event_history, option_choice: option_choice, env: env ) rescue StandardError => e # Produce a Stacktrace for anything else raise e end
Version data entries
10 entries across 10 versions & 1 rubygems