Sha256: 93aba211f81798c2040ee9ae2d4c79a6046f0a8c87466f0e9a60511fddf3e4ac

Contents?: true

Size: 1.14 KB

Versions: 16

Compression:

Stored size: 1.14 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_session_countdown

# 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

16 entries across 16 versions & 1 rubygems

Version Path
cryptum-0.0.407 bin/cryptum
cryptum-0.0.406 bin/cryptum
cryptum-0.0.405 bin/cryptum
cryptum-0.0.404 bin/cryptum
cryptum-0.0.403 bin/cryptum
cryptum-0.0.402 bin/cryptum
cryptum-0.0.401 bin/cryptum
cryptum-0.0.400 bin/cryptum
cryptum-0.0.399 bin/cryptum
cryptum-0.0.398 bin/cryptum
cryptum-0.0.397 bin/cryptum
cryptum-0.0.396 bin/cryptum
cryptum-0.0.395 bin/cryptum
cryptum-0.0.394 bin/cryptum
cryptum-0.0.393 bin/cryptum
cryptum-0.0.392 bin/cryptum