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.446 bin/cryptum
cryptum-0.0.445 bin/cryptum
cryptum-0.0.444 bin/cryptum
cryptum-0.0.443 bin/cryptum
cryptum-0.0.442 bin/cryptum
cryptum-0.0.441 bin/cryptum
cryptum-0.0.440 bin/cryptum
cryptum-0.0.439 bin/cryptum
cryptum-0.0.438 bin/cryptum
cryptum-0.0.437 bin/cryptum
cryptum-0.0.436 bin/cryptum
cryptum-0.0.435 bin/cryptum
cryptum-0.0.434 bin/cryptum
cryptum-0.0.433 bin/cryptum
cryptum-0.0.432 bin/cryptum
cryptum-0.0.431 bin/cryptum
cryptum-0.0.430 bin/cryptum
cryptum-0.0.429 bin/cryptum
cryptum-0.0.428 bin/cryptum
cryptum-0.0.427 bin/cryptum