Sha256: e08df3beceac6806c73f6ad7bd32778707db7610afe3836ff3af758a3028f459

Contents?: true

Size: 1.13 KB

Versions: 59

Compression:

Stored size: 1.13 KB

Contents

#!/usr/bin/env ruby

# frozen_string_literal: true

require 'cryptum'

# Initialize Driver Name & Parse cryptum Flags
driver_name = File.basename($PROGRAM_NAME)
option_choice = Cryptum::Option::Parser.get(driver_name: driver_name)

# Initialize the Respective Environment / API Authentication Artifacts
env = Cryptum::Option::Environment.get(option_choice: option_choice)

# Dump out supported products if --list-products flag is passed and exit
if option_choice.list_products
  Cryptum::API::Products.list_and_exit(
    option_choice: option_choice,
    env: env
  )
end

# Generate an Order Book for Session Tracking
event_history = Cryptum::OrderBook::Generate.new(
  option_choice: option_choice,
  env: env
)

# Initialize Curses UI
terminal_win = Cryptum::UI.init(event_history: event_history)
terminal_win.key_press_event.key_w = true if option_choice.reset_timers

# Connect to WebSocket
# Refresh UI and Trigger Events as Messages via Web Socket are Received.
# Leverage Indicators to Initiate Actions
Cryptum::WebSock::EventMachine.run(
  option_choice: option_choice,
  env: env,
  terminal_win: terminal_win,
  event_history: event_history
)

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
cryptum-0.0.466 bin/cryptum
cryptum-0.0.465 bin/cryptum
cryptum-0.0.464 bin/cryptum
cryptum-0.0.463 bin/cryptum
cryptum-0.0.462 bin/cryptum
cryptum-0.0.461 bin/cryptum
cryptum-0.0.460 bin/cryptum
cryptum-0.0.459 bin/cryptum
cryptum-0.0.458 bin/cryptum
cryptum-0.0.457 bin/cryptum
cryptum-0.0.456 bin/cryptum
cryptum-0.0.455 bin/cryptum
cryptum-0.0.454 bin/cryptum
cryptum-0.0.453 bin/cryptum
cryptum-0.0.452 bin/cryptum
cryptum-0.0.451 bin/cryptum
cryptum-0.0.450 bin/cryptum
cryptum-0.0.449 bin/cryptum
cryptum-0.0.448 bin/cryptum
cryptum-0.0.447 bin/cryptum