Skip to content

Commit

Permalink
1.72.75
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Feb 11, 2022
1 parent ec5c1a4 commit 31d2a4b
Show file tree
Hide file tree
Showing 19 changed files with 206 additions and 175 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -227,13 +227,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.72.74/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.72.74/dist/ccxt.browser.js
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.72.75/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.72.75/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.72.74/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@1.72.75/dist/ccxt.browser.js"></script>
```

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

const version = '1.72.74'
const version = '1.72.75'

Exchange.ccxtVersion = version

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

const version = '1.72.74'
const version = '1.72.75'

Exchange.ccxtVersion = version

Expand Down Expand Up @@ -64890,31 +64890,29 @@ module.exports = class cryptocom extends Exchange {
}

async fetchMarkets (params = {}) {
// {
// "id": 11,
// "method": "public/get-instruments",
// "code": 0,
// "result": {
// "instruments": [
// {
// "instrument_name": "BTC_USDT",
// "quote_currency": "BTC",
// "base_currency": "USDT",
// "price_decimals": 2,
// "quantity_decimals": 6,
// "margin_trading_enabled": true
// },
// {
// "instrument_name": "CRO_BTC",
// "quote_currency": "BTC",
// "base_currency": "CRO",
// "price_decimals": 8,
// "quantity_decimals": 2,
// "margin_trading_enabled": false
// }
// ]
// }
// }
//
// {
// id: 11,
// method: 'public/get-instruments',
// code: 0,
// result: {
// 'instruments': [
// {
// instrument_name: 'NEAR_BTC',
// quote_currency: 'BTC',
// base_currency: 'NEAR',
// price_decimals: '8',
// quantity_decimals: '2',
// margin_trading_enabled: true,
// margin_trading_enabled_5x: true,
// margin_trading_enabled_10x: true,
// max_quantity: '100000000',
// min_quantity: '0.01'
// },
// ]
// }
// }
//
const response = await this.spotPublicGetPublicGetInstruments (params);
const resultResponse = this.safeValue (response, 'result', {});
const markets = this.safeValue (resultResponse, 'instruments', []);
Expand All @@ -64929,6 +64927,15 @@ module.exports = class cryptocom extends Exchange {
const priceDecimals = this.safeString (market, 'price_decimals');
const minPrice = this.parsePrecision (priceDecimals);
const minQuantity = this.safeString (market, 'min_quantity');
let maxLeverage = this.parseNumber ('1');
const margin_trading_enabled_5x = this.safeValue (market, 'margin_trading_enabled_5x');
if (margin_trading_enabled_5x) {
maxLeverage = this.parseNumber ('5');
}
const margin_trading_enabled_10x = this.safeValue (market, 'margin_trading_enabled_10x');
if (margin_trading_enabled_10x) {
maxLeverage = this.parseNumber ('10');
}
result.push ({
'id': id,
'symbol': base + '/' + quote,
Expand Down Expand Up @@ -64959,8 +64966,8 @@ module.exports = class cryptocom extends Exchange {
},
'limits': {
'leverage': {
'min': undefined,
'max': undefined,
'min': this.parseNumber ('1'),
'max': maxLeverage,
},
'amount': {
'min': this.parseNumber (minQuantity),
Expand Down
6 changes: 3 additions & 3 deletions doc/readme.rst
Expand Up @@ -2033,14 +2033,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.72.74/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.72.74/dist/ccxt.browser.js
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.72.75/dist/ccxt.browser.js
* unpkg: https://unpkg.com/ccxt@1.72.75/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.72.74/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@1.72.75/dist/ccxt.browser.js"></script>

Creates a global ``ccxt`` object:

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

16 changes: 8 additions & 8 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "ccxt",
"version": "1.72.74",
"version": "1.72.75",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 130+ exchanges",
"main": "./ccxt.js",
"unpkg": "dist/ccxt.browser.js",
Expand Down Expand Up @@ -212,7 +212,7 @@
"ccex",
"C-CEX",
"cex",
"CEX.IO",
"cex.io",
"CHBTC",
"ChileBit",
"chilebit.net",
Expand Down Expand Up @@ -382,7 +382,7 @@
"fybse.se",
"fybsg.com",
"gatecoin.com",
"gate.io",
"Gate.io",
"gdax.com",
"gemini.com",
"getbtc.org",
Expand Down Expand Up @@ -499,8 +499,8 @@
"dsxglobal.com",
"bitvavo.com",
"Bitvavo",
"currency.com",
"waves.exchange",
"Currency.com",
"Waves.Exchange",
"phemex.com",
"Phemex",
"huobi.co.jp",
Expand Down Expand Up @@ -549,7 +549,7 @@
"Binance USDⓈ-M",
"eqonex.com",
"EQONEX",
"fmfw.io",
"FMFW.io",
"mexc.com",
"MEXC Global",
"bitrue.com",
Expand All @@ -563,8 +563,8 @@
"Zonda",
"futures.kucoin.com",
"KuCoin Futures",
"blockchain.com",
"crypto.com",
"Blockchain.com",
"Crypto.com",
"wazirx.com",
"WazirX",
"woo.org",
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
Expand Up @@ -28,11 +28,11 @@

include 'Throttle.php';

$version = '1.72.74';
$version = '1.72.75';

class Exchange extends \ccxt\Exchange {

const VERSION = '1.72.74';
const VERSION = '1.72.75';

public static $loop;
public static $kernel;
Expand Down
61 changes: 34 additions & 27 deletions php/async/cryptocom.php
Expand Up @@ -271,31 +271,29 @@ public function describe() {
}

public function fetch_markets($params = array ()) {
// {
// "id" => 11,
// "method" => "public/get-instruments",
// "code" => 0,
// "result" => {
// "instruments" => array(
// array(
// "instrument_name" => "BTC_USDT",
// "quote_currency" => "BTC",
// "base_currency" => "USDT",
// "price_decimals" => 2,
// "quantity_decimals" => 6,
// "margin_trading_enabled" => true
// ),
// {
// "instrument_name" => "CRO_BTC",
// "quote_currency" => "BTC",
// "base_currency" => "CRO",
// "price_decimals" => 8,
// "quantity_decimals" => 2,
// "margin_trading_enabled" => false
// }
// )
// }
// }
//
// {
// $id => 11,
// method => 'public/get-instruments',
// code => 0,
// $result => {
// 'instruments' => array(
// array(
// instrument_name => 'NEAR_BTC',
// quote_currency => 'BTC',
// base_currency => 'NEAR',
// price_decimals => '8',
// quantity_decimals => '2',
// margin_trading_enabled => true,
// $margin_trading_enabled_5x => true,
// $margin_trading_enabled_10x => true,
// max_quantity => '100000000',
// min_quantity => '0.01'
// ),
// )
// }
// }
//
$response = yield $this->spotPublicGetPublicGetInstruments ($params);
$resultResponse = $this->safe_value($response, 'result', array());
$markets = $this->safe_value($resultResponse, 'instruments', array());
Expand All @@ -310,6 +308,15 @@ public function fetch_markets($params = array ()) {
$priceDecimals = $this->safe_string($market, 'price_decimals');
$minPrice = $this->parse_precision($priceDecimals);
$minQuantity = $this->safe_string($market, 'min_quantity');
$maxLeverage = $this->parse_number('1');
$margin_trading_enabled_5x = $this->safe_value($market, 'margin_trading_enabled_5x');
if ($margin_trading_enabled_5x) {
$maxLeverage = $this->parse_number('5');
}
$margin_trading_enabled_10x = $this->safe_value($market, 'margin_trading_enabled_10x');
if ($margin_trading_enabled_10x) {
$maxLeverage = $this->parse_number('10');
}
$result[] = array(
'id' => $id,
'symbol' => $base . '/' . $quote,
Expand Down Expand Up @@ -340,8 +347,8 @@ public function fetch_markets($params = array ()) {
),
'limits' => array(
'leverage' => array(
'min' => null,
'max' => null,
'min' => $this->parse_number('1'),
'max' => $maxLeverage,
),
'amount' => array(
'min' => $this->parse_number($minQuantity),
Expand Down

0 comments on commit 31d2a4b

Please sign in to comment.