Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

additional fixes to properly sync w/peatio #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/arke/exchange/rubykube.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def create_order(order)
{
market: order.market.downcase,
side: order.side.to_s,
volume: order.amount,
price: order.price
volume: order.amount.to_f.to_s,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probable to_d will be better?

price: order.price.to_s
}
)
@open_orders.add_order(order, response.env.body['id']) if response.env.status == 201 && response.env.body['id']
Expand Down Expand Up @@ -69,7 +69,8 @@ def post(path, params = nil)

# Helper method, generates headers to authenticate with +api_key+
def generate_headers
nonce = Time.now.to_i.to_s
nonce = (Time.now.utc.to_f * 1000).to_i.to_s

{
'X-Auth-Apikey' => @api_key,
'X-Auth-Nonce' => nonce,
Expand Down