Skip to content

Commit

Permalink
1.4.32
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Aug 19, 2017
1 parent f66e28d commit 553c57f
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 30 deletions.
20 changes: 12 additions & 8 deletions build/ccxt.browser.js

Large diffs are not rendered by default.

20 changes: 12 additions & 8 deletions build/ccxt.es5.js

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions build/ccxt.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class DDoSProtection extends NetworkError {}
class RequestTimeout extends NetworkError {}
class ExchangeNotAvailable extends NetworkError {}

$version = '1.4.31';
$version = '1.4.32';

$curl_errors = array (
0 => 'CURLE_OK',
Expand Down Expand Up @@ -10475,8 +10475,9 @@ public function create_order ($market, $type, $side, $amount, $price = null, $pa
$difference = $quantity - $wholeLots;
if (abs ($difference) > $p['step'])
throw new ExchangeError ($this->id . ' $order $amount should be evenly divisible by lot unit size of ' . (string) $p['lot']);
$clientOrderId = $this->nonce ()
$order = array (
'clientOrderId' => $this->nonce (),
'clientOrderId' => (string) $clientOrderId,
'symbol' => $p['id'],
'side' => $side,
'quantity' => (string) $wholeLots, // $quantity in integer lot units
Expand All @@ -10487,7 +10488,7 @@ public function create_order ($market, $type, $side, $amount, $price = null, $pa
$response = $this->tradingPostNewOrder (array_merge ($order, $params));
return array (
'info' => $response,
'id' => $response['ExecutionReport']['orderId'],
'id' => $response['ExecutionReport']['clientOrderId'],
);
}

Expand All @@ -10510,8 +10511,10 @@ public function request ($path, $api = 'public', $method = 'GET', $params = arra
if ($method == 'POST')
if ($query)
$body = $this->urlencode ($query);
if ($query)
$url .= '?' . $this->urlencode ($query);
$url .= '?' . $this->urlencode (array (
'nonce' => $nonce,
'apikey' => $this->apiKey,
));
$auth = $url . ($body || '');
$headers = array (
'Content-Type' => 'application/x-www-form-urlencoded',
Expand Down
2 changes: 1 addition & 1 deletion ccxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const CryptoJS = require ('crypto-js')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.4.31'
const version = '1.4.32'

//-----------------------------------------------------------------------------
// platform detection
Expand Down
2 changes: 1 addition & 1 deletion ccxt.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class DDoSProtection extends NetworkError {}
class RequestTimeout extends NetworkError {}
class ExchangeNotAvailable extends NetworkError {}

$version = '1.4.31';
$version = '1.4.32';

$curl_errors = array (
0 => 'CURLE_OK',
Expand Down
2 changes: 1 addition & 1 deletion ccxt.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@

#------------------------------------------------------------------------------

__version__ = '1.4.31'
__version__ = '1.4.32'

#------------------------------------------------------------------------------

Expand Down
13 changes: 8 additions & 5 deletions ccxt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@

#------------------------------------------------------------------------------

__version__ = '1.4.31'
__version__ = '1.4.32'

#------------------------------------------------------------------------------

Expand Down Expand Up @@ -9728,8 +9728,9 @@ def create_order(self, market, type, side, amount, price=None, params={}):
difference = quantity - wholeLots
if abs(difference) > p['step']:
raise ExchangeError(self.id + ' order amount should be evenly divisible by lot unit size of ' + str(p['lot']))
clientOrderId = self.nonce()
order = {
'clientOrderId': self.nonce(),
'clientOrderId': str(clientOrderId),
'symbol': p['id'],
'side': side,
'quantity': str(wholeLots), # quantity in integer lot units
Expand All @@ -9740,7 +9741,7 @@ def create_order(self, market, type, side, amount, price=None, params={}):
response = self.tradingPostNewOrder(self.extend(order, params))
return {
'info': response,
'id': response['ExecutionReport']['orderId'],
'id': response['ExecutionReport']['clientOrderId'],
}

def cancel_order(self, id, params={}):
Expand All @@ -9761,8 +9762,10 @@ def request(self, path, api='public', method='GET', params={}, headers=None, bod
if method == 'POST':
if query:
body = self.urlencode(query)
if query:
url += '?' + self.urlencode(query)
url += '?' + self.urlencode({
'nonce': nonce,
'apikey': self.apiKey,
})
auth = url + (body or '')
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ccxt",
"version": "1.4.31",
"version": "1.4.32",
"description": "A library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs",
"main": "build/ccxt.es5.js",
"unpkg": "build/ccxt.browser.js",
Expand Down

0 comments on commit 553c57f

Please sign in to comment.