From 847d7644615aedee7b7d526af2b86df59cd59737 Mon Sep 17 00:00:00 2001 From: Evgenij Novosilskij Date: Sat, 12 Jul 2014 01:20:52 +0300 Subject: [PATCH] switched to use nonce in miliseconds everywhere --- lib/hitbtc/client.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hitbtc/client.rb b/lib/hitbtc/client.rb index c318cb2..1f42384 100644 --- a/lib/hitbtc/client.rb +++ b/lib/hitbtc/client.rb @@ -117,7 +117,7 @@ def cancel_order client_order_id else opts = {} opts[:clientOrderId] = order.orderId - opts[:cancelRequestClientOrderId] = Time.now.to_i.to_s + opts[:cancelRequestClientOrderId] = nonce opts[:symbol] = order.symbol opts[:side] = order.side opts[:price] = order.orderPrice @@ -141,7 +141,7 @@ def recent_orders opts={max_results: 10, start_index: 0, statuses: "new,partiall #### Private User Trading (Still experimental!) #### def create_order opts={} - opts[:clientOrderId] = Time.now.to_i.to_s + opts[:clientOrderId] = nonce post_private 'new_order', opts end ######################