lib/wash_trade.rb in SimBot-0.1.6 vs lib/wash_trade.rb in SimBot-0.1.7
- old
+ new
@@ -18,18 +18,20 @@
end
def start
count = 0
loop do
- vol = rand(1...10)
+ vol = rand(0.2...2)
price = Utils.get_bchbtc_price
@api.post_order(@market, price, vol, 'sell')
delay = (1.00 / @freq)
sleep(delay)
@api.post_order(@market, price, vol, 'buy')
puts "order ##{count} placed"
count += 1
end
+ rescue ::StandardError => e
+ puts e
end
# Attempts to write the pid of the forked process to the pid file.
def write_pid_file(pid, pidfile)
File.open pidfile, "w" do |f|
\ No newline at end of file