Skip to content

Commit

Permalink
1.17.552
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Nov 28, 2018
1 parent c8145f3 commit d587bac
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 14 deletions.
10 changes: 8 additions & 2 deletions build/ccxt.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.17.551'
const version = '1.17.552'

Exchange.ccxtVersion = version

Expand Down Expand Up @@ -18210,6 +18210,12 @@ module.exports = class btcalpha extends Exchange {
let amount = parseFloat (trade['amount']);
let cost = this.costToPrecision (symbol, price * amount);
let id = this.safeString (trade, 'id');
let side = undefined;
if ('my_side' in trade) {
side = this.safeString (trade, 'my_side');
} else {
side = this.safeString (trade, 'side');
}
if (!id)
id = this.safeString (trade, 'tid');
return {
Expand All @@ -18219,7 +18225,7 @@ module.exports = class btcalpha extends Exchange {
'id': id,
'order': this.safeString (trade, 'o_id'),
'type': 'limit',
'side': trade['type'],
'side': side,
'price': price,
'amount': amount,
'cost': parseFloat (cost),
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 Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.17.551'
const version = '1.17.552'

Exchange.ccxtVersion = version

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.17.551",
"version": "1.17.552",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 100+ exchanges",
"main": "./ccxt.js",
"unpkg": "build/ccxt.browser.js",
Expand Down
4 changes: 2 additions & 2 deletions php/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use kornrunner\Secp256k1;
use kornrunner\Solidity;

$version = '1.17.551';
$version = '1.17.552';

// rounding mode
const TRUNCATE = 0;
Expand All @@ -50,7 +50,7 @@

class Exchange {

const VERSION = '1.17.551';
const VERSION = '1.17.552';

public static $eth_units = array (
'wei' => '1',
Expand Down
8 changes: 7 additions & 1 deletion php/btcalpha.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ public function parse_trade ($trade, $market = null) {
$amount = floatval ($trade['amount']);
$cost = $this->cost_to_precision($symbol, $price * $amount);
$id = $this->safe_string($trade, 'id');
$side = null;
if (is_array ($trade) && array_key_exists ('my_side', $trade)) {
$side = $this->safe_string($trade, 'my_side');
} else {
$side = $this->safe_string($trade, 'side');
}
if (!$id)
$id = $this->safe_string($trade, 'tid');
return array (
Expand All @@ -179,7 +185,7 @@ public function parse_trade ($trade, $market = null) {
'id' => $id,
'order' => $this->safe_string($trade, 'o_id'),
'type' => 'limit',
'side' => $trade['type'],
'side' => $side,
'price' => $price,
'amount' => $amount,
'cost' => floatval ($cost),
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

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

__version__ = '1.17.551'
__version__ = '1.17.552'

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

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

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

__version__ = '1.17.551'
__version__ = '1.17.552'

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

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

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

__version__ = '1.17.551'
__version__ = '1.17.552'

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

Expand Down
7 changes: 6 additions & 1 deletion python/ccxt/async_support/btcalpha.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ def parse_trade(self, trade, market=None):
amount = float(trade['amount'])
cost = self.cost_to_precision(symbol, price * amount)
id = self.safe_string(trade, 'id')
side = None
if 'my_side' in trade:
side = self.safe_string(trade, 'my_side')
else:
side = self.safe_string(trade, 'side')
if not id:
id = self.safe_string(trade, 'tid')
return {
Expand All @@ -186,7 +191,7 @@ def parse_trade(self, trade, market=None):
'id': id,
'order': self.safe_string(trade, 'o_id'),
'type': 'limit',
'side': trade['type'],
'side': side,
'price': price,
'amount': amount,
'cost': float(cost),
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.17.551'
__version__ = '1.17.552'

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

Expand Down
7 changes: 6 additions & 1 deletion python/ccxt/btcalpha.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ def parse_trade(self, trade, market=None):
amount = float(trade['amount'])
cost = self.cost_to_precision(symbol, price * amount)
id = self.safe_string(trade, 'id')
side = None
if 'my_side' in trade:
side = self.safe_string(trade, 'my_side')
else:
side = self.safe_string(trade, 'side')
if not id:
id = self.safe_string(trade, 'tid')
return {
Expand All @@ -186,7 +191,7 @@ def parse_trade(self, trade, market=None):
'id': id,
'order': self.safe_string(trade, 'o_id'),
'type': 'limit',
'side': trade['type'],
'side': side,
'price': price,
'amount': amount,
'cost': float(cost),
Expand Down

0 comments on commit d587bac

Please sign in to comment.