Skip to content

Commit

Permalink
1.68.3
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Jan 15, 2022
1 parent aa6b041 commit 5f9aa38
Show file tree
Hide file tree
Showing 19 changed files with 230 additions and 116 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,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/ccxt@1.68.2/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.68.2/dist/ccxt.browser.js
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.68.3/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.68.3/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/ccxt@1.68.2/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@1.68.3/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 @@ -36,7 +36,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.68.2'
const version = '1.68.3'

Exchange.ccxtVersion = version

Expand Down
62 changes: 42 additions & 20 deletions dist/ccxt.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.68.2'
const version = '1.68.3'

Exchange.ccxtVersion = version

Expand Down Expand Up @@ -124305,22 +124305,27 @@ module.exports = class poloniex extends Exchange {
}

parseTicker (ticker, market = undefined) {
// {
// id: '121',
// last: '43196.31469670',
// lowestAsk: '43209.61843169',
// highestBid: '43162.41965234',
// percentChange: '0.00963340',
// baseVolume: '13444643.33799658',
// quoteVolume: '315.84780115',
// isFrozen: '0',
// postOnly: '0',
// marginTradingEnabled: '1',
// high24hr: '43451.84481934',
// low24hr: '41749.89529736'
// }
const timestamp = this.milliseconds ();
let symbol = undefined;
if (market) {
symbol = market['symbol'];
}
let open = undefined;
let change = undefined;
let average = undefined;
const symbol = this.safeSymbol (undefined, market);
const last = this.safeNumber (ticker, 'last');
const relativeChange = this.safeNumber (ticker, 'percentChange');
if (relativeChange !== -1) {
open = last / this.sum (1, relativeChange);
change = last - open;
average = this.sum (last, open) / 2;
}
return {
const relativeChange = this.safeString (ticker, 'percentChange');
let percentage = Precise.stringMul (relativeChange, '100');
percentage = this.parseNumber (percentage);
return this.safeTicker ({
'symbol': symbol,
'timestamp': timestamp,
'datetime': this.iso8601 (timestamp),
Expand All @@ -124331,17 +124336,17 @@ module.exports = class poloniex extends Exchange {
'ask': this.safeNumber (ticker, 'lowestAsk'),
'askVolume': undefined,
'vwap': undefined,
'open': open,
'open': undefined,
'close': last,
'last': last,
'previousClose': undefined,
'change': change,
'percentage': relativeChange * 100,
'average': average,
'change': undefined,
'percentage': percentage,
'average': undefined,
'baseVolume': this.safeNumber (ticker, 'quoteVolume'),
'quoteVolume': this.safeNumber (ticker, 'baseVolume'),
'info': ticker,
};
}, market);
}

async fetchTickers (symbols = undefined, params = {}) {
Expand Down Expand Up @@ -124433,6 +124438,23 @@ module.exports = class poloniex extends Exchange {
await this.loadMarkets ();
const market = this.market (symbol);
const response = await this.publicGetReturnTicker (params);
// {
// "BTC_BTS":{
// "id":14,
// "last":"0.00000073",
// "lowestAsk":"0.00000075",
// "highestBid":"0.00000073",
// "percentChange":"0.01388888",
// "baseVolume":"0.01413528",
// "quoteVolume":"19431.16872167",
// "isFrozen":"0",
// "postOnly":"0",
// "marginTradingEnabled":"0",
// "high24hr":"0.00000074",
// "low24hr":"0.00000071"
// },
// ...
// }
const ticker = response[market['id']];
return this.parseTicker (ticker, market);
}
Expand Down
6 changes: 3 additions & 3 deletions doc/readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1972,14 +1972,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/ccxt@1.68.2/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.68.2/dist/ccxt.browser.js
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.68.3/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.68.3/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-block:: HTML

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@1.68.2/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@1.68.3/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.68.2",
"version": "1.68.3",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 130+ exchanges",
"main": "./ccxt.js",
"unpkg": "dist/ccxt.browser.js",
Expand Down
4 changes: 2 additions & 2 deletions php/Exchange.php

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

4 changes: 2 additions & 2 deletions php/async/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

include 'Throttle.php';

$version = '1.68.2';
$version = '1.68.3';

class Exchange extends \ccxt\Exchange {

const VERSION = '1.68.2';
const VERSION = '1.68.3';

public static $loop;
public static $kernel;
Expand Down
60 changes: 41 additions & 19 deletions php/async/poloniex.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,22 +442,27 @@ public function fetch_order_books($symbols = null, $limit = null, $params = arra
}

public function parse_ticker($ticker, $market = null) {
// {
// id => '121',
// $last => '43196.31469670',
// lowestAsk => '43209.61843169',
// highestBid => '43162.41965234',
// percentChange => '0.00963340',
// baseVolume => '13444643.33799658',
// quoteVolume => '315.84780115',
// isFrozen => '0',
// postOnly => '0',
// marginTradingEnabled => '1',
// high24hr => '43451.84481934',
// low24hr => '41749.89529736'
// }
$timestamp = $this->milliseconds();
$symbol = null;
if ($market) {
$symbol = $market['symbol'];
}
$open = null;
$change = null;
$average = null;
$symbol = $this->safe_symbol(null, $market);
$last = $this->safe_number($ticker, 'last');
$relativeChange = $this->safe_number($ticker, 'percentChange');
if ($relativeChange !== -1) {
$open = $last / $this->sum(1, $relativeChange);
$change = $last - $open;
$average = $this->sum($last, $open) / 2;
}
return array(
$relativeChange = $this->safe_string($ticker, 'percentChange');
$percentage = Precise::string_mul($relativeChange, '100');
$percentage = $this->parse_number($percentage);
return $this->safe_ticker(array(
'symbol' => $symbol,
'timestamp' => $timestamp,
'datetime' => $this->iso8601($timestamp),
Expand All @@ -468,17 +473,17 @@ public function parse_ticker($ticker, $market = null) {
'ask' => $this->safe_number($ticker, 'lowestAsk'),
'askVolume' => null,
'vwap' => null,
'open' => $open,
'open' => null,
'close' => $last,
'last' => $last,
'previousClose' => null,
'change' => $change,
'percentage' => $relativeChange * 100,
'average' => $average,
'change' => null,
'percentage' => $percentage,
'average' => null,
'baseVolume' => $this->safe_number($ticker, 'quoteVolume'),
'quoteVolume' => $this->safe_number($ticker, 'baseVolume'),
'info' => $ticker,
);
), $market);
}

public function fetch_tickers($symbols = null, $params = array ()) {
Expand Down Expand Up @@ -570,6 +575,23 @@ public function fetch_ticker($symbol, $params = array ()) {
yield $this->load_markets();
$market = $this->market($symbol);
$response = yield $this->publicGetReturnTicker ($params);
// {
// "BTC_BTS":array(
// "id":14,
// "last":"0.00000073",
// "lowestAsk":"0.00000075",
// "highestBid":"0.00000073",
// "percentChange":"0.01388888",
// "baseVolume":"0.01413528",
// "quoteVolume":"19431.16872167",
// "isFrozen":"0",
// "postOnly":"0",
// "marginTradingEnabled":"0",
// "high24hr":"0.00000074",
// "low24hr":"0.00000071"
// ),
// ...
// }
$ticker = $response[$market['id']];
return $this->parse_ticker($ticker, $market);
}
Expand Down
60 changes: 41 additions & 19 deletions php/poloniex.php

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

6 changes: 3 additions & 3 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,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/ccxt@1.68.2/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.68.2/dist/ccxt.browser.js
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.68.3/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.68.3/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/ccxt@1.68.2/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@1.68.3/dist/ccxt.browser.js"></script>
```

Creates a global `ccxt` object:
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.68.2'
__version__ = '1.68.3'

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

Expand Down

0 comments on commit 5f9aa38

Please sign in to comment.