Skip to content

Commit

Permalink
1.10.900
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Jan 29, 2018
1 parent 6ec4ed8 commit beca290
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 25 deletions.
22 changes: 16 additions & 6 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 Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.10.899'
const version = '1.10.900'

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.899",
"version": "1.10.900",
"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.899';
$version = '1.10.900';

abstract class Exchange {

Expand Down
18 changes: 14 additions & 4 deletions php/cex.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,24 +356,34 @@ public function parse_order ($order, $market = null) {
if ($market) {
$symbol = $market['symbol'];
$cost = $this->safe_float($order, 'ta:' . $market['quote']);
if ($cost === null)
$cost = $this->safe_float($order, 'tta:' . $market['quote']);
$baseFee = 'fa:' . $market['base'];
$baseTakerFee = 'tfa:' . $market['base'];
$quoteFee = 'fa:' . $market['quote'];
$quoteTakerFee = 'tfa:' . $market['quote'];
$feeRate = $this->safe_float($order, 'tradingFeeMaker');
if (!$feeRate)
$feeRate = $this->safe_float($order, 'tradingFeeTaker', $feeRate);
if ($feeRate)
$feeRate /= 100.0; // convert to mathematically-correct percentage coefficients => 1.0 = 100%
if (is_array ($order) && array_key_exists ($baseFee, $order)) {
if ((is_array ($order) && array_key_exists ($baseFee, $order)) || (is_array ($order) && array_key_exists ($baseTakerFee, $order))) {
$baseFeeCost = $this->safe_float($order, $baseFee);
if ($baseFeeCost === null)
$baseFeeCost = $this->safe_float($order, $baseTakerFee);
$fee = array (
'currency' => $market['base'],
'rate' => $feeRate,
'cost' => $this->safe_float($order, $baseFee),
'cost' => $baseFeeCost,
);
} else if (is_array ($order) && array_key_exists ($quoteFee, $order)) {
} else if ((is_array ($order) && array_key_exists ($quoteFee, $order)) || (is_array ($order) && array_key_exists ($quoteTakerFee, $order))) {
$quoteFeeCost = $this->safe_float($order, $quoteFee);
if ($quoteFeeCost === null)
$quoteFeeCost = $this->safe_float($order, $quoteTakerFee);
$fee = array (
'currency' => $market['quote'],
'rate' => $feeRate,
'cost' => $this->safe_float($order, $quoteFee),
'cost' => $quoteFeeCost,
);
}
}
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.899'
__version__ = '1.10.900'

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

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.899'
__version__ = '1.10.900'

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

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.899'
__version__ = '1.10.900'

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

Expand Down
18 changes: 14 additions & 4 deletions python/ccxt/async/cex.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,24 +338,34 @@ def parse_order(self, order, market=None):
if market:
symbol = market['symbol']
cost = self.safe_float(order, 'ta:' + market['quote'])
if cost is None:
cost = self.safe_float(order, 'tta:' + market['quote'])
baseFee = 'fa:' + market['base']
baseTakerFee = 'tfa:' + market['base']
quoteFee = 'fa:' + market['quote']
quoteTakerFee = 'tfa:' + market['quote']
feeRate = self.safe_float(order, 'tradingFeeMaker')
if not feeRate:
feeRate = self.safe_float(order, 'tradingFeeTaker', feeRate)
if feeRate:
feeRate /= 100.0 # convert to mathematically-correct percentage coefficients: 1.0 = 100%
if baseFee in order:
if (baseFee in list(order.keys())) or (baseTakerFee in list(order.keys())):
baseFeeCost = self.safe_float(order, baseFee)
if baseFeeCost is None:
baseFeeCost = self.safe_float(order, baseTakerFee)
fee = {
'currency': market['base'],
'rate': feeRate,
'cost': self.safe_float(order, baseFee),
'cost': baseFeeCost,
}
elif quoteFee in order:
elif (quoteFee in list(order.keys())) or (quoteTakerFee in list(order.keys())):
quoteFeeCost = self.safe_float(order, quoteFee)
if quoteFeeCost is None:
quoteFeeCost = self.safe_float(order, quoteTakerFee)
fee = {
'currency': market['quote'],
'rate': feeRate,
'cost': self.safe_float(order, quoteFee),
'cost': quoteFeeCost,
}
if not cost:
cost = price * filled
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.899'
__version__ = '1.10.900'

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

Expand Down
18 changes: 14 additions & 4 deletions python/ccxt/cex.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,24 +338,34 @@ def parse_order(self, order, market=None):
if market:
symbol = market['symbol']
cost = self.safe_float(order, 'ta:' + market['quote'])
if cost is None:
cost = self.safe_float(order, 'tta:' + market['quote'])
baseFee = 'fa:' + market['base']
baseTakerFee = 'tfa:' + market['base']
quoteFee = 'fa:' + market['quote']
quoteTakerFee = 'tfa:' + market['quote']
feeRate = self.safe_float(order, 'tradingFeeMaker')
if not feeRate:
feeRate = self.safe_float(order, 'tradingFeeTaker', feeRate)
if feeRate:
feeRate /= 100.0 # convert to mathematically-correct percentage coefficients: 1.0 = 100%
if baseFee in order:
if (baseFee in list(order.keys())) or (baseTakerFee in list(order.keys())):
baseFeeCost = self.safe_float(order, baseFee)
if baseFeeCost is None:
baseFeeCost = self.safe_float(order, baseTakerFee)
fee = {
'currency': market['base'],
'rate': feeRate,
'cost': self.safe_float(order, baseFee),
'cost': baseFeeCost,
}
elif quoteFee in order:
elif (quoteFee in list(order.keys())) or (quoteTakerFee in list(order.keys())):
quoteFeeCost = self.safe_float(order, quoteFee)
if quoteFeeCost is None:
quoteFeeCost = self.safe_float(order, quoteTakerFee)
fee = {
'currency': market['quote'],
'rate': feeRate,
'cost': self.safe_float(order, quoteFee),
'cost': quoteFeeCost,
}
if not cost:
cost = price * filled
Expand Down

0 comments on commit beca290

Please sign in to comment.