class SimBot::CLI
Public Instance Methods
bch()
click to toggle source
# File lib/SimBot.rb, line 67 def bch Deamons::BitcoinCashd.new end
btc()
click to toggle source
# File lib/SimBot.rb, line 63 def btc Deamons::Bitcoind.new end
cmc_data(outfile)
click to toggle source
# File lib/SimBot.rb, line 104 def cmc_data(outfile) data = Utils.cmc_data Utils.write_to_spreadsheet(data, outfile) end
eth()
click to toggle source
# File lib/SimBot.rb, line 59 def eth Deamons::Geth.new end
list()
click to toggle source
# File lib/SimBot.rb, line 51 def list puts Dir['*.pid'] end
ltc()
click to toggle source
# File lib/SimBot.rb, line 71 def ltc Deamons::Litecoind.new end
mm()
click to toggle source
# File lib/SimBot.rb, line 46 def mm api = ApiController::Peatio.new(options[:peatio_base_url], options[:barong_base_url], options[:app_id], options[:email], options[:password]) Deamons::SimpleMm.new(api, options[:market]) end
ngrok()
click to toggle source
# File lib/SimBot.rb, line 75 def ngrok Deamons::Ngrok.new end
quote(market)
click to toggle source
# File lib/SimBot.rb, line 98 def quote(market) #puts "#{market}: #{Utils.quote(market)}" Utils.new_sheet('template.xls') end
send_emails(data_file, template_file)
click to toggle source
# File lib/SimBot.rb, line 111 def send_emails(data_file, template_file) Utils.send_mail(data_file, template_file, options[:email], options[:password]) end
stop(pid)
click to toggle source
# File lib/SimBot.rb, line 55 def stop(pid) Utils.kill_process(pid) end
test()
click to toggle source
# File lib/SimBot.rb, line 35 def test peatio = Peatio::Client.new(options[:jwt],'www.ovex.io') peatio.orders('btczar')[bids] end
test_ws()
click to toggle source
# File lib/SimBot.rb, line 79 def test_ws # Create websocket connection. ws = WebSocket::Client::Simple.connect("ws://ws.api.review.ovex.io:80") puts("here") # Called on messaged from websocket server. ws.on(:message) do |msg| puts msg.data end # Called if connection to server has been opened. ws.on(:open) do # Authenticate. msg = "{ \"jwt\": \"Bearer ngrgiuerubrgeiru\"}" ws.send msg end end
wash()
click to toggle source
# File lib/SimBot.rb, line 29 def wash api = ApiController::Peatio.new(options[:peatio_base_url], options[:barong_base_url], options[:app_id], options[:email], options[:password]) Deamons::WashTrade.new(api, options[:market], options[:freq], options[:vol]) end