Skip to content

Commit

Permalink
1.36.74
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Oct 21, 2020
1 parent 7a15bf3 commit 0da1c70
Show file tree
Hide file tree
Showing 16 changed files with 178 additions and 80 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -225,13 +225,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.36.73/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.36.73/dist/ccxt.browser.js
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.36.74/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.36.74/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.36.73/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@1.36.74/dist/ccxt.browser.js"></script>
```

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

const version = '1.36.73'
const version = '1.36.74'

Exchange.ccxtVersion = version

Expand Down
57 changes: 41 additions & 16 deletions dist/ccxt.browser.js
Expand Up @@ -43,7 +43,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.36.73'
const version = '1.36.74'

Exchange.ccxtVersion = version

Expand Down Expand Up @@ -55093,7 +55093,7 @@ module.exports = class crex24 extends Exchange {

const Exchange = require ('./base/Exchange');
const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, InvalidNonce, AuthenticationError, BadRequest } = require ('./base/errors');
const { ROUND } = require ('./base/functions/number');
const { ROUND, TICK_SIZE } = require ('./base/functions/number');

// ---------------------------------------------------------------------------

Expand Down Expand Up @@ -55187,6 +55187,7 @@ module.exports = class currencycom extends Exchange {
'maker': 0.002,
},
},
'precisionMode': TICK_SIZE,
// exchange-specific options
'options': {
'defaultTimeInForce': 'GTC', // 'GTC' = Good To Cancel (default), 'IOC' = Immediate Or Cancel, 'FOK' = Fill Or Kill
Expand Down Expand Up @@ -55255,22 +55256,20 @@ module.exports = class currencycom extends Exchange {
async fetchMarkets (params = {}) {
const response = await this.publicGetExchangeInfo (params);
//
// spot
//
// {
// "timezone":"UTC",
// "serverTime":1590998061253,
// "serverTime":1603252990096,
// "rateLimits":[
// {"rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":1200},
// {"rateLimitType":"ORDERS","interval":"SECOND","intervalNum":1,"limit":10},
// {"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":864000}
// {"rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":864000},
// ],
// "exchangeFilters":[],
// "symbols":[
// {
// "symbol":"EVK",
// "name":"Evonik",
// "status":"HALT",
// "status":"BREAK",
// "baseAsset":"EVK",
// "baseAssetPrecision":3,
// "quoteAsset":"EUR",
Expand All @@ -55281,7 +55280,14 @@ module.exports = class currencycom extends Exchange {
// {"filterType":"LOT_SIZE","minQty":"1","maxQty":"27000","stepSize":"1"},
// {"filterType":"MIN_NOTIONAL","minNotional":"23"}
// ],
// "marketType":"SPOT"
// "marketType":"SPOT",
// "country":"DE",
// "sector":"Basic Materials",
// "industry":"Diversified Chemicals",
// "tradingHours":"UTC; Mon 07:02 - 15:30; Tue 07:02 - 15:30; Wed 07:02 - 15:30; Thu 07:02 - 15:30; Fri 07:02 - 15:30",
// "tickSize":0.005,
// "tickValue":0.11125,
// "exchangeFee":0.05
// },
// {
// "symbol":"BTC/USD_LEVERAGE",
Expand All @@ -55295,10 +55301,21 @@ module.exports = class currencycom extends Exchange {
// "orderTypes":["LIMIT","MARKET","STOP"],
// "filters":[
// {"filterType":"LOT_SIZE","minQty":"0.001","maxQty":"100","stepSize":"0.001"},
// {"filterType":"MIN_NOTIONAL","minNotional":"11"}
// {"filterType":"MIN_NOTIONAL","minNotional":"13"}
// ],
// "marketType":"LEVERAGE"
// }
// "marketType":"LEVERAGE",
// "longRate":-0.01,
// "shortRate":0.01,
// "swapChargeInterval":480,
// "country":"",
// "sector":"",
// "industry":"",
// "tradingHours":"UTC; Mon - 21:00, 21:05 -; Tue - 21:00, 21:05 -; Wed - 21:00, 21:05 -; Thu - 21:00, 21:05 -; Fri - 21:00, 22:01 -; Sat - 21:00, 21:05 -; Sun - 20:00, 21:05 -",
// "tickSize":0.05,
// "tickValue":610.20875,
// "makerFee":-0.025,
// "takerFee":0.075
// },
// ]
// }
//
Expand All @@ -55321,8 +55338,8 @@ module.exports = class currencycom extends Exchange {
const filters = this.safeValue (market, 'filters', []);
const filtersByType = this.indexBy (filters, 'filterType');
const precision = {
'amount': this.safeInteger (market, 'baseAssetPrecision'),
'price': this.safeInteger (market, 'quotePrecision'),
'amount': 1 / Math.pow (1, this.safeInteger (market, 'baseAssetPrecision')),
'price': this.safeFloat (market, 'tickSize'),
};
const status = this.safeString (market, 'status');
const active = (status === 'TRADING');
Expand Down Expand Up @@ -55360,8 +55377,18 @@ module.exports = class currencycom extends Exchange {
},
},
};
const exchangeFee = this.safeFloat2 (market, 'exchangeFee', 'tradingFee');
const makerFee = this.safeFloat (market, 'makerFee', exchangeFee);
const takerFee = this.safeFloat (market, 'takerFee', exchangeFee);
if (makerFee !== undefined) {
entry['maker'] = makerFee / 100;
}
if (takerFee !== undefined) {
entry['taker'] = takerFee / 100;
}
if ('PRICE_FILTER' in filtersByType) {
const filter = this.safeValue (filtersByType, 'PRICE_FILTER', {});
entry['precision']['price'] = this.safeFloat (filter, 'tickSize');
// PRICE_FILTER reports zero values for maxPrice
// since they updated filter types in November 2018
// https://github.com/ccxt/ccxt/issues/4286
Expand All @@ -55374,12 +55401,10 @@ module.exports = class currencycom extends Exchange {
if ((maxPrice !== undefined) && (maxPrice > 0)) {
entry['limits']['price']['max'] = maxPrice;
}
entry['precision']['price'] = this.precisionFromString (filter['tickSize']);
}
if ('LOT_SIZE' in filtersByType) {
const filter = this.safeValue (filtersByType, 'LOT_SIZE', {});
const stepSize = this.safeString (filter, 'stepSize');
entry['precision']['amount'] = this.precisionFromString (stepSize);
entry['precision']['amount'] = this.safeFloat (filter, 'stepSize');
entry['limits']['amount'] = {
'min': this.safeFloat (filter, 'minQty'),
'max': this.safeFloat (filter, 'maxQty'),
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
@@ -1,6 +1,6 @@
{
"name": "ccxt",
"version": "1.36.73",
"version": "1.36.74",
"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/base/Exchange.php
Expand Up @@ -36,7 +36,7 @@
use Elliptic\EdDSA;
use BN\BN;

$version = '1.36.73';
$version = '1.36.74';

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

class Exchange {

const VERSION = '1.36.73';
const VERSION = '1.36.74';

private static $base58_alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
private static $base58_encoder = null;
Expand Down
59 changes: 42 additions & 17 deletions php/currencycom.php
Expand Up @@ -102,6 +102,7 @@ public function describe() {
'maker' => 0.002,
),
),
'precisionMode' => TICK_SIZE,
// exchange-specific options
'options' => array(
'defaultTimeInForce' => 'GTC', // 'GTC' = Good To Cancel (default), 'IOC' = Immediate Or Cancel, 'FOK' = Fill Or Kill
Expand Down Expand Up @@ -170,35 +171,40 @@ public function load_time_difference($params = array ()) {
public function fetch_markets($params = array ()) {
$response = $this->publicGetExchangeInfo ($params);
//
// $spot
//
// {
// "timezone":"UTC",
// "serverTime":1590998061253,
// "serverTime":1603252990096,
// "rateLimits":array(
// array("rateLimitType":"REQUEST_WEIGHT","interval":"MINUTE","intervalNum":1,"limit":1200),
// array("rateLimitType":"ORDERS","interval":"SECOND","intervalNum":1,"limit":10),
// array("rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":864000)
// array("rateLimitType":"ORDERS","interval":"DAY","intervalNum":1,"limit":864000),
// ),
// "exchangeFilters":array(),
// "symbols":[
// array(
// "$symbol":"EVK",
// "name":"Evonik",
// "$status":"HALT",
// "$status":"BREAK",
// "baseAsset":"EVK",
// "baseAssetPrecision":3,
// "quoteAsset":"EUR",
// "quoteAssetId":"EUR",
// "quotePrecision":3,
// "orderTypes":["LIMIT","MARKET"],
// "$filters":array(
// array("filterType":"LOT_SIZE","minQty":"1","maxQty":"27000","$stepSize":"1"),
// array("filterType":"LOT_SIZE","minQty":"1","maxQty":"27000","stepSize":"1"),
// array("filterType":"MIN_NOTIONAL","minNotional":"23")
// ),
// "marketType":"SPOT"
// "marketType":"SPOT",
// "country":"DE",
// "sector":"Basic Materials",
// "industry":"Diversified Chemicals",
// "tradingHours":"UTC; Mon 07:02 - 15:30; Tue 07:02 - 15:30; Wed 07:02 - 15:30; Thu 07:02 - 15:30; Fri 07:02 - 15:30",
// "tickSize":0.005,
// "tickValue":0.11125,
// "$exchangeFee":0.05
// ),
// {
// array(
// "$symbol":"BTC/USD_LEVERAGE",
// "name":"Bitcoin / USD",
// "$status":"TRADING",
Expand All @@ -209,11 +215,22 @@ public function fetch_markets($params = array ()) {
// "quotePrecision":3,
// "orderTypes":["LIMIT","MARKET","STOP"],
// "$filters":array(
// array("filterType":"LOT_SIZE","minQty":"0.001","maxQty":"100","$stepSize":"0.001"),
// array("filterType":"MIN_NOTIONAL","minNotional":"11")
// array("filterType":"LOT_SIZE","minQty":"0.001","maxQty":"100","stepSize":"0.001"),
// array("filterType":"MIN_NOTIONAL","minNotional":"13")
// ),
// "marketType":"LEVERAGE"
// }
// "marketType":"LEVERAGE",
// "longRate":-0.01,
// "shortRate":0.01,
// "swapChargeInterval":480,
// "country":"",
// "sector":"",
// "industry":"",
// "tradingHours":"UTC; Mon - 21:00, 21:05 -; Tue - 21:00, 21:05 -; Wed - 21:00, 21:05 -; Thu - 21:00, 21:05 -; Fri - 21:00, 22:01 -; Sat - 21:00, 21:05 -; Sun - 20:00, 21:05 -",
// "tickSize":0.05,
// "tickValue":610.20875,
// "$makerFee":-0.025,
// "$takerFee":0.075
// ),
// ]
// }
//
Expand All @@ -236,8 +253,8 @@ public function fetch_markets($params = array ()) {
$filters = $this->safe_value($market, 'filters', array());
$filtersByType = $this->index_by($filters, 'filterType');
$precision = array(
'amount' => $this->safe_integer($market, 'baseAssetPrecision'),
'price' => $this->safe_integer($market, 'quotePrecision'),
'amount' => 1 / pow(1, $this->safe_integer($market, 'baseAssetPrecision')),
'price' => $this->safe_float($market, 'tickSize'),
);
$status = $this->safe_string($market, 'status');
$active = ($status === 'TRADING');
Expand Down Expand Up @@ -275,8 +292,18 @@ public function fetch_markets($params = array ()) {
),
),
);
$exchangeFee = $this->safe_float_2($market, 'exchangeFee', 'tradingFee');
$makerFee = $this->safe_float($market, 'makerFee', $exchangeFee);
$takerFee = $this->safe_float($market, 'takerFee', $exchangeFee);
if ($makerFee !== null) {
$entry['maker'] = $makerFee / 100;
}
if ($takerFee !== null) {
$entry['taker'] = $takerFee / 100;
}
if (is_array($filtersByType) && array_key_exists('PRICE_FILTER', $filtersByType)) {
$filter = $this->safe_value($filtersByType, 'PRICE_FILTER', array());
$entry['precision']['price'] = $this->safe_float($filter, 'tickSize');
// PRICE_FILTER reports zero values for $maxPrice
// since they updated $filter types in November 2018
// https://github.com/ccxt/ccxt/issues/4286
Expand All @@ -289,12 +316,10 @@ public function fetch_markets($params = array ()) {
if (($maxPrice !== null) && ($maxPrice > 0)) {
$entry['limits']['price']['max'] = $maxPrice;
}
$entry['precision']['price'] = $this->precision_from_string($filter['tickSize']);
}
if (is_array($filtersByType) && array_key_exists('LOT_SIZE', $filtersByType)) {
$filter = $this->safe_value($filtersByType, 'LOT_SIZE', array());
$stepSize = $this->safe_string($filter, 'stepSize');
$entry['precision']['amount'] = $this->precision_from_string($stepSize);
$entry['precision']['amount'] = $this->safe_float($filter, 'stepSize');
$entry['limits']['amount'] = array(
'min' => $this->safe_float($filter, 'minQty'),
'max' => $this->safe_float($filter, 'maxQty'),
Expand Down
6 changes: 3 additions & 3 deletions python/README.md
Expand Up @@ -225,13 +225,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.36.73/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.36.73/dist/ccxt.browser.js
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.36.74/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.36.74/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.36.73/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@1.36.74/dist/ccxt.browser.js"></script>
```

Creates a global `ccxt` object:
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/__init__.py
Expand Up @@ -22,7 +22,7 @@

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

__version__ = '1.36.73'
__version__ = '1.36.74'

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

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async_support/__init__.py
Expand Up @@ -4,7 +4,7 @@

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

__version__ = '1.36.73'
__version__ = '1.36.74'

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

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async_support/base/exchange.py
Expand Up @@ -2,7 +2,7 @@

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

__version__ = '1.36.73'
__version__ = '1.36.74'

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

Expand Down

0 comments on commit 0da1c70

Please sign in to comment.