Skip to content

Commit

Permalink
1.10.408
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Dec 18, 2017
1 parent 01c4232 commit 4f7a5df
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 17 deletions.
28 changes: 24 additions & 4 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.407'
const version = '1.10.408'

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.407';
$version = '1.10.408';

const CLASSES_DIR = __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.407",
"version": "1.10.408",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 90+ exchanges",
"main": "./ccxt.js",
"unpkg": "build/ccxt.browser.js",
Expand Down
24 changes: 22 additions & 2 deletions php/quadrigacx.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,27 @@ public function cancel_order ($id, $symbol = null, $params = array ()) {
), $params));
}

public function withdrawal_method ($currency) {
public function fetch_deposit_address ($currency, $params = array ()) {
$method = 'privatePost' . $this->get_currency_name ($currency) . 'DepositAddress';
$response = $this->$method ($params);
$address = null;
$status = null;
// [E|e]rror
if (mb_strpos ($response, 'rror') !== false) {
$status = 'error';
} else {
$address = $response;
$status = 'ok';
}
return array (
'currency' => $currency,
'address' => $address,
'status' => $status,
'info' => $this->last_http_response,
);
}

public function get_currency_name ($currency) {
if ($currency == 'ETH')
return 'Ether';
if ($currency == 'BTC')
Expand All @@ -180,7 +200,7 @@ public function withdraw ($currency, $amount, $address, $params = array ()) {
'amount' => $amount,
'address' => $address
);
$method = 'privatePost' . $this->withdrawal_method ($currency) . 'Withdrawal';
$method = 'privatePost' . $this->get_currency_name ($currency) . 'Withdrawal';
$response = $this->$method (array_merge ($request, $params));
return array (
'info' => $response,
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.407'
__version__ = '1.10.408'

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

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.407'
__version__ = '1.10.408'

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

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.407'
__version__ = '1.10.408'

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

Expand Down
22 changes: 20 additions & 2 deletions python/ccxt/async/quadrigacx.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,25 @@ async def cancel_order(self, id, symbol=None, params={}):
'id': id,
}, params))

def withdrawal_method(self, currency):
async def fetch_deposit_address(self, currency, params={}):
method = 'privatePost' + self.get_currency_name(currency) + 'DepositAddress'
response = await getattr(self, method)(params)
address = None
status = None
# [E|e]rror
if response.find('rror') >= 0:
status = 'error'
else:
address = response
status = 'ok'
return {
'currency': currency,
'address': address,
'status': status,
'info': self.last_http_response,
}

def get_currency_name(self, currency):
if currency == 'ETH':
return 'Ether'
if currency == 'BTC':
Expand All @@ -179,7 +197,7 @@ async def withdraw(self, currency, amount, address, params={}):
'amount': amount,
'address': address
}
method = 'privatePost' + self.withdrawal_method(currency) + 'Withdrawal'
method = 'privatePost' + self.get_currency_name(currency) + 'Withdrawal'
response = await getattr(self, method)(self.extend(request, params))
return {
'info': 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.407'
__version__ = '1.10.408'

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

Expand Down
22 changes: 20 additions & 2 deletions python/ccxt/quadrigacx.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,25 @@ def cancel_order(self, id, symbol=None, params={}):
'id': id,
}, params))

def withdrawal_method(self, currency):
def fetch_deposit_address(self, currency, params={}):
method = 'privatePost' + self.get_currency_name(currency) + 'DepositAddress'
response = getattr(self, method)(params)
address = None
status = None
# [E|e]rror
if response.find('rror') >= 0:
status = 'error'
else:
address = response
status = 'ok'
return {
'currency': currency,
'address': address,
'status': status,
'info': self.last_http_response,
}

def get_currency_name(self, currency):
if currency == 'ETH':
return 'Ether'
if currency == 'BTC':
Expand All @@ -179,7 +197,7 @@ def withdraw(self, currency, amount, address, params={}):
'amount': amount,
'address': address
}
method = 'privatePost' + self.withdrawal_method(currency) + 'Withdrawal'
method = 'privatePost' + self.get_currency_name(currency) + 'Withdrawal'
response = getattr(self, method)(self.extend(request, params))
return {
'info': response,
Expand Down

0 comments on commit 4f7a5df

Please sign in to comment.