Skip to content

Commit

Permalink
1.10.421
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Dec 19, 2017
1 parent bcbb140 commit fce88eb
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 37 deletions.
20 changes: 11 additions & 9 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.420'
const version = '1.10.421'

Exchange.ccxtVersion = version

Expand Down
2 changes: 1 addition & 1 deletion ccxt.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

namespace ccxt;

$version = '1.10.420';
$version = '1.10.421';

define('PATH_TO_CCXT', __DIR__ . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR);

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.420",
"version": "1.10.421",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 90+ exchanges",
"main": "./ccxt.js",
"unpkg": "build/ccxt.browser.js",
Expand Down
16 changes: 9 additions & 7 deletions php/bitbay.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,18 @@ public function fetch_balance ($params = array ()) {
if (is_array ($response) && array_key_exists ('balances', $response)) {
$balance = $response['balances'];
$result = array ( 'info' => $balance );
$currencies = array_keys ($this->currencies);
for ($i = 0; $i < count ($currencies); $i++) {
$currency = $currencies[$i];
$codes = array_keys ($this->currencies);
for ($i = 0; $i < count ($codes); $i++) {
$code = $codes[$i];
$currency = $this->currencies[$code];
$id = $currency['id'];
$account = $this->account ();
if (is_array ($balance) && array_key_exists ($currency, $balance)) {
$account['free'] = floatval ($balance[$currency]['available']);
$account['used'] = floatval ($balance[$currency]['locked']);
if (is_array ($balance) && array_key_exists ($id, $balance)) {
$account['free'] = floatval ($balance[$id]['available']);
$account['used'] = floatval ($balance[$id]['locked']);
$account['total'] = $this->sum ($account['free'], $account['used']);
}
$result[$currency] = $account;
$result[$code] = $account;
}
return $this->parse_balance($result);
}
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.420'
__version__ = '1.10.421'

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

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.420'
__version__ = '1.10.421'

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

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.420'
__version__ = '1.10.421'

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

Expand Down
16 changes: 9 additions & 7 deletions python/ccxt/async/bitbay.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,17 @@ async def fetch_balance(self, params={}):
if 'balances' in response:
balance = response['balances']
result = {'info': balance}
currencies = list(self.currencies.keys())
for i in range(0, len(currencies)):
currency = currencies[i]
codes = list(self.currencies.keys())
for i in range(0, len(codes)):
code = codes[i]
currency = self.currencies[code]
id = currency['id']
account = self.account()
if currency in balance:
account['free'] = float(balance[currency]['available'])
account['used'] = float(balance[currency]['locked'])
if id in balance:
account['free'] = float(balance[id]['available'])
account['used'] = float(balance[id]['locked'])
account['total'] = self.sum(account['free'], account['used'])
result[currency] = account
result[code] = account
return self.parse_balance(result)
raise ExchangeError(self.id + ' empty balance response ' + self.json(response))

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.420'
__version__ = '1.10.421'

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

Expand Down
16 changes: 9 additions & 7 deletions python/ccxt/bitbay.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,17 @@ def fetch_balance(self, params={}):
if 'balances' in response:
balance = response['balances']
result = {'info': balance}
currencies = list(self.currencies.keys())
for i in range(0, len(currencies)):
currency = currencies[i]
codes = list(self.currencies.keys())
for i in range(0, len(codes)):
code = codes[i]
currency = self.currencies[code]
id = currency['id']
account = self.account()
if currency in balance:
account['free'] = float(balance[currency]['available'])
account['used'] = float(balance[currency]['locked'])
if id in balance:
account['free'] = float(balance[id]['available'])
account['used'] = float(balance[id]['locked'])
account['total'] = self.sum(account['free'], account['used'])
result[currency] = account
result[code] = account
return self.parse_balance(result)
raise ExchangeError(self.id + ' empty balance response ' + self.json(response))

Expand Down

0 comments on commit fce88eb

Please sign in to comment.