Sha256: 67786f30e724ec2282217ec35a76e8bc7577465ccc2b1b0e26b6d9767c8692c7
Contents?: true
Size: 1.86 KB
Versions: 6
Compression:
Stored size: 1.86 KB
Contents
require "SimBot/version" require 'thor' require 'pusher-client' module SimBot class CLI < Thor require 'utils' require 'barong' require 'api_controller' require 'wash_trade' desc 'start', 'Start simulation bot parsing in base-url and auth token.' method_option :email, type: :string, default: 'admin@ovex.io', required: true, desc: 'Your OVEX email address' method_option :password, type: :string, default: '1bQozgrr', required: true, desc: 'Your OVEX password' method_option :peatio_base_url, type: :string, default: 'https://platform.review.ovex.io/api/v2', desc: 'Peatio API base URL' method_option :barong_base_url, type: :string, default: 'https://account.review.ovex.io/api/v1', desc: 'Barong API base URL' method_option :app_id, type: :string, default: 'ef3f28bfb2625ed56f0ff88c6fdb', desc: 'Peatio applicaiton id from Barong' method_option :market, type: :string, default: 'bchbtc', required: false, desc: 'OVEX market for SimBot to interact with' method_option :freq, type: :numeric, default: 1, desc: 'Frequency for trades to be added' def start count = 0 jwt = Barong::API.new(options[:barong_base_url], options[:app_id]).log_in(options[:email], options[:password]) api = ApiController.new(options[:peatio_base_url], jwt) Deamons::WashTrade.new(api, options[:market], options[:freq]) end desc 'list', 'Return list of running processes' def list puts Dir['*.pid'] end desc 'stop pid', 'stop a running process with the given pid' def stop(pid) Utils.kill_process(pid) end desc 'test_ws', 'connect to web socket and test it is working correctly' def test_ws Barong::API.log_in("hi there","my man") end desc 'quote market', 'get the quote for the given market e.g. btc/eth' def quote(market) puts "#{market}: #{Utils.quote(market)}" end end end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
SimBot-0.1.14 | lib/SimBot.rb |
SimBot-0.1.13 | lib/SimBot.rb |
SimBot-0.1.12 | lib/SimBot.rb |
SimBot-0.1.11 | lib/SimBot.rb |
SimBot-0.1.10 | lib/SimBot.rb |
SimBot-0.1.8 | lib/SimBot.rb |