Skip to content

Commit

Permalink
1.10.516
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Dec 29, 2017
1 parent 1c0842f commit eca2844
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 45 deletions.
23 changes: 12 additions & 11 deletions build/ccxt.browser.js

Large diffs are not rendered by default.

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 errors = require ('./js/base/errors')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.10.515'
const version = '1.10.516'

Exchange.ccxtVersion = version

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.10.515",
"version": "1.10.516",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 90+ exchanges",
"main": "./ccxt.js",
"unpkg": "build/ccxt.browser.js",
Expand Down
2 changes: 1 addition & 1 deletion php/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

namespace ccxt;

$version = '1.10.515';
$version = '1.10.516';

abstract class Exchange {

Expand Down
19 changes: 10 additions & 9 deletions php/btcmarkets.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,15 @@ public function create_order ($symbol, $type, $side, $amount, $price = null, $pa
$orderSide = ($side == 'buy') ? 'Bid' : 'Ask';
$order = $this->ordered (array (
'currency' => $market['quote'],
'instrument' => $market['base'],
'price' => intval ($price * $multiplier),
'volume' => intval ($amount * $multiplier),
'orderSide' => $orderSide,
'ordertype' => $this->capitalize ($type),
'clientRequestId' => (string) $this->nonce (),
));
$response = $this->privatePostOrderCreate (array_merge ($order, $params));
$order['currency'] = $market['quote'];
$order['instrument'] = $market['base'];
$order['price'] = intval ($price * $multiplier);
$order['volume'] = intval ($amount * $multiplier);
$order['orderSide'] = $orderSide;
$order['ordertype'] = $this->capitalize ($type);
$order['clientRequestId'] = (string) $this->nonce ();
$response = $this->privatePostOrderCreate ($order);
return array (
'info' => $response,
'id' => (string) $response['id'],
Expand All @@ -191,7 +192,7 @@ public function nonce () {
public function sign ($path, $api = 'public', $method = 'GET', $params = array (), $headers = null, $body = null) {
$uri = '/' . $this->implode_params($path, $params);
$url = $this->urls['api'] . $uri;
$query = $this->omit ($params, $this->extract_params($path));
// $query = $this->omit ($params, $this->extract_params($path));
if ($api == 'public') {
if ($params)
$url .= '?' . $this->urlencode ($params);
Expand All @@ -205,7 +206,7 @@ public function sign ($path, $api = 'public', $method = 'GET', $params = array (
'timestamp' => $nonce,
);
if ($method == 'POST') {
$body = $this->json ($query);
$body = $this->json ($params);
$auth .= $body;
}
$secret = base64_decode ($this->secret);
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

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

__version__ = '1.10.515'
__version__ = '1.10.516'

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

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

__version__ = '1.10.515'
__version__ = '1.10.516'

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

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async/base/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

__version__ = '1.10.515'
__version__ = '1.10.516'

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

Expand Down
19 changes: 10 additions & 9 deletions python/ccxt/async/btcmarkets.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,15 @@ async def create_order(self, symbol, type, side, amount, price=None, params={}):
orderSide = 'Bid' if (side == 'buy') else 'Ask'
order = self.ordered({
'currency': market['quote'],
'instrument': market['base'],
'price': int(price * multiplier),
'volume': int(amount * multiplier),
'orderSide': orderSide,
'ordertype': self.capitalize(type),
'clientRequestId': str(self.nonce()),
})
response = await self.privatePostOrderCreate(self.extend(order, params))
order['currency'] = market['quote']
order['instrument'] = market['base']
order['price'] = int(price * multiplier)
order['volume'] = int(amount * multiplier)
order['orderSide'] = orderSide
order['ordertype'] = self.capitalize(type)
order['clientRequestId'] = str(self.nonce())
response = await self.privatePostOrderCreate(order)
return {
'info': response,
'id': str(response['id']),
Expand All @@ -183,7 +184,7 @@ def nonce(self):
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
uri = '/' + self.implode_params(path, params)
url = self.urls['api'] + uri
query = self.omit(params, self.extract_params(path))
# query = self.omit(params, self.extract_params(path))
if api == 'public':
if params:
url += '?' + self.urlencode(params)
Expand All @@ -197,7 +198,7 @@ def sign(self, path, api='public', method='GET', params={}, headers=None, body=N
'timestamp': nonce,
}
if method == 'POST':
body = self.json(query)
body = self.json(params)
auth += body
secret = base64.b64decode(self.secret)
signature = self.hmac(self.encode(auth), secret, hashlib.sha512, 'base64')
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/base/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

__version__ = '1.10.515'
__version__ = '1.10.516'

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

Expand Down
19 changes: 10 additions & 9 deletions python/ccxt/btcmarkets.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,15 @@ def create_order(self, symbol, type, side, amount, price=None, params={}):
orderSide = 'Bid' if (side == 'buy') else 'Ask'
order = self.ordered({
'currency': market['quote'],
'instrument': market['base'],
'price': int(price * multiplier),
'volume': int(amount * multiplier),
'orderSide': orderSide,
'ordertype': self.capitalize(type),
'clientRequestId': str(self.nonce()),
})
response = self.privatePostOrderCreate(self.extend(order, params))
order['currency'] = market['quote']
order['instrument'] = market['base']
order['price'] = int(price * multiplier)
order['volume'] = int(amount * multiplier)
order['orderSide'] = orderSide
order['ordertype'] = self.capitalize(type)
order['clientRequestId'] = str(self.nonce())
response = self.privatePostOrderCreate(order)
return {
'info': response,
'id': str(response['id']),
Expand All @@ -183,7 +184,7 @@ def nonce(self):
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
uri = '/' + self.implode_params(path, params)
url = self.urls['api'] + uri
query = self.omit(params, self.extract_params(path))
# query = self.omit(params, self.extract_params(path))
if api == 'public':
if params:
url += '?' + self.urlencode(params)
Expand All @@ -197,7 +198,7 @@ def sign(self, path, api='public', method='GET', params={}, headers=None, body=N
'timestamp': nonce,
}
if method == 'POST':
body = self.json(query)
body = self.json(params)
auth += body
secret = base64.b64decode(self.secret)
signature = self.hmac(self.encode(auth), secret, hashlib.sha512, 'base64')
Expand Down

0 comments on commit eca2844

Please sign in to comment.