Skip to content

Commit

Permalink
1.24.73
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Mar 22, 2020
1 parent a1e6c31 commit ece30b2
Show file tree
Hide file tree
Showing 152 changed files with 3,117 additions and 3,117 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ console.log (ccxt.exchanges) // print all available exchanges

All-in-one browser bundle (dependencies included), served from a CDN of your choice:

* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].72/dist/ccxt.browser.js
* unpkg: https://unpkg.com/[email protected].72/dist/ccxt.browser.js
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].73/dist/ccxt.browser.js
* unpkg: https://unpkg.com/[email protected].73/dist/ccxt.browser.js

CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.

```HTML
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].72/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].73/dist/ccxt.browser.js"></script>
```

Creates a global `ccxt` object:
Expand Down
2 changes: 1 addition & 1 deletion ccxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.24.72'
const version = '1.24.73'

Exchange.ccxtVersion = version

Expand Down
2 changes: 1 addition & 1 deletion dist/ccxt.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.24.72'
const version = '1.24.73'

Exchange.ccxtVersion = version

Expand Down
6 changes: 3 additions & 3 deletions doc/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,14 @@ JavaScript (for use with the ``<script>`` tag):

All-in-one browser bundle (dependencies included), served from a CDN of your choice:

- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].72/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].72/dist/ccxt.browser.js
- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].73/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].73/dist/ccxt.browser.js

CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.

.. code:: html

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].72/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].73/dist/ccxt.browser.js"></script>

Creates a global ``ccxt`` object:

Expand Down
6 changes: 3 additions & 3 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ JavaScript (for use with the ``<script>`` tag):

All-in-one browser bundle (dependencies included), served from a CDN of your choice:

- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].72/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].72/dist/ccxt.browser.js
- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].73/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].73/dist/ccxt.browser.js

You can obtain a live-updated version of the bundle by removing the version number from the URL (the ``@a.b.c`` thing) — however, we do not recommend to do that, as it may break your app eventually. Also, please keep in mind that we are not responsible for the correct operation of those CDN servers.

.. code:: html

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].72/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].73/dist/ccxt.browser.js"></script>

Creates a global ``ccxt`` object:

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.24.72",
"version": "1.24.73",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 130+ exchanges",
"main": "./ccxt.js",
"unpkg": "dist/ccxt.browser.js",
Expand Down
30 changes: 15 additions & 15 deletions php/_1btcxe.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ public function fetch_balance ($params = array ()) {
$codes = is_array($this->currencies) ? array_keys($this->currencies) : array();
for ($i = 0; $i < count($codes); $i++) {
$code = $codes[$i];
$currency = $this->currency ($code);
$currency = $this->currency($code);
$currencyId = $currency['id'];
$account = $this->account ();
$account = $this->account();
$account['free'] = $this->safe_float($balance['available'], $currencyId);
$account['used'] = $this->safe_float($balance['on_hold'], $currencyId);
$result[$code] = $account;
Expand Down Expand Up @@ -154,7 +154,7 @@ public function fetch_ticker ($symbol, $params = array ()) {

public function parse_ohlcv ($ohlcv, $market = null, $timeframe = '1d', $since = null, $limit = null) {
return [
$this->parse8601 ($ohlcv['date'] . ' 00:00:00'),
$this->parse8601($ohlcv['date'] . ' 00:00:00'),
null,
null,
null,
Expand All @@ -165,12 +165,12 @@ public function parse_ohlcv ($ohlcv, $market = null, $timeframe = '1d', $since =

public function fetch_ohlcv ($symbol, $timeframe = '1d', $since = null, $limit = null, $params = array ()) {
$this->load_markets();
$market = $this->market ($symbol);
$market = $this->market($symbol);
$response = $this->publicGetHistoricalPrices (array_merge(array(
'currency' => $market['id'],
'timeframe' => $this->timeframes[$timeframe],
), $params));
$ohlcvs = $this->to_array($this->omit ($response['historical-prices'], 'request_currency'));
$ohlcvs = $this->to_array($this->omit($response['historical-prices'], 'request_currency'));
return $this->parse_ohlcvs($ohlcvs, $market, $timeframe, $since, $limit);
}

Expand All @@ -195,7 +195,7 @@ public function parse_trade ($trade, $market = null) {
'id' => $id,
'info' => $trade,
'timestamp' => $timestamp,
'datetime' => $this->iso8601 ($timestamp),
'datetime' => $this->iso8601($timestamp),
'symbol' => $symbol,
'order' => null,
'type' => $type,
Expand All @@ -210,15 +210,15 @@ public function parse_trade ($trade, $market = null) {

public function fetch_trades ($symbol, $since = null, $limit = null, $params = array ()) {
$this->load_markets();
$market = $this->market ($symbol);
$market = $this->market($symbol);
$request = array(
'currency' => $market['id'],
);
if ($limit !== null) {
$request['limit'] = $limit;
}
$response = $this->publicGetTransactions (array_merge($request, $params));
$trades = $this->to_array($this->omit ($response['transactions'], 'request_currency'));
$trades = $this->to_array($this->omit($response['transactions'], 'request_currency'));
return $this->parse_trades($trades, $market, $since, $limit);
}

Expand Down Expand Up @@ -251,7 +251,7 @@ public function cancel_order ($id, $symbol = null, $params = array ()) {
public function withdraw ($code, $amount, $address, $tag = null, $params = array ()) {
$this->check_address($address);
$this->load_markets();
$currency = $this->currency ($code);
$currency = $this->currency($code);
$request = array(
'currency' => $currency['id'],
'amount' => floatval ($amount),
Expand All @@ -271,24 +271,24 @@ public function sign ($path, $api = 'public', $method = 'GET', $params = array (
$url = $this->urls['api'] . '/' . $path;
if ($api === 'public') {
if ($params) {
$url .= '?' . $this->urlencode ($params);
$url .= '?' . $this->urlencode($params);
}
} else {
$this->check_required_credentials();
$query = array_merge(array(
'api_key' => $this->apiKey,
'nonce' => $this->nonce (),
'nonce' => $this->nonce(),
), $params);
$request = $this->json ($query);
$query['signature'] = $this->hmac ($this->encode ($request), $this->encode ($this->secret));
$body = $this->json ($query);
$request = $this->json($query);
$query['signature'] = $this->hmac($this->encode($request), $this->encode($this->secret));
$body = $this->json($query);
$headers = array( 'Content-Type' => 'application/json' );
}
return array( 'url' => $url, 'method' => $method, 'body' => $body, 'headers' => $headers );
}

public function request ($path, $api = 'public', $method = 'GET', $params = array (), $headers = null, $body = null) {
$response = $this->fetch2 ($path, $api, $method, $params, $headers, $body);
$response = $this->fetch2($path, $api, $method, $params, $headers, $body);
if (gettype($response) === 'string') {
if (mb_strpos($response, 'Maintenance') !== false) {
throw new ExchangeNotAvailable($this->id . ' on maintenance');
Expand Down
38 changes: 19 additions & 19 deletions php/acx.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function fetch_balance ($params = array ()) {
$balance = $balances[$i];
$currencyId = $this->safe_string($balance, 'currency');
$code = $this->safe_currency_code($currencyId);
$account = $this->account ();
$account = $this->account();
$account['free'] = $this->safe_float($balance, 'balance');
$account['used'] = $this->safe_float($balance, 'locked');
$result[$code] = $account;
Expand All @@ -160,7 +160,7 @@ public function fetch_balance ($params = array ()) {

public function fetch_order_book ($symbol, $limit = null, $params = array ()) {
$this->load_markets();
$market = $this->market ($symbol);
$market = $this->market($symbol);
$request = array(
'market' => $market['id'],
);
Expand All @@ -183,7 +183,7 @@ public function parse_ticker ($ticker, $market = null) {
return array(
'symbol' => $symbol,
'timestamp' => $timestamp,
'datetime' => $this->iso8601 ($timestamp),
'datetime' => $this->iso8601($timestamp),
'high' => $this->safe_float($ticker, 'high'),
'low' => $this->safe_float($ticker, 'low'),
'bid' => $this->safe_float($ticker, 'buy'),
Expand Down Expand Up @@ -232,7 +232,7 @@ public function fetch_tickers ($symbols = null, $params = array ()) {

public function fetch_ticker ($symbol, $params = array ()) {
$this->load_markets();
$market = $this->market ($symbol);
$market = $this->market($symbol);
$request = array(
'market' => $market['id'],
);
Expand All @@ -241,7 +241,7 @@ public function fetch_ticker ($symbol, $params = array ()) {
}

public function parse_trade ($trade, $market = null) {
$timestamp = $this->parse8601 ($this->safe_string($trade, 'created_at'));
$timestamp = $this->parse8601($this->safe_string($trade, 'created_at'));
$id = $this->safe_string($trade, 'tid');
$symbol = null;
if ($market !== null) {
Expand All @@ -251,7 +251,7 @@ public function parse_trade ($trade, $market = null) {
'info' => $trade,
'id' => $id,
'timestamp' => $timestamp,
'datetime' => $this->iso8601 ($timestamp),
'datetime' => $this->iso8601($timestamp),
'symbol' => $symbol,
'type' => null,
'side' => null,
Expand All @@ -266,7 +266,7 @@ public function parse_trade ($trade, $market = null) {

public function fetch_trades ($symbol, $since = null, $limit = null, $params = array ()) {
$this->load_markets();
$market = $this->market ($symbol);
$market = $this->market($symbol);
$request = array(
'market' => $market['id'],
);
Expand All @@ -287,7 +287,7 @@ public function parse_ohlcv ($ohlcv, $market = null, $timeframe = '1m', $since =

public function fetch_ohlcv ($symbol, $timeframe = '1m', $since = null, $limit = null, $params = array ()) {
$this->load_markets();
$market = $this->market ($symbol);
$market = $this->market($symbol);
if ($limit === null) {
$limit = 500; // default is 30
}
Expand Down Expand Up @@ -320,15 +320,15 @@ public function parse_order ($order, $market = null) {
$marketId = $this->safe_string($order, 'market');
$symbol = $this->markets_by_id[$marketId]['symbol'];
}
$timestamp = $this->parse8601 ($this->safe_string($order, 'created_at'));
$timestamp = $this->parse8601($this->safe_string($order, 'created_at'));
$status = $this->parse_order_status($this->safe_string($order, 'state'));
$type = $this->safe_string($order, 'type');
$side = $this->safe_string($order, 'side');
$id = $this->safe_string($order, 'id');
return array(
'id' => $id,
'timestamp' => $timestamp,
'datetime' => $this->iso8601 ($timestamp),
'datetime' => $this->iso8601($timestamp),
'lastTradeTimestamp' => null,
'status' => $status,
'symbol' => $symbol,
Expand Down Expand Up @@ -379,15 +379,15 @@ public function cancel_order ($id, $symbol = null, $params = array ()) {
$order = $this->parse_order($response);
$status = $order['status'];
if ($status === 'closed' || $status === 'canceled') {
throw new OrderNotFound($this->id . ' ' . $this->json ($order));
throw new OrderNotFound($this->id . ' ' . $this->json($order));
}
return $order;
}

public function withdraw ($code, $amount, $address, $tag = null, $params = array ()) {
$this->check_address($address);
$this->load_markets();
$currency = $this->currency ($code);
$currency = $this->currency($code);
// they have XRP but no docs on memo/tag
$request = array(
'currency' => $currency['id'],
Expand All @@ -403,13 +403,13 @@ public function withdraw ($code, $amount, $address, $tag = null, $params = array
}

public function nonce () {
return $this->milliseconds ();
return $this->milliseconds();
}

public function encode_params ($params) {
if (is_array($params) && array_key_exists('orders', $params)) {
$orders = $params['orders'];
$query = $this->urlencode ($this->keysort ($this->omit ($params, 'orders')));
$query = $this->urlencode($this->keysort($this->omit($params, 'orders')));
for ($i = 0; $i < count($orders); $i++) {
$order = $orders[$i];
$keys = is_array($order) ? array_keys($order) : array();
Expand All @@ -421,19 +421,19 @@ public function encode_params ($params) {
}
return $query;
}
return $this->urlencode ($this->keysort ($params));
return $this->urlencode($this->keysort($params));
}

public function sign ($path, $api = 'public', $method = 'GET', $params = array (), $headers = null, $body = null) {
$request = '/api/' . $this->version . '/' . $this->implode_params($path, $params);
if (is_array($this->urls) && array_key_exists('extension', $this->urls)) {
$request .= $this->urls['extension'];
}
$query = $this->omit ($params, $this->extract_params($path));
$query = $this->omit($params, $this->extract_params($path));
$url = $this->urls['api'] . $request;
if ($api === 'public') {
if ($query) {
$url .= '?' . $this->urlencode ($query);
$url .= '?' . $this->urlencode($query);
}
} else {
$this->check_required_credentials();
Expand All @@ -443,7 +443,7 @@ public function sign ($path, $api = 'public', $method = 'GET', $params = array (
'tonce' => $nonce,
), $params));
$auth = $method . '|' . $request . '|' . $query;
$signed = $this->hmac ($this->encode ($auth), $this->encode ($this->secret));
$signed = $this->hmac($this->encode($auth), $this->encode($this->secret));
$suffix = $query . '&signature=' . $signed;
if ($method === 'GET') {
$url .= '?' . $suffix;
Expand All @@ -462,7 +462,7 @@ public function handle_errors ($code, $reason, $url, $method, $headers, $body, $
if ($code === 400) {
$error = $this->safe_value($response, 'error');
$errorCode = $this->safe_string($error, 'code');
$feedback = $this->id . ' ' . $this->json ($response);
$feedback = $this->id . ' ' . $this->json($response);
$this->throw_exactly_matched_exception($this->exceptions, $errorCode, $feedback);
// fallback to default $error handler
}
Expand Down
Loading

0 comments on commit ece30b2

Please sign in to comment.