From 4a4b2bb52bb751abd5e3e57e94bb6202ea2df8bf Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 27 May 2022 22:11:03 +0000 Subject: [PATCH] 1.84.19 [ci skip] --- README.md | 6 +++--- ccxt.js | 2 +- dist/ccxt.browser.js | 10 ++++------ doc/readme.rst | 6 +++--- package-lock.json | 4 ++-- package.json | 16 ++++++++-------- php/Exchange.php | 4 ++-- php/async/Exchange.php | 4 ++-- php/async/bybit.php | 8 +++----- php/bybit.php | 8 +++----- python/README.md | 6 +++--- python/ccxt/__init__.py | 2 +- python/ccxt/async_support/__init__.py | 2 +- python/ccxt/async_support/base/exchange.py | 2 +- python/ccxt/async_support/bybit.py | 8 +++----- python/ccxt/base/exchange.py | 2 +- python/ccxt/bybit.py | 8 +++----- python/package.json | 16 ++++++++-------- wiki/Install.md | 6 +++--- 19 files changed, 55 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index 3980d53946da..872c8fb47359 100644 --- a/README.md +++ b/README.md @@ -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.84.18/dist/ccxt.browser.js -* unpkg: https://unpkg.com/ccxt@1.84.18/dist/ccxt.browser.js +* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.84.19/dist/ccxt.browser.js +* unpkg: https://unpkg.com/ccxt@1.84.19/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 - + ``` Creates a global `ccxt` object: diff --git a/ccxt.js b/ccxt.js index bc88d3c04130..0921cd0986cf 100644 --- a/ccxt.js +++ b/ccxt.js @@ -36,7 +36,7 @@ const Exchange = require ('./js/base/Exchange') //----------------------------------------------------------------------------- // this is updated by vss.js when building -const version = '1.84.18' +const version = '1.84.19' Exchange.ccxtVersion = version diff --git a/dist/ccxt.browser.js b/dist/ccxt.browser.js index b93b9c99e323..fa876a0fc0cf 100644 --- a/dist/ccxt.browser.js +++ b/dist/ccxt.browser.js @@ -46,7 +46,7 @@ const Exchange = require ('./js/base/Exchange') //----------------------------------------------------------------------------- // this is updated by vss.js when building -const version = '1.84.18' +const version = '1.84.19' Exchange.ccxtVersion = version @@ -59817,8 +59817,6 @@ module.exports = class bybit extends Exchange { await this.loadMarkets (); const market = this.market (symbol); symbol = market['symbol']; - amount = this.amountToPrecision (symbol, amount); - price = (price !== undefined) ? this.priceToPrecision (symbol, price) : undefined; const isUsdcSettled = (market['settle'] === 'USDC'); if (market['spot']) { return await this.createSpotOrder (symbol, type, side, amount, price, params); @@ -59849,7 +59847,7 @@ module.exports = class bybit extends Exchange { 'side': this.capitalize (side), 'type': type.toUpperCase (), // limit, market or limit_maker 'timeInForce': 'GTC', // FOK, IOC - 'qty': amount, + 'qty': this.amountToPrecision (symbol, amount), // 'orderLinkId': 'string', // unique client order id, max 36 characters }; if (type === 'limit' || type === 'limit_maker') { @@ -59907,7 +59905,7 @@ module.exports = class bybit extends Exchange { 'side': this.capitalize (side), 'orderType': this.capitalize (type), // limit or market 'timeInForce': 'GoodTillCancel', // ImmediateOrCancel, FillOrKill, PostOnly - 'orderQty': amount, + 'orderQty': this.amountToPrecision (symbol, amount), // 'takeProfit': 123.45, // take profit price, only take effect upon opening the position // 'stopLoss': 123.45, // stop loss price, only take effect upon opening the position // 'reduceOnly': false, // reduce only, required for linear orders @@ -59923,7 +59921,7 @@ module.exports = class bybit extends Exchange { // 'mmp': false // market maker protection }; if (price !== undefined) { - request['orderPrice'] = price; + request['orderPrice'] = this.priceToPrecision (symbol, price); } if (market['swap']) { const stopPx = this.safeValue2 (params, 'stopPrice', 'triggerPrice'); diff --git a/doc/readme.rst b/doc/readme.rst index 2e77f6f3d942..1b2d8e883fa7 100644 --- a/doc/readme.rst +++ b/doc/readme.rst @@ -2056,14 +2056,14 @@ JavaScript (for use with the `` + Creates a global ``ccxt`` object: diff --git a/package-lock.json b/package-lock.json index 283fe6fb68cf..33822135b8dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ccxt", - "version": "1.84.18", + "version": "1.84.19", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ccxt", - "version": "1.84.18", + "version": "1.84.19", "hasInstallScript": true, "license": "MIT", "devDependencies": { diff --git a/package.json b/package.json index 900707a01431..232dc67db529 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ccxt", - "version": "1.84.18", + "version": "1.84.19", "description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 130+ exchanges", "main": "./ccxt.js", "unpkg": "dist/ccxt.browser.js", @@ -215,7 +215,7 @@ "ccex", "C-CEX", "cex", - "CEX.IO", + "cex.io", "CHBTC", "ChileBit", "chilebit.net", @@ -385,7 +385,7 @@ "fybse.se", "fybsg.com", "gatecoin.com", - "gate.io", + "Gate.io", "gdax.com", "gemini.com", "getbtc.org", @@ -502,8 +502,8 @@ "dsxglobal.com", "bitvavo.com", "Bitvavo", - "currency.com", - "waves.exchange", + "Currency.com", + "Waves.Exchange", "phemex.com", "Phemex", "huobi.co.jp", @@ -552,7 +552,7 @@ "Binance USDⓈ-M", "eqonex.com", "EQONEX", - "fmfw.io", + "FMFW.io", "mexc.com", "MEXC Global", "bitrue.com", @@ -566,8 +566,8 @@ "Zonda", "futures.kucoin.com", "KuCoin Futures", - "blockchain.com", - "crypto.com", + "Blockchain.com", + "Crypto.com", "wazirx.com", "WazirX", "woo.org", diff --git a/php/Exchange.php b/php/Exchange.php index 24131242bf2a..075b712d0e59 100644 --- a/php/Exchange.php +++ b/php/Exchange.php @@ -36,7 +36,7 @@ use BN\BN; use Exception; -$version = '1.84.18'; +$version = '1.84.19'; // rounding mode const TRUNCATE = 0; @@ -55,7 +55,7 @@ class Exchange { - const VERSION = '1.84.18'; + const VERSION = '1.84.19'; private static $base58_alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; private static $base58_encoder = null; diff --git a/php/async/Exchange.php b/php/async/Exchange.php index ac27ec724ebb..140f1174b6aa 100644 --- a/php/async/Exchange.php +++ b/php/async/Exchange.php @@ -28,11 +28,11 @@ include 'Throttle.php'; -$version = '1.84.18'; +$version = '1.84.19'; class Exchange extends \ccxt\Exchange { - const VERSION = '1.84.18'; + const VERSION = '1.84.19'; public static $loop; public static $kernel; diff --git a/php/async/bybit.php b/php/async/bybit.php index ebd8ece5a646..f3899b9c6469 100644 --- a/php/async/bybit.php +++ b/php/async/bybit.php @@ -2667,8 +2667,6 @@ public function create_order($symbol, $type, $side, $amount, $price = null, $par yield $this->load_markets(); $market = $this->market($symbol); $symbol = $market['symbol']; - $amount = $this->amount_to_precision($symbol, $amount); - $price = ($price !== null) ? $this->price_to_precision($symbol, $price) : null; $isUsdcSettled = ($market['settle'] === 'USDC'); if ($market['spot']) { return yield $this->create_spot_order($symbol, $type, $side, $amount, $price, $params); @@ -2699,7 +2697,7 @@ public function create_spot_order($symbol, $type, $side, $amount, $price = null, 'side' => $this->capitalize($side), 'type' => strtoupper($type), // limit, $market or limit_maker 'timeInForce' => 'GTC', // FOK, IOC - 'qty' => $amount, + 'qty' => $this->amount_to_precision($symbol, $amount), // 'orderLinkId' => 'string', // unique client $order id, max 36 characters ); if ($type === 'limit' || $type === 'limit_maker') { @@ -2757,7 +2755,7 @@ public function create_usdc_order($symbol, $type, $side, $amount, $price = null, 'side' => $this->capitalize($side), 'orderType' => $this->capitalize($type), // limit or $market 'timeInForce' => 'GoodTillCancel', // ImmediateOrCancel, FillOrKill, PostOnly - 'orderQty' => $amount, + 'orderQty' => $this->amount_to_precision($symbol, $amount), // 'takeProfit' => 123.45, // take profit $price, only take effect upon opening the position // 'stopLoss' => 123.45, // stop loss $price, only take effect upon opening the position // 'reduceOnly' => false, // reduce only, required for linear orders @@ -2773,7 +2771,7 @@ public function create_usdc_order($symbol, $type, $side, $amount, $price = null, // 'mmp' => false // $market maker protection ); if ($price !== null) { - $request['orderPrice'] = $price; + $request['orderPrice'] = $this->price_to_precision($symbol, $price); } if ($market['swap']) { $stopPx = $this->safe_value_2($params, 'stopPrice', 'triggerPrice'); diff --git a/php/bybit.php b/php/bybit.php index b63baefc8924..151e75022723 100644 --- a/php/bybit.php +++ b/php/bybit.php @@ -2666,8 +2666,6 @@ public function create_order($symbol, $type, $side, $amount, $price = null, $par $this->load_markets(); $market = $this->market($symbol); $symbol = $market['symbol']; - $amount = $this->amount_to_precision($symbol, $amount); - $price = ($price !== null) ? $this->price_to_precision($symbol, $price) : null; $isUsdcSettled = ($market['settle'] === 'USDC'); if ($market['spot']) { return $this->create_spot_order($symbol, $type, $side, $amount, $price, $params); @@ -2698,7 +2696,7 @@ public function create_spot_order($symbol, $type, $side, $amount, $price = null, 'side' => $this->capitalize($side), 'type' => strtoupper($type), // limit, $market or limit_maker 'timeInForce' => 'GTC', // FOK, IOC - 'qty' => $amount, + 'qty' => $this->amount_to_precision($symbol, $amount), // 'orderLinkId' => 'string', // unique client $order id, max 36 characters ); if ($type === 'limit' || $type === 'limit_maker') { @@ -2756,7 +2754,7 @@ public function create_usdc_order($symbol, $type, $side, $amount, $price = null, 'side' => $this->capitalize($side), 'orderType' => $this->capitalize($type), // limit or $market 'timeInForce' => 'GoodTillCancel', // ImmediateOrCancel, FillOrKill, PostOnly - 'orderQty' => $amount, + 'orderQty' => $this->amount_to_precision($symbol, $amount), // 'takeProfit' => 123.45, // take profit $price, only take effect upon opening the position // 'stopLoss' => 123.45, // stop loss $price, only take effect upon opening the position // 'reduceOnly' => false, // reduce only, required for linear orders @@ -2772,7 +2770,7 @@ public function create_usdc_order($symbol, $type, $side, $amount, $price = null, // 'mmp' => false // $market maker protection ); if ($price !== null) { - $request['orderPrice'] = $price; + $request['orderPrice'] = $this->price_to_precision($symbol, $price); } if ($market['swap']) { $stopPx = $this->safe_value_2($params, 'stopPrice', 'triggerPrice'); diff --git a/python/README.md b/python/README.md index 3980d53946da..872c8fb47359 100644 --- a/python/README.md +++ b/python/README.md @@ -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.84.18/dist/ccxt.browser.js -* unpkg: https://unpkg.com/ccxt@1.84.18/dist/ccxt.browser.js +* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.84.19/dist/ccxt.browser.js +* unpkg: https://unpkg.com/ccxt@1.84.19/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 - + ``` Creates a global `ccxt` object: diff --git a/python/ccxt/__init__.py b/python/ccxt/__init__.py index f14e391989bf..dbb97321485a 100644 --- a/python/ccxt/__init__.py +++ b/python/ccxt/__init__.py @@ -22,7 +22,7 @@ # ---------------------------------------------------------------------------- -__version__ = '1.84.18' +__version__ = '1.84.19' # ---------------------------------------------------------------------------- diff --git a/python/ccxt/async_support/__init__.py b/python/ccxt/async_support/__init__.py index 3909bda1fbe8..94e66da531fb 100644 --- a/python/ccxt/async_support/__init__.py +++ b/python/ccxt/async_support/__init__.py @@ -4,7 +4,7 @@ # ----------------------------------------------------------------------------- -__version__ = '1.84.18' +__version__ = '1.84.19' # ----------------------------------------------------------------------------- diff --git a/python/ccxt/async_support/base/exchange.py b/python/ccxt/async_support/base/exchange.py index 18942bcd2145..8402d41a2447 100644 --- a/python/ccxt/async_support/base/exchange.py +++ b/python/ccxt/async_support/base/exchange.py @@ -2,7 +2,7 @@ # ----------------------------------------------------------------------------- -__version__ = '1.84.18' +__version__ = '1.84.19' # ----------------------------------------------------------------------------- diff --git a/python/ccxt/async_support/bybit.py b/python/ccxt/async_support/bybit.py index 2e422e96d89c..3ea57a922a52 100644 --- a/python/ccxt/async_support/bybit.py +++ b/python/ccxt/async_support/bybit.py @@ -2569,8 +2569,6 @@ async def create_order(self, symbol, type, side, amount, price=None, params={}): await self.load_markets() market = self.market(symbol) symbol = market['symbol'] - amount = self.amount_to_precision(symbol, amount) - price = self.price_to_precision(symbol, price) if (price is not None) else None isUsdcSettled = (market['settle'] == 'USDC') if market['spot']: return await self.create_spot_order(symbol, type, side, amount, price, params) @@ -2596,7 +2594,7 @@ async def create_spot_order(self, symbol, type, side, amount, price=None, params 'side': self.capitalize(side), 'type': type.upper(), # limit, market or limit_maker 'timeInForce': 'GTC', # FOK, IOC - 'qty': amount, + 'qty': self.amount_to_precision(symbol, amount), # 'orderLinkId': 'string', # unique client order id, max 36 characters } if type == 'limit' or type == 'limit_maker': @@ -2647,7 +2645,7 @@ async def create_usdc_order(self, symbol, type, side, amount, price=None, params 'side': self.capitalize(side), 'orderType': self.capitalize(type), # limit or market 'timeInForce': 'GoodTillCancel', # ImmediateOrCancel, FillOrKill, PostOnly - 'orderQty': amount, + 'orderQty': self.amount_to_precision(symbol, amount), # 'takeProfit': 123.45, # take profit price, only take effect upon opening the position # 'stopLoss': 123.45, # stop loss price, only take effect upon opening the position # 'reduceOnly': False, # reduce only, required for linear orders @@ -2663,7 +2661,7 @@ async def create_usdc_order(self, symbol, type, side, amount, price=None, params # 'mmp': False # market maker protection } if price is not None: - request['orderPrice'] = price + request['orderPrice'] = self.price_to_precision(symbol, price) if market['swap']: stopPx = self.safe_value_2(params, 'stopPrice', 'triggerPrice') params = self.omit(params, ['stopPrice', 'triggerPrice']) diff --git a/python/ccxt/base/exchange.py b/python/ccxt/base/exchange.py index f76e5997f60b..b7c049395291 100644 --- a/python/ccxt/base/exchange.py +++ b/python/ccxt/base/exchange.py @@ -4,7 +4,7 @@ # ----------------------------------------------------------------------------- -__version__ = '1.84.18' +__version__ = '1.84.19' # ----------------------------------------------------------------------------- diff --git a/python/ccxt/bybit.py b/python/ccxt/bybit.py index 8fb80af6f47e..7200fc5096c6 100644 --- a/python/ccxt/bybit.py +++ b/python/ccxt/bybit.py @@ -2569,8 +2569,6 @@ def create_order(self, symbol, type, side, amount, price=None, params={}): self.load_markets() market = self.market(symbol) symbol = market['symbol'] - amount = self.amount_to_precision(symbol, amount) - price = self.price_to_precision(symbol, price) if (price is not None) else None isUsdcSettled = (market['settle'] == 'USDC') if market['spot']: return self.create_spot_order(symbol, type, side, amount, price, params) @@ -2596,7 +2594,7 @@ def create_spot_order(self, symbol, type, side, amount, price=None, params={}): 'side': self.capitalize(side), 'type': type.upper(), # limit, market or limit_maker 'timeInForce': 'GTC', # FOK, IOC - 'qty': amount, + 'qty': self.amount_to_precision(symbol, amount), # 'orderLinkId': 'string', # unique client order id, max 36 characters } if type == 'limit' or type == 'limit_maker': @@ -2647,7 +2645,7 @@ def create_usdc_order(self, symbol, type, side, amount, price=None, params={}): 'side': self.capitalize(side), 'orderType': self.capitalize(type), # limit or market 'timeInForce': 'GoodTillCancel', # ImmediateOrCancel, FillOrKill, PostOnly - 'orderQty': amount, + 'orderQty': self.amount_to_precision(symbol, amount), # 'takeProfit': 123.45, # take profit price, only take effect upon opening the position # 'stopLoss': 123.45, # stop loss price, only take effect upon opening the position # 'reduceOnly': False, # reduce only, required for linear orders @@ -2663,7 +2661,7 @@ def create_usdc_order(self, symbol, type, side, amount, price=None, params={}): # 'mmp': False # market maker protection } if price is not None: - request['orderPrice'] = price + request['orderPrice'] = self.price_to_precision(symbol, price) if market['swap']: stopPx = self.safe_value_2(params, 'stopPrice', 'triggerPrice') params = self.omit(params, ['stopPrice', 'triggerPrice']) diff --git a/python/package.json b/python/package.json index 900707a01431..232dc67db529 100644 --- a/python/package.json +++ b/python/package.json @@ -1,6 +1,6 @@ { "name": "ccxt", - "version": "1.84.18", + "version": "1.84.19", "description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 130+ exchanges", "main": "./ccxt.js", "unpkg": "dist/ccxt.browser.js", @@ -215,7 +215,7 @@ "ccex", "C-CEX", "cex", - "CEX.IO", + "cex.io", "CHBTC", "ChileBit", "chilebit.net", @@ -385,7 +385,7 @@ "fybse.se", "fybsg.com", "gatecoin.com", - "gate.io", + "Gate.io", "gdax.com", "gemini.com", "getbtc.org", @@ -502,8 +502,8 @@ "dsxglobal.com", "bitvavo.com", "Bitvavo", - "currency.com", - "waves.exchange", + "Currency.com", + "Waves.Exchange", "phemex.com", "Phemex", "huobi.co.jp", @@ -552,7 +552,7 @@ "Binance USDⓈ-M", "eqonex.com", "EQONEX", - "fmfw.io", + "FMFW.io", "mexc.com", "MEXC Global", "bitrue.com", @@ -566,8 +566,8 @@ "Zonda", "futures.kucoin.com", "KuCoin Futures", - "blockchain.com", - "crypto.com", + "Blockchain.com", + "Crypto.com", "wazirx.com", "WazirX", "woo.org", diff --git a/wiki/Install.md b/wiki/Install.md index 2d3dcad1057b..900a01f69833 100644 --- a/wiki/Install.md +++ b/wiki/Install.md @@ -40,13 +40,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.84.18/dist/ccxt.browser.js -* unpkg: https://unpkg.com/ccxt@1.84.18/dist/ccxt.browser.js +* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.84.19/dist/ccxt.browser.js +* unpkg: https://unpkg.com/ccxt@1.84.19/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. ```HTML - + ``` Creates a global `ccxt` object: