lib/cryptum.rb in cryptum-0.0.272 vs lib/cryptum.rb in cryptum-0.0.273
- old
+ new
@@ -156,13 +156,13 @@
# Clear out candle data to ensure
# Cryptum Statistics Only Apply to
# Live Sessions
if event_history
- order_book_file = event_history.order_book[:path]
- File.open(order_book_file, 'w') do |f|
- f.puts event_history.order_book.to_json
- end
+ File.write(
+ order_book_file,
+ JSON.pretty_generate(event_history.order_book)
+ )
end
Curses.close_screen
puts "Interrupt detected in #{which_self}...goodbye."