Skip to content

Commit

Permalink
1.14.134
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Jun 5, 2018
1 parent d705494 commit c407cd6
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 13 deletions.
11 changes: 8 additions & 3 deletions build/ccxt.browser.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ccxt.js
Expand Up @@ -37,7 +37,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.14.133'
const version = '1.14.134'

Exchange.ccxtVersion = version

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "ccxt",
"version": "1.14.133",
"version": "1.14.134",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 100+ exchanges",
"main": "./ccxt.js",
"unpkg": "build/ccxt.browser.js",
Expand Down
2 changes: 1 addition & 1 deletion php/Exchange.php
Expand Up @@ -30,7 +30,7 @@

namespace ccxt;

$version = '1.14.133';
$version = '1.14.134';

// rounding mode
const TRUNCATE = 0;
Expand Down
7 changes: 6 additions & 1 deletion php/kraken.php
Expand Up @@ -629,8 +629,13 @@ public function create_order ($symbol, $type, $side, $amount, $price = null, $pa
'ordertype' => $type,
'volume' => $this->amount_to_precision($symbol, $amount),
);
if ($type === 'limit')
$priceIsDefined = ($price !== null);
$marketOrder = ($type === 'market');
$limitOrder = ($type === 'limit');
$shouldIncludePrice = $limitOrder || (!$marketOrder && $priceIsDefined);
if ($shouldIncludePrice) {
$order['price'] = $this->price_to_precision($symbol, $price);
}
$response = $this->privatePostAddOrder (array_merge ($order, $params));
$id = $this->safe_value($response['result'], 'txid');
if ($id !== null) {
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/__init__.py
Expand Up @@ -22,7 +22,7 @@

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

__version__ = '1.14.133'
__version__ = '1.14.134'

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

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async/__init__.py
Expand Up @@ -4,7 +4,7 @@

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

__version__ = '1.14.133'
__version__ = '1.14.134'

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

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async/base/exchange.py
Expand Up @@ -2,7 +2,7 @@

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

__version__ = '1.14.133'
__version__ = '1.14.134'

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

Expand Down
6 changes: 5 additions & 1 deletion python/ccxt/async/kraken.py
Expand Up @@ -615,7 +615,11 @@ async def create_order(self, symbol, type, side, amount, price=None, params={}):
'ordertype': type,
'volume': self.amount_to_precision(symbol, amount),
}
if type == 'limit':
priceIsDefined = (price is not None)
marketOrder = (type == 'market')
limitOrder = (type == 'limit')
shouldIncludePrice = limitOrder or (not marketOrder and priceIsDefined)
if shouldIncludePrice:
order['price'] = self.price_to_precision(symbol, price)
response = await self.privatePostAddOrder(self.extend(order, params))
id = self.safe_value(response['result'], 'txid')
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/base/exchange.py
Expand Up @@ -4,7 +4,7 @@

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

__version__ = '1.14.133'
__version__ = '1.14.134'

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

Expand Down
6 changes: 5 additions & 1 deletion python/ccxt/kraken.py
Expand Up @@ -615,7 +615,11 @@ def create_order(self, symbol, type, side, amount, price=None, params={}):
'ordertype': type,
'volume': self.amount_to_precision(symbol, amount),
}
if type == 'limit':
priceIsDefined = (price is not None)
marketOrder = (type == 'market')
limitOrder = (type == 'limit')
shouldIncludePrice = limitOrder or (not marketOrder and priceIsDefined)
if shouldIncludePrice:
order['price'] = self.price_to_precision(symbol, price)
response = self.privatePostAddOrder(self.extend(order, params))
id = self.safe_value(response['result'], 'txid')
Expand Down

0 comments on commit c407cd6

Please sign in to comment.