From 95a8befe3540043bac408b36794342b0a9e724cd Mon Sep 17 00:00:00 2001 From: Travis CI Date: Thu, 20 Sep 2018 06:38:43 +0000 Subject: [PATCH] 1.17.322 [ci skip] --- README.md | 9 +- build/ccxt.browser.js | 2230 ++++++++++---------- ccxt.d.ts | 5 +- ccxt.js | 3 +- doc/README.rst | 13 +- doc/exchanges-by-country.rst | 27 +- doc/exchanges.rst | 13 +- doc/manual.rst | 13 +- package.json | 2 +- php/Exchange.php | 5 +- php/kucoin.php | 19 +- php/liquid.php | 17 +- php/qryptos.php | 519 +---- php/quoinex.php | 19 +- python/README.rst | 13 +- python/ccxt/__init__.py | 4 +- python/ccxt/async_support/__init__.py | 4 +- python/ccxt/async_support/base/exchange.py | 2 +- python/ccxt/async_support/kucoin.py | 18 +- python/ccxt/async_support/liquid.py | 17 +- python/ccxt/async_support/qryptos.py | 480 +---- python/ccxt/async_support/quoinex.py | 21 +- python/ccxt/base/exchange.py | 2 +- python/ccxt/kucoin.py | 18 +- python/ccxt/liquid.py | 17 +- python/ccxt/qryptos.py | 480 +---- python/ccxt/quoinex.py | 21 +- wiki/Exchange-Markets-By-Country.md | 14 +- wiki/Exchange-Markets.md | 7 +- wiki/Manual.md | 7 +- 30 files changed, 1263 insertions(+), 2756 deletions(-) diff --git a/README.md b/README.md index 11d5a71539aee..998338b2ca649 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # CCXT – CryptoCurrency eXchange Trading Library -[![Build Status](https://travis-ci.org/ccxt/ccxt.svg?branch=master)](https://travis-ci.org/ccxt/ccxt) [![npm](https://img.shields.io/npm/v/ccxt.svg)](https://npmjs.com/package/ccxt) [![PyPI](https://img.shields.io/pypi/v/ccxt.svg)](https://pypi.python.org/pypi/ccxt) [![NPM Downloads](https://img.shields.io/npm/dm/ccxt.svg)](https://www.npmjs.com/package/ccxt) [![Gitter](https://badges.gitter.im/ccxt-dev/ccxt.svg)](https://gitter.im/ccxt-dev/ccxt?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Supported Exchanges](https://img.shields.io/badge/exchanges-131-blue.svg)](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [![Open Collective](https://opencollective.com/ccxt/backers/badge.svg)](https://opencollective.com/ccxt) +[![Build Status](https://travis-ci.org/ccxt/ccxt.svg?branch=master)](https://travis-ci.org/ccxt/ccxt) [![npm](https://img.shields.io/npm/v/ccxt.svg)](https://npmjs.com/package/ccxt) [![PyPI](https://img.shields.io/pypi/v/ccxt.svg)](https://pypi.python.org/pypi/ccxt) [![NPM Downloads](https://img.shields.io/npm/dm/ccxt.svg)](https://www.npmjs.com/package/ccxt) [![Gitter](https://badges.gitter.im/ccxt-dev/ccxt.svg)](https://gitter.im/ccxt-dev/ccxt?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Supported Exchanges](https://img.shields.io/badge/exchanges-132-blue.svg)](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [![Open Collective](https://opencollective.com/ccxt/backers/badge.svg)](https://opencollective.com/ccxt) [![Twitter Follow](https://img.shields.io/twitter/follow/ccxt_official.svg?style=social&label=CCXT)](https://twitter.com/ccxt_official) A JavaScript / Python / PHP library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs. @@ -39,7 +39,7 @@ Learn more about **[The Ocean](https://theocean.trade)** in [CCXT v1.17 Release ## Supported Cryptocurrency Exchange Markets -The ccxt library currently supports the following 131 cryptocurrency exchange markets and trading APIs: +The ccxt library currently supports the following 132 cryptocurrency exchange markets and trading APIs: | | id | name | certified | ver | doc | countries | |---------------------------------------------------------------------------------------------------------------------------|--------------------|--------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------:|:-----:|--------------------------------------------------------------------------------------------------|-----------------------------------------| @@ -141,6 +141,7 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma |![lakebtc](https://user-images.githubusercontent.com/1294454/28074120-72b7c38a-6660-11e7-92d9-d9027502281d.jpg) | lakebtc | [LakeBTC](https://www.lakebtc.com) | | 2 | [API](https://www.lakebtc.com/s/api_v2) | US | |![lbank](https://user-images.githubusercontent.com/1294454/38063602-9605e28a-3302-11e8-81be-64b1e53c4cfb.jpg) | lbank | [LBank](https://www.lbank.info) | | 1 | [API](https://github.com/LBank-exchange/lbank-official-api-docs) | China | |![liqui](https://user-images.githubusercontent.com/1294454/27982022-75aea828-63a0-11e7-9511-ca584a8edd74.jpg) | liqui | [Liqui](https://liqui.io) | | 3 | [API](https://liqui.io/api) | Ukraine | +|![liquid](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | liquid | [Liquid](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | Japan, China, Taiwan | |![livecoin](https://user-images.githubusercontent.com/1294454/27980768-f22fc424-638a-11e7-89c9-6010a54ff9be.jpg) | livecoin | [LiveCoin](https://www.livecoin.net) | | * | [API](https://www.livecoin.net/api?lang=en) | US, UK, Russia | |![luno](https://user-images.githubusercontent.com/1294454/27766607-8c1a69d8-5ede-11e7-930c-540b5eb9be24.jpg) | luno | [luno](https://www.luno.com) | | 1 | [API](https://www.luno.com/en/api) | UK, Singapore, South Africa | |![lykke](https://user-images.githubusercontent.com/1294454/34487620-3139a7b0-efe6-11e7-90f5-e520cef74451.jpg) | lykke | [Lykke](https://www.lykke.com) | | 1 | [API](https://hft-api.lykke.com/swagger/ui/) | Switzerland | @@ -153,9 +154,9 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma |![okex](https://user-images.githubusercontent.com/1294454/32552768-0d6dd3c6-c4a6-11e7-90f8-c043b64756a7.jpg) | okex | [OKEX](https://www.okex.com) | | 1 | [API](https://github.com/okcoin-okex/API-docs-OKEx.com) | China, US | |![paymium](https://user-images.githubusercontent.com/1294454/27790564-a945a9d4-5ff9-11e7-9d2d-b635763f2f24.jpg) | paymium | [Paymium](https://www.paymium.com) | | 1 | [API](https://github.com/Paymium/api-documentation) | France, EU | |![poloniex](https://user-images.githubusercontent.com/1294454/27766817-e9456312-5ee6-11e7-9b3c-b628ca5626a5.jpg) | poloniex | [Poloniex](https://poloniex.com) | | * | [API](https://poloniex.com/support/api/) | US | -|![qryptos](https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg) | qryptos | [QRYPTOS](https://www.qryptos.com) | | 2 | [API](https://developers.quoine.com) | China, Taiwan | +|![qryptos](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | qryptos | [QRYPTOS](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | Japan, China, Taiwan | |![quadrigacx](https://user-images.githubusercontent.com/1294454/27766825-98a6d0de-5ee7-11e7-9fa4-38e11a2c6f52.jpg) | quadrigacx | [QuadrigaCX](https://www.quadrigacx.com) | | 2 | [API](https://www.quadrigacx.com/api_info) | Canada | -|![quoinex](https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg) | quoinex | [QUOINEX](https://quoinex.com/) | | 2 | [API](https://developers.quoine.com) | Japan, Singapore, Vietnam | +|![quoinex](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | quoinex | [QUOINEX](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | Japan, China, Taiwan | |![rightbtc](https://user-images.githubusercontent.com/1294454/42633917-7d20757e-85ea-11e8-9f53-fffe9fbb7695.jpg) | rightbtc | [RightBTC](https://www.rightbtc.com) | | * | [API](https://52.53.159.206/api/trader/) | United Arab Emirates | |![southxchange](https://user-images.githubusercontent.com/1294454/27838912-4f94ec8a-60f6-11e7-9e5d-bbf9bd50a559.jpg) | southxchange | [SouthXchange](https://www.southxchange.com) | | * | [API](https://www.southxchange.com/Home/Api) | Argentina | |![surbitcoin](https://user-images.githubusercontent.com/1294454/27991511-f0a50194-6481-11e7-99b5-8f02932424cc.jpg) | surbitcoin | [SurBitcoin](https://surbitcoin.com) | | 1 | [API](https://blinktrade.com/docs) | Venezuela | diff --git a/build/ccxt.browser.js b/build/ccxt.browser.js index c364032bfcc6b..52ed8c56f8c09 100644 --- a/build/ccxt.browser.js +++ b/build/ccxt.browser.js @@ -45,7 +45,7 @@ const Exchange = require ('./js/base/Exchange') //----------------------------------------------------------------------------- // this is updated by vss.js when building -const version = '1.17.321' +const version = '1.17.322' Exchange.ccxtVersion = version @@ -150,6 +150,7 @@ const exchanges = { 'lakebtc': require ('./js/lakebtc.js'), 'lbank': require ('./js/lbank.js'), 'liqui': require ('./js/liqui.js'), + 'liquid': require ('./js/liquid.js'), 'livecoin': require ('./js/livecoin.js'), 'luno': require ('./js/luno.js'), 'lykke': require ('./js/lykke.js'), @@ -191,7 +192,7 @@ module.exports = Object.assign ({ version, Exchange, exchanges: Object.keys (exc //----------------------------------------------------------------------------- -},{"./js/_1broker.js":3,"./js/_1btcxe.js":4,"./js/acx.js":5,"./js/allcoin.js":6,"./js/anxpro.js":7,"./js/anybits.js":8,"./js/base/Exchange":9,"./js/base/errors":11,"./js/base/functions":12,"./js/bcex.js":23,"./js/bibox.js":24,"./js/bigone.js":25,"./js/binance.js":26,"./js/bit2c.js":27,"./js/bitbank.js":28,"./js/bitbay.js":29,"./js/bitfinex.js":30,"./js/bitfinex2.js":31,"./js/bitflyer.js":32,"./js/bitforex.js":33,"./js/bithumb.js":34,"./js/bitkk.js":35,"./js/bitlish.js":36,"./js/bitmarket.js":37,"./js/bitmex.js":38,"./js/bitsane.js":39,"./js/bitso.js":40,"./js/bitstamp.js":41,"./js/bitstamp1.js":42,"./js/bittrex.js":43,"./js/bitz.js":44,"./js/bl3p.js":45,"./js/bleutrade.js":46,"./js/braziliex.js":47,"./js/btcalpha.js":48,"./js/btcbox.js":49,"./js/btcchina.js":50,"./js/btcexchange.js":51,"./js/btcmarkets.js":52,"./js/btctradeim.js":53,"./js/btctradeua.js":54,"./js/btcturk.js":55,"./js/btcx.js":56,"./js/bxinth.js":57,"./js/ccex.js":58,"./js/cex.js":59,"./js/chbtc.js":60,"./js/chilebit.js":61,"./js/cobinhood.js":62,"./js/coinbase.js":63,"./js/coinbaseprime.js":64,"./js/coinbasepro.js":65,"./js/coincheck.js":66,"./js/coinegg.js":67,"./js/coinex.js":68,"./js/coinexchange.js":69,"./js/coinfalcon.js":70,"./js/coinfloor.js":71,"./js/coingi.js":72,"./js/coinmarketcap.js":73,"./js/coinmate.js":74,"./js/coinnest.js":75,"./js/coinone.js":76,"./js/coinsecure.js":77,"./js/coinspot.js":78,"./js/cointiger.js":79,"./js/coolcoin.js":80,"./js/crypton.js":81,"./js/cryptopia.js":82,"./js/deribit.js":83,"./js/dsx.js":84,"./js/ethfinex.js":85,"./js/exmo.js":86,"./js/exx.js":87,"./js/fcoin.js":88,"./js/flowbtc.js":89,"./js/foxbit.js":90,"./js/fybse.js":91,"./js/fybsg.js":92,"./js/gatecoin.js":93,"./js/gateio.js":94,"./js/gdax.js":95,"./js/gemini.js":96,"./js/getbtc.js":97,"./js/hadax.js":98,"./js/hitbtc.js":99,"./js/hitbtc2.js":100,"./js/huobi.js":101,"./js/huobicny.js":102,"./js/huobipro.js":103,"./js/ice3x.js":104,"./js/independentreserve.js":105,"./js/indodax.js":106,"./js/itbit.js":107,"./js/jubi.js":108,"./js/kraken.js":109,"./js/kucoin.js":110,"./js/kuna.js":111,"./js/lakebtc.js":112,"./js/lbank.js":113,"./js/liqui.js":114,"./js/livecoin.js":115,"./js/luno.js":116,"./js/lykke.js":117,"./js/mercado.js":118,"./js/mixcoins.js":119,"./js/negociecoins.js":120,"./js/nova.js":121,"./js/okcoincny.js":122,"./js/okcoinusd.js":123,"./js/okex.js":124,"./js/paymium.js":125,"./js/poloniex.js":126,"./js/qryptos.js":127,"./js/quadrigacx.js":128,"./js/quoinex.js":129,"./js/rightbtc.js":130,"./js/southxchange.js":131,"./js/surbitcoin.js":132,"./js/theocean.js":133,"./js/therock.js":134,"./js/tidebit.js":135,"./js/tidex.js":136,"./js/uex.js":137,"./js/urdubit.js":138,"./js/vaultoro.js":139,"./js/vbtc.js":140,"./js/virwox.js":141,"./js/wex.js":142,"./js/xbtce.js":143,"./js/yobit.js":144,"./js/yunbi.js":145,"./js/zaif.js":146,"./js/zb.js":147}],3:[function(require,module,exports){ +},{"./js/_1broker.js":3,"./js/_1btcxe.js":4,"./js/acx.js":5,"./js/allcoin.js":6,"./js/anxpro.js":7,"./js/anybits.js":8,"./js/base/Exchange":9,"./js/base/errors":11,"./js/base/functions":12,"./js/bcex.js":23,"./js/bibox.js":24,"./js/bigone.js":25,"./js/binance.js":26,"./js/bit2c.js":27,"./js/bitbank.js":28,"./js/bitbay.js":29,"./js/bitfinex.js":30,"./js/bitfinex2.js":31,"./js/bitflyer.js":32,"./js/bitforex.js":33,"./js/bithumb.js":34,"./js/bitkk.js":35,"./js/bitlish.js":36,"./js/bitmarket.js":37,"./js/bitmex.js":38,"./js/bitsane.js":39,"./js/bitso.js":40,"./js/bitstamp.js":41,"./js/bitstamp1.js":42,"./js/bittrex.js":43,"./js/bitz.js":44,"./js/bl3p.js":45,"./js/bleutrade.js":46,"./js/braziliex.js":47,"./js/btcalpha.js":48,"./js/btcbox.js":49,"./js/btcchina.js":50,"./js/btcexchange.js":51,"./js/btcmarkets.js":52,"./js/btctradeim.js":53,"./js/btctradeua.js":54,"./js/btcturk.js":55,"./js/btcx.js":56,"./js/bxinth.js":57,"./js/ccex.js":58,"./js/cex.js":59,"./js/chbtc.js":60,"./js/chilebit.js":61,"./js/cobinhood.js":62,"./js/coinbase.js":63,"./js/coinbaseprime.js":64,"./js/coinbasepro.js":65,"./js/coincheck.js":66,"./js/coinegg.js":67,"./js/coinex.js":68,"./js/coinexchange.js":69,"./js/coinfalcon.js":70,"./js/coinfloor.js":71,"./js/coingi.js":72,"./js/coinmarketcap.js":73,"./js/coinmate.js":74,"./js/coinnest.js":75,"./js/coinone.js":76,"./js/coinsecure.js":77,"./js/coinspot.js":78,"./js/cointiger.js":79,"./js/coolcoin.js":80,"./js/crypton.js":81,"./js/cryptopia.js":82,"./js/deribit.js":83,"./js/dsx.js":84,"./js/ethfinex.js":85,"./js/exmo.js":86,"./js/exx.js":87,"./js/fcoin.js":88,"./js/flowbtc.js":89,"./js/foxbit.js":90,"./js/fybse.js":91,"./js/fybsg.js":92,"./js/gatecoin.js":93,"./js/gateio.js":94,"./js/gdax.js":95,"./js/gemini.js":96,"./js/getbtc.js":97,"./js/hadax.js":98,"./js/hitbtc.js":99,"./js/hitbtc2.js":100,"./js/huobi.js":101,"./js/huobicny.js":102,"./js/huobipro.js":103,"./js/ice3x.js":104,"./js/independentreserve.js":105,"./js/indodax.js":106,"./js/itbit.js":107,"./js/jubi.js":108,"./js/kraken.js":109,"./js/kucoin.js":110,"./js/kuna.js":111,"./js/lakebtc.js":112,"./js/lbank.js":113,"./js/liqui.js":114,"./js/liquid.js":115,"./js/livecoin.js":116,"./js/luno.js":117,"./js/lykke.js":118,"./js/mercado.js":119,"./js/mixcoins.js":120,"./js/negociecoins.js":121,"./js/nova.js":122,"./js/okcoincny.js":123,"./js/okcoinusd.js":124,"./js/okex.js":125,"./js/paymium.js":126,"./js/poloniex.js":127,"./js/qryptos.js":128,"./js/quadrigacx.js":129,"./js/quoinex.js":130,"./js/rightbtc.js":131,"./js/southxchange.js":132,"./js/surbitcoin.js":133,"./js/theocean.js":134,"./js/therock.js":135,"./js/tidebit.js":136,"./js/tidex.js":137,"./js/uex.js":138,"./js/urdubit.js":139,"./js/vaultoro.js":140,"./js/vbtc.js":141,"./js/virwox.js":142,"./js/wex.js":143,"./js/xbtce.js":144,"./js/yobit.js":145,"./js/yunbi.js":146,"./js/zaif.js":147,"./js/zb.js":148}],3:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -1287,7 +1288,7 @@ module.exports = class allcoin extends okcoinusd { } }; -},{"./okcoinusd.js":123}],7:[function(require,module,exports){ +},{"./okcoinusd.js":124}],7:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -2979,7 +2980,7 @@ module.exports = class Exchange { } }).call(this,require("buffer").Buffer) -},{"./Market":10,"./errors":11,"./functions":12,"bignumber.js":170,"buffer":206,"ethereumjs-abi":279,"ethereumjs-util":282,"fetch-ponyfill":289,"web3":464}],10:[function(require,module,exports){ +},{"./Market":10,"./errors":11,"./functions":12,"bignumber.js":171,"buffer":207,"ethereumjs-abi":280,"ethereumjs-util":283,"fetch-ponyfill":290,"web3":465}],10:[function(require,module,exports){ "use strict"; module.exports = class Market { @@ -3169,7 +3170,7 @@ module.exports = { /* ------------------------------------------------------------------------ */ -},{"./encode":14,"./string":19,"crypto-js":223}],14:[function(require,module,exports){ +},{"./encode":14,"./string":19,"crypto-js":224}],14:[function(require,module,exports){ "use strict"; /* ------------------------------------------------------------------------ */ @@ -3210,7 +3211,7 @@ module.exports = /* ------------------------------------------------------------------------ */ -},{"crypto-js":223,"qs":350}],15:[function(require,module,exports){ +},{"crypto-js":224,"qs":351}],15:[function(require,module,exports){ "use strict"; /* ------------------------------------------------------------------------ */ @@ -3825,7 +3826,7 @@ module.exports = { isWindows, } }).call(this,require('_process')) -},{"_process":203}],19:[function(require,module,exports){ +},{"_process":204}],19:[function(require,module,exports){ "use strict"; /* ------------------------------------------------------------------------ */ @@ -11470,7 +11471,7 @@ module.exports = class bitkk extends zb { } }; -},{"./zb.js":147}],36:[function(require,module,exports){ +},{"./zb.js":148}],36:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -21411,7 +21412,7 @@ module.exports = class chbtc extends zb { } }; -},{"./base/errors":11,"./zb.js":147}],61:[function(require,module,exports){ +},{"./base/errors":11,"./zb.js":148}],61:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -42865,17 +42866,20 @@ module.exports = class kucoin extends Exchange { amount = this.safeFloat (trade, 'amount'); cost = this.safeFloat (trade, 'dealValue'); let feeCurrency = undefined; - if (market !== undefined) { - feeCurrency = (side === 'sell') ? market['quote'] : market['base']; - } else { - let feeCurrencyField = (side === 'sell') ? 'coinTypePair' : 'coinType'; - let feeCurrency = this.safeString (order, feeCurrencyField); - if (feeCurrency !== undefined) { - if (feeCurrency in this.currencies_by_id) - feeCurrency = this.currencies_by_id[feeCurrency]['code']; + if (side !== undefined) { + if (market !== undefined) { + feeCurrency = (side === 'sell') ? market['quote'] : market['base']; + } else { + let feeCurrencyField = (side === 'sell') ? 'coinTypePair' : 'coinType'; + let feeCurrency = this.safeString (order, feeCurrencyField); + if (feeCurrency !== undefined) { + if (feeCurrency in this.currencies_by_id) + feeCurrency = this.currencies_by_id[feeCurrency]['code']; + } } } fee = { + 'rate': this.safeFloat (trade, 'feeRate'), 'cost': this.safeFloat (trade, 'fee'), 'currency': feeCurrency, }; @@ -44871,6 +44875,537 @@ module.exports = class liqui extends Exchange { // --------------------------------------------------------------------------- +const Exchange = require ('./base/Exchange'); +const { InvalidNonce, OrderNotFound, InvalidOrder, InsufficientFunds, AuthenticationError } = require ('./base/errors'); + +// --------------------------------------------------------------------------- + +module.exports = class liquid extends Exchange { + describe () { + return this.deepExtend (super.describe (), { + 'id': 'liquid', + 'name': 'Liquid', + 'countries': [ 'JP', 'CN', 'TW' ], + 'version': '2', + 'rateLimit': 1000, + 'has': { + 'CORS': false, + 'fetchTickers': true, + 'fetchOrder': true, + 'fetchOrders': true, + 'fetchOpenOrders': true, + 'fetchClosedOrders': true, + 'fetchMyTrades': true, + }, + 'urls': { + 'logo': 'https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg', + 'api': 'https://api.liquid.com', + 'www': 'https://www.liquid.com', + 'doc': [ + 'https://developers.quoine.com', + 'https://developers.quoine.com/v2', + ], + 'fees': 'https://help.liquid.com/getting-started-with-liquid/the-platform/fee-structure', + }, + 'api': { + 'public': { + 'get': [ + 'products', + 'products/{id}', + 'products/{id}/price_levels', + 'executions', + 'ir_ladders/{currency}', + ], + }, + 'private': { + 'get': [ + 'accounts/balance', + 'accounts/main_asset', + 'crypto_accounts', + 'executions/me', + 'fiat_accounts', + 'loan_bids', + 'loans', + 'orders', + 'orders/{id}', + 'orders/{id}/trades', + 'orders/{id}/executions', + 'trades', + 'trades/{id}/loans', + 'trading_accounts', + 'trading_accounts/{id}', + ], + 'post': [ + 'fiat_accounts', + 'loan_bids', + 'orders', + ], + 'put': [ + 'loan_bids/{id}/close', + 'loans/{id}', + 'orders/{id}', + 'orders/{id}/cancel', + 'trades/{id}', + 'trades/{id}/close', + 'trades/close_all', + 'trading_accounts/{id}', + ], + }, + }, + 'skipJsonOnStatusCodes': [401], + 'exceptions': { + 'messages': { + 'API Authentication failed': AuthenticationError, + 'Nonce is too small': InvalidNonce, + 'Order not found': OrderNotFound, + 'user': { + 'not_enough_free_balance': InsufficientFunds, + }, + 'price': { + 'must_be_positive': InvalidOrder, + }, + 'quantity': { + 'less_than_order_size': InvalidOrder, + }, + }, + }, + 'commonCurrencies': { + 'WIN': 'WCOIN', + }, + }); + } + + async fetchMarkets () { + let markets = await this.publicGetProducts (); + let result = []; + for (let p = 0; p < markets.length; p++) { + let market = markets[p]; + let id = market['id'].toString (); + let baseId = market['base_currency']; + let quoteId = market['quoted_currency']; + let base = this.commonCurrencyCode (baseId); + let quote = this.commonCurrencyCode (quoteId); + let symbol = base + '/' + quote; + let maker = this.safeFloat (market, 'maker_fee'); + let taker = this.safeFloat (market, 'taker_fee'); + let active = !market['disabled']; + let minAmount = undefined; + let minPrice = undefined; + if (base === 'BTC') { + minAmount = 0.001; + } else if (base === 'ETH') { + minAmount = 0.01; + } + if (quote === 'BTC') { + minPrice = 0.00000001; + } else if (quote === 'ETH' || quote === 'USD' || quote === 'JPY') { + minPrice = 0.00001; + } + let limits = { + 'amount': { 'min': minAmount }, + 'price': { 'min': minPrice }, + 'cost': { 'min': undefined }, + }; + if (minPrice !== undefined) + if (minAmount !== undefined) + limits['cost']['min'] = minPrice * minAmount; + let precision = { + 'amount': undefined, + 'price': undefined, + }; + if (minAmount !== undefined) + precision['amount'] = -Math.log10 (minAmount); + if (minPrice !== undefined) + precision['price'] = -Math.log10 (minPrice); + result.push ({ + 'id': id, + 'symbol': symbol, + 'base': base, + 'quote': quote, + 'baseId': baseId, + 'quoteId': quoteId, + 'maker': maker, + 'taker': taker, + 'limits': limits, + 'precision': precision, + 'active': active, + 'info': market, + }); + } + return result; + } + + async fetchBalance (params = {}) { + await this.loadMarkets (); + let balances = await this.privateGetAccountsBalance (params); + let result = { 'info': balances }; + for (let b = 0; b < balances.length; b++) { + let balance = balances[b]; + let currencyId = balance['currency']; + let code = currencyId; + if (currencyId in this.currencies_by_id) { + code = this.currencies_by_id[currencyId]['code']; + } + let total = parseFloat (balance['balance']); + let account = { + 'free': total, + 'used': 0.0, + 'total': total, + }; + result[code] = account; + } + return this.parseBalance (result); + } + + async fetchOrderBook (symbol, limit = undefined, params = {}) { + await this.loadMarkets (); + let orderbook = await this.publicGetProductsIdPriceLevels (this.extend ({ + 'id': this.marketId (symbol), + }, params)); + return this.parseOrderBook (orderbook, undefined, 'buy_price_levels', 'sell_price_levels'); + } + + parseTicker (ticker, market = undefined) { + let timestamp = this.milliseconds (); + let last = undefined; + if ('last_traded_price' in ticker) { + if (ticker['last_traded_price']) { + let length = ticker['last_traded_price'].length; + if (length > 0) + last = this.safeFloat (ticker, 'last_traded_price'); + } + } + let symbol = undefined; + if (market === undefined) { + let marketId = this.safeString (ticker, 'id'); + if (marketId in this.markets_by_id) { + market = this.markets_by_id[marketId]; + } else { + let baseId = this.safeString (ticker, 'base_currency'); + let quoteId = this.safeString (ticker, 'quoted_currency'); + if (symbol in this.markets) { + market = this.markets[symbol]; + } else { + symbol = this.commonCurrencyCode (baseId) + '/' + this.commonCurrencyCode (quoteId); + } + } + } + if (market !== undefined) + symbol = market['symbol']; + let change = undefined; + let percentage = undefined; + let average = undefined; + let open = this.safeFloat (ticker, 'last_price_24h'); + if (open !== undefined && last !== undefined) { + change = last - open; + average = this.sum (last, open) / 2; + if (open > 0) { + percentage = change / open * 100; + } + } + return { + 'symbol': symbol, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'high': this.safeFloat (ticker, 'high_market_ask'), + 'low': this.safeFloat (ticker, 'low_market_bid'), + 'bid': this.safeFloat (ticker, 'market_bid'), + 'bidVolume': undefined, + 'ask': this.safeFloat (ticker, 'market_ask'), + 'askVolume': undefined, + 'vwap': undefined, + 'open': open, + 'close': last, + 'last': last, + 'previousClose': undefined, + 'change': change, + 'percentage': percentage, + 'average': average, + 'baseVolume': this.safeFloat (ticker, 'volume_24h'), + 'quoteVolume': undefined, + 'info': ticker, + }; + } + + async fetchTickers (symbols = undefined, params = {}) { + await this.loadMarkets (); + let tickers = await this.publicGetProducts (params); + let result = {}; + for (let t = 0; t < tickers.length; t++) { + let ticker = this.parseTicker (tickers[t]); + let symbol = ticker['symbol']; + result[symbol] = ticker; + } + return result; + } + + async fetchTicker (symbol, params = {}) { + await this.loadMarkets (); + let market = this.market (symbol); + let ticker = await this.publicGetProductsId (this.extend ({ + 'id': market['id'], + }, params)); + return this.parseTicker (ticker, market); + } + + parseTrade (trade, market) { + // { id: 12345, + // quantity: "6.789", + // price: "98765.4321", + // taker_side: "sell", + // created_at: 1512345678, + // my_side: "buy" } + let timestamp = trade['created_at'] * 1000; + // 'taker_side' gets filled for both fetchTrades and fetchMyTrades + let takerSide = this.safeString (trade, 'taker_side'); + // 'my_side' gets filled for fetchMyTrades only and may differ from 'taker_side' + let mySide = this.safeString (trade, 'my_side'); + let side = (mySide !== undefined) ? mySide : takerSide; + let takerOrMaker = undefined; + if (mySide !== undefined) + takerOrMaker = (takerSide === mySide) ? 'taker' : 'maker'; + return { + 'info': trade, + 'id': trade['id'].toString (), + 'order': undefined, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'symbol': market['symbol'], + 'type': undefined, + 'side': side, + 'takerOrMaker': takerOrMaker, + 'price': this.safeFloat (trade, 'price'), + 'amount': this.safeFloat (trade, 'quantity'), + }; + } + + async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + let market = this.market (symbol); + let request = { + 'product_id': market['id'], + }; + if (limit !== undefined) + request['limit'] = limit; + if (since !== undefined) { + // timestamp should be in seconds, whereas we use milliseconds in since and everywhere + request['timestamp'] = parseInt (since / 1000); + } + let response = await this.publicGetExecutions (this.extend (request, params)); + let result = (since !== undefined) ? response : response['models']; + return this.parseTrades (result, market, since, limit); + } + + async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + let market = this.market (symbol); + let request = { + 'product_id': market['id'], + }; + if (limit !== undefined) + request['limit'] = limit; + let response = await this.privateGetExecutionsMe (this.extend (request, params)); + return this.parseTrades (response['models'], market, since, limit); + } + + async createOrder (symbol, type, side, amount, price = undefined, params = {}) { + await this.loadMarkets (); + let order = { + 'order_type': type, + 'product_id': this.marketId (symbol), + 'side': side, + 'quantity': amount, + }; + if (type === 'limit') + order['price'] = price; + let response = await this.privatePostOrders (this.extend (order, params)); + return this.parseOrder (response); + } + + async cancelOrder (id, symbol = undefined, params = {}) { + await this.loadMarkets (); + let result = await this.privatePutOrdersIdCancel (this.extend ({ + 'id': id, + }, params)); + let order = this.parseOrder (result); + if (order['status'] === 'closed') + throw new OrderNotFound (this.id + ' ' + this.json (order)); + return order; + } + + parseOrder (order, market = undefined) { + let timestamp = order['created_at'] * 1000; + let marketId = this.safeString (order, 'product_id'); + if (marketId !== undefined) { + if (marketId in this.markets_by_id) + market = this.markets_by_id[marketId]; + } + let status = undefined; + if ('status' in order) { + if (order['status'] === 'live') { + status = 'open'; + } else if (order['status'] === 'filled') { + status = 'closed'; + } else if (order['status'] === 'cancelled') { // 'll' intended + status = 'canceled'; + } + } + let amount = this.safeFloat (order, 'quantity'); + let filled = this.safeFloat (order, 'filled_quantity'); + let price = this.safeFloat (order, 'price'); + let symbol = undefined; + if (market !== undefined) { + symbol = market['symbol']; + } + return { + 'id': order['id'].toString (), + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'lastTradeTimestamp': undefined, + 'type': order['order_type'], + 'status': status, + 'symbol': symbol, + 'side': order['side'], + 'price': price, + 'amount': amount, + 'filled': filled, + 'remaining': amount - filled, + 'trades': undefined, + 'fee': { + 'currency': undefined, + 'cost': this.safeFloat (order, 'order_fee'), + }, + 'info': order, + }; + } + + async fetchOrder (id, symbol = undefined, params = {}) { + await this.loadMarkets (); + let order = await this.privateGetOrdersId (this.extend ({ + 'id': id, + }, params)); + return this.parseOrder (order); + } + + async fetchOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + let market = undefined; + let request = {}; + if (symbol !== undefined) { + market = this.market (symbol); + request['product_id'] = market['id']; + } + let status = this.safeValue (params, 'status'); + if (status) { + params = this.omit (params, 'status'); + if (status === 'open') { + request['status'] = 'live'; + } else if (status === 'closed') { + request['status'] = 'filled'; + } else if (status === 'canceled') { + request['status'] = 'cancelled'; + } + } + if (limit !== undefined) + request['limit'] = limit; + let result = await this.privateGetOrders (this.extend (request, params)); + let orders = result['models']; + return this.parseOrders (orders, market, since, limit); + } + + fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + return this.fetchOrders (symbol, since, limit, this.extend ({ 'status': 'open' }, params)); + } + + fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + return this.fetchOrders (symbol, since, limit, this.extend ({ 'status': 'closed' }, params)); + } + + nonce () { + return this.milliseconds (); + } + + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { + let url = '/' + this.implodeParams (path, params); + let query = this.omit (params, this.extractParams (path)); + headers = { + 'X-Quoine-API-Version': this.version, + 'Content-Type': 'application/json', + }; + if (api === 'public') { + if (Object.keys (query).length) + url += '?' + this.urlencode (query); + } else { + this.checkRequiredCredentials (); + if (method === 'GET') { + if (Object.keys (query).length) + url += '?' + this.urlencode (query); + } else if (Object.keys (query).length) { + body = this.json (query); + } + let nonce = this.nonce (); + let request = { + 'path': url, + 'nonce': nonce, + 'token_id': this.apiKey, + 'iat': Math.floor (nonce / 1000), // issued at + }; + headers['X-Quoine-Auth'] = this.jwt (request, this.secret); + } + url = this.urls['api'] + url; + return { 'url': url, 'method': method, 'body': body, 'headers': headers }; + } + + handleErrors (code, reason, url, method, headers, body, response = undefined) { + if (code >= 200 && code <= 299) + return; + const messages = this.exceptions['messages']; + if (code === 401) { + // expected non-json response + if (body in messages) + throw new messages[body] (this.id + ' ' + body); + else + return; + } + if (response === undefined) + if ((body[0] === '{') || (body[0] === '[')) + response = JSON.parse (body); + else + return; + const feedback = this.id + ' ' + this.json (response); + if (code === 404) { + // { "message": "Order not found" } + const message = this.safeString (response, 'message'); + if (message in messages) + throw new messages[message] (feedback); + } else if (code === 422) { + // array of error messages is returned in 'user' or 'quantity' property of 'errors' object, e.g.: + // { "errors": { "user": ["not_enough_free_balance"] }} + // { "errors": { "quantity": ["less_than_order_size"] }} + if ('errors' in response) { + const errors = response['errors']; + const errorTypes = ['user', 'quantity', 'price']; + for (let i = 0; i < errorTypes.length; i++) { + const errorType = errorTypes[i]; + if (errorType in errors) { + const errorMessages = errors[errorType]; + for (let j = 0; j < errorMessages.length; j++) { + const message = errorMessages[j]; + if (message in messages[errorType]) + throw new messages[errorType][message] (feedback); + } + } + } + } + } + } +}; + +},{"./base/Exchange":9,"./base/errors":11}],116:[function(require,module,exports){ +'use strict'; + +// --------------------------------------------------------------------------- + const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError, NotSupported, InvalidOrder, OrderNotFound, ExchangeNotAvailable, DDoSProtection, InsufficientFunds } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES } = require ('./base/functions/number'); @@ -45542,7 +46077,7 @@ module.exports = class livecoin extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11,"./base/functions/number":17}],116:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11,"./base/functions/number":17}],117:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -45973,7 +46508,7 @@ module.exports = class luno extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],117:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],118:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -46353,7 +46888,7 @@ module.exports = class lykke extends Exchange { } }; -},{"./base/Exchange":9}],118:[function(require,module,exports){ +},{"./base/Exchange":9}],119:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -46725,7 +47260,7 @@ module.exports = class mercado extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],119:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],120:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -46914,7 +47449,7 @@ module.exports = class mixcoins extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],120:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],121:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -47264,7 +47799,7 @@ module.exports = class negociecoins extends Exchange { } }; -},{"./base/Exchange":9}],121:[function(require,module,exports){ +},{"./base/Exchange":9}],122:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -47499,7 +48034,7 @@ module.exports = class nova extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],122:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],123:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -47538,7 +48073,7 @@ module.exports = class okcoincny extends okcoinusd { } }; -},{"./okcoinusd.js":123}],123:[function(require,module,exports){ +},{"./okcoinusd.js":124}],124:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -48521,7 +49056,7 @@ module.exports = class okcoinusd extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],124:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],125:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -48636,7 +49171,7 @@ module.exports = class okex extends okcoinusd { } }; -},{"./okcoinusd.js":123}],125:[function(require,module,exports){ +},{"./okcoinusd.js":124}],126:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -48853,7 +49388,7 @@ module.exports = class paymium extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],126:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],127:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -49515,699 +50050,195 @@ module.exports = class poloniex extends Exchange { if (order['symbol'] === symbol) result.push (order); } else { - result.push (order); - } - } - return this.filterBySinceLimit (result, since, limit); - } - - async fetchOrder (id, symbol = undefined, params = {}) { - let since = this.safeValue (params, 'since'); - let limit = this.safeValue (params, 'limit'); - let request = this.omit (params, [ 'since', 'limit' ]); - let orders = await this.fetchOrders (symbol, since, limit, request); - for (let i = 0; i < orders.length; i++) { - if (orders[i]['id'] === id) - return orders[i]; - } - throw new OrderNotCached (this.id + ' order id ' + id.toString () + ' is not in "open" state and not found in cache'); - } - - filterOrdersByStatus (orders, status) { - let result = []; - for (let i = 0; i < orders.length; i++) { - if (orders[i]['status'] === status) - result.push (orders[i]); - } - return result; - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - let orders = await this.fetchOrders (symbol, since, limit, params); - return this.filterOrdersByStatus (orders, 'open'); - } - - async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - let orders = await this.fetchOrders (symbol, since, limit, params); - return this.filterOrdersByStatus (orders, 'closed'); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - if (type === 'market') - throw new ExchangeError (this.id + ' allows limit orders only'); - await this.loadMarkets (); - let method = 'privatePost' + this.capitalize (side); - let market = this.market (symbol); - let request = { - 'currencyPair': market['id'], - 'rate': this.priceToPrecision (symbol, price), - 'amount': this.amountToPrecision (symbol, amount), - }; - let response = await this[method] (this.extend (request, params)); - let timestamp = this.milliseconds (); - let order = this.parseOrder (this.extend ({ - 'timestamp': timestamp, - 'status': 'open', - 'type': type, - 'side': side, - 'price': price, - 'amount': amount, - }, response), market); - let id = order['id']; - this.orders[id] = order; - return this.extend ({ 'info': response }, order); - } - - async editOrder (id, symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - price = parseFloat (price); - let request = { - 'orderNumber': id, - 'rate': this.priceToPrecision (symbol, price), - }; - if (amount !== undefined) { - request['amount'] = this.amountToPrecision (symbol, amount); - } - let response = await this.privatePostMoveOrder (this.extend (request, params)); - let result = undefined; - if (id in this.orders) { - this.orders[id]['status'] = 'canceled'; - let newid = response['orderNumber']; - this.orders[newid] = this.extend (this.orders[id], { - 'id': newid, - 'price': price, - 'status': 'open', - }); - if (amount !== undefined) - this.orders[newid]['amount'] = amount; - result = this.extend (this.orders[newid], { 'info': response }); - } else { - let market = undefined; - if (symbol !== undefined) - market = this.market (symbol); - result = this.parseOrder (response, market); - this.orders[result['id']] = result; - } - return result; - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - let response = undefined; - try { - response = await this.privatePostCancelOrder (this.extend ({ - 'orderNumber': id, - }, params)); - } catch (e) { - if (e instanceof CancelPending) { - // A request to cancel the order has been sent already. - // If we then attempt to cancel the order the second time - // before the first request is processed the exchange will - // throw a CancelPending exception. Poloniex won't show the - // order in the list of active (open) orders and the cached - // order will be marked as 'closed' (see #1801 for details). - // To avoid that we proactively mark the order as 'canceled' - // here. If for some reason the order does not get canceled - // and still appears in the active list then the order cache - // will eventually get back in sync on a call to `fetchOrder`. - if (id in this.orders) - this.orders[id]['status'] = 'canceled'; - } - throw e; - } - if (id in this.orders) - this.orders[id]['status'] = 'canceled'; - return response; - } - - async fetchOrderStatus (id, symbol = undefined) { - await this.loadMarkets (); - let orders = await this.fetchOpenOrders (symbol); - let indexed = this.indexBy (orders, 'id'); - return (id in indexed) ? 'open' : 'closed'; - } - - async fetchOrderTrades (id, symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let trades = await this.privatePostReturnOrderTrades (this.extend ({ - 'orderNumber': id, - }, params)); - return this.parseTrades (trades); - } - - async createDepositAddress (code, params = {}) { - await this.loadMarkets (); - let currency = this.currency (code); - let response = await this.privatePostGenerateNewAddress ({ - 'currency': currency['id'], - }); - let address = undefined; - if (response['success'] === 1) - address = this.safeString (response, 'response'); - this.checkAddress (address); - return { - 'currency': code, - 'address': address, - 'tag': undefined, - 'info': response, - }; - } - - async fetchDepositAddress (code, params = {}) { - await this.loadMarkets (); - let currency = this.currency (code); - let response = await this.privatePostReturnDepositAddresses (); - let currencyId = currency['id']; - let address = this.safeString (response, currencyId); - this.checkAddress (address); - return { - 'currency': code, - 'address': address, - 'tag': undefined, - 'info': response, - }; - } - - async withdraw (code, amount, address, tag = undefined, params = {}) { - this.checkAddress (address); - await this.loadMarkets (); - let currency = this.currency (code); - let request = { - 'currency': currency['id'], - 'amount': amount, - 'address': address, - }; - if (tag) - request['paymentId'] = tag; - let result = await this.privatePostWithdraw (this.extend (request, params)); - return { - 'info': result, - 'id': result['response'], - }; - } - - nonce () { - return this.milliseconds (); - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'][api]; - let query = this.extend ({ 'command': path }, params); - if (api === 'public') { - url += '?' + this.urlencode (query); - } else { - this.checkRequiredCredentials (); - query['nonce'] = this.nonce (); - body = this.urlencode (query); - headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Key': this.apiKey, - 'Sign': this.hmac (this.encode (body), this.encode (this.secret), 'sha512'), - }; - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - handleErrors (code, reason, url, method, headers, body) { - let response = undefined; - try { - response = JSON.parse (body); - } catch (e) { - // syntax error, resort to default error handler - return; - } - // {"error":"Permission denied."} - if ('error' in response) { - const message = response['error']; - const feedback = this.id + ' ' + this.json (response); - let exact = this.exceptions['exact']; - if (message in exact) { - throw new exact[message] (feedback); - } - const broad = this.exceptions['broad']; - const broadKey = this.findBroadlyMatchedKey (broad, message); - if (broadKey !== undefined) { - throw new broad[broadKey] (feedback); - } - throw new ExchangeError (feedback); // unknown message - } - } -}; - -},{"./base/Exchange":9,"./base/errors":11}],127:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { InvalidNonce, OrderNotFound, InvalidOrder, InsufficientFunds, AuthenticationError } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class qryptos extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'qryptos', - 'name': 'QRYPTOS', - 'countries': [ 'CN', 'TW' ], - 'version': '2', - 'rateLimit': 1000, - 'has': { - 'CORS': false, - 'fetchTickers': true, - 'fetchOrder': true, - 'fetchOrders': true, - 'fetchOpenOrders': true, - 'fetchClosedOrders': true, - 'fetchMyTrades': true, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg', - 'api': 'https://api.qryptos.com', - 'www': 'https://www.qryptos.com', - 'doc': [ - 'https://developers.quoine.com', - 'https://developers.quoine.com/v2', - ], - 'fees': 'https://qryptos.zendesk.com/hc/en-us/articles/115007858167-Fees', - }, - 'api': { - 'public': { - 'get': [ - 'products', - 'products/{id}', - 'products/{id}/price_levels', - 'executions', - 'ir_ladders/{currency}', - ], - }, - 'private': { - 'get': [ - 'accounts/balance', - 'accounts/main_asset', - 'crypto_accounts', - 'executions/me', - 'fiat_accounts', - 'loan_bids', - 'loans', - 'orders', - 'orders/{id}', - 'orders/{id}/trades', - 'orders/{id}/executions', - 'trades', - 'trades/{id}/loans', - 'trading_accounts', - 'trading_accounts/{id}', - ], - 'post': [ - 'fiat_accounts', - 'loan_bids', - 'orders', - ], - 'put': [ - 'loan_bids/{id}/close', - 'loans/{id}', - 'orders/{id}', - 'orders/{id}/cancel', - 'trades/{id}', - 'trades/{id}/close', - 'trades/close_all', - 'trading_accounts/{id}', - ], - }, - }, - 'skipJsonOnStatusCodes': [401], - 'exceptions': { - 'messages': { - 'API Authentication failed': AuthenticationError, - 'Nonce is too small': InvalidNonce, - 'Order not found': OrderNotFound, - 'user': { - 'not_enough_free_balance': InsufficientFunds, - }, - 'price': { - 'must_be_positive': InvalidOrder, - }, - 'quantity': { - 'less_than_order_size': InvalidOrder, - }, - }, - }, - 'commonCurrencies': { - 'WIN': 'WCOIN', - }, - }); - } - - async fetchMarkets () { - let markets = await this.publicGetProducts (); - let result = []; - for (let p = 0; p < markets.length; p++) { - let market = markets[p]; - let id = market['id'].toString (); - let baseId = market['base_currency']; - let quoteId = market['quoted_currency']; - let base = this.commonCurrencyCode (baseId); - let quote = this.commonCurrencyCode (quoteId); - let symbol = base + '/' + quote; - let maker = this.safeFloat (market, 'maker_fee'); - let taker = this.safeFloat (market, 'taker_fee'); - let active = !market['disabled']; - let minAmount = undefined; - let minPrice = undefined; - if (base === 'BTC') { - minAmount = 0.001; - } else if (base === 'ETH') { - minAmount = 0.01; - } - if (quote === 'BTC') { - minPrice = 0.00000001; - } else if (quote === 'ETH' || quote === 'USD' || quote === 'JPY') { - minPrice = 0.00001; - } - let limits = { - 'amount': { 'min': minAmount }, - 'price': { 'min': minPrice }, - 'cost': { 'min': undefined }, - }; - if (minPrice !== undefined) - if (minAmount !== undefined) - limits['cost']['min'] = minPrice * minAmount; - let precision = { - 'amount': undefined, - 'price': undefined, - }; - if (minAmount !== undefined) - precision['amount'] = -Math.log10 (minAmount); - if (minPrice !== undefined) - precision['price'] = -Math.log10 (minPrice); - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'maker': maker, - 'taker': taker, - 'limits': limits, - 'precision': precision, - 'active': active, - 'info': market, - }); - } - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - let balances = await this.privateGetAccountsBalance (params); - let result = { 'info': balances }; - for (let b = 0; b < balances.length; b++) { - let balance = balances[b]; - let currencyId = balance['currency']; - let code = currencyId; - if (currencyId in this.currencies_by_id) { - code = this.currencies_by_id[currencyId]['code']; - } - let total = parseFloat (balance['balance']); - let account = { - 'free': total, - 'used': 0.0, - 'total': total, - }; - result[code] = account; - } - return this.parseBalance (result); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - let orderbook = await this.publicGetProductsIdPriceLevels (this.extend ({ - 'id': this.marketId (symbol), - }, params)); - return this.parseOrderBook (orderbook, undefined, 'buy_price_levels', 'sell_price_levels'); - } - - parseTicker (ticker, market = undefined) { - let timestamp = this.milliseconds (); - let last = undefined; - if ('last_traded_price' in ticker) { - if (ticker['last_traded_price']) { - let length = ticker['last_traded_price'].length; - if (length > 0) - last = this.safeFloat (ticker, 'last_traded_price'); - } - } - let symbol = undefined; - if (market === undefined) { - let marketId = this.safeString (ticker, 'id'); - if (marketId in this.markets_by_id) { - market = this.markets_by_id[marketId]; - } else { - let baseId = this.safeString (ticker, 'base_currency'); - let quoteId = this.safeString (ticker, 'quoted_currency'); - let base = this.commonCurrencyCode (baseId); - let quote = this.commonCurrencyCode (quoteId); - if (symbol in this.markets) { - market = this.markets[symbol]; - } else { - symbol = base + '/' + quote; - } + result.push (order); } } - if (market !== undefined) - symbol = market['symbol']; - let change = undefined; - let percentage = undefined; - let average = undefined; - let open = this.safeFloat (ticker, 'last_price_24h'); - if (open !== undefined && last !== undefined) { - change = last - open; - average = this.sum (last, open) / 2; - if (open > 0) { - percentage = change / open * 100; - } + return this.filterBySinceLimit (result, since, limit); + } + + async fetchOrder (id, symbol = undefined, params = {}) { + let since = this.safeValue (params, 'since'); + let limit = this.safeValue (params, 'limit'); + let request = this.omit (params, [ 'since', 'limit' ]); + let orders = await this.fetchOrders (symbol, since, limit, request); + for (let i = 0; i < orders.length; i++) { + if (orders[i]['id'] === id) + return orders[i]; } - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_market_ask'), - 'low': this.safeFloat (ticker, 'low_market_bid'), - 'bid': this.safeFloat (ticker, 'market_bid'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'market_ask'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': open, - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': change, - 'percentage': percentage, - 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume_24h'), - 'quoteVolume': undefined, - 'info': ticker, - }; + throw new OrderNotCached (this.id + ' order id ' + id.toString () + ' is not in "open" state and not found in cache'); } - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - let tickers = await this.publicGetProducts (params); - let result = {}; - for (let t = 0; t < tickers.length; t++) { - let ticker = tickers[t]; - let base = ticker['base_currency']; - let quote = ticker['quoted_currency']; - let symbol = base + '/' + quote; - let market = this.markets[symbol]; - result[symbol] = this.parseTicker (ticker, market); + filterOrdersByStatus (orders, status) { + let result = []; + for (let i = 0; i < orders.length; i++) { + if (orders[i]['status'] === status) + result.push (orders[i]); } return result; } - async fetchTicker (symbol, params = {}) { - await this.loadMarkets (); - let market = this.market (symbol); - let ticker = await this.publicGetProductsId (this.extend ({ - 'id': market['id'], - }, params)); - return this.parseTicker (ticker, market); + async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + let orders = await this.fetchOrders (symbol, since, limit, params); + return this.filterOrdersByStatus (orders, 'open'); } - parseTrade (trade, market) { - // { id: 12345, - // quantity: "6.789", - // price: "98765.4321", - // taker_side: "sell", - // created_at: 1512345678, - // my_side: "buy" } - let timestamp = trade['created_at'] * 1000; - // 'taker_side' gets filled for both fetchTrades and fetchMyTrades - let takerSide = this.safeString (trade, 'taker_side'); - // 'my_side' gets filled for fetchMyTrades only and may differ from 'taker_side' - let mySide = this.safeString (trade, 'my_side'); - let side = (mySide !== undefined) ? mySide : takerSide; - let takerOrMaker = undefined; - if (mySide !== undefined) - takerOrMaker = (takerSide === mySide) ? 'taker' : 'maker'; - return { - 'info': trade, - 'id': trade['id'].toString (), - 'order': undefined, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': market['symbol'], - 'type': undefined, - 'side': side, - 'takerOrMaker': takerOrMaker, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'quantity'), - }; + async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + let orders = await this.fetchOrders (symbol, since, limit, params); + return this.filterOrdersByStatus (orders, 'closed'); } - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { + async createOrder (symbol, type, side, amount, price = undefined, params = {}) { + if (type === 'market') + throw new ExchangeError (this.id + ' allows limit orders only'); await this.loadMarkets (); + let method = 'privatePost' + this.capitalize (side); let market = this.market (symbol); let request = { - 'product_id': market['id'], + 'currencyPair': market['id'], + 'rate': this.priceToPrecision (symbol, price), + 'amount': this.amountToPrecision (symbol, amount), }; - if (limit !== undefined) - request['limit'] = limit; - if (since !== undefined) { - // timestamp should be in seconds, whereas we use milliseconds in since and everywhere - request['timestamp'] = parseInt (since / 1000); - } - let response = await this.publicGetExecutions (this.extend (request, params)); - let result = (since !== undefined) ? response : response['models']; - return this.parseTrades (result, market, since, limit); + let response = await this[method] (this.extend (request, params)); + let timestamp = this.milliseconds (); + let order = this.parseOrder (this.extend ({ + 'timestamp': timestamp, + 'status': 'open', + 'type': type, + 'side': side, + 'price': price, + 'amount': amount, + }, response), market); + let id = order['id']; + this.orders[id] = order; + return this.extend ({ 'info': response }, order); } - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { + async editOrder (id, symbol, type, side, amount, price = undefined, params = {}) { await this.loadMarkets (); - let market = this.market (symbol); + price = parseFloat (price); let request = { - 'product_id': market['id'], - }; - if (limit !== undefined) - request['limit'] = limit; - let response = await this.privateGetExecutionsMe (this.extend (request, params)); - return this.parseTrades (response['models'], market, since, limit); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - let order = { - 'order_type': type, - 'product_id': this.marketId (symbol), - 'side': side, - 'quantity': amount, + 'orderNumber': id, + 'rate': this.priceToPrecision (symbol, price), }; - if (type === 'limit') - order['price'] = price; - let response = await this.privatePostOrders (this.extend (order, params)); - return this.parseOrder (response); + if (amount !== undefined) { + request['amount'] = this.amountToPrecision (symbol, amount); + } + let response = await this.privatePostMoveOrder (this.extend (request, params)); + let result = undefined; + if (id in this.orders) { + this.orders[id]['status'] = 'canceled'; + let newid = response['orderNumber']; + this.orders[newid] = this.extend (this.orders[id], { + 'id': newid, + 'price': price, + 'status': 'open', + }); + if (amount !== undefined) + this.orders[newid]['amount'] = amount; + result = this.extend (this.orders[newid], { 'info': response }); + } else { + let market = undefined; + if (symbol !== undefined) + market = this.market (symbol); + result = this.parseOrder (response, market); + this.orders[result['id']] = result; + } + return result; } async cancelOrder (id, symbol = undefined, params = {}) { await this.loadMarkets (); - let result = await this.privatePutOrdersIdCancel (this.extend ({ - 'id': id, - }, params)); - let order = this.parseOrder (result); - if (order['status'] === 'closed') - throw new OrderNotFound (this.id + ' ' + this.json (order)); - return order; - } - - parseOrder (order, market = undefined) { - let timestamp = order['created_at'] * 1000; - let marketId = this.safeString (order, 'product_id'); - if (marketId !== undefined) { - if (marketId in this.markets_by_id) - market = this.markets_by_id[marketId]; - } - let status = undefined; - if ('status' in order) { - if (order['status'] === 'live') { - status = 'open'; - } else if (order['status'] === 'filled') { - status = 'closed'; - } else if (order['status'] === 'cancelled') { // 'll' intended - status = 'canceled'; + let response = undefined; + try { + response = await this.privatePostCancelOrder (this.extend ({ + 'orderNumber': id, + }, params)); + } catch (e) { + if (e instanceof CancelPending) { + // A request to cancel the order has been sent already. + // If we then attempt to cancel the order the second time + // before the first request is processed the exchange will + // throw a CancelPending exception. Poloniex won't show the + // order in the list of active (open) orders and the cached + // order will be marked as 'closed' (see #1801 for details). + // To avoid that we proactively mark the order as 'canceled' + // here. If for some reason the order does not get canceled + // and still appears in the active list then the order cache + // will eventually get back in sync on a call to `fetchOrder`. + if (id in this.orders) + this.orders[id]['status'] = 'canceled'; } + throw e; } - let amount = this.safeFloat (order, 'quantity'); - let filled = this.safeFloat (order, 'filled_quantity'); - let price = this.safeFloat (order, 'price'); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - return { - 'id': order['id'].toString (), - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': undefined, - 'type': order['order_type'], - 'status': status, - 'symbol': symbol, - 'side': order['side'], - 'price': price, - 'amount': amount, - 'filled': filled, - 'remaining': amount - filled, - 'trades': undefined, - 'fee': { - 'currency': undefined, - 'cost': this.safeFloat (order, 'order_fee'), - }, - 'info': order, - }; + if (id in this.orders) + this.orders[id]['status'] = 'canceled'; + return response; } - async fetchOrder (id, symbol = undefined, params = {}) { + async fetchOrderStatus (id, symbol = undefined) { await this.loadMarkets (); - let order = await this.privateGetOrdersId (this.extend ({ - 'id': id, + let orders = await this.fetchOpenOrders (symbol); + let indexed = this.indexBy (orders, 'id'); + return (id in indexed) ? 'open' : 'closed'; + } + + async fetchOrderTrades (id, symbol = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + let trades = await this.privatePostReturnOrderTrades (this.extend ({ + 'orderNumber': id, }, params)); - return this.parseOrder (order); + return this.parseTrades (trades); } - async fetchOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + async createDepositAddress (code, params = {}) { await this.loadMarkets (); - let market = undefined; - let request = {}; - if (symbol !== undefined) { - market = this.market (symbol); - request['product_id'] = market['id']; - } - let status = this.safeValue (params, 'status'); - if (status) { - params = this.omit (params, 'status'); - if (status === 'open') { - request['status'] = 'live'; - } else if (status === 'closed') { - request['status'] = 'filled'; - } else if (status === 'canceled') { - request['status'] = 'cancelled'; - } - } - if (limit !== undefined) - request['limit'] = limit; - let result = await this.privateGetOrders (this.extend (request, params)); - let orders = result['models']; - return this.parseOrders (orders, market, since, limit); + let currency = this.currency (code); + let response = await this.privatePostGenerateNewAddress ({ + 'currency': currency['id'], + }); + let address = undefined; + if (response['success'] === 1) + address = this.safeString (response, 'response'); + this.checkAddress (address); + return { + 'currency': code, + 'address': address, + 'tag': undefined, + 'info': response, + }; } - fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - return this.fetchOrders (symbol, since, limit, this.extend ({ 'status': 'open' }, params)); + async fetchDepositAddress (code, params = {}) { + await this.loadMarkets (); + let currency = this.currency (code); + let response = await this.privatePostReturnDepositAddresses (); + let currencyId = currency['id']; + let address = this.safeString (response, currencyId); + this.checkAddress (address); + return { + 'currency': code, + 'address': address, + 'tag': undefined, + 'info': response, + }; } - fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - return this.fetchOrders (symbol, since, limit, this.extend ({ 'status': 'closed' }, params)); + async withdraw (code, amount, address, tag = undefined, params = {}) { + this.checkAddress (address); + await this.loadMarkets (); + let currency = this.currency (code); + let request = { + 'currency': currency['id'], + 'amount': amount, + 'address': address, + }; + if (tag) + request['paymentId'] = tag; + let result = await this.privatePostWithdraw (this.extend (request, params)); + return { + 'info': result, + 'id': result['response'], + }; } nonce () { @@ -50215,77 +50246,45 @@ module.exports = class qryptos extends Exchange { } sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = '/' + this.implodeParams (path, params); - let query = this.omit (params, this.extractParams (path)); - headers = { - 'X-Quoine-API-Version': this.version, - 'Content-Type': 'application/json', - }; + let url = this.urls['api'][api]; + let query = this.extend ({ 'command': path }, params); if (api === 'public') { - if (Object.keys (query).length) - url += '?' + this.urlencode (query); + url += '?' + this.urlencode (query); } else { this.checkRequiredCredentials (); - if (method === 'GET') { - if (Object.keys (query).length) - url += '?' + this.urlencode (query); - } else if (Object.keys (query).length) { - body = this.json (query); - } - let nonce = this.nonce (); - let request = { - 'path': url, - 'nonce': nonce, - 'token_id': this.apiKey, - 'iat': Math.floor (nonce / 1000), // issued at + query['nonce'] = this.nonce (); + body = this.urlencode (query); + headers = { + 'Content-Type': 'application/x-www-form-urlencoded', + 'Key': this.apiKey, + 'Sign': this.hmac (this.encode (body), this.encode (this.secret), 'sha512'), }; - headers['X-Quoine-Auth'] = this.jwt (request, this.secret); } - url = this.urls['api'] + url; return { 'url': url, 'method': method, 'body': body, 'headers': headers }; } - handleErrors (code, reason, url, method, headers, body, response = undefined) { - if (code >= 200 && code <= 299) + handleErrors (code, reason, url, method, headers, body) { + let response = undefined; + try { + response = JSON.parse (body); + } catch (e) { + // syntax error, resort to default error handler return; - const messages = this.exceptions['messages']; - if (code === 401) { - // expected non-json response - if (body in messages) - throw new messages[body] (this.id + ' ' + body); - else - return; } - if (response === undefined) - if ((body[0] === '{') || (body[0] === '[')) - response = JSON.parse (body); - else - return; - const feedback = this.id + ' ' + this.json (response); - if (code === 404) { - // { "message": "Order not found" } - const message = this.safeString (response, 'message'); - if (message in messages) - throw new messages[message] (feedback); - } else if (code === 422) { - // array of error messages is returned in 'user' or 'quantity' property of 'errors' object, e.g.: - // { "errors": { "user": ["not_enough_free_balance"] }} - // { "errors": { "quantity": ["less_than_order_size"] }} - if ('errors' in response) { - const errors = response['errors']; - const errorTypes = ['user', 'quantity', 'price']; - for (let i = 0; i < errorTypes.length; i++) { - const errorType = errorTypes[i]; - if (errorType in errors) { - const errorMessages = errors[errorType]; - for (let j = 0; j < errorMessages.length; j++) { - const message = errorMessages[j]; - if (message in messages[errorType]) - throw new messages[errorType][message] (feedback); - } - } - } + // {"error":"Permission denied."} + if ('error' in response) { + const message = response['error']; + const feedback = this.id + ' ' + this.json (response); + let exact = this.exceptions['exact']; + if (message in exact) { + throw new exact[message] (feedback); + } + const broad = this.exceptions['broad']; + const broadKey = this.findBroadlyMatchedKey (broad, message); + if (broadKey !== undefined) { + throw new broad[broadKey] (feedback); } + throw new ExchangeError (feedback); // unknown message } } }; @@ -50293,6 +50292,24 @@ module.exports = class qryptos extends Exchange { },{"./base/Exchange":9,"./base/errors":11}],128:[function(require,module,exports){ 'use strict'; +// --------------------------------------------------------------------------- + +const liquid = require ('./liquid'); + +// --------------------------------------------------------------------------- + +module.exports = class qryptos extends liquid { + describe () { + return this.deepExtend (super.describe (), { + 'id': 'qryptos', + 'name': 'QRYPTOS', + }); + } +}; + +},{"./liquid":115}],129:[function(require,module,exports){ +'use strict'; + // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); @@ -50603,42 +50620,25 @@ module.exports = class quadrigacx extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],129:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],130:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- -const qryptos = require ('./qryptos.js'); +const liquid = require ('./liquid'); // --------------------------------------------------------------------------- -module.exports = class quoinex extends qryptos { +module.exports = class quoinex extends liquid { describe () { return this.deepExtend (super.describe (), { 'id': 'quoinex', 'name': 'QUOINEX', - 'countries': [ 'JP', 'SG', 'VN' ], - 'version': '2', - 'rateLimit': 1000, - 'has': { - 'CORS': false, - 'fetchTickers': true, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg', - 'api': 'https://api.quoine.com', - 'www': 'https://quoinex.com/', - 'doc': [ - 'https://developers.quoine.com', - 'https://developers.quoine.com/v2', - ], - 'fees': 'https://news.quoinex.com/fees/', - }, }); } }; -},{"./qryptos.js":127}],130:[function(require,module,exports){ +},{"./liquid":115}],131:[function(require,module,exports){ 'use strict'; const Exchange = require ('./base/Exchange'); @@ -51410,7 +51410,7 @@ module.exports = class rightbtc extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],131:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],132:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -51746,7 +51746,7 @@ module.exports = class southxchange extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],132:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],133:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -51780,7 +51780,7 @@ module.exports = class surbitcoin extends foxbit { } }; -},{"./foxbit.js":90}],133:[function(require,module,exports){ +},{"./foxbit.js":90}],134:[function(require,module,exports){ 'use strict'; const Exchange = require ('./base/Exchange'); @@ -52979,7 +52979,7 @@ module.exports = class theocean extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],134:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],135:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -53323,7 +53323,7 @@ module.exports = class therock extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],135:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],136:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -53750,7 +53750,7 @@ module.exports = class tidebit extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],136:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],137:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -53917,7 +53917,7 @@ module.exports = class tidex extends liqui { } }; -},{"./liqui.js":114}],137:[function(require,module,exports){ +},{"./liqui.js":114}],138:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -54896,7 +54896,7 @@ module.exports = class uex extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],138:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],139:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -54930,7 +54930,7 @@ module.exports = class urdubit extends foxbit { } }; -},{"./foxbit.js":90}],139:[function(require,module,exports){ +},{"./foxbit.js":90}],140:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -55149,7 +55149,7 @@ module.exports = class vaultoro extends Exchange { } }; -},{"./base/Exchange":9}],140:[function(require,module,exports){ +},{"./base/Exchange":9}],141:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -55183,7 +55183,7 @@ module.exports = class vbtc extends foxbit { } }; -},{"./foxbit.js":90}],141:[function(require,module,exports){ +},{"./foxbit.js":90}],142:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -55476,7 +55476,7 @@ module.exports = class virwox extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],142:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],143:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -55643,7 +55643,7 @@ module.exports = class wex extends liqui { } }; -},{"./base/errors":11,"./liqui.js":114}],143:[function(require,module,exports){ +},{"./base/errors":11,"./liqui.js":114}],144:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -55988,7 +55988,7 @@ module.exports = class xbtce extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],144:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],145:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -56243,7 +56243,7 @@ module.exports = class yobit extends liqui { } }; -},{"./base/errors":11,"./liqui.js":114}],145:[function(require,module,exports){ +},{"./base/errors":11,"./liqui.js":114}],146:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -56326,7 +56326,7 @@ module.exports = class yunbi extends acx { } }; -},{"./acx.js":5}],146:[function(require,module,exports){ +},{"./acx.js":5}],147:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -56757,7 +56757,7 @@ module.exports = class zaif extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],147:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],148:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -57379,10 +57379,10 @@ module.exports = class zb extends Exchange { } }; -},{"./base/Exchange":9,"./base/errors":11}],148:[function(require,module,exports){ +},{"./base/Exchange":9,"./base/errors":11}],149:[function(require,module,exports){ module.exports = require('./register')().Promise -},{"./register":150}],149:[function(require,module,exports){ +},{"./register":151}],150:[function(require,module,exports){ "use strict" // global key for user preferred registration var REGISTRATION_KEY = '@@any-promise/REGISTRATION', @@ -57462,7 +57462,7 @@ module.exports = function(root, loadImplementation){ } } -},{}],150:[function(require,module,exports){ +},{}],151:[function(require,module,exports){ "use strict"; module.exports = require('./loader')(window, loadImplementation) @@ -57482,7 +57482,7 @@ function loadImplementation(){ } } -},{"./loader":149}],151:[function(require,module,exports){ +},{"./loader":150}],152:[function(require,module,exports){ var asn1 = exports; asn1.bignum = require('bn.js'); @@ -57493,7 +57493,7 @@ asn1.constants = require('./asn1/constants'); asn1.decoders = require('./asn1/decoders'); asn1.encoders = require('./asn1/encoders'); -},{"./asn1/api":152,"./asn1/base":154,"./asn1/constants":158,"./asn1/decoders":160,"./asn1/encoders":163,"bn.js":172}],152:[function(require,module,exports){ +},{"./asn1/api":153,"./asn1/base":155,"./asn1/constants":159,"./asn1/decoders":161,"./asn1/encoders":164,"bn.js":173}],153:[function(require,module,exports){ var asn1 = require('../asn1'); var inherits = require('inherits'); @@ -57556,7 +57556,7 @@ Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) { return this._getEncoder(enc).encode(data, reporter); }; -},{"../asn1":151,"inherits":308,"vm":412}],153:[function(require,module,exports){ +},{"../asn1":152,"inherits":309,"vm":413}],154:[function(require,module,exports){ var inherits = require('inherits'); var Reporter = require('../base').Reporter; var Buffer = require('buffer').Buffer; @@ -57674,7 +57674,7 @@ EncoderBuffer.prototype.join = function join(out, offset) { return out; }; -},{"../base":154,"buffer":206,"inherits":308}],154:[function(require,module,exports){ +},{"../base":155,"buffer":207,"inherits":309}],155:[function(require,module,exports){ var base = exports; base.Reporter = require('./reporter').Reporter; @@ -57682,7 +57682,7 @@ base.DecoderBuffer = require('./buffer').DecoderBuffer; base.EncoderBuffer = require('./buffer').EncoderBuffer; base.Node = require('./node'); -},{"./buffer":153,"./node":155,"./reporter":156}],155:[function(require,module,exports){ +},{"./buffer":154,"./node":156,"./reporter":157}],156:[function(require,module,exports){ var Reporter = require('../base').Reporter; var EncoderBuffer = require('../base').EncoderBuffer; var DecoderBuffer = require('../base').DecoderBuffer; @@ -58318,7 +58318,7 @@ Node.prototype._isPrintstr = function isPrintstr(str) { return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str); }; -},{"../base":154,"minimalistic-assert":324}],156:[function(require,module,exports){ +},{"../base":155,"minimalistic-assert":325}],157:[function(require,module,exports){ var inherits = require('inherits'); function Reporter(options) { @@ -58441,7 +58441,7 @@ ReporterError.prototype.rethrow = function rethrow(msg) { return this; }; -},{"inherits":308}],157:[function(require,module,exports){ +},{"inherits":309}],158:[function(require,module,exports){ var constants = require('../constants'); exports.tagClass = { @@ -58485,7 +58485,7 @@ exports.tag = { }; exports.tagByName = constants._reverse(exports.tag); -},{"../constants":158}],158:[function(require,module,exports){ +},{"../constants":159}],159:[function(require,module,exports){ var constants = exports; // Helper @@ -58506,7 +58506,7 @@ constants._reverse = function reverse(map) { constants.der = require('./der'); -},{"./der":157}],159:[function(require,module,exports){ +},{"./der":158}],160:[function(require,module,exports){ var inherits = require('inherits'); var asn1 = require('../../asn1'); @@ -58832,13 +58832,13 @@ function derDecodeLen(buf, primitive, fail) { return len; } -},{"../../asn1":151,"inherits":308}],160:[function(require,module,exports){ +},{"../../asn1":152,"inherits":309}],161:[function(require,module,exports){ var decoders = exports; decoders.der = require('./der'); decoders.pem = require('./pem'); -},{"./der":159,"./pem":161}],161:[function(require,module,exports){ +},{"./der":160,"./pem":162}],162:[function(require,module,exports){ var inherits = require('inherits'); var Buffer = require('buffer').Buffer; @@ -58889,7 +58889,7 @@ PEMDecoder.prototype.decode = function decode(data, options) { return DERDecoder.prototype.decode.call(this, input, options); }; -},{"./der":159,"buffer":206,"inherits":308}],162:[function(require,module,exports){ +},{"./der":160,"buffer":207,"inherits":309}],163:[function(require,module,exports){ var inherits = require('inherits'); var Buffer = require('buffer').Buffer; @@ -59186,13 +59186,13 @@ function encodeTag(tag, primitive, cls, reporter) { return res; } -},{"../../asn1":151,"buffer":206,"inherits":308}],163:[function(require,module,exports){ +},{"../../asn1":152,"buffer":207,"inherits":309}],164:[function(require,module,exports){ var encoders = exports; encoders.der = require('./der'); encoders.pem = require('./pem'); -},{"./der":162,"./pem":164}],164:[function(require,module,exports){ +},{"./der":163,"./pem":165}],165:[function(require,module,exports){ var inherits = require('inherits'); var DEREncoder = require('./der'); @@ -59215,7 +59215,7 @@ PEMEncoder.prototype.encode = function encode(data, options) { return out.join('\n'); }; -},{"./der":162,"inherits":308}],165:[function(require,module,exports){ +},{"./der":163,"inherits":309}],166:[function(require,module,exports){ (function (global){ 'use strict'; @@ -59709,7 +59709,7 @@ var objectKeys = Object.keys || function (obj) { }; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"util/":168}],166:[function(require,module,exports){ +},{"util/":169}],167:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -59734,14 +59734,14 @@ if (typeof Object.create === 'function') { } } -},{}],167:[function(require,module,exports){ +},{}],168:[function(require,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } -},{}],168:[function(require,module,exports){ +},{}],169:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -60331,7 +60331,7 @@ function hasOwnProperty(obj, prop) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":167,"_process":203,"inherits":166}],169:[function(require,module,exports){ +},{"./support/isBuffer":168,"_process":204,"inherits":167}],170:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -60484,7 +60484,7 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],170:[function(require,module,exports){ +},{}],171:[function(require,module,exports){ ;(function (globalObject) { 'use strict'; @@ -63300,7 +63300,7 @@ function fromByteArray (uint8) { } })(this); -},{}],171:[function(require,module,exports){ +},{}],172:[function(require,module,exports){ // Reference https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki // Format: 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S] // NOTE: SIGHASH byte ignored AND restricted, truncate before use @@ -63415,7 +63415,7 @@ module.exports = { encode: encode } -},{"safe-buffer":378}],172:[function(require,module,exports){ +},{"safe-buffer":379}],173:[function(require,module,exports){ (function (module, exports) { 'use strict'; @@ -66844,7 +66844,7 @@ module.exports = { }; })(typeof module === 'undefined' || module, this); -},{"buffer":174}],173:[function(require,module,exports){ +},{"buffer":175}],174:[function(require,module,exports){ var r; module.exports = function rand(len) { @@ -66911,9 +66911,9 @@ if (typeof self === 'object') { } } -},{"crypto":174}],174:[function(require,module,exports){ +},{"crypto":175}],175:[function(require,module,exports){ -},{}],175:[function(require,module,exports){ +},{}],176:[function(require,module,exports){ // based on the aes implimentation in triple sec // https://github.com/keybase/triplesec // which is in turn based on the one from crypto-js @@ -67143,7 +67143,7 @@ AES.prototype.scrub = function () { module.exports.AES = AES -},{"safe-buffer":378}],176:[function(require,module,exports){ +},{"safe-buffer":379}],177:[function(require,module,exports){ var aes = require('./aes') var Buffer = require('safe-buffer').Buffer var Transform = require('cipher-base') @@ -67262,7 +67262,7 @@ StreamCipher.prototype.setAAD = function setAAD (buf) { module.exports = StreamCipher -},{"./aes":175,"./ghash":180,"./incr32":181,"buffer-xor":205,"cipher-base":207,"inherits":308,"safe-buffer":378}],177:[function(require,module,exports){ +},{"./aes":176,"./ghash":181,"./incr32":182,"buffer-xor":206,"cipher-base":208,"inherits":309,"safe-buffer":379}],178:[function(require,module,exports){ var ciphers = require('./encrypter') var deciphers = require('./decrypter') var modes = require('./modes/list.json') @@ -67277,7 +67277,7 @@ exports.createDecipher = exports.Decipher = deciphers.createDecipher exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv exports.listCiphers = exports.getCiphers = getCiphers -},{"./decrypter":178,"./encrypter":179,"./modes/list.json":189}],178:[function(require,module,exports){ +},{"./decrypter":179,"./encrypter":180,"./modes/list.json":190}],179:[function(require,module,exports){ var AuthCipher = require('./authCipher') var Buffer = require('safe-buffer').Buffer var MODES = require('./modes') @@ -67403,7 +67403,7 @@ function createDecipher (suite, password) { exports.createDecipher = createDecipher exports.createDecipheriv = createDecipheriv -},{"./aes":175,"./authCipher":176,"./modes":188,"./streamCipher":191,"cipher-base":207,"evp_bytestokey":288,"inherits":308,"safe-buffer":378}],179:[function(require,module,exports){ +},{"./aes":176,"./authCipher":177,"./modes":189,"./streamCipher":192,"cipher-base":208,"evp_bytestokey":289,"inherits":309,"safe-buffer":379}],180:[function(require,module,exports){ var MODES = require('./modes') var AuthCipher = require('./authCipher') var Buffer = require('safe-buffer').Buffer @@ -67519,7 +67519,7 @@ function createCipher (suite, password) { exports.createCipheriv = createCipheriv exports.createCipher = createCipher -},{"./aes":175,"./authCipher":176,"./modes":188,"./streamCipher":191,"cipher-base":207,"evp_bytestokey":288,"inherits":308,"safe-buffer":378}],180:[function(require,module,exports){ +},{"./aes":176,"./authCipher":177,"./modes":189,"./streamCipher":192,"cipher-base":208,"evp_bytestokey":289,"inherits":309,"safe-buffer":379}],181:[function(require,module,exports){ var Buffer = require('safe-buffer').Buffer var ZEROES = Buffer.alloc(16, 0) @@ -67610,7 +67610,7 @@ GHASH.prototype.final = function (abl, bl) { module.exports = GHASH -},{"safe-buffer":378}],181:[function(require,module,exports){ +},{"safe-buffer":379}],182:[function(require,module,exports){ function incr32 (iv) { var len = iv.length var item @@ -67627,7 +67627,7 @@ function incr32 (iv) { } module.exports = incr32 -},{}],182:[function(require,module,exports){ +},{}],183:[function(require,module,exports){ var xor = require('buffer-xor') exports.encrypt = function (self, block) { @@ -67646,7 +67646,7 @@ exports.decrypt = function (self, block) { return xor(out, pad) } -},{"buffer-xor":205}],183:[function(require,module,exports){ +},{"buffer-xor":206}],184:[function(require,module,exports){ var Buffer = require('safe-buffer').Buffer var xor = require('buffer-xor') @@ -67681,7 +67681,7 @@ exports.encrypt = function (self, data, decrypt) { return out } -},{"buffer-xor":205,"safe-buffer":378}],184:[function(require,module,exports){ +},{"buffer-xor":206,"safe-buffer":379}],185:[function(require,module,exports){ var Buffer = require('safe-buffer').Buffer function encryptByte (self, byteParam, decrypt) { @@ -67725,7 +67725,7 @@ exports.encrypt = function (self, chunk, decrypt) { return out } -},{"safe-buffer":378}],185:[function(require,module,exports){ +},{"safe-buffer":379}],186:[function(require,module,exports){ var Buffer = require('safe-buffer').Buffer function encryptByte (self, byteParam, decrypt) { @@ -67752,7 +67752,7 @@ exports.encrypt = function (self, chunk, decrypt) { return out } -},{"safe-buffer":378}],186:[function(require,module,exports){ +},{"safe-buffer":379}],187:[function(require,module,exports){ var xor = require('buffer-xor') var Buffer = require('safe-buffer').Buffer var incr32 = require('../incr32') @@ -67784,7 +67784,7 @@ exports.encrypt = function (self, chunk) { return xor(chunk, pad) } -},{"../incr32":181,"buffer-xor":205,"safe-buffer":378}],187:[function(require,module,exports){ +},{"../incr32":182,"buffer-xor":206,"safe-buffer":379}],188:[function(require,module,exports){ exports.encrypt = function (self, block) { return self._cipher.encryptBlock(block) } @@ -67793,7 +67793,7 @@ exports.decrypt = function (self, block) { return self._cipher.decryptBlock(block) } -},{}],188:[function(require,module,exports){ +},{}],189:[function(require,module,exports){ var modeModules = { ECB: require('./ecb'), CBC: require('./cbc'), @@ -67813,7 +67813,7 @@ for (var key in modes) { module.exports = modes -},{"./cbc":182,"./cfb":183,"./cfb1":184,"./cfb8":185,"./ctr":186,"./ecb":187,"./list.json":189,"./ofb":190}],189:[function(require,module,exports){ +},{"./cbc":183,"./cfb":184,"./cfb1":185,"./cfb8":186,"./ctr":187,"./ecb":188,"./list.json":190,"./ofb":191}],190:[function(require,module,exports){ module.exports={ "aes-128-ecb": { "cipher": "AES", @@ -68006,7 +68006,7 @@ module.exports={ } } -},{}],190:[function(require,module,exports){ +},{}],191:[function(require,module,exports){ (function (Buffer){ var xor = require('buffer-xor') @@ -68026,7 +68026,7 @@ exports.encrypt = function (self, chunk) { } }).call(this,require("buffer").Buffer) -},{"buffer":206,"buffer-xor":205}],191:[function(require,module,exports){ +},{"buffer":207,"buffer-xor":206}],192:[function(require,module,exports){ var aes = require('./aes') var Buffer = require('safe-buffer').Buffer var Transform = require('cipher-base') @@ -68055,7 +68055,7 @@ StreamCipher.prototype._final = function () { module.exports = StreamCipher -},{"./aes":175,"cipher-base":207,"inherits":308,"safe-buffer":378}],192:[function(require,module,exports){ +},{"./aes":176,"cipher-base":208,"inherits":309,"safe-buffer":379}],193:[function(require,module,exports){ var DES = require('browserify-des') var aes = require('browserify-aes/browser') var aesModes = require('browserify-aes/modes') @@ -68124,7 +68124,7 @@ exports.createDecipher = exports.Decipher = createDecipher exports.createDecipheriv = exports.Decipheriv = createDecipheriv exports.listCiphers = exports.getCiphers = getCiphers -},{"browserify-aes/browser":177,"browserify-aes/modes":188,"browserify-des":193,"browserify-des/modes":194,"evp_bytestokey":288}],193:[function(require,module,exports){ +},{"browserify-aes/browser":178,"browserify-aes/modes":189,"browserify-des":194,"browserify-des/modes":195,"evp_bytestokey":289}],194:[function(require,module,exports){ var CipherBase = require('cipher-base') var des = require('des.js') var inherits = require('inherits') @@ -68176,7 +68176,7 @@ DES.prototype._final = function () { return Buffer.from(this._des.final()) } -},{"cipher-base":207,"des.js":250,"inherits":308,"safe-buffer":378}],194:[function(require,module,exports){ +},{"cipher-base":208,"des.js":251,"inherits":309,"safe-buffer":379}],195:[function(require,module,exports){ exports['des-ecb'] = { key: 8, iv: 0 @@ -68202,7 +68202,7 @@ exports['des-ede'] = { iv: 0 } -},{}],195:[function(require,module,exports){ +},{}],196:[function(require,module,exports){ (function (Buffer){ var bn = require('bn.js'); var randomBytes = require('randombytes'); @@ -68246,7 +68246,7 @@ function getr(priv) { } }).call(this,require("buffer").Buffer) -},{"bn.js":172,"buffer":206,"randombytes":358}],196:[function(require,module,exports){ +},{"bn.js":173,"buffer":207,"randombytes":359}],197:[function(require,module,exports){ (function (Buffer){ const Sha3 = require('js-sha3') @@ -68284,10 +68284,10 @@ module.exports = { } }).call(this,require("buffer").Buffer) -},{"buffer":206,"js-sha3":314}],197:[function(require,module,exports){ +},{"buffer":207,"js-sha3":315}],198:[function(require,module,exports){ module.exports = require('./browser/algorithms.json') -},{"./browser/algorithms.json":198}],198:[function(require,module,exports){ +},{"./browser/algorithms.json":199}],199:[function(require,module,exports){ module.exports={ "sha224WithRSAEncryption": { "sign": "rsa", @@ -68441,7 +68441,7 @@ module.exports={ } } -},{}],199:[function(require,module,exports){ +},{}],200:[function(require,module,exports){ module.exports={ "1.3.132.0.10": "secp256k1", "1.3.132.0.33": "p224", @@ -68451,7 +68451,7 @@ module.exports={ "1.3.132.0.35": "p521" } -},{}],200:[function(require,module,exports){ +},{}],201:[function(require,module,exports){ (function (Buffer){ var createHash = require('create-hash') var stream = require('stream') @@ -68546,7 +68546,7 @@ module.exports = { } }).call(this,require("buffer").Buffer) -},{"./algorithms.json":198,"./sign":201,"./verify":202,"buffer":206,"create-hash":210,"inherits":308,"stream":395}],201:[function(require,module,exports){ +},{"./algorithms.json":199,"./sign":202,"./verify":203,"buffer":207,"create-hash":211,"inherits":309,"stream":396}],202:[function(require,module,exports){ (function (Buffer){ // much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js var createHmac = require('create-hmac') @@ -68695,7 +68695,7 @@ module.exports.getKey = getKey module.exports.makeKey = makeKey }).call(this,require("buffer").Buffer) -},{"./curves.json":199,"bn.js":172,"browserify-rsa":195,"buffer":206,"create-hmac":212,"elliptic":260,"parse-asn1":334}],202:[function(require,module,exports){ +},{"./curves.json":200,"bn.js":173,"browserify-rsa":196,"buffer":207,"create-hmac":213,"elliptic":261,"parse-asn1":335}],203:[function(require,module,exports){ (function (Buffer){ // much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js var BN = require('bn.js') @@ -68782,7 +68782,7 @@ function checkValue (b, q) { module.exports = verify }).call(this,require("buffer").Buffer) -},{"./curves.json":199,"bn.js":172,"buffer":206,"elliptic":260,"parse-asn1":334}],203:[function(require,module,exports){ +},{"./curves.json":200,"bn.js":173,"buffer":207,"elliptic":261,"parse-asn1":335}],204:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -68968,7 +68968,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],204:[function(require,module,exports){ +},{}],205:[function(require,module,exports){ 'use strict'; var Buffer = require('safe-buffer').Buffer; @@ -69241,7 +69241,7 @@ function simpleWrite(buf) { function simpleEnd(buf) { return buf && buf.length ? this.write(buf) : ''; } -},{"safe-buffer":378}],205:[function(require,module,exports){ +},{"safe-buffer":379}],206:[function(require,module,exports){ (function (Buffer){ module.exports = function xor (a, b) { var length = Math.min(a.length, b.length) @@ -69255,7 +69255,7 @@ module.exports = function xor (a, b) { } }).call(this,require("buffer").Buffer) -},{"buffer":206}],206:[function(require,module,exports){ +},{"buffer":207}],207:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -71034,7 +71034,7 @@ function numberIsNaN (obj) { return obj !== obj // eslint-disable-line no-self-compare } -},{"base64-js":169,"ieee754":306}],207:[function(require,module,exports){ +},{"base64-js":170,"ieee754":307}],208:[function(require,module,exports){ var Buffer = require('safe-buffer').Buffer var Transform = require('stream').Transform var StringDecoder = require('string_decoder').StringDecoder @@ -71135,7 +71135,7 @@ CipherBase.prototype._toString = function (value, enc, fin) { module.exports = CipherBase -},{"inherits":308,"safe-buffer":378,"stream":395,"string_decoder":204}],208:[function(require,module,exports){ +},{"inherits":309,"safe-buffer":379,"stream":396,"string_decoder":205}],209:[function(require,module,exports){ (function (Buffer){ // Copyright Joyent, Inc. and other Node contributors. // @@ -71246,7 +71246,7 @@ function objectToString(o) { } }).call(this,{"isBuffer":require("../../is-buffer/index.js")}) -},{"../../is-buffer/index.js":309}],209:[function(require,module,exports){ +},{"../../is-buffer/index.js":310}],210:[function(require,module,exports){ (function (Buffer){ var elliptic = require('elliptic') var BN = require('bn.js') @@ -71374,7 +71374,7 @@ function formatReturnValue (bn, enc, len) { } }).call(this,require("buffer").Buffer) -},{"bn.js":172,"buffer":206,"elliptic":260}],210:[function(require,module,exports){ +},{"bn.js":173,"buffer":207,"elliptic":261}],211:[function(require,module,exports){ 'use strict' var inherits = require('inherits') var MD5 = require('md5.js') @@ -71406,14 +71406,14 @@ module.exports = function createHash (alg) { return new Hash(sha(alg)) } -},{"cipher-base":207,"inherits":308,"md5.js":322,"ripemd160":376,"sha.js":388}],211:[function(require,module,exports){ +},{"cipher-base":208,"inherits":309,"md5.js":323,"ripemd160":377,"sha.js":389}],212:[function(require,module,exports){ var MD5 = require('md5.js') module.exports = function (buffer) { return new MD5().update(buffer).digest() } -},{"md5.js":322}],212:[function(require,module,exports){ +},{"md5.js":323}],213:[function(require,module,exports){ 'use strict' var inherits = require('inherits') var Legacy = require('./legacy') @@ -71477,7 +71477,7 @@ module.exports = function createHmac (alg, key) { return new Hmac(alg, key) } -},{"./legacy":213,"cipher-base":207,"create-hash/md5":211,"inherits":308,"ripemd160":376,"safe-buffer":378,"sha.js":388}],213:[function(require,module,exports){ +},{"./legacy":214,"cipher-base":208,"create-hash/md5":212,"inherits":309,"ripemd160":377,"safe-buffer":379,"sha.js":389}],214:[function(require,module,exports){ 'use strict' var inherits = require('inherits') var Buffer = require('safe-buffer').Buffer @@ -71525,7 +71525,7 @@ Hmac.prototype._final = function () { } module.exports = Hmac -},{"cipher-base":207,"inherits":308,"safe-buffer":378}],214:[function(require,module,exports){ +},{"cipher-base":208,"inherits":309,"safe-buffer":379}],215:[function(require,module,exports){ 'use strict' exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes') @@ -71624,7 +71624,7 @@ exports.constants = { 'POINT_CONVERSION_HYBRID': 6 } -},{"browserify-cipher":192,"browserify-sign":200,"browserify-sign/algos":197,"create-ecdh":209,"create-hash":210,"create-hmac":212,"diffie-hellman":256,"pbkdf2":336,"public-encrypt":342,"randombytes":358,"randomfill":359}],215:[function(require,module,exports){ +},{"browserify-cipher":193,"browserify-sign":201,"browserify-sign/algos":198,"create-ecdh":210,"create-hash":211,"create-hmac":213,"diffie-hellman":257,"pbkdf2":337,"public-encrypt":343,"randombytes":359,"randomfill":360}],216:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -71857,7 +71857,7 @@ exports.constants = { return CryptoJS.AES; })); -},{"./cipher-core":216,"./core":217,"./enc-base64":218,"./evpkdf":220,"./md5":225}],216:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218,"./enc-base64":219,"./evpkdf":221,"./md5":226}],217:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -72738,7 +72738,7 @@ exports.constants = { })); -},{"./core":217,"./evpkdf":220}],217:[function(require,module,exports){ +},{"./core":218,"./evpkdf":221}],218:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -73499,7 +73499,7 @@ exports.constants = { return CryptoJS; })); -},{}],218:[function(require,module,exports){ +},{}],219:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -73635,7 +73635,7 @@ exports.constants = { return CryptoJS.enc.Base64; })); -},{"./core":217}],219:[function(require,module,exports){ +},{"./core":218}],220:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -73785,7 +73785,7 @@ exports.constants = { return CryptoJS.enc.Utf16; })); -},{"./core":217}],220:[function(require,module,exports){ +},{"./core":218}],221:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -73918,7 +73918,7 @@ exports.constants = { return CryptoJS.EvpKDF; })); -},{"./core":217,"./hmac":222,"./sha1":241}],221:[function(require,module,exports){ +},{"./core":218,"./hmac":223,"./sha1":242}],222:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -73985,7 +73985,7 @@ exports.constants = { return CryptoJS.format.Hex; })); -},{"./cipher-core":216,"./core":217}],222:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218}],223:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -74129,7 +74129,7 @@ exports.constants = { })); -},{"./core":217}],223:[function(require,module,exports){ +},{"./core":218}],224:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -74148,7 +74148,7 @@ exports.constants = { return CryptoJS; })); -},{"./aes":215,"./cipher-core":216,"./core":217,"./enc-base64":218,"./enc-utf16":219,"./evpkdf":220,"./format-hex":221,"./hmac":222,"./lib-typedarrays":224,"./md5":225,"./mode-cfb":226,"./mode-ctr":228,"./mode-ctr-gladman":227,"./mode-ecb":229,"./mode-ofb":230,"./pad-ansix923":231,"./pad-iso10126":232,"./pad-iso97971":233,"./pad-nopadding":234,"./pad-zeropadding":235,"./pbkdf2":236,"./rabbit":238,"./rabbit-legacy":237,"./rc4":239,"./ripemd160":240,"./sha1":241,"./sha224":242,"./sha256":243,"./sha3":244,"./sha384":245,"./sha512":246,"./tripledes":247,"./x64-core":248}],224:[function(require,module,exports){ +},{"./aes":216,"./cipher-core":217,"./core":218,"./enc-base64":219,"./enc-utf16":220,"./evpkdf":221,"./format-hex":222,"./hmac":223,"./lib-typedarrays":225,"./md5":226,"./mode-cfb":227,"./mode-ctr":229,"./mode-ctr-gladman":228,"./mode-ecb":230,"./mode-ofb":231,"./pad-ansix923":232,"./pad-iso10126":233,"./pad-iso97971":234,"./pad-nopadding":235,"./pad-zeropadding":236,"./pbkdf2":237,"./rabbit":239,"./rabbit-legacy":238,"./rc4":240,"./ripemd160":241,"./sha1":242,"./sha224":243,"./sha256":244,"./sha3":245,"./sha384":246,"./sha512":247,"./tripledes":248,"./x64-core":249}],225:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -74225,7 +74225,7 @@ exports.constants = { return CryptoJS.lib.WordArray; })); -},{"./core":217}],225:[function(require,module,exports){ +},{"./core":218}],226:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -74494,7 +74494,7 @@ exports.constants = { return CryptoJS.MD5; })); -},{"./core":217}],226:[function(require,module,exports){ +},{"./core":218}],227:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -74573,7 +74573,7 @@ exports.constants = { return CryptoJS.mode.CFB; })); -},{"./cipher-core":216,"./core":217}],227:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218}],228:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -74690,7 +74690,7 @@ exports.constants = { return CryptoJS.mode.CTRGladman; })); -},{"./cipher-core":216,"./core":217}],228:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218}],229:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -74749,7 +74749,7 @@ exports.constants = { return CryptoJS.mode.CTR; })); -},{"./cipher-core":216,"./core":217}],229:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218}],230:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -74790,7 +74790,7 @@ exports.constants = { return CryptoJS.mode.ECB; })); -},{"./cipher-core":216,"./core":217}],230:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218}],231:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -74845,7 +74845,7 @@ exports.constants = { return CryptoJS.mode.OFB; })); -},{"./cipher-core":216,"./core":217}],231:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218}],232:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -74895,7 +74895,7 @@ exports.constants = { return CryptoJS.pad.Ansix923; })); -},{"./cipher-core":216,"./core":217}],232:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218}],233:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -74940,7 +74940,7 @@ exports.constants = { return CryptoJS.pad.Iso10126; })); -},{"./cipher-core":216,"./core":217}],233:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218}],234:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -74981,7 +74981,7 @@ exports.constants = { return CryptoJS.pad.Iso97971; })); -},{"./cipher-core":216,"./core":217}],234:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218}],235:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -75012,7 +75012,7 @@ exports.constants = { return CryptoJS.pad.NoPadding; })); -},{"./cipher-core":216,"./core":217}],235:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218}],236:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -75058,7 +75058,7 @@ exports.constants = { return CryptoJS.pad.ZeroPadding; })); -},{"./cipher-core":216,"./core":217}],236:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218}],237:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -75204,7 +75204,7 @@ exports.constants = { return CryptoJS.PBKDF2; })); -},{"./core":217,"./hmac":222,"./sha1":241}],237:[function(require,module,exports){ +},{"./core":218,"./hmac":223,"./sha1":242}],238:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -75395,7 +75395,7 @@ exports.constants = { return CryptoJS.RabbitLegacy; })); -},{"./cipher-core":216,"./core":217,"./enc-base64":218,"./evpkdf":220,"./md5":225}],238:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218,"./enc-base64":219,"./evpkdf":221,"./md5":226}],239:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -75588,7 +75588,7 @@ exports.constants = { return CryptoJS.Rabbit; })); -},{"./cipher-core":216,"./core":217,"./enc-base64":218,"./evpkdf":220,"./md5":225}],239:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218,"./enc-base64":219,"./evpkdf":221,"./md5":226}],240:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -75728,7 +75728,7 @@ exports.constants = { return CryptoJS.RC4; })); -},{"./cipher-core":216,"./core":217,"./enc-base64":218,"./evpkdf":220,"./md5":225}],240:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218,"./enc-base64":219,"./evpkdf":221,"./md5":226}],241:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -75996,7 +75996,7 @@ exports.constants = { return CryptoJS.RIPEMD160; })); -},{"./core":217}],241:[function(require,module,exports){ +},{"./core":218}],242:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -76147,7 +76147,7 @@ exports.constants = { return CryptoJS.SHA1; })); -},{"./core":217}],242:[function(require,module,exports){ +},{"./core":218}],243:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -76228,7 +76228,7 @@ exports.constants = { return CryptoJS.SHA224; })); -},{"./core":217,"./sha256":243}],243:[function(require,module,exports){ +},{"./core":218,"./sha256":244}],244:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -76428,7 +76428,7 @@ exports.constants = { return CryptoJS.SHA256; })); -},{"./core":217}],244:[function(require,module,exports){ +},{"./core":218}],245:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -76752,7 +76752,7 @@ exports.constants = { return CryptoJS.SHA3; })); -},{"./core":217,"./x64-core":248}],245:[function(require,module,exports){ +},{"./core":218,"./x64-core":249}],246:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -76836,7 +76836,7 @@ exports.constants = { return CryptoJS.SHA384; })); -},{"./core":217,"./sha512":246,"./x64-core":248}],246:[function(require,module,exports){ +},{"./core":218,"./sha512":247,"./x64-core":249}],247:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -77160,7 +77160,7 @@ exports.constants = { return CryptoJS.SHA512; })); -},{"./core":217,"./x64-core":248}],247:[function(require,module,exports){ +},{"./core":218,"./x64-core":249}],248:[function(require,module,exports){ ;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS @@ -77931,7 +77931,7 @@ exports.constants = { return CryptoJS.TripleDES; })); -},{"./cipher-core":216,"./core":217,"./enc-base64":218,"./evpkdf":220,"./md5":225}],248:[function(require,module,exports){ +},{"./cipher-core":217,"./core":218,"./enc-base64":219,"./evpkdf":221,"./md5":226}],249:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -78236,7 +78236,7 @@ exports.constants = { return CryptoJS; })); -},{"./core":217}],249:[function(require,module,exports){ +},{"./core":218}],250:[function(require,module,exports){ 'use strict'; var token = '%[a-f0-9]{2}'; var singleMatcher = new RegExp(token, 'gi'); @@ -78332,7 +78332,7 @@ module.exports = function (encodedURI) { } }; -},{}],250:[function(require,module,exports){ +},{}],251:[function(require,module,exports){ 'use strict'; exports.utils = require('./des/utils'); @@ -78341,7 +78341,7 @@ exports.DES = require('./des/des'); exports.CBC = require('./des/cbc'); exports.EDE = require('./des/ede'); -},{"./des/cbc":251,"./des/cipher":252,"./des/des":253,"./des/ede":254,"./des/utils":255}],251:[function(require,module,exports){ +},{"./des/cbc":252,"./des/cipher":253,"./des/des":254,"./des/ede":255,"./des/utils":256}],252:[function(require,module,exports){ 'use strict'; var assert = require('minimalistic-assert'); @@ -78408,7 +78408,7 @@ proto._update = function _update(inp, inOff, out, outOff) { } }; -},{"inherits":308,"minimalistic-assert":324}],252:[function(require,module,exports){ +},{"inherits":309,"minimalistic-assert":325}],253:[function(require,module,exports){ 'use strict'; var assert = require('minimalistic-assert'); @@ -78551,7 +78551,7 @@ Cipher.prototype._finalDecrypt = function _finalDecrypt() { return this._unpad(out); }; -},{"minimalistic-assert":324}],253:[function(require,module,exports){ +},{"minimalistic-assert":325}],254:[function(require,module,exports){ 'use strict'; var assert = require('minimalistic-assert'); @@ -78696,7 +78696,7 @@ DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) { utils.rip(l, r, out, off); }; -},{"../des":250,"inherits":308,"minimalistic-assert":324}],254:[function(require,module,exports){ +},{"../des":251,"inherits":309,"minimalistic-assert":325}],255:[function(require,module,exports){ 'use strict'; var assert = require('minimalistic-assert'); @@ -78753,7 +78753,7 @@ EDE.prototype._update = function _update(inp, inOff, out, outOff) { EDE.prototype._pad = DES.prototype._pad; EDE.prototype._unpad = DES.prototype._unpad; -},{"../des":250,"inherits":308,"minimalistic-assert":324}],255:[function(require,module,exports){ +},{"../des":251,"inherits":309,"minimalistic-assert":325}],256:[function(require,module,exports){ 'use strict'; exports.readUInt32BE = function readUInt32BE(bytes, off) { @@ -79011,7 +79011,7 @@ exports.padSplit = function padSplit(num, size, group) { return out.join(' '); }; -},{}],256:[function(require,module,exports){ +},{}],257:[function(require,module,exports){ (function (Buffer){ var generatePrime = require('./lib/generatePrime') var primes = require('./lib/primes.json') @@ -79057,7 +79057,7 @@ exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffi exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman }).call(this,require("buffer").Buffer) -},{"./lib/dh":257,"./lib/generatePrime":258,"./lib/primes.json":259,"buffer":206}],257:[function(require,module,exports){ +},{"./lib/dh":258,"./lib/generatePrime":259,"./lib/primes.json":260,"buffer":207}],258:[function(require,module,exports){ (function (Buffer){ var BN = require('bn.js'); var MillerRabin = require('miller-rabin'); @@ -79225,7 +79225,7 @@ function formatReturnValue(bn, enc) { } }).call(this,require("buffer").Buffer) -},{"./generatePrime":258,"bn.js":172,"buffer":206,"miller-rabin":323,"randombytes":358}],258:[function(require,module,exports){ +},{"./generatePrime":259,"bn.js":173,"buffer":207,"miller-rabin":324,"randombytes":359}],259:[function(require,module,exports){ var randomBytes = require('randombytes'); module.exports = findPrime; findPrime.simpleSieve = simpleSieve; @@ -79332,7 +79332,7 @@ function findPrime(bits, gen) { } -},{"bn.js":172,"miller-rabin":323,"randombytes":358}],259:[function(require,module,exports){ +},{"bn.js":173,"miller-rabin":324,"randombytes":359}],260:[function(require,module,exports){ module.exports={ "modp1": { "gen": "02", @@ -79367,7 +79367,7 @@ module.exports={ "prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff" } } -},{}],260:[function(require,module,exports){ +},{}],261:[function(require,module,exports){ 'use strict'; var elliptic = exports; @@ -79382,7 +79382,7 @@ elliptic.curves = require('./elliptic/curves'); elliptic.ec = require('./elliptic/ec'); elliptic.eddsa = require('./elliptic/eddsa'); -},{"../package.json":275,"./elliptic/curve":263,"./elliptic/curves":266,"./elliptic/ec":267,"./elliptic/eddsa":270,"./elliptic/utils":274,"brorand":173}],261:[function(require,module,exports){ +},{"../package.json":276,"./elliptic/curve":264,"./elliptic/curves":267,"./elliptic/ec":268,"./elliptic/eddsa":271,"./elliptic/utils":275,"brorand":174}],262:[function(require,module,exports){ 'use strict'; var BN = require('bn.js'); @@ -79759,7 +79759,7 @@ BasePoint.prototype.dblp = function dblp(k) { return r; }; -},{"../../elliptic":260,"bn.js":172}],262:[function(require,module,exports){ +},{"../../elliptic":261,"bn.js":173}],263:[function(require,module,exports){ 'use strict'; var curve = require('../curve'); @@ -80194,7 +80194,7 @@ Point.prototype.eqXToP = function eqXToP(x) { Point.prototype.toP = Point.prototype.normalize; Point.prototype.mixedAdd = Point.prototype.add; -},{"../../elliptic":260,"../curve":263,"bn.js":172,"inherits":308}],263:[function(require,module,exports){ +},{"../../elliptic":261,"../curve":264,"bn.js":173,"inherits":309}],264:[function(require,module,exports){ 'use strict'; var curve = exports; @@ -80204,7 +80204,7 @@ curve.short = require('./short'); curve.mont = require('./mont'); curve.edwards = require('./edwards'); -},{"./base":261,"./edwards":262,"./mont":264,"./short":265}],264:[function(require,module,exports){ +},{"./base":262,"./edwards":263,"./mont":265,"./short":266}],265:[function(require,module,exports){ 'use strict'; var curve = require('../curve'); @@ -80386,7 +80386,7 @@ Point.prototype.getX = function getX() { return this.x.fromRed(); }; -},{"../../elliptic":260,"../curve":263,"bn.js":172,"inherits":308}],265:[function(require,module,exports){ +},{"../../elliptic":261,"../curve":264,"bn.js":173,"inherits":309}],266:[function(require,module,exports){ 'use strict'; var curve = require('../curve'); @@ -81325,7 +81325,7 @@ JPoint.prototype.isInfinity = function isInfinity() { return this.z.cmpn(0) === 0; }; -},{"../../elliptic":260,"../curve":263,"bn.js":172,"inherits":308}],266:[function(require,module,exports){ +},{"../../elliptic":261,"../curve":264,"bn.js":173,"inherits":309}],267:[function(require,module,exports){ 'use strict'; var curves = exports; @@ -81532,7 +81532,7 @@ defineCurve('secp256k1', { ] }); -},{"../elliptic":260,"./precomputed/secp256k1":273,"hash.js":293}],267:[function(require,module,exports){ +},{"../elliptic":261,"./precomputed/secp256k1":274,"hash.js":294}],268:[function(require,module,exports){ 'use strict'; var BN = require('bn.js'); @@ -81774,7 +81774,7 @@ EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { throw new Error('Unable to find valid recovery factor'); }; -},{"../../elliptic":260,"./key":268,"./signature":269,"bn.js":172,"hmac-drbg":305}],268:[function(require,module,exports){ +},{"../../elliptic":261,"./key":269,"./signature":270,"bn.js":173,"hmac-drbg":306}],269:[function(require,module,exports){ 'use strict'; var BN = require('bn.js'); @@ -81895,7 +81895,7 @@ KeyPair.prototype.inspect = function inspect() { ' pub: ' + (this.pub && this.pub.inspect()) + ' >'; }; -},{"../../elliptic":260,"bn.js":172}],269:[function(require,module,exports){ +},{"../../elliptic":261,"bn.js":173}],270:[function(require,module,exports){ 'use strict'; var BN = require('bn.js'); @@ -82032,7 +82032,7 @@ Signature.prototype.toDER = function toDER(enc) { return utils.encode(res, enc); }; -},{"../../elliptic":260,"bn.js":172}],270:[function(require,module,exports){ +},{"../../elliptic":261,"bn.js":173}],271:[function(require,module,exports){ 'use strict'; var hash = require('hash.js'); @@ -82152,7 +82152,7 @@ EDDSA.prototype.isPoint = function isPoint(val) { return val instanceof this.pointClass; }; -},{"../../elliptic":260,"./key":271,"./signature":272,"hash.js":293}],271:[function(require,module,exports){ +},{"../../elliptic":261,"./key":272,"./signature":273,"hash.js":294}],272:[function(require,module,exports){ 'use strict'; var elliptic = require('../../elliptic'); @@ -82250,7 +82250,7 @@ KeyPair.prototype.getPublic = function getPublic(enc) { module.exports = KeyPair; -},{"../../elliptic":260}],272:[function(require,module,exports){ +},{"../../elliptic":261}],273:[function(require,module,exports){ 'use strict'; var BN = require('bn.js'); @@ -82318,7 +82318,7 @@ Signature.prototype.toHex = function toHex() { module.exports = Signature; -},{"../../elliptic":260,"bn.js":172}],273:[function(require,module,exports){ +},{"../../elliptic":261,"bn.js":173}],274:[function(require,module,exports){ module.exports = { doubles: { step: 4, @@ -83100,7 +83100,7 @@ module.exports = { } }; -},{}],274:[function(require,module,exports){ +},{}],275:[function(require,module,exports){ 'use strict'; var utils = exports; @@ -83222,7 +83222,7 @@ function intFromLE(bytes) { utils.intFromLE = intFromLE; -},{"bn.js":172,"minimalistic-assert":324,"minimalistic-crypto-utils":325}],275:[function(require,module,exports){ +},{"bn.js":173,"minimalistic-assert":325,"minimalistic-crypto-utils":326}],276:[function(require,module,exports){ module.exports={ "_from": "elliptic@^6.2.3", "_id": "elliptic@6.4.1", @@ -83314,7 +83314,7 @@ module.exports={ "version": "6.4.1" } -},{}],276:[function(require,module,exports){ +},{}],277:[function(require,module,exports){ var generate = function generate(num, fn) { var a = []; for (var i = 0; i < num; ++i) { @@ -83355,7 +83355,7 @@ module.exports = { flatten: flatten, chunksOf: chunksOf }; -},{}],277:[function(require,module,exports){ +},{}],278:[function(require,module,exports){ var A = require("./array.js"); var at = function at(bytes, index) { @@ -83544,7 +83544,7 @@ module.exports = { fromUint8Array: fromUint8Array, toUint8Array: toUint8Array }; -},{"./array.js":276}],278:[function(require,module,exports){ +},{"./array.js":277}],279:[function(require,module,exports){ // This was ported from https://github.com/emn178/js-sha3, with some minor // modifications and pruning. It is licensed under MIT: // @@ -83884,10 +83884,10 @@ module.exports = { keccak256s: keccak(256), keccak512s: keccak(512) }; -},{}],279:[function(require,module,exports){ +},{}],280:[function(require,module,exports){ module.exports = require('./lib/index.js') -},{"./lib/index.js":280}],280:[function(require,module,exports){ +},{"./lib/index.js":281}],281:[function(require,module,exports){ (function (Buffer){ const utils = require('ethereumjs-util') const BN = require('bn.js') @@ -84448,7 +84448,7 @@ ABI.toSerpent = function (types) { module.exports = ABI }).call(this,require("buffer").Buffer) -},{"bn.js":172,"buffer":206,"ethereumjs-util":281}],281:[function(require,module,exports){ +},{"bn.js":173,"buffer":207,"ethereumjs-util":282}],282:[function(require,module,exports){ (function (Buffer){ const SHA3 = require('keccakjs') const secp256k1 = require('secp256k1') @@ -85153,7 +85153,7 @@ exports.defineProperties = function (self, fields, data) { } }).call(this,require("buffer").Buffer) -},{"assert":165,"bn.js":172,"buffer":206,"create-hash":210,"keccakjs":321,"rlp":377,"secp256k1":381}],282:[function(require,module,exports){ +},{"assert":166,"bn.js":173,"buffer":207,"create-hash":211,"keccakjs":322,"rlp":378,"secp256k1":382}],283:[function(require,module,exports){ 'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; @@ -85869,7 +85869,7 @@ exports.defineProperties = function (self, fields, data) { } } }; -},{"assert":165,"bn.js":172,"create-hash":210,"ethjs-util":285,"keccak":315,"rlp":377,"safe-buffer":378,"secp256k1":381}],283:[function(require,module,exports){ +},{"assert":166,"bn.js":173,"create-hash":211,"ethjs-util":286,"keccak":316,"rlp":378,"safe-buffer":379,"secp256k1":382}],284:[function(require,module,exports){ 'use strict'; var BN = require('bn.js'); @@ -86038,7 +86038,7 @@ module.exports = { fromWei: fromWei, toWei: toWei }; -},{"bn.js":284,"number-to-bn":327}],284:[function(require,module,exports){ +},{"bn.js":285,"number-to-bn":328}],285:[function(require,module,exports){ (function (module, exports) { 'use strict'; @@ -89467,7 +89467,7 @@ module.exports = { }; })(typeof module === 'undefined' || module, this); -},{}],285:[function(require,module,exports){ +},{}],286:[function(require,module,exports){ (function (Buffer){ 'use strict'; @@ -89690,7 +89690,7 @@ module.exports = { isHexString: isHexString }; }).call(this,require("buffer").Buffer) -},{"buffer":206,"is-hex-prefixed":312,"strip-hex-prefix":398}],286:[function(require,module,exports){ +},{"buffer":207,"is-hex-prefixed":313,"strip-hex-prefix":399}],287:[function(require,module,exports){ 'use strict'; // @@ -89954,7 +89954,7 @@ if ('undefined' !== typeof module) { module.exports = EventEmitter; } -},{}],287:[function(require,module,exports){ +},{}],288:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -90258,7 +90258,7 @@ function isUndefined(arg) { return arg === void 0; } -},{}],288:[function(require,module,exports){ +},{}],289:[function(require,module,exports){ var Buffer = require('safe-buffer').Buffer var MD5 = require('md5.js') @@ -90305,7 +90305,7 @@ function EVP_BytesToKey (password, salt, keyBits, ivLen) { module.exports = EVP_BytesToKey -},{"md5.js":322,"safe-buffer":378}],289:[function(require,module,exports){ +},{"md5.js":323,"safe-buffer":379}],290:[function(require,module,exports){ (function (self) { 'use strict'; @@ -90806,7 +90806,7 @@ module.exports = EVP_BytesToKey }(typeof self === 'undefined' ? this : self)); -},{}],290:[function(require,module,exports){ +},{}],291:[function(require,module,exports){ 'use strict'; var isCallable = require('is-callable'); @@ -90870,7 +90870,7 @@ var forEach = function forEach(list, iterator, thisArg) { module.exports = forEach; -},{"is-callable":310}],291:[function(require,module,exports){ +},{"is-callable":311}],292:[function(require,module,exports){ (function (global){ var win; @@ -90887,7 +90887,7 @@ if (typeof window !== "undefined") { module.exports = win; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],292:[function(require,module,exports){ +},{}],293:[function(require,module,exports){ 'use strict' var Buffer = require('safe-buffer').Buffer var Transform = require('stream').Transform @@ -90984,7 +90984,7 @@ HashBase.prototype._digest = function () { module.exports = HashBase -},{"inherits":308,"safe-buffer":378,"stream":395}],293:[function(require,module,exports){ +},{"inherits":309,"safe-buffer":379,"stream":396}],294:[function(require,module,exports){ var hash = exports; hash.utils = require('./hash/utils'); @@ -91001,7 +91001,7 @@ hash.sha384 = hash.sha.sha384; hash.sha512 = hash.sha.sha512; hash.ripemd160 = hash.ripemd.ripemd160; -},{"./hash/common":294,"./hash/hmac":295,"./hash/ripemd":296,"./hash/sha":297,"./hash/utils":304}],294:[function(require,module,exports){ +},{"./hash/common":295,"./hash/hmac":296,"./hash/ripemd":297,"./hash/sha":298,"./hash/utils":305}],295:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); @@ -91095,7 +91095,7 @@ BlockHash.prototype._pad = function pad() { return res; }; -},{"./utils":304,"minimalistic-assert":324}],295:[function(require,module,exports){ +},{"./utils":305,"minimalistic-assert":325}],296:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); @@ -91144,7 +91144,7 @@ Hmac.prototype.digest = function digest(enc) { return this.outer.digest(enc); }; -},{"./utils":304,"minimalistic-assert":324}],296:[function(require,module,exports){ +},{"./utils":305,"minimalistic-assert":325}],297:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); @@ -91292,7 +91292,7 @@ var sh = [ 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]; -},{"./common":294,"./utils":304}],297:[function(require,module,exports){ +},{"./common":295,"./utils":305}],298:[function(require,module,exports){ 'use strict'; exports.sha1 = require('./sha/1'); @@ -91301,7 +91301,7 @@ exports.sha256 = require('./sha/256'); exports.sha384 = require('./sha/384'); exports.sha512 = require('./sha/512'); -},{"./sha/1":298,"./sha/224":299,"./sha/256":300,"./sha/384":301,"./sha/512":302}],298:[function(require,module,exports){ +},{"./sha/1":299,"./sha/224":300,"./sha/256":301,"./sha/384":302,"./sha/512":303}],299:[function(require,module,exports){ 'use strict'; var utils = require('../utils'); @@ -91377,7 +91377,7 @@ SHA1.prototype._digest = function digest(enc) { return utils.split32(this.h, 'big'); }; -},{"../common":294,"../utils":304,"./common":303}],299:[function(require,module,exports){ +},{"../common":295,"../utils":305,"./common":304}],300:[function(require,module,exports){ 'use strict'; var utils = require('../utils'); @@ -91409,7 +91409,7 @@ SHA224.prototype._digest = function digest(enc) { }; -},{"../utils":304,"./256":300}],300:[function(require,module,exports){ +},{"../utils":305,"./256":301}],301:[function(require,module,exports){ 'use strict'; var utils = require('../utils'); @@ -91516,7 +91516,7 @@ SHA256.prototype._digest = function digest(enc) { return utils.split32(this.h, 'big'); }; -},{"../common":294,"../utils":304,"./common":303,"minimalistic-assert":324}],301:[function(require,module,exports){ +},{"../common":295,"../utils":305,"./common":304,"minimalistic-assert":325}],302:[function(require,module,exports){ 'use strict'; var utils = require('../utils'); @@ -91553,7 +91553,7 @@ SHA384.prototype._digest = function digest(enc) { return utils.split32(this.h.slice(0, 12), 'big'); }; -},{"../utils":304,"./512":302}],302:[function(require,module,exports){ +},{"../utils":305,"./512":303}],303:[function(require,module,exports){ 'use strict'; var utils = require('../utils'); @@ -91885,7 +91885,7 @@ function g1_512_lo(xh, xl) { return r; } -},{"../common":294,"../utils":304,"minimalistic-assert":324}],303:[function(require,module,exports){ +},{"../common":295,"../utils":305,"minimalistic-assert":325}],304:[function(require,module,exports){ 'use strict'; var utils = require('../utils'); @@ -91936,7 +91936,7 @@ function g1_256(x) { } exports.g1_256 = g1_256; -},{"../utils":304}],304:[function(require,module,exports){ +},{"../utils":305}],305:[function(require,module,exports){ 'use strict'; var assert = require('minimalistic-assert'); @@ -92191,7 +92191,7 @@ function shr64_lo(ah, al, num) { } exports.shr64_lo = shr64_lo; -},{"inherits":308,"minimalistic-assert":324}],305:[function(require,module,exports){ +},{"inherits":309,"minimalistic-assert":325}],306:[function(require,module,exports){ 'use strict'; var hash = require('hash.js'); @@ -92306,7 +92306,7 @@ HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { return utils.encode(res, enc); }; -},{"hash.js":293,"minimalistic-assert":324,"minimalistic-crypto-utils":325}],306:[function(require,module,exports){ +},{"hash.js":294,"minimalistic-assert":325,"minimalistic-crypto-utils":326}],307:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = (nBytes * 8) - mLen - 1 @@ -92392,7 +92392,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],307:[function(require,module,exports){ +},{}],308:[function(require,module,exports){ var indexOf = [].indexOf; @@ -92403,9 +92403,9 @@ module.exports = function(arr, obj){ } return -1; }; -},{}],308:[function(require,module,exports){ -arguments[4][166][0].apply(exports,arguments) -},{"dup":166}],309:[function(require,module,exports){ +},{}],309:[function(require,module,exports){ +arguments[4][167][0].apply(exports,arguments) +},{"dup":167}],310:[function(require,module,exports){ /*! * Determine if an object is a Buffer * @@ -92428,7 +92428,7 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],310:[function(require,module,exports){ +},{}],311:[function(require,module,exports){ 'use strict'; var fnToStr = Function.prototype.toString; @@ -92467,7 +92467,7 @@ module.exports = function isCallable(value) { return strClass === fnClass || strClass === genClass; }; -},{}],311:[function(require,module,exports){ +},{}],312:[function(require,module,exports){ module.exports = isFunction var toString = Object.prototype.toString @@ -92484,7 +92484,7 @@ function isFunction (fn) { fn === window.prompt)) }; -},{}],312:[function(require,module,exports){ +},{}],313:[function(require,module,exports){ /** * Returns a `Boolean` on whether or not the a `String` starts with '0x' * @param {String} str the string input value @@ -92499,14 +92499,14 @@ module.exports = function isHexPrefixed(str) { return str.slice(0, 2) === '0x'; } -},{}],313:[function(require,module,exports){ +},{}],314:[function(require,module,exports){ var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; -},{}],314:[function(require,module,exports){ +},{}],315:[function(require,module,exports){ (function (global){ /* * js-sha3 v0.3.1 @@ -92942,11 +92942,11 @@ module.exports = Array.isArray || function (arr) { }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],315:[function(require,module,exports){ +},{}],316:[function(require,module,exports){ 'use strict' module.exports = require('./lib/api')(require('./lib/keccak')) -},{"./lib/api":316,"./lib/keccak":320}],316:[function(require,module,exports){ +},{"./lib/api":317,"./lib/keccak":321}],317:[function(require,module,exports){ 'use strict' var createKeccak = require('./keccak') var createShake = require('./shake') @@ -92976,7 +92976,7 @@ module.exports = function (KeccakState) { } } -},{"./keccak":317,"./shake":318}],317:[function(require,module,exports){ +},{"./keccak":318,"./shake":319}],318:[function(require,module,exports){ 'use strict' var Buffer = require('safe-buffer').Buffer var Transform = require('stream').Transform @@ -93062,7 +93062,7 @@ module.exports = function (KeccakState) { return Keccak } -},{"inherits":308,"safe-buffer":378,"stream":395}],318:[function(require,module,exports){ +},{"inherits":309,"safe-buffer":379,"stream":396}],319:[function(require,module,exports){ 'use strict' var Buffer = require('safe-buffer').Buffer var Transform = require('stream').Transform @@ -93139,7 +93139,7 @@ module.exports = function (KeccakState) { return Shake } -},{"inherits":308,"safe-buffer":378,"stream":395}],319:[function(require,module,exports){ +},{"inherits":309,"safe-buffer":379,"stream":396}],320:[function(require,module,exports){ 'use strict' var P1600_ROUND_CONSTANTS = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648] @@ -93328,7 +93328,7 @@ exports.p1600 = function (s) { } } -},{}],320:[function(require,module,exports){ +},{}],321:[function(require,module,exports){ 'use strict' var Buffer = require('safe-buffer').Buffer var keccakState = require('./keccak-state-unroll') @@ -93400,10 +93400,10 @@ Keccak.prototype.copy = function (dest) { module.exports = Keccak -},{"./keccak-state-unroll":319,"safe-buffer":378}],321:[function(require,module,exports){ +},{"./keccak-state-unroll":320,"safe-buffer":379}],322:[function(require,module,exports){ module.exports = require('browserify-sha3').SHA3Hash -},{"browserify-sha3":196}],322:[function(require,module,exports){ +},{"browserify-sha3":197}],323:[function(require,module,exports){ (function (Buffer){ 'use strict' var inherits = require('inherits') @@ -93552,7 +93552,7 @@ function fnI (a, b, c, d, m, k, s) { module.exports = MD5 }).call(this,require("buffer").Buffer) -},{"buffer":206,"hash-base":292,"inherits":308}],323:[function(require,module,exports){ +},{"buffer":207,"hash-base":293,"inherits":309}],324:[function(require,module,exports){ var bn = require('bn.js'); var brorand = require('brorand'); @@ -93669,7 +93669,7 @@ MillerRabin.prototype.getDivisor = function getDivisor(n, k) { return false; }; -},{"bn.js":172,"brorand":173}],324:[function(require,module,exports){ +},{"bn.js":173,"brorand":174}],325:[function(require,module,exports){ module.exports = assert; function assert(val, msg) { @@ -93682,7 +93682,7 @@ assert.equal = function assertEqual(l, r, msg) { throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r)); }; -},{}],325:[function(require,module,exports){ +},{}],326:[function(require,module,exports){ 'use strict'; var utils = exports; @@ -93742,9 +93742,9 @@ utils.encode = function encode(arr, enc) { return arr; }; -},{}],326:[function(require,module,exports){ -arguments[4][284][0].apply(exports,arguments) -},{"dup":284}],327:[function(require,module,exports){ +},{}],327:[function(require,module,exports){ +arguments[4][285][0].apply(exports,arguments) +},{"dup":285}],328:[function(require,module,exports){ var BN = require('bn.js'); var stripHexPrefix = require('strip-hex-prefix'); @@ -93784,7 +93784,7 @@ module.exports = function numberToBN(arg) { throw new Error('[number-to-bn] while converting number ' + JSON.stringify(arg) + ' to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.'); } -},{"bn.js":326,"strip-hex-prefix":398}],328:[function(require,module,exports){ +},{"bn.js":327,"strip-hex-prefix":399}],329:[function(require,module,exports){ /* object-assign (c) Sindre Sorhus @@ -93876,7 +93876,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) { return to; }; -},{}],329:[function(require,module,exports){ +},{}],330:[function(require,module,exports){ // This file is the concatenation of many js files. // See http://github.com/jimhigson/oboe.js for the raw source @@ -96580,7 +96580,7 @@ oboe.drop = function() { } }()), Object, Array, Error, JSON); -},{}],330:[function(require,module,exports){ +},{}],331:[function(require,module,exports){ module.exports={"2.16.840.1.101.3.4.1.1": "aes-128-ecb", "2.16.840.1.101.3.4.1.2": "aes-128-cbc", "2.16.840.1.101.3.4.1.3": "aes-128-ofb", @@ -96594,7 +96594,7 @@ module.exports={"2.16.840.1.101.3.4.1.1": "aes-128-ecb", "2.16.840.1.101.3.4.1.43": "aes-256-ofb", "2.16.840.1.101.3.4.1.44": "aes-256-cfb" } -},{}],331:[function(require,module,exports){ +},{}],332:[function(require,module,exports){ // from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js // Fedor, you are amazing. 'use strict' @@ -96718,7 +96718,7 @@ exports.signature = asn1.define('signature', function () { ) }) -},{"./certificate":332,"asn1.js":151}],332:[function(require,module,exports){ +},{"./certificate":333,"asn1.js":152}],333:[function(require,module,exports){ // from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js // thanks to @Rantanen @@ -96808,7 +96808,7 @@ var X509Certificate = asn.define('X509Certificate', function () { module.exports = X509Certificate -},{"asn1.js":151}],333:[function(require,module,exports){ +},{"asn1.js":152}],334:[function(require,module,exports){ (function (Buffer){ // adapted from https://github.com/apatil/pemstrip var findProc = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m @@ -96842,7 +96842,7 @@ module.exports = function (okey, password) { } }).call(this,require("buffer").Buffer) -},{"browserify-aes":177,"buffer":206,"evp_bytestokey":288}],334:[function(require,module,exports){ +},{"browserify-aes":178,"buffer":207,"evp_bytestokey":289}],335:[function(require,module,exports){ (function (Buffer){ var asn1 = require('./asn1') var aesid = require('./aesid.json') @@ -96952,7 +96952,7 @@ function decrypt (data, password) { } }).call(this,require("buffer").Buffer) -},{"./aesid.json":330,"./asn1":331,"./fixProc":333,"browserify-aes":177,"buffer":206,"pbkdf2":336}],335:[function(require,module,exports){ +},{"./aesid.json":331,"./asn1":332,"./fixProc":334,"browserify-aes":178,"buffer":207,"pbkdf2":337}],336:[function(require,module,exports){ var trim = require('trim') , forEach = require('for-each') , isArray = function(arg) { @@ -96984,11 +96984,11 @@ module.exports = function (headers) { return result } -},{"for-each":290,"trim":405}],336:[function(require,module,exports){ +},{"for-each":291,"trim":406}],337:[function(require,module,exports){ exports.pbkdf2 = require('./lib/async') exports.pbkdf2Sync = require('./lib/sync') -},{"./lib/async":337,"./lib/sync":340}],337:[function(require,module,exports){ +},{"./lib/async":338,"./lib/sync":341}],338:[function(require,module,exports){ (function (process,global){ var checkParameters = require('./precondition') var defaultEncoding = require('./default-encoding') @@ -97092,7 +97092,7 @@ module.exports = function (password, salt, iterations, keylen, digest, callback) } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./default-encoding":338,"./precondition":339,"./sync":340,"_process":203,"safe-buffer":378}],338:[function(require,module,exports){ +},{"./default-encoding":339,"./precondition":340,"./sync":341,"_process":204,"safe-buffer":379}],339:[function(require,module,exports){ (function (process){ var defaultEncoding /* istanbul ignore next */ @@ -97106,7 +97106,7 @@ if (process.browser) { module.exports = defaultEncoding }).call(this,require('_process')) -},{"_process":203}],339:[function(require,module,exports){ +},{"_process":204}],340:[function(require,module,exports){ (function (Buffer){ var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs @@ -97138,7 +97138,7 @@ module.exports = function (password, salt, iterations, keylen) { } }).call(this,{"isBuffer":require("../../is-buffer/index.js")}) -},{"../../is-buffer/index.js":309}],340:[function(require,module,exports){ +},{"../../is-buffer/index.js":310}],341:[function(require,module,exports){ var md5 = require('create-hash/md5') var rmd160 = require('ripemd160') var sha = require('sha.js') @@ -97241,7 +97241,7 @@ function pbkdf2 (password, salt, iterations, keylen, digest) { module.exports = pbkdf2 -},{"./default-encoding":338,"./precondition":339,"create-hash/md5":211,"ripemd160":376,"safe-buffer":378,"sha.js":388}],341:[function(require,module,exports){ +},{"./default-encoding":339,"./precondition":340,"create-hash/md5":212,"ripemd160":377,"safe-buffer":379,"sha.js":389}],342:[function(require,module,exports){ (function (process){ 'use strict'; @@ -97289,7 +97289,7 @@ function nextTick(fn, arg1, arg2, arg3) { }).call(this,require('_process')) -},{"_process":203}],342:[function(require,module,exports){ +},{"_process":204}],343:[function(require,module,exports){ exports.publicEncrypt = require('./publicEncrypt'); exports.privateDecrypt = require('./privateDecrypt'); @@ -97300,7 +97300,7 @@ exports.privateEncrypt = function privateEncrypt(key, buf) { exports.publicDecrypt = function publicDecrypt(key, buf) { return exports.privateDecrypt(key, buf, true); }; -},{"./privateDecrypt":344,"./publicEncrypt":345}],343:[function(require,module,exports){ +},{"./privateDecrypt":345,"./publicEncrypt":346}],344:[function(require,module,exports){ (function (Buffer){ var createHash = require('create-hash'); module.exports = function (seed, len) { @@ -97319,7 +97319,7 @@ function i2ops(c) { return out; } }).call(this,require("buffer").Buffer) -},{"buffer":206,"create-hash":210}],344:[function(require,module,exports){ +},{"buffer":207,"create-hash":211}],345:[function(require,module,exports){ (function (Buffer){ var parseKeys = require('parse-asn1'); var mgf = require('./mgf'); @@ -97430,7 +97430,7 @@ function compare(a, b){ return dif; } }).call(this,require("buffer").Buffer) -},{"./mgf":343,"./withPublic":346,"./xor":347,"bn.js":172,"browserify-rsa":195,"buffer":206,"create-hash":210,"parse-asn1":334}],345:[function(require,module,exports){ +},{"./mgf":344,"./withPublic":347,"./xor":348,"bn.js":173,"browserify-rsa":196,"buffer":207,"create-hash":211,"parse-asn1":335}],346:[function(require,module,exports){ (function (Buffer){ var parseKeys = require('parse-asn1'); var randomBytes = require('randombytes'); @@ -97528,7 +97528,7 @@ function nonZero(len, crypto) { return out; } }).call(this,require("buffer").Buffer) -},{"./mgf":343,"./withPublic":346,"./xor":347,"bn.js":172,"browserify-rsa":195,"buffer":206,"create-hash":210,"parse-asn1":334,"randombytes":358}],346:[function(require,module,exports){ +},{"./mgf":344,"./withPublic":347,"./xor":348,"bn.js":173,"browserify-rsa":196,"buffer":207,"create-hash":211,"parse-asn1":335,"randombytes":359}],347:[function(require,module,exports){ (function (Buffer){ var bn = require('bn.js'); function withPublic(paddedMsg, key) { @@ -97541,7 +97541,7 @@ function withPublic(paddedMsg, key) { module.exports = withPublic; }).call(this,require("buffer").Buffer) -},{"bn.js":172,"buffer":206}],347:[function(require,module,exports){ +},{"bn.js":173,"buffer":207}],348:[function(require,module,exports){ module.exports = function xor(a, b) { var len = a.length; var i = -1; @@ -97550,7 +97550,7 @@ module.exports = function xor(a, b) { } return a }; -},{}],348:[function(require,module,exports){ +},{}],349:[function(require,module,exports){ (function (global){ /*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { @@ -98087,7 +98087,7 @@ module.exports = function xor(a, b) { }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],349:[function(require,module,exports){ +},{}],350:[function(require,module,exports){ 'use strict'; var replace = String.prototype.replace; @@ -98107,7 +98107,7 @@ module.exports = { RFC3986: 'RFC3986' }; -},{}],350:[function(require,module,exports){ +},{}],351:[function(require,module,exports){ 'use strict'; var stringify = require('./stringify'); @@ -98120,7 +98120,7 @@ module.exports = { stringify: stringify }; -},{"./formats":349,"./parse":351,"./stringify":352}],351:[function(require,module,exports){ +},{"./formats":350,"./parse":352,"./stringify":353}],352:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); @@ -98296,7 +98296,7 @@ module.exports = function (str, opts) { return utils.compact(obj); }; -},{"./utils":353}],352:[function(require,module,exports){ +},{"./utils":354}],353:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); @@ -98508,7 +98508,7 @@ module.exports = function (object, opts) { return joined.length > 0 ? prefix + joined : ''; }; -},{"./formats":349,"./utils":353}],353:[function(require,module,exports){ +},{"./formats":350,"./utils":354}],354:[function(require,module,exports){ 'use strict'; var has = Object.prototype.hasOwnProperty; @@ -98712,7 +98712,7 @@ exports.isBuffer = function isBuffer(obj) { return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; -},{}],354:[function(require,module,exports){ +},{}],355:[function(require,module,exports){ 'use strict'; var strictUriEncode = require('strict-uri-encode'); var objectAssign = require('object-assign'); @@ -98938,7 +98938,7 @@ exports.parseUrl = function (str, opts) { }; }; -},{"decode-uri-component":249,"object-assign":328,"strict-uri-encode":396}],355:[function(require,module,exports){ +},{"decode-uri-component":250,"object-assign":329,"strict-uri-encode":397}],356:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -99024,7 +99024,7 @@ var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; -},{}],356:[function(require,module,exports){ +},{}],357:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -99111,13 +99111,13 @@ var objectKeys = Object.keys || function (obj) { return res; }; -},{}],357:[function(require,module,exports){ +},{}],358:[function(require,module,exports){ 'use strict'; exports.decode = exports.parse = require('./decode'); exports.encode = exports.stringify = require('./encode'); -},{"./decode":355,"./encode":356}],358:[function(require,module,exports){ +},{"./decode":356,"./encode":357}],359:[function(require,module,exports){ (function (process,global){ 'use strict' @@ -99159,7 +99159,7 @@ function randomBytes (size, cb) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":203,"safe-buffer":378}],359:[function(require,module,exports){ +},{"_process":204,"safe-buffer":379}],360:[function(require,module,exports){ (function (process,global){ 'use strict' @@ -99271,11 +99271,11 @@ function randomFillSync (buf, offset, size) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"_process":203,"randombytes":358,"safe-buffer":378}],360:[function(require,module,exports){ +},{"_process":204,"randombytes":359,"safe-buffer":379}],361:[function(require,module,exports){ module.exports = window.crypto; -},{}],361:[function(require,module,exports){ +},{}],362:[function(require,module,exports){ module.exports = require('crypto'); -},{"crypto":360}],362:[function(require,module,exports){ +},{"crypto":361}],363:[function(require,module,exports){ var randomHex = function(size, callback) { var crypto = require('./crypto.js'); var isCallback = (typeof callback === 'function'); @@ -99341,10 +99341,10 @@ var randomHex = function(size, callback) { module.exports = randomHex; -},{"./crypto.js":361}],363:[function(require,module,exports){ +},{"./crypto.js":362}],364:[function(require,module,exports){ module.exports = require('./lib/_stream_duplex.js'); -},{"./lib/_stream_duplex.js":364}],364:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":365}],365:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -99476,7 +99476,7 @@ Duplex.prototype._destroy = function (err, cb) { pna.nextTick(cb, err); }; -},{"./_stream_readable":366,"./_stream_writable":368,"core-util-is":208,"inherits":308,"process-nextick-args":341}],365:[function(require,module,exports){ +},{"./_stream_readable":367,"./_stream_writable":369,"core-util-is":209,"inherits":309,"process-nextick-args":342}],366:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -99524,7 +99524,7 @@ function PassThrough(options) { PassThrough.prototype._transform = function (chunk, encoding, cb) { cb(null, chunk); }; -},{"./_stream_transform":367,"core-util-is":208,"inherits":308}],366:[function(require,module,exports){ +},{"./_stream_transform":368,"core-util-is":209,"inherits":309}],367:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -100546,7 +100546,7 @@ function indexOf(xs, x) { return -1; } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./_stream_duplex":364,"./internal/streams/BufferList":369,"./internal/streams/destroy":370,"./internal/streams/stream":371,"_process":203,"core-util-is":208,"events":287,"inherits":308,"isarray":313,"process-nextick-args":341,"safe-buffer":378,"string_decoder/":397,"util":174}],367:[function(require,module,exports){ +},{"./_stream_duplex":365,"./internal/streams/BufferList":370,"./internal/streams/destroy":371,"./internal/streams/stream":372,"_process":204,"core-util-is":209,"events":288,"inherits":309,"isarray":314,"process-nextick-args":342,"safe-buffer":379,"string_decoder/":398,"util":175}],368:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -100761,7 +100761,7 @@ function done(stream, er, data) { return stream.push(null); } -},{"./_stream_duplex":364,"core-util-is":208,"inherits":308}],368:[function(require,module,exports){ +},{"./_stream_duplex":365,"core-util-is":209,"inherits":309}],369:[function(require,module,exports){ (function (process,global,setImmediate){ // Copyright Joyent, Inc. and other Node contributors. // @@ -101451,7 +101451,7 @@ Writable.prototype._destroy = function (err, cb) { cb(err); }; }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").setImmediate) -},{"./_stream_duplex":364,"./internal/streams/destroy":370,"./internal/streams/stream":371,"_process":203,"core-util-is":208,"inherits":308,"process-nextick-args":341,"safe-buffer":378,"timers":403,"util-deprecate":411}],369:[function(require,module,exports){ +},{"./_stream_duplex":365,"./internal/streams/destroy":371,"./internal/streams/stream":372,"_process":204,"core-util-is":209,"inherits":309,"process-nextick-args":342,"safe-buffer":379,"timers":404,"util-deprecate":412}],370:[function(require,module,exports){ 'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -101531,7 +101531,7 @@ if (util && util.inspect && util.inspect.custom) { return this.constructor.name + ' ' + obj; }; } -},{"safe-buffer":378,"util":174}],370:[function(require,module,exports){ +},{"safe-buffer":379,"util":175}],371:[function(require,module,exports){ 'use strict'; /**/ @@ -101606,13 +101606,13 @@ module.exports = { destroy: destroy, undestroy: undestroy }; -},{"process-nextick-args":341}],371:[function(require,module,exports){ +},{"process-nextick-args":342}],372:[function(require,module,exports){ module.exports = require('events').EventEmitter; -},{"events":287}],372:[function(require,module,exports){ +},{"events":288}],373:[function(require,module,exports){ module.exports = require('./readable').PassThrough -},{"./readable":373}],373:[function(require,module,exports){ +},{"./readable":374}],374:[function(require,module,exports){ exports = module.exports = require('./lib/_stream_readable.js'); exports.Stream = exports; exports.Readable = exports; @@ -101621,13 +101621,13 @@ exports.Duplex = require('./lib/_stream_duplex.js'); exports.Transform = require('./lib/_stream_transform.js'); exports.PassThrough = require('./lib/_stream_passthrough.js'); -},{"./lib/_stream_duplex.js":364,"./lib/_stream_passthrough.js":365,"./lib/_stream_readable.js":366,"./lib/_stream_transform.js":367,"./lib/_stream_writable.js":368}],374:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":365,"./lib/_stream_passthrough.js":366,"./lib/_stream_readable.js":367,"./lib/_stream_transform.js":368,"./lib/_stream_writable.js":369}],375:[function(require,module,exports){ module.exports = require('./readable').Transform -},{"./readable":373}],375:[function(require,module,exports){ +},{"./readable":374}],376:[function(require,module,exports){ module.exports = require('./lib/_stream_writable.js'); -},{"./lib/_stream_writable.js":368}],376:[function(require,module,exports){ +},{"./lib/_stream_writable.js":369}],377:[function(require,module,exports){ 'use strict' var Buffer = require('buffer').Buffer var inherits = require('inherits') @@ -101792,7 +101792,7 @@ function fn5 (a, b, c, d, e, m, k, s) { module.exports = RIPEMD160 -},{"buffer":206,"hash-base":292,"inherits":308}],377:[function(require,module,exports){ +},{"buffer":207,"hash-base":293,"inherits":309}],378:[function(require,module,exports){ const assert = require('assert') const Buffer = require('safe-buffer').Buffer /** @@ -102024,7 +102024,7 @@ function toBuffer (v) { return v } -},{"assert":165,"safe-buffer":378}],378:[function(require,module,exports){ +},{"assert":166,"safe-buffer":379}],379:[function(require,module,exports){ /* eslint-disable node/no-deprecated-api */ var buffer = require('buffer') var Buffer = buffer.Buffer @@ -102088,10 +102088,10 @@ SafeBuffer.allocUnsafeSlow = function (size) { return buffer.SlowBuffer(size) } -},{"buffer":206}],379:[function(require,module,exports){ +},{"buffer":207}],380:[function(require,module,exports){ module.exports = require('scryptsy') -},{"scryptsy":380}],380:[function(require,module,exports){ +},{"scryptsy":381}],381:[function(require,module,exports){ (function (Buffer){ var pbkdf2Sync = require('pbkdf2').pbkdf2Sync @@ -102274,11 +102274,11 @@ function arraycopy (src, srcPos, dest, destPos, length) { module.exports = scrypt }).call(this,require("buffer").Buffer) -},{"buffer":206,"pbkdf2":336}],381:[function(require,module,exports){ +},{"buffer":207,"pbkdf2":337}],382:[function(require,module,exports){ 'use strict' module.exports = require('./lib')(require('./lib/elliptic')) -},{"./lib":385,"./lib/elliptic":384}],382:[function(require,module,exports){ +},{"./lib":386,"./lib/elliptic":385}],383:[function(require,module,exports){ (function (Buffer){ 'use strict' var toString = Object.prototype.toString @@ -102326,7 +102326,7 @@ exports.isNumberInInterval = function (number, x, y, message) { } }).call(this,{"isBuffer":require("../../is-buffer/index.js")}) -},{"../../is-buffer/index.js":309}],383:[function(require,module,exports){ +},{"../../is-buffer/index.js":310}],384:[function(require,module,exports){ 'use strict' var Buffer = require('safe-buffer').Buffer var bip66 = require('bip66') @@ -102521,7 +102521,7 @@ exports.signatureImportLax = function (sig) { return { r: r, s: s } } -},{"bip66":171,"safe-buffer":378}],384:[function(require,module,exports){ +},{"bip66":172,"safe-buffer":379}],385:[function(require,module,exports){ 'use strict' var Buffer = require('safe-buffer').Buffer var createHash = require('create-hash') @@ -102783,7 +102783,7 @@ exports.ecdhUnsafe = function (publicKey, privateKey, compressed) { return Buffer.from(pair.pub.mul(scalar).encode(true, compressed)) } -},{"../messages.json":386,"bn.js":172,"create-hash":210,"elliptic":260,"safe-buffer":378}],385:[function(require,module,exports){ +},{"../messages.json":387,"bn.js":173,"create-hash":211,"elliptic":261,"safe-buffer":379}],386:[function(require,module,exports){ 'use strict' var assert = require('./assert') var der = require('./der') @@ -103030,7 +103030,7 @@ module.exports = function (secp256k1) { } } -},{"./assert":382,"./der":383,"./messages.json":386}],386:[function(require,module,exports){ +},{"./assert":383,"./der":384,"./messages.json":387}],387:[function(require,module,exports){ module.exports={ "COMPRESSED_TYPE_INVALID": "compressed should be a boolean", "EC_PRIVATE_KEY_TYPE_INVALID": "private key should be a Buffer", @@ -103069,7 +103069,7 @@ module.exports={ "TWEAK_LENGTH_INVALID": "tweak length is invalid" } -},{}],387:[function(require,module,exports){ +},{}],388:[function(require,module,exports){ var Buffer = require('safe-buffer').Buffer // prototype class for hash functions @@ -103152,7 +103152,7 @@ Hash.prototype._update = function () { module.exports = Hash -},{"safe-buffer":378}],388:[function(require,module,exports){ +},{"safe-buffer":379}],389:[function(require,module,exports){ var exports = module.exports = function SHA (algorithm) { algorithm = algorithm.toLowerCase() @@ -103169,7 +103169,7 @@ exports.sha256 = require('./sha256') exports.sha384 = require('./sha384') exports.sha512 = require('./sha512') -},{"./sha":389,"./sha1":390,"./sha224":391,"./sha256":392,"./sha384":393,"./sha512":394}],389:[function(require,module,exports){ +},{"./sha":390,"./sha1":391,"./sha224":392,"./sha256":393,"./sha384":394,"./sha512":395}],390:[function(require,module,exports){ /* * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined * in FIPS PUB 180-1 @@ -103265,7 +103265,7 @@ Sha.prototype._hash = function () { module.exports = Sha -},{"./hash":387,"inherits":308,"safe-buffer":378}],390:[function(require,module,exports){ +},{"./hash":388,"inherits":309,"safe-buffer":379}],391:[function(require,module,exports){ /* * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined * in FIPS PUB 180-1 @@ -103366,7 +103366,7 @@ Sha1.prototype._hash = function () { module.exports = Sha1 -},{"./hash":387,"inherits":308,"safe-buffer":378}],391:[function(require,module,exports){ +},{"./hash":388,"inherits":309,"safe-buffer":379}],392:[function(require,module,exports){ /** * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined * in FIPS 180-2 @@ -103421,7 +103421,7 @@ Sha224.prototype._hash = function () { module.exports = Sha224 -},{"./hash":387,"./sha256":392,"inherits":308,"safe-buffer":378}],392:[function(require,module,exports){ +},{"./hash":388,"./sha256":393,"inherits":309,"safe-buffer":379}],393:[function(require,module,exports){ /** * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined * in FIPS 180-2 @@ -103558,7 +103558,7 @@ Sha256.prototype._hash = function () { module.exports = Sha256 -},{"./hash":387,"inherits":308,"safe-buffer":378}],393:[function(require,module,exports){ +},{"./hash":388,"inherits":309,"safe-buffer":379}],394:[function(require,module,exports){ var inherits = require('inherits') var SHA512 = require('./sha512') var Hash = require('./hash') @@ -103617,7 +103617,7 @@ Sha384.prototype._hash = function () { module.exports = Sha384 -},{"./hash":387,"./sha512":394,"inherits":308,"safe-buffer":378}],394:[function(require,module,exports){ +},{"./hash":388,"./sha512":395,"inherits":309,"safe-buffer":379}],395:[function(require,module,exports){ var inherits = require('inherits') var Hash = require('./hash') var Buffer = require('safe-buffer').Buffer @@ -103879,7 +103879,7 @@ Sha512.prototype._hash = function () { module.exports = Sha512 -},{"./hash":387,"inherits":308,"safe-buffer":378}],395:[function(require,module,exports){ +},{"./hash":388,"inherits":309,"safe-buffer":379}],396:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -104008,7 +104008,7 @@ Stream.prototype.pipe = function(dest, options) { return dest; }; -},{"events":287,"inherits":308,"readable-stream/duplex.js":363,"readable-stream/passthrough.js":372,"readable-stream/readable.js":373,"readable-stream/transform.js":374,"readable-stream/writable.js":375}],396:[function(require,module,exports){ +},{"events":288,"inherits":309,"readable-stream/duplex.js":364,"readable-stream/passthrough.js":373,"readable-stream/readable.js":374,"readable-stream/transform.js":375,"readable-stream/writable.js":376}],397:[function(require,module,exports){ 'use strict'; module.exports = function (str) { return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { @@ -104016,7 +104016,7 @@ module.exports = function (str) { }); }; -},{}],397:[function(require,module,exports){ +},{}],398:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -104313,7 +104313,7 @@ function simpleWrite(buf) { function simpleEnd(buf) { return buf && buf.length ? this.write(buf) : ''; } -},{"safe-buffer":378}],398:[function(require,module,exports){ +},{"safe-buffer":379}],399:[function(require,module,exports){ var isHexPrefixed = require('is-hex-prefixed'); /** @@ -104329,7 +104329,7 @@ module.exports = function stripHexPrefix(str) { return isHexPrefixed(str) ? str.slice(2) : str; } -},{"is-hex-prefixed":312}],399:[function(require,module,exports){ +},{"is-hex-prefixed":313}],400:[function(require,module,exports){ var unavailable = function unavailable() { throw "This swarm.js function isn't available on the browser."; }; @@ -104362,7 +104362,7 @@ module.exports = swarm({ hash: hash, pick: pick }); -},{"./pick.js":400,"./swarm":402,"./swarm-hash.js":401,"eth-lib/lib/bytes":277,"xhr-request-promise":468}],400:[function(require,module,exports){ +},{"./pick.js":401,"./swarm":403,"./swarm-hash.js":402,"eth-lib/lib/bytes":278,"xhr-request-promise":469}],401:[function(require,module,exports){ var picker = function picker(type) { return function () { return new Promise(function (resolve, reject) { @@ -104420,7 +104420,7 @@ module.exports = { file: picker("file"), directory: picker("directory") }; -},{}],401:[function(require,module,exports){ +},{}],402:[function(require,module,exports){ // Thanks https://github.com/axic/swarmhash var keccak = require("eth-lib/lib/hash").keccak256; @@ -104461,7 +104461,7 @@ var swarmHash = function swarmHash(data) { }; module.exports = swarmHash; -},{"eth-lib/lib/bytes":277,"eth-lib/lib/hash":278}],402:[function(require,module,exports){ +},{"eth-lib/lib/bytes":278,"eth-lib/lib/hash":279}],403:[function(require,module,exports){ // TODO: this is a temporary fix to hide those libraries from the browser. A // slightly better long-term solution would be to split this file into two, // separating the functions that are used on Node.js from the functions that @@ -105088,7 +105088,7 @@ module.exports = function (_ref) { }; }; -},{}],403:[function(require,module,exports){ +},{}],404:[function(require,module,exports){ (function (setImmediate,clearImmediate){ var nextTick = require('process/browser.js').nextTick; var apply = Function.prototype.apply; @@ -105167,9 +105167,9 @@ exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate : delete immediateIds[id]; }; }).call(this,require("timers").setImmediate,require("timers").clearImmediate) -},{"process/browser.js":404,"timers":403}],404:[function(require,module,exports){ -arguments[4][203][0].apply(exports,arguments) -},{"dup":203}],405:[function(require,module,exports){ +},{"process/browser.js":405,"timers":404}],405:[function(require,module,exports){ +arguments[4][204][0].apply(exports,arguments) +},{"dup":204}],406:[function(require,module,exports){ exports = module.exports = trim; @@ -105185,7 +105185,7 @@ exports.right = function(str){ return str.replace(/\s*$/, ''); }; -},{}],406:[function(require,module,exports){ +},{}],407:[function(require,module,exports){ // Underscore.js 1.8.3 // http://underscorejs.org // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -106735,7 +106735,7 @@ exports.right = function(str){ } }.call(this)); -},{}],407:[function(require,module,exports){ +},{}],408:[function(require,module,exports){ module.exports = urlSetQuery function urlSetQuery (url, query) { if (query) { @@ -106760,7 +106760,7 @@ function urlSetQuery (url, query) { return url } -},{}],408:[function(require,module,exports){ +},{}],409:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -107494,7 +107494,7 @@ Url.prototype.parseHost = function() { if (host) this.hostname = host; }; -},{"./util":409,"punycode":348,"querystring":357}],409:[function(require,module,exports){ +},{"./util":410,"punycode":349,"querystring":358}],410:[function(require,module,exports){ 'use strict'; module.exports = { @@ -107512,7 +107512,7 @@ module.exports = { } }; -},{}],410:[function(require,module,exports){ +},{}],411:[function(require,module,exports){ (function (global){ /*! https://mths.be/utf8js v2.0.0 by @mathias */ ;(function(root) { @@ -107760,7 +107760,7 @@ module.exports = { }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],411:[function(require,module,exports){ +},{}],412:[function(require,module,exports){ (function (global){ /** @@ -107831,7 +107831,7 @@ function config (name) { } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],412:[function(require,module,exports){ +},{}],413:[function(require,module,exports){ var indexOf = require('indexof'); var Object_keys = function (obj) { @@ -107971,7 +107971,7 @@ exports.createContext = Script.createContext = function (context) { return copy; }; -},{"indexof":307}],413:[function(require,module,exports){ +},{"indexof":308}],414:[function(require,module,exports){ /* This file is part of web3.js. @@ -108061,7 +108061,7 @@ Bzz.prototype.setProvider = function(provider) { module.exports = Bzz; -},{"swarm-js":399,"underscore":406}],414:[function(require,module,exports){ +},{"swarm-js":400,"underscore":407}],415:[function(require,module,exports){ /* This file is part of web3.js. @@ -108110,7 +108110,7 @@ module.exports = { } }; -},{}],415:[function(require,module,exports){ +},{}],416:[function(require,module,exports){ /* This file is part of web3.js. @@ -108548,7 +108548,7 @@ module.exports = { }; -},{"underscore":406,"web3-eth-iban":450,"web3-utils":460}],416:[function(require,module,exports){ +},{"underscore":407,"web3-eth-iban":451,"web3-utils":461}],417:[function(require,module,exports){ /* This file is part of web3.js. @@ -108582,7 +108582,7 @@ module.exports = { }; -},{"./errors":414,"./formatters":415}],417:[function(require,module,exports){ +},{"./errors":415,"./formatters":416}],418:[function(require,module,exports){ /* This file is part of web3.js. @@ -109193,7 +109193,7 @@ Method.prototype.request = function () { module.exports = Method; -},{"underscore":406,"web3-core-helpers":416,"web3-core-promievent":418,"web3-core-subscriptions":423,"web3-utils":460}],418:[function(require,module,exports){ +},{"underscore":407,"web3-core-helpers":417,"web3-core-promievent":419,"web3-core-subscriptions":424,"web3-utils":461}],419:[function(require,module,exports){ /* This file is part of web3.js. @@ -109270,7 +109270,7 @@ PromiEvent.resolve = function(value) { module.exports = PromiEvent; -},{"any-promise":148,"eventemitter3":286}],419:[function(require,module,exports){ +},{"any-promise":149,"eventemitter3":287}],420:[function(require,module,exports){ /* This file is part of web3.js. @@ -109344,7 +109344,7 @@ Batch.prototype.execute = function () { module.exports = Batch; -},{"./jsonrpc":422,"web3-core-helpers":416}],420:[function(require,module,exports){ +},{"./jsonrpc":423,"web3-core-helpers":417}],421:[function(require,module,exports){ /* This file is part of web3.js. @@ -109432,7 +109432,7 @@ if(typeof global.ethereumProvider !== 'undefined') { module.exports = givenProvider; -},{}],421:[function(require,module,exports){ +},{}],422:[function(require,module,exports){ /* This file is part of web3.js. @@ -109680,7 +109680,7 @@ module.exports = { BatchManager: BatchManager }; -},{"./batch.js":419,"./givenProvider.js":420,"./jsonrpc.js":422,"underscore":406,"web3-core-helpers":416,"web3-providers-http":455,"web3-providers-ipc":456,"web3-providers-ws":457}],422:[function(require,module,exports){ +},{"./batch.js":420,"./givenProvider.js":421,"./jsonrpc.js":423,"underscore":407,"web3-core-helpers":417,"web3-providers-http":456,"web3-providers-ipc":457,"web3-providers-ws":458}],423:[function(require,module,exports){ /* This file is part of web3.js. @@ -109771,7 +109771,7 @@ Jsonrpc.toBatchPayload = function (messages) { module.exports = Jsonrpc; -},{}],423:[function(require,module,exports){ +},{}],424:[function(require,module,exports){ /* This file is part of web3.js. @@ -109849,7 +109849,7 @@ module.exports = { subscription: Subscription }; -},{"./subscription.js":424}],424:[function(require,module,exports){ +},{"./subscription.js":425}],425:[function(require,module,exports){ /* This file is part of web3.js. @@ -110166,7 +110166,7 @@ Subscription.prototype.subscribe = function() { module.exports = Subscription; -},{"eventemitter3":286,"underscore":406,"web3-core-helpers":416}],425:[function(require,module,exports){ +},{"eventemitter3":287,"underscore":407,"web3-core-helpers":417}],426:[function(require,module,exports){ /* This file is part of web3.js. @@ -110237,7 +110237,7 @@ var extend = function (pckg) { module.exports = extend; -},{"web3-core-helpers":416,"web3-core-method":417,"web3-utils":460}],426:[function(require,module,exports){ +},{"web3-core-helpers":417,"web3-core-method":418,"web3-utils":461}],427:[function(require,module,exports){ /* This file is part of web3.js. @@ -110325,9 +110325,9 @@ module.exports = { }; -},{"./extend.js":425,"web3-core-requestmanager":421}],427:[function(require,module,exports){ -arguments[4][284][0].apply(exports,arguments) -},{"dup":284}],428:[function(require,module,exports){ +},{"./extend.js":426,"web3-core-requestmanager":422}],428:[function(require,module,exports){ +arguments[4][285][0].apply(exports,arguments) +},{"dup":285}],429:[function(require,module,exports){ /* This file is part of web3.js. @@ -110617,7 +110617,7 @@ module.exports = { toTwosComplement: utils.toTwosComplement }; -},{"./param":430,"bn.js":427,"underscore":406,"web3-utils":460}],429:[function(require,module,exports){ +},{"./param":431,"bn.js":428,"underscore":407,"web3-utils":461}],430:[function(require,module,exports){ /* This file is part of web3.js. @@ -111027,7 +111027,7 @@ var coder = new ABICoder([ module.exports = coder; -},{"./formatters":428,"./types/address":432,"./types/bool":433,"./types/bytes":434,"./types/dynamicbytes":435,"./types/int":436,"./types/string":437,"./types/uint":438,"underscore":406,"web3-utils":460}],430:[function(require,module,exports){ +},{"./formatters":429,"./types/address":433,"./types/bool":434,"./types/bytes":435,"./types/dynamicbytes":436,"./types/int":437,"./types/string":438,"./types/uint":439,"underscore":407,"web3-utils":461}],431:[function(require,module,exports){ /* This file is part of web3.js. @@ -111182,7 +111182,7 @@ SolidityParam.encodeList = function (params) { module.exports = SolidityParam; -},{"./formatters.js":428}],431:[function(require,module,exports){ +},{"./formatters.js":429}],432:[function(require,module,exports){ var f = require('./formatters'); var SolidityParam = require('./param'); @@ -111439,7 +111439,7 @@ SolidityType.prototype.decode = function (bytes, offset, name) { module.exports = SolidityType; -},{"./formatters":428,"./param":430}],432:[function(require,module,exports){ +},{"./formatters":429,"./param":431}],433:[function(require,module,exports){ var f = require('../formatters'); var formatters = require('web3-core-helpers').formatters; var SolidityType = require('../type'); @@ -111472,7 +111472,7 @@ SolidityTypeAddress.prototype.isType = function (name) { module.exports = SolidityTypeAddress; -},{"../formatters":428,"../type":431,"web3-core-helpers":416}],433:[function(require,module,exports){ +},{"../formatters":429,"../type":432,"web3-core-helpers":417}],434:[function(require,module,exports){ var f = require('../formatters'); var SolidityType = require('../type'); @@ -111500,7 +111500,7 @@ SolidityTypeBool.prototype.isType = function (name) { module.exports = SolidityTypeBool; -},{"../formatters":428,"../type":431}],434:[function(require,module,exports){ +},{"../formatters":429,"../type":432}],435:[function(require,module,exports){ var f = require('../formatters'); var SolidityType = require('../type'); @@ -111531,7 +111531,7 @@ SolidityTypeBytes.prototype.isType = function (name) { module.exports = SolidityTypeBytes; -},{"../formatters":428,"../type":431}],435:[function(require,module,exports){ +},{"../formatters":429,"../type":432}],436:[function(require,module,exports){ var f = require('../formatters'); var SolidityType = require('../type'); @@ -111553,7 +111553,7 @@ SolidityTypeDynamicBytes.prototype.isDynamicType = function () { module.exports = SolidityTypeDynamicBytes; -},{"../formatters":428,"../type":431}],436:[function(require,module,exports){ +},{"../formatters":429,"../type":432}],437:[function(require,module,exports){ var f = require('../formatters'); var SolidityType = require('../type'); @@ -111587,7 +111587,7 @@ SolidityTypeInt.prototype.isType = function (name) { module.exports = SolidityTypeInt; -},{"../formatters":428,"../type":431}],437:[function(require,module,exports){ +},{"../formatters":429,"../type":432}],438:[function(require,module,exports){ var f = require('../formatters'); var SolidityType = require('../type'); @@ -111609,7 +111609,7 @@ SolidityTypeString.prototype.isDynamicType = function () { module.exports = SolidityTypeString; -},{"../formatters":428,"../type":431}],438:[function(require,module,exports){ +},{"../formatters":429,"../type":432}],439:[function(require,module,exports){ var f = require('../formatters'); var SolidityType = require('../type'); @@ -111643,7 +111643,7 @@ SolidityTypeUInt.prototype.isType = function (name) { module.exports = SolidityTypeUInt; -},{"../formatters":428,"../type":431}],439:[function(require,module,exports){ +},{"../formatters":429,"../type":432}],440:[function(require,module,exports){ (function (Buffer){ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); @@ -111727,13 +111727,13 @@ module.exports = { decodeSignature: decodeSignature }; }).call(this,require("buffer").Buffer) -},{"./bytes":441,"./hash":442,"./nat":443,"./rlp":444,"buffer":206,"elliptic":260}],440:[function(require,module,exports){ -arguments[4][276][0].apply(exports,arguments) -},{"dup":276}],441:[function(require,module,exports){ +},{"./bytes":442,"./hash":443,"./nat":444,"./rlp":445,"buffer":207,"elliptic":261}],441:[function(require,module,exports){ arguments[4][277][0].apply(exports,arguments) -},{"./array.js":440,"dup":277}],442:[function(require,module,exports){ +},{"dup":277}],442:[function(require,module,exports){ arguments[4][278][0].apply(exports,arguments) -},{"dup":278}],443:[function(require,module,exports){ +},{"./array.js":441,"dup":278}],443:[function(require,module,exports){ +arguments[4][279][0].apply(exports,arguments) +},{"dup":279}],444:[function(require,module,exports){ var BN = require("bn.js"); var Bytes = require("./bytes"); @@ -111798,7 +111798,7 @@ module.exports = { div: div, sub: sub }; -},{"./bytes":441,"bn.js":172}],444:[function(require,module,exports){ +},{"./bytes":442,"bn.js":173}],445:[function(require,module,exports){ // The RLP format // Serialization and deserialization for the BytesTree type, under the following grammar: // | First byte | Meaning | @@ -111872,7 +111872,7 @@ var decode = function decode(hex) { }; module.exports = { encode: encode, decode: decode }; -},{}],445:[function(require,module,exports){ +},{}],446:[function(require,module,exports){ (function (global){ var rng; @@ -111907,7 +111907,7 @@ module.exports = rng; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],446:[function(require,module,exports){ +},{}],447:[function(require,module,exports){ // uuid.js // // Copyright (c) 2010-2012 Robert Kieffer @@ -112092,7 +112092,7 @@ uuid.unparse = unparse; module.exports = uuid; -},{"./rng":445}],447:[function(require,module,exports){ +},{"./rng":446}],448:[function(require,module,exports){ (function (global,Buffer){ /* This file is part of web3.js. @@ -112630,7 +112630,7 @@ if (typeof localStorage === 'undefined') { module.exports = Accounts; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"any-promise":148,"buffer":206,"crypto":214,"crypto-browserify":214,"eth-lib/lib/account":439,"eth-lib/lib/bytes":441,"eth-lib/lib/hash":442,"eth-lib/lib/nat":443,"eth-lib/lib/rlp":444,"scrypt.js":379,"underscore":406,"uuid":446,"web3-core":426,"web3-core-helpers":416,"web3-core-method":417,"web3-utils":460}],448:[function(require,module,exports){ +},{"any-promise":149,"buffer":207,"crypto":215,"crypto-browserify":215,"eth-lib/lib/account":440,"eth-lib/lib/bytes":442,"eth-lib/lib/hash":443,"eth-lib/lib/nat":444,"eth-lib/lib/rlp":445,"scrypt.js":380,"underscore":407,"uuid":447,"web3-core":427,"web3-core-helpers":417,"web3-core-method":418,"web3-utils":461}],449:[function(require,module,exports){ /* This file is part of web3.js. @@ -113531,9 +113531,9 @@ Contract.prototype._executeMethod = function _executeMethod(){ module.exports = Contract; -},{"underscore":406,"web3-core":426,"web3-core-helpers":416,"web3-core-method":417,"web3-core-promievent":418,"web3-core-subscriptions":423,"web3-eth-abi":429,"web3-utils":460}],449:[function(require,module,exports){ -arguments[4][284][0].apply(exports,arguments) -},{"dup":284}],450:[function(require,module,exports){ +},{"underscore":407,"web3-core":427,"web3-core-helpers":417,"web3-core-method":418,"web3-core-promievent":419,"web3-core-subscriptions":424,"web3-eth-abi":430,"web3-utils":461}],450:[function(require,module,exports){ +arguments[4][285][0].apply(exports,arguments) +},{"dup":285}],451:[function(require,module,exports){ /* This file is part of web3.js. @@ -113802,7 +113802,7 @@ Iban.prototype.toString = function () { module.exports = Iban; -},{"bn.js":449,"web3-utils":460}],451:[function(require,module,exports){ +},{"bn.js":450,"web3-utils":461}],452:[function(require,module,exports){ /* This file is part of web3.js. @@ -113954,7 +113954,7 @@ module.exports = Personal; -},{"web3-core":426,"web3-core-helpers":416,"web3-core-method":417,"web3-net":454,"web3-utils":460}],452:[function(require,module,exports){ +},{"web3-core":427,"web3-core-helpers":417,"web3-core-method":418,"web3-net":455,"web3-utils":461}],453:[function(require,module,exports){ /* This file is part of web3.js. @@ -114034,7 +114034,7 @@ var getNetworkType = function (callback) { module.exports = getNetworkType; -},{"underscore":406}],453:[function(require,module,exports){ +},{"underscore":407}],454:[function(require,module,exports){ /* This file is part of web3.js. @@ -114507,7 +114507,7 @@ core.addProviders(Eth); module.exports = Eth; -},{"./getNetworkType.js":452,"underscore":406,"web3-core":426,"web3-core-helpers":416,"web3-core-method":417,"web3-core-subscriptions":423,"web3-eth-abi":429,"web3-eth-accounts":447,"web3-eth-contract":448,"web3-eth-iban":450,"web3-eth-personal":451,"web3-net":454,"web3-utils":460}],454:[function(require,module,exports){ +},{"./getNetworkType.js":453,"underscore":407,"web3-core":427,"web3-core-helpers":417,"web3-core-method":418,"web3-core-subscriptions":424,"web3-eth-abi":430,"web3-eth-accounts":448,"web3-eth-contract":449,"web3-eth-iban":451,"web3-eth-personal":452,"web3-net":455,"web3-utils":461}],455:[function(require,module,exports){ /* This file is part of web3.js. @@ -114576,7 +114576,7 @@ module.exports = Net; -},{"web3-core":426,"web3-core-method":417,"web3-utils":460}],455:[function(require,module,exports){ +},{"web3-core":427,"web3-core-method":418,"web3-utils":461}],456:[function(require,module,exports){ /* This file is part of web3.js. @@ -114673,7 +114673,7 @@ HttpProvider.prototype.send = function (payload, callback) { module.exports = HttpProvider; -},{"web3-core-helpers":416,"xhr2":474}],456:[function(require,module,exports){ +},{"web3-core-helpers":417,"xhr2":475}],457:[function(require,module,exports){ /* This file is part of web3.js. @@ -114984,7 +114984,7 @@ IpcProvider.prototype.reset = function () { module.exports = IpcProvider; -},{"oboe":329,"underscore":406,"web3-core-helpers":416}],457:[function(require,module,exports){ +},{"oboe":330,"underscore":407,"web3-core-helpers":417}],458:[function(require,module,exports){ (function (Buffer){ /* This file is part of web3.js. @@ -115354,7 +115354,7 @@ WebsocketProvider.prototype.reset = function () { module.exports = WebsocketProvider; }).call(this,require("buffer").Buffer) -},{"buffer":206,"underscore":406,"url":408,"web3-core-helpers":416,"websocket":465}],458:[function(require,module,exports){ +},{"buffer":207,"underscore":407,"url":409,"web3-core-helpers":417,"websocket":466}],459:[function(require,module,exports){ /* This file is part of web3.js. @@ -115539,9 +115539,9 @@ module.exports = Shh; -},{"web3-core":426,"web3-core-method":417,"web3-core-subscriptions":423,"web3-net":454}],459:[function(require,module,exports){ -arguments[4][284][0].apply(exports,arguments) -},{"dup":284}],460:[function(require,module,exports){ +},{"web3-core":427,"web3-core-method":418,"web3-core-subscriptions":424,"web3-net":455}],460:[function(require,module,exports){ +arguments[4][285][0].apply(exports,arguments) +},{"dup":285}],461:[function(require,module,exports){ /* This file is part of web3.js. @@ -115863,7 +115863,7 @@ module.exports = { }; -},{"./soliditySha3.js":461,"./utils.js":462,"ethjs-unit":283,"randomhex":362,"underscore":406}],461:[function(require,module,exports){ +},{"./soliditySha3.js":462,"./utils.js":463,"ethjs-unit":284,"randomhex":363,"underscore":407}],462:[function(require,module,exports){ /* This file is part of web3.js. @@ -116110,7 +116110,7 @@ var soliditySha3 = function () { module.exports = soliditySha3; -},{"./utils.js":462,"bn.js":459,"underscore":406}],462:[function(require,module,exports){ +},{"./utils.js":463,"bn.js":460,"underscore":407}],463:[function(require,module,exports){ /* This file is part of web3.js. @@ -116579,7 +116579,7 @@ module.exports = { sha3: sha3 }; -},{"bn.js":459,"eth-lib/lib/hash":278,"number-to-bn":327,"underscore":406,"utf8":410}],463:[function(require,module,exports){ +},{"bn.js":460,"eth-lib/lib/hash":279,"number-to-bn":328,"underscore":407,"utf8":411}],464:[function(require,module,exports){ module.exports={ "_from": "web3@1.0.0-beta.34", "_id": "web3@1.0.0-beta.34", @@ -116665,7 +116665,7 @@ module.exports={ "version": "1.0.0-beta.34" } -},{}],464:[function(require,module,exports){ +},{}],465:[function(require,module,exports){ /* This file is part of web3.js. @@ -116746,7 +116746,7 @@ core.addProviders(Web3); module.exports = Web3; -},{"../package.json":463,"web3-bzz":413,"web3-core":426,"web3-eth":453,"web3-eth-personal":451,"web3-net":454,"web3-shh":458,"web3-utils":460}],465:[function(require,module,exports){ +},{"../package.json":464,"web3-bzz":414,"web3-core":427,"web3-eth":454,"web3-eth-personal":452,"web3-net":455,"web3-shh":459,"web3-utils":461}],466:[function(require,module,exports){ var _global = (function() { return this || {}; })(); var NativeWebSocket = _global.WebSocket || _global.MozWebSocket; var websocket_version = require('./version'); @@ -116790,10 +116790,10 @@ module.exports = { 'version' : websocket_version }; -},{"./version":466}],466:[function(require,module,exports){ +},{"./version":467}],467:[function(require,module,exports){ module.exports = require('../package.json').version; -},{"../package.json":467}],467:[function(require,module,exports){ +},{"../package.json":468}],468:[function(require,module,exports){ module.exports={ "_from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible", "_id": "websocket@1.0.26", @@ -116888,7 +116888,7 @@ module.exports={ "version": "1.0.26" } -},{}],468:[function(require,module,exports){ +},{}],469:[function(require,module,exports){ var request = require('xhr-request') module.exports = function (url, options) { @@ -116900,7 +116900,7 @@ module.exports = function (url, options) { }); }; -},{"xhr-request":469}],469:[function(require,module,exports){ +},{"xhr-request":470}],470:[function(require,module,exports){ var queryString = require('query-string') var setQuery = require('url-set-query') var assign = require('object-assign') @@ -116961,7 +116961,7 @@ function xhrRequest (url, opt, cb) { return request(opt, cb) } -},{"./lib/ensure-header.js":470,"./lib/request.js":472,"object-assign":328,"query-string":354,"url-set-query":407}],470:[function(require,module,exports){ +},{"./lib/ensure-header.js":471,"./lib/request.js":473,"object-assign":329,"query-string":355,"url-set-query":408}],471:[function(require,module,exports){ module.exports = ensureHeader function ensureHeader (headers, key, value) { var lower = key.toLowerCase() @@ -116970,7 +116970,7 @@ function ensureHeader (headers, key, value) { } } -},{}],471:[function(require,module,exports){ +},{}],472:[function(require,module,exports){ module.exports = getResponse function getResponse (opt, resp) { if (!resp) return null @@ -116984,7 +116984,7 @@ function getResponse (opt, resp) { } } -},{}],472:[function(require,module,exports){ +},{}],473:[function(require,module,exports){ var xhr = require('xhr') var normalize = require('./normalize-response') var noop = function () {} @@ -117028,7 +117028,7 @@ function xhrRequest (opt, cb) { return req } -},{"./normalize-response":471,"xhr":473}],473:[function(require,module,exports){ +},{"./normalize-response":472,"xhr":474}],474:[function(require,module,exports){ "use strict"; var window = require("global/window") var isFunction = require("is-function") @@ -117277,10 +117277,10 @@ function getXml(xhr) { function noop() {} -},{"global/window":291,"is-function":311,"parse-headers":335,"xtend":475}],474:[function(require,module,exports){ +},{"global/window":292,"is-function":312,"parse-headers":336,"xtend":476}],475:[function(require,module,exports){ module.exports = XMLHttpRequest; -},{}],475:[function(require,module,exports){ +},{}],476:[function(require,module,exports){ module.exports = extend var hasOwnProperty = Object.prototype.hasOwnProperty; diff --git a/ccxt.d.ts b/ccxt.d.ts index 3725bae8352fb..0a8ed25aec42b 100644 --- a/ccxt.d.ts +++ b/ccxt.d.ts @@ -410,6 +410,7 @@ declare module 'ccxt' { export class lakebtc extends Exchange {} export class lbank extends Exchange {} export class liqui extends Exchange {} + export class liquid extends Exchange {} export class livecoin extends Exchange {} export class luno extends Exchange {} export class lykke extends Exchange {} @@ -422,9 +423,9 @@ declare module 'ccxt' { export class okex extends okcoinusd {} export class paymium extends Exchange {} export class poloniex extends Exchange {} - export class qryptos extends Exchange {} + export class qryptos extends liquid {} export class quadrigacx extends Exchange {} - export class quoinex extends qryptos {} + export class quoinex extends liquid {} export class rightbtc extends Exchange {} export class southxchange extends Exchange {} export class surbitcoin extends foxbit {} diff --git a/ccxt.js b/ccxt.js index 4c53ff6cf12ee..501544cc9620f 100644 --- a/ccxt.js +++ b/ccxt.js @@ -37,7 +37,7 @@ const Exchange = require ('./js/base/Exchange') //----------------------------------------------------------------------------- // this is updated by vss.js when building -const version = '1.17.321' +const version = '1.17.322' Exchange.ccxtVersion = version @@ -142,6 +142,7 @@ const exchanges = { 'lakebtc': require ('./js/lakebtc.js'), 'lbank': require ('./js/lbank.js'), 'liqui': require ('./js/liqui.js'), + 'liquid': require ('./js/liquid.js'), 'livecoin': require ('./js/livecoin.js'), 'luno': require ('./js/luno.js'), 'lykke': require ('./js/lykke.js'), diff --git a/doc/README.rst b/doc/README.rst index 90d4fa9ca49d3..3898b9d9071b0 100644 --- a/doc/README.rst +++ b/doc/README.rst @@ -49,7 +49,7 @@ Certified Cryptocurrency Exchanges Supported Cryptocurrency Exchange Markets ----------------------------------------- -The ccxt library currently supports the following 131 cryptocurrency exchange markets and trading APIs: +The ccxt library currently supports the following 132 cryptocurrency exchange markets and trading APIs: +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | | id | name | certified | ver | doc | countries | @@ -250,6 +250,8 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |liqui| | liqui | `Liqui `__ | | 3 | `API `__ | Ukraine | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ +| |liquid| | liquid | `Liquid `__ | | 2 | `API `__ | Japan, China, Taiwan | ++----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |livecoin| | livecoin | `LiveCoin `__ | | \* | `API `__ | US, UK, Russia | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |luno| | luno | `luno `__ | | 1 | `API `__ | UK, Singapore, South Africa | @@ -274,11 +276,11 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |poloniex| | poloniex | `Poloniex `__ | | \* | `API `__ | US | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ -| |qryptos| | qryptos | `QRYPTOS `__ | | 2 | `API `__ | China, Taiwan | +| |qryptos| | qryptos | `QRYPTOS `__ | | 2 | `API `__ | Japan, China, Taiwan | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |quadrigacx| | quadrigacx | `QuadrigaCX `__ | | 2 | `API `__ | Canada | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ -| |quoinex| | quoinex | `QUOINEX `__ | | 2 | `API `__ | Japan, Singapore, Vietnam | +| |quoinex| | quoinex | `QUOINEX `__ | | 2 | `API `__ | Japan, China, Taiwan | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |rightbtc| | rightbtc | `RightBTC `__ | | \* | `API `__ | United Arab Emirates | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ @@ -755,6 +757,7 @@ Social .. |lakebtc| image:: https://user-images.githubusercontent.com/1294454/28074120-72b7c38a-6660-11e7-92d9-d9027502281d.jpg .. |lbank| image:: https://user-images.githubusercontent.com/1294454/38063602-9605e28a-3302-11e8-81be-64b1e53c4cfb.jpg .. |liqui| image:: https://user-images.githubusercontent.com/1294454/27982022-75aea828-63a0-11e7-9511-ca584a8edd74.jpg +.. |liquid| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |livecoin| image:: https://user-images.githubusercontent.com/1294454/27980768-f22fc424-638a-11e7-89c9-6010a54ff9be.jpg .. |luno| image:: https://user-images.githubusercontent.com/1294454/27766607-8c1a69d8-5ede-11e7-930c-540b5eb9be24.jpg .. |lykke| image:: https://user-images.githubusercontent.com/1294454/34487620-3139a7b0-efe6-11e7-90f5-e520cef74451.jpg @@ -767,9 +770,9 @@ Social .. |okex| image:: https://user-images.githubusercontent.com/1294454/32552768-0d6dd3c6-c4a6-11e7-90f8-c043b64756a7.jpg .. |paymium| image:: https://user-images.githubusercontent.com/1294454/27790564-a945a9d4-5ff9-11e7-9d2d-b635763f2f24.jpg .. |poloniex| image:: https://user-images.githubusercontent.com/1294454/27766817-e9456312-5ee6-11e7-9b3c-b628ca5626a5.jpg -.. |qryptos| image:: https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg +.. |qryptos| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |quadrigacx| image:: https://user-images.githubusercontent.com/1294454/27766825-98a6d0de-5ee7-11e7-9fa4-38e11a2c6f52.jpg -.. |quoinex| image:: https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg +.. |quoinex| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |rightbtc| image:: https://user-images.githubusercontent.com/1294454/42633917-7d20757e-85ea-11e8-9f53-fffe9fbb7695.jpg .. |southxchange| image:: https://user-images.githubusercontent.com/1294454/27838912-4f94ec8a-60f6-11e7-9e5d-bbf9bd50a559.jpg .. |surbitcoin| image:: https://user-images.githubusercontent.com/1294454/27991511-f0a50194-6481-11e7-99b5-8f02932424cc.jpg diff --git a/doc/exchanges-by-country.rst b/doc/exchanges-by-country.rst index a8030d08f0c72..0ca6ab6ead790 100644 --- a/doc/exchanges-by-country.rst +++ b/doc/exchanges-by-country.rst @@ -84,13 +84,17 @@ The ccxt library currently supports the following cryptocurrency exchange market +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | China | |lbank| | lbank | `LBank `__ | | 1 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ +| China | |liquid| | liquid | `Liquid `__ | | 2 | `API `__ | ++--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | China | |okcoincny| | okcoincny | `OKCoin CNY `__ | | 1 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | China | |okcoinusd| | okcoinusd | `OKCoin USD `__ | | 1 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | China | |okex| | okex | `OKEX `__ | | 1 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ -| China | |qryptos| | qryptos | `QRYPTOS `__ | | 2 | `API `__ | +| China | |qryptos| | qryptos | `QRYPTOS `__ | | 2 | `API `__ | ++--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ +| China | |quoinex| | quoinex | `QUOINEX `__ | | 2 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | China | |yunbi| | yunbi | `YUNBI `__ | | 2 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ @@ -176,7 +180,11 @@ The ccxt library currently supports the following cryptocurrency exchange market +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | Japan | |coinexchange| | coinexchange | `CoinExchange `__ | | \* | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ -| Japan | |quoinex| | quoinex | `QUOINEX `__ | | 2 | `API `__ | +| Japan | |liquid| | liquid | `Liquid `__ | | 2 | `API `__ | ++--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ +| Japan | |qryptos| | qryptos | `QRYPTOS `__ | | 2 | `API `__ | ++--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ +| Japan | |quoinex| | quoinex | `QUOINEX `__ | | 2 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | Japan | |zaif| | zaif | `Zaif `__ | | 1 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ @@ -230,8 +238,6 @@ The ccxt library currently supports the following cryptocurrency exchange market +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | Singapore | |luno| | luno | `luno `__ | | 1 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ -| Singapore | |quoinex| | quoinex | `QUOINEX `__ | | 2 | `API `__ | -+--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | Singapore | |uex| | uex | `UEX `__ | | 1.0.3 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | South Africa | |ice3x| | ice3x | `ICE3X `__ | | 1 | `API `__ | @@ -260,7 +266,11 @@ The ccxt library currently supports the following cryptocurrency exchange market +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | Taiwan | |cobinhood| | cobinhood | `COBINHOOD `__ | | 1 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ -| Taiwan | |qryptos| | qryptos | `QRYPTOS `__ | | 2 | `API `__ | +| Taiwan | |liquid| | liquid | `Liquid `__ | | 2 | `API `__ | ++--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ +| Taiwan | |qryptos| | qryptos | `QRYPTOS `__ | | 2 | `API `__ | ++--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ +| Taiwan | |quoinex| | quoinex | `QUOINEX `__ | | 2 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | Tanzania | |nova| | nova | `Novaexchange `__ | | 2 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ @@ -352,8 +362,6 @@ The ccxt library currently supports the following cryptocurrency exchange market +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | Vietnam | |coinexchange| | coinexchange | `CoinExchange `__ | | \* | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ -| Vietnam | |quoinex| | quoinex | `QUOINEX `__ | | 2 | `API `__ | -+--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ | Vietnam | |vbtc| | vbtc | `VBTC `__ | | 1 | `API `__ | +--------------------------+----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+ @@ -394,10 +402,12 @@ The ccxt library currently supports the following cryptocurrency exchange market .. |huobipro| image:: https://user-images.githubusercontent.com/1294454/27766569-15aa7b9a-5edd-11e7-9e7f-44791f4ee49c.jpg .. |jubi| image:: https://user-images.githubusercontent.com/1294454/27766581-9d397d9a-5edd-11e7-8fb9-5d8236c0e692.jpg .. |lbank| image:: https://user-images.githubusercontent.com/1294454/38063602-9605e28a-3302-11e8-81be-64b1e53c4cfb.jpg +.. |liquid| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |okcoincny| image:: https://user-images.githubusercontent.com/1294454/27766792-8be9157a-5ee5-11e7-926c-6d69b8d3378d.jpg .. |okcoinusd| image:: https://user-images.githubusercontent.com/1294454/27766791-89ffb502-5ee5-11e7-8a5b-c5950b68ac65.jpg .. |okex| image:: https://user-images.githubusercontent.com/1294454/32552768-0d6dd3c6-c4a6-11e7-90f8-c043b64756a7.jpg -.. |qryptos| image:: https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg +.. |qryptos| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg +.. |quoinex| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |yunbi| image:: https://user-images.githubusercontent.com/1294454/28570548-4d646c40-7147-11e7-9cf6-839b93e6d622.jpg .. |zb| image:: https://user-images.githubusercontent.com/1294454/32859187-cd5214f0-ca5e-11e7-967d-96568e2e2bd1.jpg .. |cex| image:: https://user-images.githubusercontent.com/1294454/27766442-8ddc33b0-5ed8-11e7-8b98-f786aef0f3c9.jpg @@ -431,7 +441,6 @@ The ccxt library currently supports the following cryptocurrency exchange market .. |bitbank| image:: https://user-images.githubusercontent.com/1294454/37808081-b87f2d9c-2e59-11e8-894d-c1900b7584fe.jpg .. |bitflyer| image:: https://user-images.githubusercontent.com/1294454/28051642-56154182-660e-11e7-9b0d-6042d1e6edd8.jpg .. |btcbox| image:: https://user-images.githubusercontent.com/1294454/31275803-4df755a8-aaa1-11e7-9abb-11ec2fad9f2d.jpg -.. |quoinex| image:: https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg .. |zaif| image:: https://user-images.githubusercontent.com/1294454/27766927-39ca2ada-5eeb-11e7-972f-1b4199518ca6.jpg .. |therock| image:: https://user-images.githubusercontent.com/1294454/27766869-75057fa2-5ee9-11e7-9a6f-13e641fa4707.jpg .. |bitso| image:: https://user-images.githubusercontent.com/1294454/27766335-715ce7aa-5ed5-11e7-88a8-173a27bb30fe.jpg diff --git a/doc/exchanges.rst b/doc/exchanges.rst index c8aaf8fbac75f..791845f1c0bf0 100644 --- a/doc/exchanges.rst +++ b/doc/exchanges.rst @@ -1,7 +1,7 @@ Supported Exchanges =================== -The ccxt library currently supports the following 131 cryptocurrency exchange markets and trading APIs: +The ccxt library currently supports the following 132 cryptocurrency exchange markets and trading APIs: +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | | id | name | certified | ver | doc | countries | @@ -202,6 +202,8 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |liqui| | liqui | `Liqui `__ | | 3 | `API `__ | Ukraine | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ +| |liquid| | liquid | `Liquid `__ | | 2 | `API `__ | Japan, China, Taiwan | ++----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |livecoin| | livecoin | `LiveCoin `__ | | \* | `API `__ | US, UK, Russia | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |luno| | luno | `luno `__ | | 1 | `API `__ | UK, Singapore, South Africa | @@ -226,11 +228,11 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |poloniex| | poloniex | `Poloniex `__ | | \* | `API `__ | US | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ -| |qryptos| | qryptos | `QRYPTOS `__ | | 2 | `API `__ | China, Taiwan | +| |qryptos| | qryptos | `QRYPTOS `__ | | 2 | `API `__ | Japan, China, Taiwan | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |quadrigacx| | quadrigacx | `QuadrigaCX `__ | | 2 | `API `__ | Canada | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ -| |quoinex| | quoinex | `QUOINEX `__ | | 2 | `API `__ | Japan, Singapore, Vietnam | +| |quoinex| | quoinex | `QUOINEX `__ | | 2 | `API `__ | Japan, China, Taiwan | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |rightbtc| | rightbtc | `RightBTC `__ | | \* | `API `__ | United Arab Emirates | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ @@ -367,6 +369,7 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma .. |lakebtc| image:: https://user-images.githubusercontent.com/1294454/28074120-72b7c38a-6660-11e7-92d9-d9027502281d.jpg .. |lbank| image:: https://user-images.githubusercontent.com/1294454/38063602-9605e28a-3302-11e8-81be-64b1e53c4cfb.jpg .. |liqui| image:: https://user-images.githubusercontent.com/1294454/27982022-75aea828-63a0-11e7-9511-ca584a8edd74.jpg +.. |liquid| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |livecoin| image:: https://user-images.githubusercontent.com/1294454/27980768-f22fc424-638a-11e7-89c9-6010a54ff9be.jpg .. |luno| image:: https://user-images.githubusercontent.com/1294454/27766607-8c1a69d8-5ede-11e7-930c-540b5eb9be24.jpg .. |lykke| image:: https://user-images.githubusercontent.com/1294454/34487620-3139a7b0-efe6-11e7-90f5-e520cef74451.jpg @@ -379,9 +382,9 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma .. |okex| image:: https://user-images.githubusercontent.com/1294454/32552768-0d6dd3c6-c4a6-11e7-90f8-c043b64756a7.jpg .. |paymium| image:: https://user-images.githubusercontent.com/1294454/27790564-a945a9d4-5ff9-11e7-9d2d-b635763f2f24.jpg .. |poloniex| image:: https://user-images.githubusercontent.com/1294454/27766817-e9456312-5ee6-11e7-9b3c-b628ca5626a5.jpg -.. |qryptos| image:: https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg +.. |qryptos| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |quadrigacx| image:: https://user-images.githubusercontent.com/1294454/27766825-98a6d0de-5ee7-11e7-9fa4-38e11a2c6f52.jpg -.. |quoinex| image:: https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg +.. |quoinex| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |rightbtc| image:: https://user-images.githubusercontent.com/1294454/42633917-7d20757e-85ea-11e8-9f53-fffe9fbb7695.jpg .. |southxchange| image:: https://user-images.githubusercontent.com/1294454/27838912-4f94ec8a-60f6-11e7-9e5d-bbf9bd50a559.jpg .. |surbitcoin| image:: https://user-images.githubusercontent.com/1294454/27991511-f0a50194-6481-11e7-99b5-8f02932424cc.jpg diff --git a/doc/manual.rst b/doc/manual.rst index 14b83b5b77d09..9244fa73610e1 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -55,7 +55,7 @@ Full public and private HTTP REST APIs for all exchanges are implemented. WebSoc Exchanges ========= -The ccxt library currently supports the following 131 cryptocurrency exchange markets and trading APIs: +The ccxt library currently supports the following 132 cryptocurrency exchange markets and trading APIs: +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | | id | name | certified | ver | doc | countries | @@ -256,6 +256,8 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |liqui| | liqui | `Liqui `__ | | 3 | `API `__ | Ukraine | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ +| |liquid| | liquid | `Liquid `__ | | 2 | `API `__ | Japan, China, Taiwan | ++----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |livecoin| | livecoin | `LiveCoin `__ | | \* | `API `__ | US, UK, Russia | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |luno| | luno | `luno `__ | | 1 | `API `__ | UK, Singapore, South Africa | @@ -280,11 +282,11 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |poloniex| | poloniex | `Poloniex `__ | | \* | `API `__ | US | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ -| |qryptos| | qryptos | `QRYPTOS `__ | | 2 | `API `__ | China, Taiwan | +| |qryptos| | qryptos | `QRYPTOS `__ | | 2 | `API `__ | Japan, China, Taiwan | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |quadrigacx| | quadrigacx | `QuadrigaCX `__ | | 2 | `API `__ | Canada | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ -| |quoinex| | quoinex | `QUOINEX `__ | | 2 | `API `__ | Japan, Singapore, Vietnam | +| |quoinex| | quoinex | `QUOINEX `__ | | 2 | `API `__ | Japan, China, Taiwan | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | |rightbtc| | rightbtc | `RightBTC `__ | | \* | `API `__ | United Arab Emirates | +----------------------+--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ @@ -3329,6 +3331,7 @@ Notes .. |lakebtc| image:: https://user-images.githubusercontent.com/1294454/28074120-72b7c38a-6660-11e7-92d9-d9027502281d.jpg .. |lbank| image:: https://user-images.githubusercontent.com/1294454/38063602-9605e28a-3302-11e8-81be-64b1e53c4cfb.jpg .. |liqui| image:: https://user-images.githubusercontent.com/1294454/27982022-75aea828-63a0-11e7-9511-ca584a8edd74.jpg +.. |liquid| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |livecoin| image:: https://user-images.githubusercontent.com/1294454/27980768-f22fc424-638a-11e7-89c9-6010a54ff9be.jpg .. |luno| image:: https://user-images.githubusercontent.com/1294454/27766607-8c1a69d8-5ede-11e7-930c-540b5eb9be24.jpg .. |lykke| image:: https://user-images.githubusercontent.com/1294454/34487620-3139a7b0-efe6-11e7-90f5-e520cef74451.jpg @@ -3341,9 +3344,9 @@ Notes .. |okex| image:: https://user-images.githubusercontent.com/1294454/32552768-0d6dd3c6-c4a6-11e7-90f8-c043b64756a7.jpg .. |paymium| image:: https://user-images.githubusercontent.com/1294454/27790564-a945a9d4-5ff9-11e7-9d2d-b635763f2f24.jpg .. |poloniex| image:: https://user-images.githubusercontent.com/1294454/27766817-e9456312-5ee6-11e7-9b3c-b628ca5626a5.jpg -.. |qryptos| image:: https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg +.. |qryptos| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |quadrigacx| image:: https://user-images.githubusercontent.com/1294454/27766825-98a6d0de-5ee7-11e7-9fa4-38e11a2c6f52.jpg -.. |quoinex| image:: https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg +.. |quoinex| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |rightbtc| image:: https://user-images.githubusercontent.com/1294454/42633917-7d20757e-85ea-11e8-9f53-fffe9fbb7695.jpg .. |southxchange| image:: https://user-images.githubusercontent.com/1294454/27838912-4f94ec8a-60f6-11e7-9e5d-bbf9bd50a559.jpg .. |surbitcoin| image:: https://user-images.githubusercontent.com/1294454/27991511-f0a50194-6481-11e7-99b5-8f02932424cc.jpg diff --git a/package.json b/package.json index bf39c6f1555aa..317f336c70364 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ccxt", - "version": "1.17.321", + "version": "1.17.322", "description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 100+ exchanges", "main": "./ccxt.js", "unpkg": "build/ccxt.browser.js", diff --git a/php/Exchange.php b/php/Exchange.php index efb3f4487d525..4ae56bbf2bc67 100644 --- a/php/Exchange.php +++ b/php/Exchange.php @@ -34,7 +34,7 @@ use kornrunner\Secp256k1; use kornrunner\Solidity; -$version = '1.17.321'; +$version = '1.17.322'; // rounding mode const TRUNCATE = 0; @@ -50,7 +50,7 @@ class Exchange { - const VERSION = '1.17.321'; + const VERSION = '1.17.322'; public static $eth_units = array ( 'wei' => '1', @@ -178,6 +178,7 @@ class Exchange { 'lakebtc', 'lbank', 'liqui', + 'liquid', 'livecoin', 'luno', 'lykke', diff --git a/php/kucoin.php b/php/kucoin.php index 120647ea755a4..06c48ba8e11e6 100644 --- a/php/kucoin.php +++ b/php/kucoin.php @@ -1018,17 +1018,20 @@ public function parse_trade ($trade, $market = null) { $amount = $this->safe_float($trade, 'amount'); $cost = $this->safe_float($trade, 'dealValue'); $feeCurrency = null; - if ($market !== null) { - $feeCurrency = ($side === 'sell') ? $market['quote'] : $market['base']; - } else { - $feeCurrencyField = ($side === 'sell') ? 'coinTypePair' : 'coinType'; - $feeCurrency = $this->safe_string($order, $feeCurrencyField); - if ($feeCurrency !== null) { - if (is_array ($this->currencies_by_id) && array_key_exists ($feeCurrency, $this->currencies_by_id)) - $feeCurrency = $this->currencies_by_id[$feeCurrency]['code']; + if ($side !== null) { + if ($market !== null) { + $feeCurrency = ($side === 'sell') ? $market['quote'] : $market['base']; + } else { + $feeCurrencyField = ($side === 'sell') ? 'coinTypePair' : 'coinType'; + $feeCurrency = $this->safe_string($order, $feeCurrencyField); + if ($feeCurrency !== null) { + if (is_array ($this->currencies_by_id) && array_key_exists ($feeCurrency, $this->currencies_by_id)) + $feeCurrency = $this->currencies_by_id[$feeCurrency]['code']; + } } } $fee = array ( + 'rate' => $this->safe_float($trade, 'feeRate'), 'cost' => $this->safe_float($trade, 'fee'), 'currency' => $feeCurrency, ); diff --git a/php/liquid.php b/php/liquid.php index a1f3177fc3254..7696afc2aea27 100644 --- a/php/liquid.php +++ b/php/liquid.php @@ -11,8 +11,8 @@ class liquid extends Exchange { public function describe () { return array_replace_recursive (parent::describe (), array ( - 'id' => 'qryptos', - 'name' => 'QRYPTOS', + 'id' => 'liquid', + 'name' => 'Liquid', 'countries' => array ( 'JP', 'CN', 'TW' ), 'version' => '2', 'rateLimit' => 1000, @@ -211,12 +211,10 @@ public function parse_ticker ($ticker, $market = null) { } else { $baseId = $this->safe_string($ticker, 'base_currency'); $quoteId = $this->safe_string($ticker, 'quoted_currency'); - $base = $this->common_currency_code($baseId); - $quote = $this->common_currency_code($quoteId); if (is_array ($this->markets) && array_key_exists ($symbol, $this->markets)) { $market = $this->markets[$symbol]; } else { - $symbol = $base . '/' . $quote; + $symbol = $this->common_currency_code($baseId) . '/' . $this->common_currency_code($quoteId); } } } @@ -262,12 +260,9 @@ public function fetch_tickers ($symbols = null, $params = array ()) { $tickers = $this->publicGetProducts ($params); $result = array (); for ($t = 0; $t < count ($tickers); $t++) { - $ticker = $tickers[$t]; - $base = $ticker['base_currency']; - $quote = $ticker['quoted_currency']; - $symbol = $base . '/' . $quote; - $market = $this->markets[$symbol]; - $result[$symbol] = $this->parse_ticker($ticker, $market); + $ticker = $this->parse_ticker($tickers[$t]); + $symbol = $ticker['symbol']; + $result[$symbol] = $ticker; } return $result; } diff --git a/php/qryptos.php b/php/qryptos.php index a57421bd4f355..fe6c8addaee74 100644 --- a/php/qryptos.php +++ b/php/qryptos.php @@ -7,529 +7,12 @@ use Exception as Exception; // a common import -class qryptos extends Exchange { +class qryptos extends liquid { public function describe () { return array_replace_recursive (parent::describe (), array ( 'id' => 'qryptos', 'name' => 'QRYPTOS', - 'countries' => array ( 'CN', 'TW' ), - 'version' => '2', - 'rateLimit' => 1000, - 'has' => array ( - 'CORS' => false, - 'fetchTickers' => true, - 'fetchOrder' => true, - 'fetchOrders' => true, - 'fetchOpenOrders' => true, - 'fetchClosedOrders' => true, - 'fetchMyTrades' => true, - ), - 'urls' => array ( - 'logo' => 'https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg', - 'api' => 'https://api.qryptos.com', - 'www' => 'https://www.qryptos.com', - 'doc' => array ( - 'https://developers.quoine.com', - 'https://developers.quoine.com/v2', - ), - 'fees' => 'https://qryptos.zendesk.com/hc/en-us/articles/115007858167-Fees', - ), - 'api' => array ( - 'public' => array ( - 'get' => array ( - 'products', - 'products/{id}', - 'products/{id}/price_levels', - 'executions', - 'ir_ladders/{currency}', - ), - ), - 'private' => array ( - 'get' => array ( - 'accounts/balance', - 'accounts/main_asset', - 'crypto_accounts', - 'executions/me', - 'fiat_accounts', - 'loan_bids', - 'loans', - 'orders', - 'orders/{id}', - 'orders/{id}/trades', - 'orders/{id}/executions', - 'trades', - 'trades/{id}/loans', - 'trading_accounts', - 'trading_accounts/{id}', - ), - 'post' => array ( - 'fiat_accounts', - 'loan_bids', - 'orders', - ), - 'put' => array ( - 'loan_bids/{id}/close', - 'loans/{id}', - 'orders/{id}', - 'orders/{id}/cancel', - 'trades/{id}', - 'trades/{id}/close', - 'trades/close_all', - 'trading_accounts/{id}', - ), - ), - ), - 'skipJsonOnStatusCodes' => [401], - 'exceptions' => array ( - 'messages' => array ( - 'API Authentication failed' => '\\ccxt\\AuthenticationError', - 'Nonce is too small' => '\\ccxt\\InvalidNonce', - 'Order not found' => '\\ccxt\\OrderNotFound', - 'user' => array ( - 'not_enough_free_balance' => '\\ccxt\\InsufficientFunds', - ), - 'price' => array ( - 'must_be_positive' => '\\ccxt\\InvalidOrder', - ), - 'quantity' => array ( - 'less_than_order_size' => '\\ccxt\\InvalidOrder', - ), - ), - ), - 'commonCurrencies' => array ( - 'WIN' => 'WCOIN', - ), )); } - - public function fetch_markets () { - $markets = $this->publicGetProducts (); - $result = array (); - for ($p = 0; $p < count ($markets); $p++) { - $market = $markets[$p]; - $id = (string) $market['id']; - $baseId = $market['base_currency']; - $quoteId = $market['quoted_currency']; - $base = $this->common_currency_code($baseId); - $quote = $this->common_currency_code($quoteId); - $symbol = $base . '/' . $quote; - $maker = $this->safe_float($market, 'maker_fee'); - $taker = $this->safe_float($market, 'taker_fee'); - $active = !$market['disabled']; - $minAmount = null; - $minPrice = null; - if ($base === 'BTC') { - $minAmount = 0.001; - } else if ($base === 'ETH') { - $minAmount = 0.01; - } - if ($quote === 'BTC') { - $minPrice = 0.00000001; - } else if ($quote === 'ETH' || $quote === 'USD' || $quote === 'JPY') { - $minPrice = 0.00001; - } - $limits = array ( - 'amount' => array ( 'min' => $minAmount ), - 'price' => array ( 'min' => $minPrice ), - 'cost' => array ( 'min' => null ), - ); - if ($minPrice !== null) - if ($minAmount !== null) - $limits['cost']['min'] = $minPrice * $minAmount; - $precision = array ( - 'amount' => null, - 'price' => null, - ); - if ($minAmount !== null) - $precision['amount'] = -log10 ($minAmount); - if ($minPrice !== null) - $precision['price'] = -log10 ($minPrice); - $result[] = array ( - 'id' => $id, - 'symbol' => $symbol, - 'base' => $base, - 'quote' => $quote, - 'baseId' => $baseId, - 'quoteId' => $quoteId, - 'maker' => $maker, - 'taker' => $taker, - 'limits' => $limits, - 'precision' => $precision, - 'active' => $active, - 'info' => $market, - ); - } - return $result; - } - - public function fetch_balance ($params = array ()) { - $this->load_markets(); - $balances = $this->privateGetAccountsBalance ($params); - $result = array ( 'info' => $balances ); - for ($b = 0; $b < count ($balances); $b++) { - $balance = $balances[$b]; - $currencyId = $balance['currency']; - $code = $currencyId; - if (is_array ($this->currencies_by_id) && array_key_exists ($currencyId, $this->currencies_by_id)) { - $code = $this->currencies_by_id[$currencyId]['code']; - } - $total = floatval ($balance['balance']); - $account = array ( - 'free' => $total, - 'used' => 0.0, - 'total' => $total, - ); - $result[$code] = $account; - } - return $this->parse_balance($result); - } - - public function fetch_order_book ($symbol, $limit = null, $params = array ()) { - $this->load_markets(); - $orderbook = $this->publicGetProductsIdPriceLevels (array_merge (array ( - 'id' => $this->market_id($symbol), - ), $params)); - return $this->parse_order_book($orderbook, null, 'buy_price_levels', 'sell_price_levels'); - } - - public function parse_ticker ($ticker, $market = null) { - $timestamp = $this->milliseconds (); - $last = null; - if (is_array ($ticker) && array_key_exists ('last_traded_price', $ticker)) { - if ($ticker['last_traded_price']) { - $length = is_array ($ticker['last_traded_price']) ? count ($ticker['last_traded_price']) : 0; - if ($length > 0) - $last = $this->safe_float($ticker, 'last_traded_price'); - } - } - $symbol = null; - if ($market === null) { - $marketId = $this->safe_string($ticker, 'id'); - if (is_array ($this->markets_by_id) && array_key_exists ($marketId, $this->markets_by_id)) { - $market = $this->markets_by_id[$marketId]; - } else { - $baseId = $this->safe_string($ticker, 'base_currency'); - $quoteId = $this->safe_string($ticker, 'quoted_currency'); - $base = $this->common_currency_code($baseId); - $quote = $this->common_currency_code($quoteId); - if (is_array ($this->markets) && array_key_exists ($symbol, $this->markets)) { - $market = $this->markets[$symbol]; - } else { - $symbol = $base . '/' . $quote; - } - } - } - if ($market !== null) - $symbol = $market['symbol']; - $change = null; - $percentage = null; - $average = null; - $open = $this->safe_float($ticker, 'last_price_24h'); - if ($open !== null && $last !== null) { - $change = $last - $open; - $average = $this->sum ($last, $open) / 2; - if ($open > 0) { - $percentage = $change / $open * 100; - } - } - return array ( - 'symbol' => $symbol, - 'timestamp' => $timestamp, - 'datetime' => $this->iso8601 ($timestamp), - 'high' => $this->safe_float($ticker, 'high_market_ask'), - 'low' => $this->safe_float($ticker, 'low_market_bid'), - 'bid' => $this->safe_float($ticker, 'market_bid'), - 'bidVolume' => null, - 'ask' => $this->safe_float($ticker, 'market_ask'), - 'askVolume' => null, - 'vwap' => null, - 'open' => $open, - 'close' => $last, - 'last' => $last, - 'previousClose' => null, - 'change' => $change, - 'percentage' => $percentage, - 'average' => $average, - 'baseVolume' => $this->safe_float($ticker, 'volume_24h'), - 'quoteVolume' => null, - 'info' => $ticker, - ); - } - - public function fetch_tickers ($symbols = null, $params = array ()) { - $this->load_markets(); - $tickers = $this->publicGetProducts ($params); - $result = array (); - for ($t = 0; $t < count ($tickers); $t++) { - $ticker = $tickers[$t]; - $base = $ticker['base_currency']; - $quote = $ticker['quoted_currency']; - $symbol = $base . '/' . $quote; - $market = $this->markets[$symbol]; - $result[$symbol] = $this->parse_ticker($ticker, $market); - } - return $result; - } - - public function fetch_ticker ($symbol, $params = array ()) { - $this->load_markets(); - $market = $this->market ($symbol); - $ticker = $this->publicGetProductsId (array_merge (array ( - 'id' => $market['id'], - ), $params)); - return $this->parse_ticker($ticker, $market); - } - - public function parse_trade ($trade, $market) { - // { id => 12345, - // quantity => "6.789", - // price => "98765.4321", - // taker_side => "sell", - // created_at => 1512345678, - // my_side => "buy" } - $timestamp = $trade['created_at'] * 1000; - // 'taker_side' gets filled for both fetchTrades and fetchMyTrades - $takerSide = $this->safe_string($trade, 'taker_side'); - // 'my_side' gets filled for fetchMyTrades only and may differ from 'taker_side' - $mySide = $this->safe_string($trade, 'my_side'); - $side = ($mySide !== null) ? $mySide : $takerSide; - $takerOrMaker = null; - if ($mySide !== null) - $takerOrMaker = ($takerSide === $mySide) ? 'taker' : 'maker'; - return array ( - 'info' => $trade, - 'id' => (string) $trade['id'], - 'order' => null, - 'timestamp' => $timestamp, - 'datetime' => $this->iso8601 ($timestamp), - 'symbol' => $market['symbol'], - 'type' => null, - 'side' => $side, - 'takerOrMaker' => $takerOrMaker, - 'price' => $this->safe_float($trade, 'price'), - 'amount' => $this->safe_float($trade, 'quantity'), - ); - } - - public function fetch_trades ($symbol, $since = null, $limit = null, $params = array ()) { - $this->load_markets(); - $market = $this->market ($symbol); - $request = array ( - 'product_id' => $market['id'], - ); - if ($limit !== null) - $request['limit'] = $limit; - if ($since !== null) { - // timestamp should be in seconds, whereas we use milliseconds in $since and everywhere - $request['timestamp'] = intval ($since / 1000); - } - $response = $this->publicGetExecutions (array_merge ($request, $params)); - $result = ($since !== null) ? $response : $response['models']; - return $this->parse_trades($result, $market, $since, $limit); - } - - public function fetch_my_trades ($symbol = null, $since = null, $limit = null, $params = array ()) { - $this->load_markets(); - $market = $this->market ($symbol); - $request = array ( - 'product_id' => $market['id'], - ); - if ($limit !== null) - $request['limit'] = $limit; - $response = $this->privateGetExecutionsMe (array_merge ($request, $params)); - return $this->parse_trades($response['models'], $market, $since, $limit); - } - - public function create_order ($symbol, $type, $side, $amount, $price = null, $params = array ()) { - $this->load_markets(); - $order = array ( - 'order_type' => $type, - 'product_id' => $this->market_id($symbol), - 'side' => $side, - 'quantity' => $amount, - ); - if ($type === 'limit') - $order['price'] = $price; - $response = $this->privatePostOrders (array_merge ($order, $params)); - return $this->parse_order($response); - } - - public function cancel_order ($id, $symbol = null, $params = array ()) { - $this->load_markets(); - $result = $this->privatePutOrdersIdCancel (array_merge (array ( - 'id' => $id, - ), $params)); - $order = $this->parse_order($result); - if ($order['status'] === 'closed') - throw new OrderNotFound ($this->id . ' ' . $this->json ($order)); - return $order; - } - - public function parse_order ($order, $market = null) { - $timestamp = $order['created_at'] * 1000; - $marketId = $this->safe_string($order, 'product_id'); - if ($marketId !== null) { - if (is_array ($this->markets_by_id) && array_key_exists ($marketId, $this->markets_by_id)) - $market = $this->markets_by_id[$marketId]; - } - $status = null; - if (is_array ($order) && array_key_exists ('status', $order)) { - if ($order['status'] === 'live') { - $status = 'open'; - } else if ($order['status'] === 'filled') { - $status = 'closed'; - } else if ($order['status'] === 'cancelled') { // 'll' intended - $status = 'canceled'; - } - } - $amount = $this->safe_float($order, 'quantity'); - $filled = $this->safe_float($order, 'filled_quantity'); - $price = $this->safe_float($order, 'price'); - $symbol = null; - if ($market !== null) { - $symbol = $market['symbol']; - } - return array ( - 'id' => (string) $order['id'], - 'timestamp' => $timestamp, - 'datetime' => $this->iso8601 ($timestamp), - 'lastTradeTimestamp' => null, - 'type' => $order['order_type'], - 'status' => $status, - 'symbol' => $symbol, - 'side' => $order['side'], - 'price' => $price, - 'amount' => $amount, - 'filled' => $filled, - 'remaining' => $amount - $filled, - 'trades' => null, - 'fee' => array ( - 'currency' => null, - 'cost' => $this->safe_float($order, 'order_fee'), - ), - 'info' => $order, - ); - } - - public function fetch_order ($id, $symbol = null, $params = array ()) { - $this->load_markets(); - $order = $this->privateGetOrdersId (array_merge (array ( - 'id' => $id, - ), $params)); - return $this->parse_order($order); - } - - public function fetch_orders ($symbol = null, $since = null, $limit = null, $params = array ()) { - $this->load_markets(); - $market = null; - $request = array (); - if ($symbol !== null) { - $market = $this->market ($symbol); - $request['product_id'] = $market['id']; - } - $status = $this->safe_value($params, 'status'); - if ($status) { - $params = $this->omit ($params, 'status'); - if ($status === 'open') { - $request['status'] = 'live'; - } else if ($status === 'closed') { - $request['status'] = 'filled'; - } else if ($status === 'canceled') { - $request['status'] = 'cancelled'; - } - } - if ($limit !== null) - $request['limit'] = $limit; - $result = $this->privateGetOrders (array_merge ($request, $params)); - $orders = $result['models']; - return $this->parse_orders($orders, $market, $since, $limit); - } - - public function fetch_open_orders ($symbol = null, $since = null, $limit = null, $params = array ()) { - return $this->fetch_orders($symbol, $since, $limit, array_merge (array ( 'status' => 'open' ), $params)); - } - - public function fetch_closed_orders ($symbol = null, $since = null, $limit = null, $params = array ()) { - return $this->fetch_orders($symbol, $since, $limit, array_merge (array ( 'status' => 'closed' ), $params)); - } - - public function nonce () { - return $this->milliseconds (); - } - - public function sign ($path, $api = 'public', $method = 'GET', $params = array (), $headers = null, $body = null) { - $url = '/' . $this->implode_params($path, $params); - $query = $this->omit ($params, $this->extract_params($path)); - $headers = array ( - 'X-Quoine-API-Version' => $this->version, - 'Content-Type' => 'application/json', - ); - if ($api === 'public') { - if ($query) - $url .= '?' . $this->urlencode ($query); - } else { - $this->check_required_credentials(); - if ($method === 'GET') { - if ($query) - $url .= '?' . $this->urlencode ($query); - } else if ($query) { - $body = $this->json ($query); - } - $nonce = $this->nonce (); - $request = array ( - 'path' => $url, - 'nonce' => $nonce, - 'token_id' => $this->apiKey, - 'iat' => (int) floor ($nonce / 1000), // issued at - ); - $headers['X-Quoine-Auth'] = $this->jwt ($request, $this->secret); - } - $url = $this->urls['api'] . $url; - return array ( 'url' => $url, 'method' => $method, 'body' => $body, 'headers' => $headers ); - } - - public function handle_errors ($code, $reason, $url, $method, $headers, $body, $response = null) { - if ($code >= 200 && $code <= 299) - return; - $messages = $this->exceptions['messages']; - if ($code === 401) { - // expected non-json $response - if (is_array ($messages) && array_key_exists ($body, $messages)) - throw new $messages[$body] ($this->id . ' ' . $body); - else - return; - } - if ($response === null) - if (($body[0] === '{') || ($body[0] === '[')) - $response = json_decode ($body, $as_associative_array = true); - else - return; - $feedback = $this->id . ' ' . $this->json ($response); - if ($code === 404) { - // array ( "$message" => "Order not found" ) - $message = $this->safe_string($response, 'message'); - if (is_array ($messages) && array_key_exists ($message, $messages)) - throw new $messages[$message] ($feedback); - } else if ($code === 422) { - // array of error $messages is returned in 'user' or 'quantity' property of 'errors' object, e.g.: - // array ( "$errors" => { "user" => ["not_enough_free_balance"] )} - // array ( "$errors" => { "quantity" => ["less_than_order_size"] )} - if (is_array ($response) && array_key_exists ('errors', $response)) { - $errors = $response['errors']; - $errorTypes = ['user', 'quantity', 'price']; - for ($i = 0; $i < count ($errorTypes); $i++) { - $errorType = $errorTypes[$i]; - if (is_array ($errors) && array_key_exists ($errorType, $errors)) { - $errorMessages = $errors[$errorType]; - for ($j = 0; $j < count ($errorMessages); $j++) { - $message = $errorMessages[$j]; - if (is_array ($messages[$errorType]) && array_key_exists ($message, $messages[$errorType])) - throw new $messages[$errorType][$message] ($feedback); - } - } - } - } - } - } } diff --git a/php/quoinex.php b/php/quoinex.php index b75a4418b5e62..2b50424a929db 100644 --- a/php/quoinex.php +++ b/php/quoinex.php @@ -7,29 +7,12 @@ use Exception as Exception; // a common import -class quoinex extends qryptos { +class quoinex extends liquid { public function describe () { return array_replace_recursive (parent::describe (), array ( 'id' => 'quoinex', 'name' => 'QUOINEX', - 'countries' => array ( 'JP', 'SG', 'VN' ), - 'version' => '2', - 'rateLimit' => 1000, - 'has' => array ( - 'CORS' => false, - 'fetchTickers' => true, - ), - 'urls' => array ( - 'logo' => 'https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg', - 'api' => 'https://api.quoine.com', - 'www' => 'https://quoinex.com/', - 'doc' => array ( - 'https://developers.quoine.com', - 'https://developers.quoine.com/v2', - ), - 'fees' => 'https://news.quoinex.com/fees/', - ), )); } } diff --git a/python/README.rst b/python/README.rst index 4f67d06815807..427dbf229036f 100644 --- a/python/README.rst +++ b/python/README.rst @@ -49,7 +49,7 @@ Certified Cryptocurrency Exchanges Supported Cryptocurrency Exchange Markets ----------------------------------------- -The ccxt library currently supports the following 131 cryptocurrency exchange markets and trading APIs: +The ccxt library currently supports the following 132 cryptocurrency exchange markets and trading APIs: +--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | id | name | certified | ver | doc | countries | @@ -250,6 +250,8 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma +--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | liqui | `Liqui `__ | | 3 | `API `__ | Ukraine | +--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ +| liquid | `Liquid `__ | | 2 | `API `__ | Japan, China, Taiwan | ++--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | livecoin | `LiveCoin `__ | | \* | `API `__ | US, UK, Russia | +--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | luno | `luno `__ | | 1 | `API `__ | UK, Singapore, South Africa | @@ -274,11 +276,11 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma +--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | poloniex | `Poloniex `__ | | \* | `API `__ | US | +--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ -| qryptos | `QRYPTOS `__ | | 2 | `API `__ | China, Taiwan | +| qryptos | `QRYPTOS `__ | | 2 | `API `__ | Japan, China, Taiwan | +--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | quadrigacx | `QuadrigaCX `__ | | 2 | `API `__ | Canada | +--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ -| quoinex | `QUOINEX `__ | | 2 | `API `__ | Japan, Singapore, Vietnam | +| quoinex | `QUOINEX `__ | | 2 | `API `__ | Japan, China, Taiwan | +--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ | rightbtc | `RightBTC `__ | | \* | `API `__ | United Arab Emirates | +--------------------+-----------------------------------------------------------------------------------------+----------------------------------------------------------------------+-------+-----------------------------------------------------------------------------------------------------+------------------------------------------+ @@ -755,6 +757,7 @@ Social .. |lakebtc| image:: https://user-images.githubusercontent.com/1294454/28074120-72b7c38a-6660-11e7-92d9-d9027502281d.jpg .. |lbank| image:: https://user-images.githubusercontent.com/1294454/38063602-9605e28a-3302-11e8-81be-64b1e53c4cfb.jpg .. |liqui| image:: https://user-images.githubusercontent.com/1294454/27982022-75aea828-63a0-11e7-9511-ca584a8edd74.jpg +.. |liquid| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |livecoin| image:: https://user-images.githubusercontent.com/1294454/27980768-f22fc424-638a-11e7-89c9-6010a54ff9be.jpg .. |luno| image:: https://user-images.githubusercontent.com/1294454/27766607-8c1a69d8-5ede-11e7-930c-540b5eb9be24.jpg .. |lykke| image:: https://user-images.githubusercontent.com/1294454/34487620-3139a7b0-efe6-11e7-90f5-e520cef74451.jpg @@ -767,9 +770,9 @@ Social .. |okex| image:: https://user-images.githubusercontent.com/1294454/32552768-0d6dd3c6-c4a6-11e7-90f8-c043b64756a7.jpg .. |paymium| image:: https://user-images.githubusercontent.com/1294454/27790564-a945a9d4-5ff9-11e7-9d2d-b635763f2f24.jpg .. |poloniex| image:: https://user-images.githubusercontent.com/1294454/27766817-e9456312-5ee6-11e7-9b3c-b628ca5626a5.jpg -.. |qryptos| image:: https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg +.. |qryptos| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |quadrigacx| image:: https://user-images.githubusercontent.com/1294454/27766825-98a6d0de-5ee7-11e7-9fa4-38e11a2c6f52.jpg -.. |quoinex| image:: https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg +.. |quoinex| image:: https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg .. |rightbtc| image:: https://user-images.githubusercontent.com/1294454/42633917-7d20757e-85ea-11e8-9f53-fffe9fbb7695.jpg .. |southxchange| image:: https://user-images.githubusercontent.com/1294454/27838912-4f94ec8a-60f6-11e7-9e5d-bbf9bd50a559.jpg .. |surbitcoin| image:: https://user-images.githubusercontent.com/1294454/27991511-f0a50194-6481-11e7-99b5-8f02932424cc.jpg diff --git a/python/ccxt/__init__.py b/python/ccxt/__init__.py index 96024d188e776..2e9a70500fad4 100644 --- a/python/ccxt/__init__.py +++ b/python/ccxt/__init__.py @@ -22,7 +22,7 @@ # ---------------------------------------------------------------------------- -__version__ = '1.17.321' +__version__ = '1.17.322' # ---------------------------------------------------------------------------- @@ -161,6 +161,7 @@ from ccxt.lakebtc import lakebtc # noqa: F401 from ccxt.lbank import lbank # noqa: F401 from ccxt.liqui import liqui # noqa: F401 +from ccxt.liquid import liquid # noqa: F401 from ccxt.livecoin import livecoin # noqa: F401 from ccxt.luno import luno # noqa: F401 from ccxt.lykke import lykke # noqa: F401 @@ -294,6 +295,7 @@ 'lakebtc', 'lbank', 'liqui', + 'liquid', 'livecoin', 'luno', 'lykke', diff --git a/python/ccxt/async_support/__init__.py b/python/ccxt/async_support/__init__.py index 1def86ea8367a..544efbb230724 100644 --- a/python/ccxt/async_support/__init__.py +++ b/python/ccxt/async_support/__init__.py @@ -4,7 +4,7 @@ # ----------------------------------------------------------------------------- -__version__ = '1.17.321' +__version__ = '1.17.322' # ----------------------------------------------------------------------------- @@ -143,6 +143,7 @@ from ccxt.async_support.lakebtc import lakebtc # noqa: F401 from ccxt.async_support.lbank import lbank # noqa: F401 from ccxt.async_support.liqui import liqui # noqa: F401 +from ccxt.async_support.liquid import liquid # noqa: F401 from ccxt.async_support.livecoin import livecoin # noqa: F401 from ccxt.async_support.luno import luno # noqa: F401 from ccxt.async_support.lykke import lykke # noqa: F401 @@ -276,6 +277,7 @@ 'lakebtc', 'lbank', 'liqui', + 'liquid', 'livecoin', 'luno', 'lykke', diff --git a/python/ccxt/async_support/base/exchange.py b/python/ccxt/async_support/base/exchange.py index b5eafb26eadc9..8b657cefd765f 100644 --- a/python/ccxt/async_support/base/exchange.py +++ b/python/ccxt/async_support/base/exchange.py @@ -2,7 +2,7 @@ # ----------------------------------------------------------------------------- -__version__ = '1.17.321' +__version__ = '1.17.322' # ----------------------------------------------------------------------------- diff --git a/python/ccxt/async_support/kucoin.py b/python/ccxt/async_support/kucoin.py index c50b86619ee0b..675a3512bb68e 100644 --- a/python/ccxt/async_support/kucoin.py +++ b/python/ccxt/async_support/kucoin.py @@ -975,15 +975,17 @@ def parse_trade(self, trade, market=None): amount = self.safe_float(trade, 'amount') cost = self.safe_float(trade, 'dealValue') feeCurrency = None - if market is not None: - feeCurrency = market['quote'] if (side == 'sell') else market['base'] - else: - feeCurrencyField = 'coinTypePair' if (side == 'sell') else 'coinType' - feeCurrency = self.safe_string(order, feeCurrencyField) - if feeCurrency is not None: - if feeCurrency in self.currencies_by_id: - feeCurrency = self.currencies_by_id[feeCurrency]['code'] + if side is not None: + if market is not None: + feeCurrency = market['quote'] if (side == 'sell') else market['base'] + else: + feeCurrencyField = 'coinTypePair' if (side == 'sell') else 'coinType' + feeCurrency = self.safe_string(order, feeCurrencyField) + if feeCurrency is not None: + if feeCurrency in self.currencies_by_id: + feeCurrency = self.currencies_by_id[feeCurrency]['code'] fee = { + 'rate': self.safe_float(trade, 'feeRate'), 'cost': self.safe_float(trade, 'fee'), 'currency': feeCurrency, } diff --git a/python/ccxt/async_support/liquid.py b/python/ccxt/async_support/liquid.py index 8df85d99a1b3c..108eaa037d8c2 100644 --- a/python/ccxt/async_support/liquid.py +++ b/python/ccxt/async_support/liquid.py @@ -17,8 +17,8 @@ class liquid (Exchange): def describe(self): return self.deep_extend(super(liquid, self).describe(), { - 'id': 'qryptos', - 'name': 'QRYPTOS', + 'id': 'liquid', + 'name': 'Liquid', 'countries': ['JP', 'CN', 'TW'], 'version': '2', 'rateLimit': 1000, @@ -206,12 +206,10 @@ def parse_ticker(self, ticker, market=None): else: baseId = self.safe_string(ticker, 'base_currency') quoteId = self.safe_string(ticker, 'quoted_currency') - base = self.common_currency_code(baseId) - quote = self.common_currency_code(quoteId) if symbol in self.markets: market = self.markets[symbol] else: - symbol = base + '/' + quote + symbol = self.common_currency_code(baseId) + '/' + self.common_currency_code(quoteId) if market is not None: symbol = market['symbol'] change = None @@ -251,12 +249,9 @@ async def fetch_tickers(self, symbols=None, params={}): tickers = await self.publicGetProducts(params) result = {} for t in range(0, len(tickers)): - ticker = tickers[t] - base = ticker['base_currency'] - quote = ticker['quoted_currency'] - symbol = base + '/' + quote - market = self.markets[symbol] - result[symbol] = self.parse_ticker(ticker, market) + ticker = self.parse_ticker(tickers[t]) + symbol = ticker['symbol'] + result[symbol] = ticker return result async def fetch_ticker(self, symbol, params={}): diff --git a/python/ccxt/async_support/qryptos.py b/python/ccxt/async_support/qryptos.py index f0de3a71d43aa..8530f5e64454e 100644 --- a/python/ccxt/async_support/qryptos.py +++ b/python/ccxt/async_support/qryptos.py @@ -3,489 +3,13 @@ # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code -from ccxt.async_support.base.exchange import Exchange -import math -import json -from ccxt.base.errors import AuthenticationError -from ccxt.base.errors import InsufficientFunds -from ccxt.base.errors import InvalidOrder -from ccxt.base.errors import OrderNotFound -from ccxt.base.errors import InvalidNonce +from ccxt.async_support.liquid import liquid -class qryptos (Exchange): +class qryptos (liquid): def describe(self): return self.deep_extend(super(qryptos, self).describe(), { 'id': 'qryptos', 'name': 'QRYPTOS', - 'countries': ['CN', 'TW'], - 'version': '2', - 'rateLimit': 1000, - 'has': { - 'CORS': False, - 'fetchTickers': True, - 'fetchOrder': True, - 'fetchOrders': True, - 'fetchOpenOrders': True, - 'fetchClosedOrders': True, - 'fetchMyTrades': True, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg', - 'api': 'https://api.qryptos.com', - 'www': 'https://www.qryptos.com', - 'doc': [ - 'https://developers.quoine.com', - 'https://developers.quoine.com/v2', - ], - 'fees': 'https://qryptos.zendesk.com/hc/en-us/articles/115007858167-Fees', - }, - 'api': { - 'public': { - 'get': [ - 'products', - 'products/{id}', - 'products/{id}/price_levels', - 'executions', - 'ir_ladders/{currency}', - ], - }, - 'private': { - 'get': [ - 'accounts/balance', - 'accounts/main_asset', - 'crypto_accounts', - 'executions/me', - 'fiat_accounts', - 'loan_bids', - 'loans', - 'orders', - 'orders/{id}', - 'orders/{id}/trades', - 'orders/{id}/executions', - 'trades', - 'trades/{id}/loans', - 'trading_accounts', - 'trading_accounts/{id}', - ], - 'post': [ - 'fiat_accounts', - 'loan_bids', - 'orders', - ], - 'put': [ - 'loan_bids/{id}/close', - 'loans/{id}', - 'orders/{id}', - 'orders/{id}/cancel', - 'trades/{id}', - 'trades/{id}/close', - 'trades/close_all', - 'trading_accounts/{id}', - ], - }, - }, - 'skipJsonOnStatusCodes': [401], - 'exceptions': { - 'messages': { - 'API Authentication failed': AuthenticationError, - 'Nonce is too small': InvalidNonce, - 'Order not found': OrderNotFound, - 'user': { - 'not_enough_free_balance': InsufficientFunds, - }, - 'price': { - 'must_be_positive': InvalidOrder, - }, - 'quantity': { - 'less_than_order_size': InvalidOrder, - }, - }, - }, - 'commonCurrencies': { - 'WIN': 'WCOIN', - }, }) - - async def fetch_markets(self): - markets = await self.publicGetProducts() - result = [] - for p in range(0, len(markets)): - market = markets[p] - id = str(market['id']) - baseId = market['base_currency'] - quoteId = market['quoted_currency'] - base = self.common_currency_code(baseId) - quote = self.common_currency_code(quoteId) - symbol = base + '/' + quote - maker = self.safe_float(market, 'maker_fee') - taker = self.safe_float(market, 'taker_fee') - active = not market['disabled'] - minAmount = None - minPrice = None - if base == 'BTC': - minAmount = 0.001 - elif base == 'ETH': - minAmount = 0.01 - if quote == 'BTC': - minPrice = 0.00000001 - elif quote == 'ETH' or quote == 'USD' or quote == 'JPY': - minPrice = 0.00001 - limits = { - 'amount': {'min': minAmount}, - 'price': {'min': minPrice}, - 'cost': {'min': None}, - } - if minPrice is not None: - if minAmount is not None: - limits['cost']['min'] = minPrice * minAmount - precision = { - 'amount': None, - 'price': None, - } - if minAmount is not None: - precision['amount'] = -math.log10(minAmount) - if minPrice is not None: - precision['price'] = -math.log10(minPrice) - result.append({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'maker': maker, - 'taker': taker, - 'limits': limits, - 'precision': precision, - 'active': active, - 'info': market, - }) - return result - - async def fetch_balance(self, params={}): - await self.load_markets() - balances = await self.privateGetAccountsBalance(params) - result = {'info': balances} - for b in range(0, len(balances)): - balance = balances[b] - currencyId = balance['currency'] - code = currencyId - if currencyId in self.currencies_by_id: - code = self.currencies_by_id[currencyId]['code'] - total = float(balance['balance']) - account = { - 'free': total, - 'used': 0.0, - 'total': total, - } - result[code] = account - return self.parse_balance(result) - - async def fetch_order_book(self, symbol, limit=None, params={}): - await self.load_markets() - orderbook = await self.publicGetProductsIdPriceLevels(self.extend({ - 'id': self.market_id(symbol), - }, params)) - return self.parse_order_book(orderbook, None, 'buy_price_levels', 'sell_price_levels') - - def parse_ticker(self, ticker, market=None): - timestamp = self.milliseconds() - last = None - if 'last_traded_price' in ticker: - if ticker['last_traded_price']: - length = len(ticker['last_traded_price']) - if length > 0: - last = self.safe_float(ticker, 'last_traded_price') - symbol = None - if market is None: - marketId = self.safe_string(ticker, 'id') - if marketId in self.markets_by_id: - market = self.markets_by_id[marketId] - else: - baseId = self.safe_string(ticker, 'base_currency') - quoteId = self.safe_string(ticker, 'quoted_currency') - base = self.common_currency_code(baseId) - quote = self.common_currency_code(quoteId) - if symbol in self.markets: - market = self.markets[symbol] - else: - symbol = base + '/' + quote - if market is not None: - symbol = market['symbol'] - change = None - percentage = None - average = None - open = self.safe_float(ticker, 'last_price_24h') - if open is not None and last is not None: - change = last - open - average = self.sum(last, open) / 2 - if open > 0: - percentage = change / open * 100 - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': self.iso8601(timestamp), - 'high': self.safe_float(ticker, 'high_market_ask'), - 'low': self.safe_float(ticker, 'low_market_bid'), - 'bid': self.safe_float(ticker, 'market_bid'), - 'bidVolume': None, - 'ask': self.safe_float(ticker, 'market_ask'), - 'askVolume': None, - 'vwap': None, - 'open': open, - 'close': last, - 'last': last, - 'previousClose': None, - 'change': change, - 'percentage': percentage, - 'average': average, - 'baseVolume': self.safe_float(ticker, 'volume_24h'), - 'quoteVolume': None, - 'info': ticker, - } - - async def fetch_tickers(self, symbols=None, params={}): - await self.load_markets() - tickers = await self.publicGetProducts(params) - result = {} - for t in range(0, len(tickers)): - ticker = tickers[t] - base = ticker['base_currency'] - quote = ticker['quoted_currency'] - symbol = base + '/' + quote - market = self.markets[symbol] - result[symbol] = self.parse_ticker(ticker, market) - return result - - async def fetch_ticker(self, symbol, params={}): - await self.load_markets() - market = self.market(symbol) - ticker = await self.publicGetProductsId(self.extend({ - 'id': market['id'], - }, params)) - return self.parse_ticker(ticker, market) - - def parse_trade(self, trade, market): - # { id: 12345, - # quantity: "6.789", - # price: "98765.4321", - # taker_side: "sell", - # created_at: 1512345678, - # my_side: "buy" } - timestamp = trade['created_at'] * 1000 - # 'taker_side' gets filled for both fetchTrades and fetchMyTrades - takerSide = self.safe_string(trade, 'taker_side') - # 'my_side' gets filled for fetchMyTrades only and may differ from 'taker_side' - mySide = self.safe_string(trade, 'my_side') - side = mySide if (mySide is not None) else takerSide - takerOrMaker = None - if mySide is not None: - takerOrMaker = 'taker' if (takerSide == mySide) else 'maker' - return { - 'info': trade, - 'id': str(trade['id']), - 'order': None, - 'timestamp': timestamp, - 'datetime': self.iso8601(timestamp), - 'symbol': market['symbol'], - 'type': None, - 'side': side, - 'takerOrMaker': takerOrMaker, - 'price': self.safe_float(trade, 'price'), - 'amount': self.safe_float(trade, 'quantity'), - } - - async def fetch_trades(self, symbol, since=None, limit=None, params={}): - await self.load_markets() - market = self.market(symbol) - request = { - 'product_id': market['id'], - } - if limit is not None: - request['limit'] = limit - if since is not None: - # timestamp should be in seconds, whereas we use milliseconds in since and everywhere - request['timestamp'] = int(since / 1000) - response = await self.publicGetExecutions(self.extend(request, params)) - result = response if (since is not None) else response['models'] - return self.parse_trades(result, market, since, limit) - - async def fetch_my_trades(self, symbol=None, since=None, limit=None, params={}): - await self.load_markets() - market = self.market(symbol) - request = { - 'product_id': market['id'], - } - if limit is not None: - request['limit'] = limit - response = await self.privateGetExecutionsMe(self.extend(request, params)) - return self.parse_trades(response['models'], market, since, limit) - - async def create_order(self, symbol, type, side, amount, price=None, params={}): - await self.load_markets() - order = { - 'order_type': type, - 'product_id': self.market_id(symbol), - 'side': side, - 'quantity': amount, - } - if type == 'limit': - order['price'] = price - response = await self.privatePostOrders(self.extend(order, params)) - return self.parse_order(response) - - async def cancel_order(self, id, symbol=None, params={}): - await self.load_markets() - result = await self.privatePutOrdersIdCancel(self.extend({ - 'id': id, - }, params)) - order = self.parse_order(result) - if order['status'] == 'closed': - raise OrderNotFound(self.id + ' ' + self.json(order)) - return order - - def parse_order(self, order, market=None): - timestamp = order['created_at'] * 1000 - marketId = self.safe_string(order, 'product_id') - if marketId is not None: - if marketId in self.markets_by_id: - market = self.markets_by_id[marketId] - status = None - if 'status' in order: - if order['status'] == 'live': - status = 'open' - elif order['status'] == 'filled': - status = 'closed' - elif order['status'] == 'cancelled': # 'll' intended - status = 'canceled' - amount = self.safe_float(order, 'quantity') - filled = self.safe_float(order, 'filled_quantity') - price = self.safe_float(order, 'price') - symbol = None - if market is not None: - symbol = market['symbol'] - return { - 'id': str(order['id']), - 'timestamp': timestamp, - 'datetime': self.iso8601(timestamp), - 'lastTradeTimestamp': None, - 'type': order['order_type'], - 'status': status, - 'symbol': symbol, - 'side': order['side'], - 'price': price, - 'amount': amount, - 'filled': filled, - 'remaining': amount - filled, - 'trades': None, - 'fee': { - 'currency': None, - 'cost': self.safe_float(order, 'order_fee'), - }, - 'info': order, - } - - async def fetch_order(self, id, symbol=None, params={}): - await self.load_markets() - order = await self.privateGetOrdersId(self.extend({ - 'id': id, - }, params)) - return self.parse_order(order) - - async def fetch_orders(self, symbol=None, since=None, limit=None, params={}): - await self.load_markets() - market = None - request = {} - if symbol is not None: - market = self.market(symbol) - request['product_id'] = market['id'] - status = self.safe_value(params, 'status') - if status: - params = self.omit(params, 'status') - if status == 'open': - request['status'] = 'live' - elif status == 'closed': - request['status'] = 'filled' - elif status == 'canceled': - request['status'] = 'cancelled' - if limit is not None: - request['limit'] = limit - result = await self.privateGetOrders(self.extend(request, params)) - orders = result['models'] - return self.parse_orders(orders, market, since, limit) - - def fetch_open_orders(self, symbol=None, since=None, limit=None, params={}): - return self.fetch_orders(symbol, since, limit, self.extend({'status': 'open'}, params)) - - def fetch_closed_orders(self, symbol=None, since=None, limit=None, params={}): - return self.fetch_orders(symbol, since, limit, self.extend({'status': 'closed'}, params)) - - def nonce(self): - return self.milliseconds() - - def sign(self, path, api='public', method='GET', params={}, headers=None, body=None): - url = '/' + self.implode_params(path, params) - query = self.omit(params, self.extract_params(path)) - headers = { - 'X-Quoine-API-Version': self.version, - 'Content-Type': 'application/json', - } - if api == 'public': - if query: - url += '?' + self.urlencode(query) - else: - self.check_required_credentials() - if method == 'GET': - if query: - url += '?' + self.urlencode(query) - elif query: - body = self.json(query) - nonce = self.nonce() - request = { - 'path': url, - 'nonce': nonce, - 'token_id': self.apiKey, - 'iat': int(math.floor(nonce / 1000)), # issued at - } - headers['X-Quoine-Auth'] = self.jwt(request, self.secret) - url = self.urls['api'] + url - return {'url': url, 'method': method, 'body': body, 'headers': headers} - - def handle_errors(self, code, reason, url, method, headers, body, response=None): - if code >= 200 and code <= 299: - return - messages = self.exceptions['messages'] - if code == 401: - # expected non-json response - if body in messages: - raise messages[body](self.id + ' ' + body) - else: - return - if response is None: - if (body[0] == '{') or (body[0] == '['): - response = json.loads(body) - else: - return - feedback = self.id + ' ' + self.json(response) - if code == 404: - # {"message": "Order not found"} - message = self.safe_string(response, 'message') - if message in messages: - raise messages[message](feedback) - elif code == 422: - # array of error messages is returned in 'user' or 'quantity' property of 'errors' object, e.g.: - # {"errors": {"user": ["not_enough_free_balance"]}} - # {"errors": {"quantity": ["less_than_order_size"]}} - if 'errors' in response: - errors = response['errors'] - errorTypes = ['user', 'quantity', 'price'] - for i in range(0, len(errorTypes)): - errorType = errorTypes[i] - if errorType in errors: - errorMessages = errors[errorType] - for j in range(0, len(errorMessages)): - message = errorMessages[j] - if message in messages[errorType]: - raise messages[errorType][message](feedback) diff --git a/python/ccxt/async_support/quoinex.py b/python/ccxt/async_support/quoinex.py index 09c9f1e4eb99d..5af83545043dc 100644 --- a/python/ccxt/async_support/quoinex.py +++ b/python/ccxt/async_support/quoinex.py @@ -3,30 +3,13 @@ # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code -from ccxt.async_support.qryptos import qryptos +from ccxt.async_support.liquid import liquid -class quoinex (qryptos): +class quoinex (liquid): def describe(self): return self.deep_extend(super(quoinex, self).describe(), { 'id': 'quoinex', 'name': 'QUOINEX', - 'countries': ['JP', 'SG', 'VN'], - 'version': '2', - 'rateLimit': 1000, - 'has': { - 'CORS': False, - 'fetchTickers': True, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg', - 'api': 'https://api.quoine.com', - 'www': 'https://quoinex.com/', - 'doc': [ - 'https://developers.quoine.com', - 'https://developers.quoine.com/v2', - ], - 'fees': 'https://news.quoinex.com/fees/', - }, }) diff --git a/python/ccxt/base/exchange.py b/python/ccxt/base/exchange.py index f75f7c26e8e43..790000c95e646 100644 --- a/python/ccxt/base/exchange.py +++ b/python/ccxt/base/exchange.py @@ -4,7 +4,7 @@ # ----------------------------------------------------------------------------- -__version__ = '1.17.321' +__version__ = '1.17.322' # ----------------------------------------------------------------------------- diff --git a/python/ccxt/kucoin.py b/python/ccxt/kucoin.py index cc0dd8cdb6b99..6df3b66e6bb6b 100644 --- a/python/ccxt/kucoin.py +++ b/python/ccxt/kucoin.py @@ -975,15 +975,17 @@ def parse_trade(self, trade, market=None): amount = self.safe_float(trade, 'amount') cost = self.safe_float(trade, 'dealValue') feeCurrency = None - if market is not None: - feeCurrency = market['quote'] if (side == 'sell') else market['base'] - else: - feeCurrencyField = 'coinTypePair' if (side == 'sell') else 'coinType' - feeCurrency = self.safe_string(order, feeCurrencyField) - if feeCurrency is not None: - if feeCurrency in self.currencies_by_id: - feeCurrency = self.currencies_by_id[feeCurrency]['code'] + if side is not None: + if market is not None: + feeCurrency = market['quote'] if (side == 'sell') else market['base'] + else: + feeCurrencyField = 'coinTypePair' if (side == 'sell') else 'coinType' + feeCurrency = self.safe_string(order, feeCurrencyField) + if feeCurrency is not None: + if feeCurrency in self.currencies_by_id: + feeCurrency = self.currencies_by_id[feeCurrency]['code'] fee = { + 'rate': self.safe_float(trade, 'feeRate'), 'cost': self.safe_float(trade, 'fee'), 'currency': feeCurrency, } diff --git a/python/ccxt/liquid.py b/python/ccxt/liquid.py index 923e761a1a6c6..05b1da963a06f 100644 --- a/python/ccxt/liquid.py +++ b/python/ccxt/liquid.py @@ -17,8 +17,8 @@ class liquid (Exchange): def describe(self): return self.deep_extend(super(liquid, self).describe(), { - 'id': 'qryptos', - 'name': 'QRYPTOS', + 'id': 'liquid', + 'name': 'Liquid', 'countries': ['JP', 'CN', 'TW'], 'version': '2', 'rateLimit': 1000, @@ -206,12 +206,10 @@ def parse_ticker(self, ticker, market=None): else: baseId = self.safe_string(ticker, 'base_currency') quoteId = self.safe_string(ticker, 'quoted_currency') - base = self.common_currency_code(baseId) - quote = self.common_currency_code(quoteId) if symbol in self.markets: market = self.markets[symbol] else: - symbol = base + '/' + quote + symbol = self.common_currency_code(baseId) + '/' + self.common_currency_code(quoteId) if market is not None: symbol = market['symbol'] change = None @@ -251,12 +249,9 @@ def fetch_tickers(self, symbols=None, params={}): tickers = self.publicGetProducts(params) result = {} for t in range(0, len(tickers)): - ticker = tickers[t] - base = ticker['base_currency'] - quote = ticker['quoted_currency'] - symbol = base + '/' + quote - market = self.markets[symbol] - result[symbol] = self.parse_ticker(ticker, market) + ticker = self.parse_ticker(tickers[t]) + symbol = ticker['symbol'] + result[symbol] = ticker return result def fetch_ticker(self, symbol, params={}): diff --git a/python/ccxt/qryptos.py b/python/ccxt/qryptos.py index 20cbe2aeeaec3..d302b375cb688 100644 --- a/python/ccxt/qryptos.py +++ b/python/ccxt/qryptos.py @@ -3,489 +3,13 @@ # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code -from ccxt.base.exchange import Exchange -import math -import json -from ccxt.base.errors import AuthenticationError -from ccxt.base.errors import InsufficientFunds -from ccxt.base.errors import InvalidOrder -from ccxt.base.errors import OrderNotFound -from ccxt.base.errors import InvalidNonce +from ccxt.liquid import liquid -class qryptos (Exchange): +class qryptos (liquid): def describe(self): return self.deep_extend(super(qryptos, self).describe(), { 'id': 'qryptos', 'name': 'QRYPTOS', - 'countries': ['CN', 'TW'], - 'version': '2', - 'rateLimit': 1000, - 'has': { - 'CORS': False, - 'fetchTickers': True, - 'fetchOrder': True, - 'fetchOrders': True, - 'fetchOpenOrders': True, - 'fetchClosedOrders': True, - 'fetchMyTrades': True, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg', - 'api': 'https://api.qryptos.com', - 'www': 'https://www.qryptos.com', - 'doc': [ - 'https://developers.quoine.com', - 'https://developers.quoine.com/v2', - ], - 'fees': 'https://qryptos.zendesk.com/hc/en-us/articles/115007858167-Fees', - }, - 'api': { - 'public': { - 'get': [ - 'products', - 'products/{id}', - 'products/{id}/price_levels', - 'executions', - 'ir_ladders/{currency}', - ], - }, - 'private': { - 'get': [ - 'accounts/balance', - 'accounts/main_asset', - 'crypto_accounts', - 'executions/me', - 'fiat_accounts', - 'loan_bids', - 'loans', - 'orders', - 'orders/{id}', - 'orders/{id}/trades', - 'orders/{id}/executions', - 'trades', - 'trades/{id}/loans', - 'trading_accounts', - 'trading_accounts/{id}', - ], - 'post': [ - 'fiat_accounts', - 'loan_bids', - 'orders', - ], - 'put': [ - 'loan_bids/{id}/close', - 'loans/{id}', - 'orders/{id}', - 'orders/{id}/cancel', - 'trades/{id}', - 'trades/{id}/close', - 'trades/close_all', - 'trading_accounts/{id}', - ], - }, - }, - 'skipJsonOnStatusCodes': [401], - 'exceptions': { - 'messages': { - 'API Authentication failed': AuthenticationError, - 'Nonce is too small': InvalidNonce, - 'Order not found': OrderNotFound, - 'user': { - 'not_enough_free_balance': InsufficientFunds, - }, - 'price': { - 'must_be_positive': InvalidOrder, - }, - 'quantity': { - 'less_than_order_size': InvalidOrder, - }, - }, - }, - 'commonCurrencies': { - 'WIN': 'WCOIN', - }, }) - - def fetch_markets(self): - markets = self.publicGetProducts() - result = [] - for p in range(0, len(markets)): - market = markets[p] - id = str(market['id']) - baseId = market['base_currency'] - quoteId = market['quoted_currency'] - base = self.common_currency_code(baseId) - quote = self.common_currency_code(quoteId) - symbol = base + '/' + quote - maker = self.safe_float(market, 'maker_fee') - taker = self.safe_float(market, 'taker_fee') - active = not market['disabled'] - minAmount = None - minPrice = None - if base == 'BTC': - minAmount = 0.001 - elif base == 'ETH': - minAmount = 0.01 - if quote == 'BTC': - minPrice = 0.00000001 - elif quote == 'ETH' or quote == 'USD' or quote == 'JPY': - minPrice = 0.00001 - limits = { - 'amount': {'min': minAmount}, - 'price': {'min': minPrice}, - 'cost': {'min': None}, - } - if minPrice is not None: - if minAmount is not None: - limits['cost']['min'] = minPrice * minAmount - precision = { - 'amount': None, - 'price': None, - } - if minAmount is not None: - precision['amount'] = -math.log10(minAmount) - if minPrice is not None: - precision['price'] = -math.log10(minPrice) - result.append({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'maker': maker, - 'taker': taker, - 'limits': limits, - 'precision': precision, - 'active': active, - 'info': market, - }) - return result - - def fetch_balance(self, params={}): - self.load_markets() - balances = self.privateGetAccountsBalance(params) - result = {'info': balances} - for b in range(0, len(balances)): - balance = balances[b] - currencyId = balance['currency'] - code = currencyId - if currencyId in self.currencies_by_id: - code = self.currencies_by_id[currencyId]['code'] - total = float(balance['balance']) - account = { - 'free': total, - 'used': 0.0, - 'total': total, - } - result[code] = account - return self.parse_balance(result) - - def fetch_order_book(self, symbol, limit=None, params={}): - self.load_markets() - orderbook = self.publicGetProductsIdPriceLevels(self.extend({ - 'id': self.market_id(symbol), - }, params)) - return self.parse_order_book(orderbook, None, 'buy_price_levels', 'sell_price_levels') - - def parse_ticker(self, ticker, market=None): - timestamp = self.milliseconds() - last = None - if 'last_traded_price' in ticker: - if ticker['last_traded_price']: - length = len(ticker['last_traded_price']) - if length > 0: - last = self.safe_float(ticker, 'last_traded_price') - symbol = None - if market is None: - marketId = self.safe_string(ticker, 'id') - if marketId in self.markets_by_id: - market = self.markets_by_id[marketId] - else: - baseId = self.safe_string(ticker, 'base_currency') - quoteId = self.safe_string(ticker, 'quoted_currency') - base = self.common_currency_code(baseId) - quote = self.common_currency_code(quoteId) - if symbol in self.markets: - market = self.markets[symbol] - else: - symbol = base + '/' + quote - if market is not None: - symbol = market['symbol'] - change = None - percentage = None - average = None - open = self.safe_float(ticker, 'last_price_24h') - if open is not None and last is not None: - change = last - open - average = self.sum(last, open) / 2 - if open > 0: - percentage = change / open * 100 - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': self.iso8601(timestamp), - 'high': self.safe_float(ticker, 'high_market_ask'), - 'low': self.safe_float(ticker, 'low_market_bid'), - 'bid': self.safe_float(ticker, 'market_bid'), - 'bidVolume': None, - 'ask': self.safe_float(ticker, 'market_ask'), - 'askVolume': None, - 'vwap': None, - 'open': open, - 'close': last, - 'last': last, - 'previousClose': None, - 'change': change, - 'percentage': percentage, - 'average': average, - 'baseVolume': self.safe_float(ticker, 'volume_24h'), - 'quoteVolume': None, - 'info': ticker, - } - - def fetch_tickers(self, symbols=None, params={}): - self.load_markets() - tickers = self.publicGetProducts(params) - result = {} - for t in range(0, len(tickers)): - ticker = tickers[t] - base = ticker['base_currency'] - quote = ticker['quoted_currency'] - symbol = base + '/' + quote - market = self.markets[symbol] - result[symbol] = self.parse_ticker(ticker, market) - return result - - def fetch_ticker(self, symbol, params={}): - self.load_markets() - market = self.market(symbol) - ticker = self.publicGetProductsId(self.extend({ - 'id': market['id'], - }, params)) - return self.parse_ticker(ticker, market) - - def parse_trade(self, trade, market): - # { id: 12345, - # quantity: "6.789", - # price: "98765.4321", - # taker_side: "sell", - # created_at: 1512345678, - # my_side: "buy" } - timestamp = trade['created_at'] * 1000 - # 'taker_side' gets filled for both fetchTrades and fetchMyTrades - takerSide = self.safe_string(trade, 'taker_side') - # 'my_side' gets filled for fetchMyTrades only and may differ from 'taker_side' - mySide = self.safe_string(trade, 'my_side') - side = mySide if (mySide is not None) else takerSide - takerOrMaker = None - if mySide is not None: - takerOrMaker = 'taker' if (takerSide == mySide) else 'maker' - return { - 'info': trade, - 'id': str(trade['id']), - 'order': None, - 'timestamp': timestamp, - 'datetime': self.iso8601(timestamp), - 'symbol': market['symbol'], - 'type': None, - 'side': side, - 'takerOrMaker': takerOrMaker, - 'price': self.safe_float(trade, 'price'), - 'amount': self.safe_float(trade, 'quantity'), - } - - def fetch_trades(self, symbol, since=None, limit=None, params={}): - self.load_markets() - market = self.market(symbol) - request = { - 'product_id': market['id'], - } - if limit is not None: - request['limit'] = limit - if since is not None: - # timestamp should be in seconds, whereas we use milliseconds in since and everywhere - request['timestamp'] = int(since / 1000) - response = self.publicGetExecutions(self.extend(request, params)) - result = response if (since is not None) else response['models'] - return self.parse_trades(result, market, since, limit) - - def fetch_my_trades(self, symbol=None, since=None, limit=None, params={}): - self.load_markets() - market = self.market(symbol) - request = { - 'product_id': market['id'], - } - if limit is not None: - request['limit'] = limit - response = self.privateGetExecutionsMe(self.extend(request, params)) - return self.parse_trades(response['models'], market, since, limit) - - def create_order(self, symbol, type, side, amount, price=None, params={}): - self.load_markets() - order = { - 'order_type': type, - 'product_id': self.market_id(symbol), - 'side': side, - 'quantity': amount, - } - if type == 'limit': - order['price'] = price - response = self.privatePostOrders(self.extend(order, params)) - return self.parse_order(response) - - def cancel_order(self, id, symbol=None, params={}): - self.load_markets() - result = self.privatePutOrdersIdCancel(self.extend({ - 'id': id, - }, params)) - order = self.parse_order(result) - if order['status'] == 'closed': - raise OrderNotFound(self.id + ' ' + self.json(order)) - return order - - def parse_order(self, order, market=None): - timestamp = order['created_at'] * 1000 - marketId = self.safe_string(order, 'product_id') - if marketId is not None: - if marketId in self.markets_by_id: - market = self.markets_by_id[marketId] - status = None - if 'status' in order: - if order['status'] == 'live': - status = 'open' - elif order['status'] == 'filled': - status = 'closed' - elif order['status'] == 'cancelled': # 'll' intended - status = 'canceled' - amount = self.safe_float(order, 'quantity') - filled = self.safe_float(order, 'filled_quantity') - price = self.safe_float(order, 'price') - symbol = None - if market is not None: - symbol = market['symbol'] - return { - 'id': str(order['id']), - 'timestamp': timestamp, - 'datetime': self.iso8601(timestamp), - 'lastTradeTimestamp': None, - 'type': order['order_type'], - 'status': status, - 'symbol': symbol, - 'side': order['side'], - 'price': price, - 'amount': amount, - 'filled': filled, - 'remaining': amount - filled, - 'trades': None, - 'fee': { - 'currency': None, - 'cost': self.safe_float(order, 'order_fee'), - }, - 'info': order, - } - - def fetch_order(self, id, symbol=None, params={}): - self.load_markets() - order = self.privateGetOrdersId(self.extend({ - 'id': id, - }, params)) - return self.parse_order(order) - - def fetch_orders(self, symbol=None, since=None, limit=None, params={}): - self.load_markets() - market = None - request = {} - if symbol is not None: - market = self.market(symbol) - request['product_id'] = market['id'] - status = self.safe_value(params, 'status') - if status: - params = self.omit(params, 'status') - if status == 'open': - request['status'] = 'live' - elif status == 'closed': - request['status'] = 'filled' - elif status == 'canceled': - request['status'] = 'cancelled' - if limit is not None: - request['limit'] = limit - result = self.privateGetOrders(self.extend(request, params)) - orders = result['models'] - return self.parse_orders(orders, market, since, limit) - - def fetch_open_orders(self, symbol=None, since=None, limit=None, params={}): - return self.fetch_orders(symbol, since, limit, self.extend({'status': 'open'}, params)) - - def fetch_closed_orders(self, symbol=None, since=None, limit=None, params={}): - return self.fetch_orders(symbol, since, limit, self.extend({'status': 'closed'}, params)) - - def nonce(self): - return self.milliseconds() - - def sign(self, path, api='public', method='GET', params={}, headers=None, body=None): - url = '/' + self.implode_params(path, params) - query = self.omit(params, self.extract_params(path)) - headers = { - 'X-Quoine-API-Version': self.version, - 'Content-Type': 'application/json', - } - if api == 'public': - if query: - url += '?' + self.urlencode(query) - else: - self.check_required_credentials() - if method == 'GET': - if query: - url += '?' + self.urlencode(query) - elif query: - body = self.json(query) - nonce = self.nonce() - request = { - 'path': url, - 'nonce': nonce, - 'token_id': self.apiKey, - 'iat': int(math.floor(nonce / 1000)), # issued at - } - headers['X-Quoine-Auth'] = self.jwt(request, self.secret) - url = self.urls['api'] + url - return {'url': url, 'method': method, 'body': body, 'headers': headers} - - def handle_errors(self, code, reason, url, method, headers, body, response=None): - if code >= 200 and code <= 299: - return - messages = self.exceptions['messages'] - if code == 401: - # expected non-json response - if body in messages: - raise messages[body](self.id + ' ' + body) - else: - return - if response is None: - if (body[0] == '{') or (body[0] == '['): - response = json.loads(body) - else: - return - feedback = self.id + ' ' + self.json(response) - if code == 404: - # {"message": "Order not found"} - message = self.safe_string(response, 'message') - if message in messages: - raise messages[message](feedback) - elif code == 422: - # array of error messages is returned in 'user' or 'quantity' property of 'errors' object, e.g.: - # {"errors": {"user": ["not_enough_free_balance"]}} - # {"errors": {"quantity": ["less_than_order_size"]}} - if 'errors' in response: - errors = response['errors'] - errorTypes = ['user', 'quantity', 'price'] - for i in range(0, len(errorTypes)): - errorType = errorTypes[i] - if errorType in errors: - errorMessages = errors[errorType] - for j in range(0, len(errorMessages)): - message = errorMessages[j] - if message in messages[errorType]: - raise messages[errorType][message](feedback) diff --git a/python/ccxt/quoinex.py b/python/ccxt/quoinex.py index 14fb47b5e4108..c34102a1e0948 100644 --- a/python/ccxt/quoinex.py +++ b/python/ccxt/quoinex.py @@ -3,30 +3,13 @@ # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code -from ccxt.qryptos import qryptos +from ccxt.liquid import liquid -class quoinex (qryptos): +class quoinex (liquid): def describe(self): return self.deep_extend(super(quoinex, self).describe(), { 'id': 'quoinex', 'name': 'QUOINEX', - 'countries': ['JP', 'SG', 'VN'], - 'version': '2', - 'rateLimit': 1000, - 'has': { - 'CORS': False, - 'fetchTickers': True, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg', - 'api': 'https://api.quoine.com', - 'www': 'https://quoinex.com/', - 'doc': [ - 'https://developers.quoine.com', - 'https://developers.quoine.com/v2', - ], - 'fees': 'https://news.quoinex.com/fees/', - }, }) diff --git a/wiki/Exchange-Markets-By-Country.md b/wiki/Exchange-Markets-By-Country.md index d12ed7df97cce..a8226c89eca23 100644 --- a/wiki/Exchange-Markets-By-Country.md +++ b/wiki/Exchange-Markets-By-Country.md @@ -43,10 +43,12 @@ The ccxt library currently supports the following cryptocurrency exchange market |China | ![huobipro](https://user-images.githubusercontent.com/1294454/27766569-15aa7b9a-5edd-11e7-9e7f-44791f4ee49c.jpg) | huobipro | [Huobi Pro](https://www.huobi.br.com/en-us/topic/invited/?invite_code=rwrd3) | | 1 | [API](https://github.com/huobiapi/API_Docs/wiki/REST_api_reference) | |China | ![jubi](https://user-images.githubusercontent.com/1294454/27766581-9d397d9a-5edd-11e7-8fb9-5d8236c0e692.jpg) | jubi | [jubi.com](https://www.jubi.com) | | 1 | [API](https://www.jubi.com/help/api.html) | |China | ![lbank](https://user-images.githubusercontent.com/1294454/38063602-9605e28a-3302-11e8-81be-64b1e53c4cfb.jpg) | lbank | [LBank](https://www.lbank.info) | | 1 | [API](https://github.com/LBank-exchange/lbank-official-api-docs) | +|China | ![liquid](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | liquid | [Liquid](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | |China | ![okcoincny](https://user-images.githubusercontent.com/1294454/27766792-8be9157a-5ee5-11e7-926c-6d69b8d3378d.jpg) | okcoincny | [OKCoin CNY](https://www.okcoin.cn) | | 1 | [API](https://www.okcoin.cn/rest_getStarted.html) | |China | ![okcoinusd](https://user-images.githubusercontent.com/1294454/27766791-89ffb502-5ee5-11e7-8a5b-c5950b68ac65.jpg) | okcoinusd | [OKCoin USD](https://www.okcoin.com) | | 1 | [API](https://www.okcoin.com/rest_getStarted.html) | |China | ![okex](https://user-images.githubusercontent.com/1294454/32552768-0d6dd3c6-c4a6-11e7-90f8-c043b64756a7.jpg) | okex | [OKEX](https://www.okex.com) | | 1 | [API](https://github.com/okcoin-okex/API-docs-OKEx.com) | -|China | ![qryptos](https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg) | qryptos | [QRYPTOS](https://www.qryptos.com) | | 2 | [API](https://developers.quoine.com) | +|China | ![qryptos](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | qryptos | [QRYPTOS](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | +|China | ![quoinex](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | quoinex | [QUOINEX](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | |China | ![yunbi](https://user-images.githubusercontent.com/1294454/28570548-4d646c40-7147-11e7-9cf6-839b93e6d622.jpg) | yunbi | [YUNBI](https://yunbi.com) | | 2 | [API](https://yunbi.com/documents/api/guide) | |China | ![zb](https://user-images.githubusercontent.com/1294454/32859187-cd5214f0-ca5e-11e7-967d-96568e2e2bd1.jpg) | zb | [ZB](https://vip.zb.com/user/register?recommendCode=bn070u) | | 1 | [API](https://www.zb.com/i/developer) | |Cyprus | ![cex](https://user-images.githubusercontent.com/1294454/27766442-8ddc33b0-5ed8-11e7-8b98-f786aef0f3c9.jpg) | cex | [CEX.IO](https://cex.io/r/0/up105393824/0/) | | * | [API](https://cex.io/cex-api) | @@ -89,7 +91,9 @@ The ccxt library currently supports the following cryptocurrency exchange market |Japan | ![btcbox](https://user-images.githubusercontent.com/1294454/31275803-4df755a8-aaa1-11e7-9abb-11ec2fad9f2d.jpg) | btcbox | [BtcBox](https://www.btcbox.co.jp/) | | 1 | [API](https://www.btcbox.co.jp/help/asm) | |Japan | ![coincheck](https://user-images.githubusercontent.com/1294454/27766464-3b5c3c74-5ed9-11e7-840e-31b32968e1da.jpg) | coincheck | [coincheck](https://coincheck.com) | | * | [API](https://coincheck.com/documents/exchange/api) | |Japan | ![coinexchange](https://user-images.githubusercontent.com/1294454/34842303-29c99fca-f71c-11e7-83c1-09d900cb2334.jpg) | coinexchange | [CoinExchange](https://www.coinexchange.io) | | * | [API](https://coinexchangeio.github.io/slate/) | -|Japan | ![quoinex](https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg) | quoinex | [QUOINEX](https://quoinex.com/) | | 2 | [API](https://developers.quoine.com) | +|Japan | ![liquid](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | liquid | [Liquid](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | +|Japan | ![qryptos](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | qryptos | [QRYPTOS](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | +|Japan | ![quoinex](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | quoinex | [QUOINEX](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | |Japan | ![zaif](https://user-images.githubusercontent.com/1294454/27766927-39ca2ada-5eeb-11e7-972f-1b4199518ca6.jpg) | zaif | [Zaif](https://zaif.jp) | | 1 | [API](http://techbureau-api-document.readthedocs.io/ja/latest/index.html) | |Malta | ![bitbay](https://user-images.githubusercontent.com/1294454/27766132-978a7bd8-5ece-11e7-9540-bc96d1e9bbb8.jpg) | bitbay | [BitBay](https://bitbay.net) | | * | [API](https://bitbay.net/public-api) | |Malta | ![therock](https://user-images.githubusercontent.com/1294454/27766869-75057fa2-5ee9-11e7-9a6f-13e641fa4707.jpg) | therock | [TheRockTrading](https://therocktrading.com) | | 1 | [API](https://api.therocktrading.com/doc/v1/index.html) | @@ -116,7 +120,6 @@ The ccxt library currently supports the following cryptocurrency exchange market |Singapore | ![anxpro](https://user-images.githubusercontent.com/1294454/27765983-fd8595da-5ec9-11e7-82e3-adb3ab8c2612.jpg) | anxpro | [ANXPro](https://anxpro.com) | | 2 | [API](http://docs.anxv2.apiary.io) | |Singapore | ![fybsg](https://user-images.githubusercontent.com/1294454/27766513-3364d56a-5edb-11e7-9e6b-d5898bb89c81.jpg) | fybsg | [FYB-SG](https://www.fybsg.com) | | * | [API](http://docs.fyb.apiary.io) | |Singapore | ![luno](https://user-images.githubusercontent.com/1294454/27766607-8c1a69d8-5ede-11e7-930c-540b5eb9be24.jpg) | luno | [luno](https://www.luno.com) | | 1 | [API](https://www.luno.com/en/api) | -|Singapore | ![quoinex](https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg) | quoinex | [QUOINEX](https://quoinex.com/) | | 2 | [API](https://developers.quoine.com) | |Singapore | ![uex](https://user-images.githubusercontent.com/1294454/43999923-051d9884-9e1f-11e8-965a-76948cb17678.jpg) | uex | [UEX](https://www.uex.com/signup.html?code=VAGQLL) | | 1.0.3 | [API](https://download.uex.com/doc/UEX-API-English-1.0.3.pdf) | |South Africa | ![ice3x](https://user-images.githubusercontent.com/1294454/38012176-11616c32-3269-11e8-9f05-e65cf885bb15.jpg) | ice3x | [ICE3X](https://ice3x.com) | | 1 | [API](https://ice3x.co.za/ice-cubed-bitcoin-exchange-api-documentation-1-june-2017) | |South Africa | ![luno](https://user-images.githubusercontent.com/1294454/27766607-8c1a69d8-5ede-11e7-930c-540b5eb9be24.jpg) | luno | [luno](https://www.luno.com) | | 1 | [API](https://www.luno.com/en/api) | @@ -131,7 +134,9 @@ The ccxt library currently supports the following cryptocurrency exchange market |Switzerland | ![lykke](https://user-images.githubusercontent.com/1294454/34487620-3139a7b0-efe6-11e7-90f5-e520cef74451.jpg) | lykke | [Lykke](https://www.lykke.com) | | 1 | [API](https://hft-api.lykke.com/swagger/ui/) | |Switzerland | ![vaultoro](https://user-images.githubusercontent.com/1294454/27766880-f205e870-5ee9-11e7-8fe2-0d5b15880752.jpg) | vaultoro | [Vaultoro](https://www.vaultoro.com) | | 1 | [API](https://api.vaultoro.com) | |Taiwan | ![cobinhood](https://user-images.githubusercontent.com/1294454/35755576-dee02e5c-0878-11e8-989f-1595d80ba47f.jpg) | cobinhood | [COBINHOOD](https://cobinhood.com) | | 1 | [API](https://cobinhood.github.io/api-public) | -|Taiwan | ![qryptos](https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg) | qryptos | [QRYPTOS](https://www.qryptos.com) | | 2 | [API](https://developers.quoine.com) | +|Taiwan | ![liquid](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | liquid | [Liquid](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | +|Taiwan | ![qryptos](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | qryptos | [QRYPTOS](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | +|Taiwan | ![quoinex](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | quoinex | [QUOINEX](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | |Tanzania | ![nova](https://user-images.githubusercontent.com/1294454/30518571-78ca0bca-9b8a-11e7-8840-64b83a4a94b2.jpg) | nova | [Novaexchange](https://novaexchange.com) | | 2 | [API](https://novaexchange.com/remote/faq) | |Thailand | ![bxinth](https://user-images.githubusercontent.com/1294454/27766412-567b1eb4-5ed7-11e7-94a8-ff6a3884f6c5.jpg) | bxinth | [BX.in.th](https://bx.in.th) | | * | [API](https://bx.in.th/info/api) | |Turkey | ![btcturk](https://user-images.githubusercontent.com/1294454/27992709-18e15646-64a3-11e7-9fa2-b0950ec7712f.jpg) | btcturk | [BTCTurk](https://www.btcturk.com) | | * | [API](https://github.com/BTCTrader/broker-api-docs) | @@ -177,6 +182,5 @@ The ccxt library currently supports the following cryptocurrency exchange market |US | ![uex](https://user-images.githubusercontent.com/1294454/43999923-051d9884-9e1f-11e8-965a-76948cb17678.jpg) | uex | [UEX](https://www.uex.com/signup.html?code=VAGQLL) | | 1.0.3 | [API](https://download.uex.com/doc/UEX-API-English-1.0.3.pdf) | |Venezuela | ![surbitcoin](https://user-images.githubusercontent.com/1294454/27991511-f0a50194-6481-11e7-99b5-8f02932424cc.jpg) | surbitcoin | [SurBitcoin](https://surbitcoin.com) | | 1 | [API](https://blinktrade.com/docs) | |Vietnam | ![coinexchange](https://user-images.githubusercontent.com/1294454/34842303-29c99fca-f71c-11e7-83c1-09d900cb2334.jpg) | coinexchange | [CoinExchange](https://www.coinexchange.io) | | * | [API](https://coinexchangeio.github.io/slate/) | -|Vietnam | ![quoinex](https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg) | quoinex | [QUOINEX](https://quoinex.com/) | | 2 | [API](https://developers.quoine.com) | |Vietnam | ![vbtc](https://user-images.githubusercontent.com/1294454/27991481-1f53d1d8-6481-11e7-884e-21d17e7939db.jpg) | vbtc | [VBTC](https://vbtc.exchange) | | 1 | [API](https://blinktrade.com/docs) | diff --git a/wiki/Exchange-Markets.md b/wiki/Exchange-Markets.md index 8b56ac7092bdd..2aba5816bd6a0 100644 --- a/wiki/Exchange-Markets.md +++ b/wiki/Exchange-Markets.md @@ -1,6 +1,6 @@ # Supported Exchanges -The ccxt library currently supports the following 131 cryptocurrency exchange markets and trading APIs: +The ccxt library currently supports the following 132 cryptocurrency exchange markets and trading APIs: | | id | name | certified | ver | doc | countries | |---------------------------------------------------------------------------------------------------------------------------|--------------------|--------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------:|:-----:|--------------------------------------------------------------------------------------------------|-----------------------------------------| @@ -102,6 +102,7 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma |![lakebtc](https://user-images.githubusercontent.com/1294454/28074120-72b7c38a-6660-11e7-92d9-d9027502281d.jpg) | lakebtc | [LakeBTC](https://www.lakebtc.com) | | 2 | [API](https://www.lakebtc.com/s/api_v2) | US | |![lbank](https://user-images.githubusercontent.com/1294454/38063602-9605e28a-3302-11e8-81be-64b1e53c4cfb.jpg) | lbank | [LBank](https://www.lbank.info) | | 1 | [API](https://github.com/LBank-exchange/lbank-official-api-docs) | China | |![liqui](https://user-images.githubusercontent.com/1294454/27982022-75aea828-63a0-11e7-9511-ca584a8edd74.jpg) | liqui | [Liqui](https://liqui.io) | | 3 | [API](https://liqui.io/api) | Ukraine | +|![liquid](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | liquid | [Liquid](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | Japan, China, Taiwan | |![livecoin](https://user-images.githubusercontent.com/1294454/27980768-f22fc424-638a-11e7-89c9-6010a54ff9be.jpg) | livecoin | [LiveCoin](https://www.livecoin.net) | | * | [API](https://www.livecoin.net/api?lang=en) | US, UK, Russia | |![luno](https://user-images.githubusercontent.com/1294454/27766607-8c1a69d8-5ede-11e7-930c-540b5eb9be24.jpg) | luno | [luno](https://www.luno.com) | | 1 | [API](https://www.luno.com/en/api) | UK, Singapore, South Africa | |![lykke](https://user-images.githubusercontent.com/1294454/34487620-3139a7b0-efe6-11e7-90f5-e520cef74451.jpg) | lykke | [Lykke](https://www.lykke.com) | | 1 | [API](https://hft-api.lykke.com/swagger/ui/) | Switzerland | @@ -114,9 +115,9 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma |![okex](https://user-images.githubusercontent.com/1294454/32552768-0d6dd3c6-c4a6-11e7-90f8-c043b64756a7.jpg) | okex | [OKEX](https://www.okex.com) | | 1 | [API](https://github.com/okcoin-okex/API-docs-OKEx.com) | China, US | |![paymium](https://user-images.githubusercontent.com/1294454/27790564-a945a9d4-5ff9-11e7-9d2d-b635763f2f24.jpg) | paymium | [Paymium](https://www.paymium.com) | | 1 | [API](https://github.com/Paymium/api-documentation) | France, EU | |![poloniex](https://user-images.githubusercontent.com/1294454/27766817-e9456312-5ee6-11e7-9b3c-b628ca5626a5.jpg) | poloniex | [Poloniex](https://poloniex.com) | | * | [API](https://poloniex.com/support/api/) | US | -|![qryptos](https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg) | qryptos | [QRYPTOS](https://www.qryptos.com) | | 2 | [API](https://developers.quoine.com) | China, Taiwan | +|![qryptos](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | qryptos | [QRYPTOS](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | Japan, China, Taiwan | |![quadrigacx](https://user-images.githubusercontent.com/1294454/27766825-98a6d0de-5ee7-11e7-9fa4-38e11a2c6f52.jpg) | quadrigacx | [QuadrigaCX](https://www.quadrigacx.com) | | 2 | [API](https://www.quadrigacx.com/api_info) | Canada | -|![quoinex](https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg) | quoinex | [QUOINEX](https://quoinex.com/) | | 2 | [API](https://developers.quoine.com) | Japan, Singapore, Vietnam | +|![quoinex](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | quoinex | [QUOINEX](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | Japan, China, Taiwan | |![rightbtc](https://user-images.githubusercontent.com/1294454/42633917-7d20757e-85ea-11e8-9f53-fffe9fbb7695.jpg) | rightbtc | [RightBTC](https://www.rightbtc.com) | | * | [API](https://52.53.159.206/api/trader/) | United Arab Emirates | |![southxchange](https://user-images.githubusercontent.com/1294454/27838912-4f94ec8a-60f6-11e7-9e5d-bbf9bd50a559.jpg) | southxchange | [SouthXchange](https://www.southxchange.com) | | * | [API](https://www.southxchange.com/Home/Api) | Argentina | |![surbitcoin](https://user-images.githubusercontent.com/1294454/27991511-f0a50194-6481-11e7-99b5-8f02932424cc.jpg) | surbitcoin | [SurBitcoin](https://surbitcoin.com) | | 1 | [API](https://blinktrade.com/docs) | Venezuela | diff --git a/wiki/Manual.md b/wiki/Manual.md index 16d2d14dac032..afcaf76bdb099 100644 --- a/wiki/Manual.md +++ b/wiki/Manual.md @@ -53,7 +53,7 @@ Full public and private HTTP REST APIs for all exchanges are implemented. WebSoc # Exchanges -The ccxt library currently supports the following 131 cryptocurrency exchange markets and trading APIs: +The ccxt library currently supports the following 132 cryptocurrency exchange markets and trading APIs: | | id | name | certified | ver | doc | countries | |---------------------------------------------------------------------------------------------------------------------------|--------------------|--------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------:|:-----:|--------------------------------------------------------------------------------------------------|-----------------------------------------| @@ -155,6 +155,7 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma |![lakebtc](https://user-images.githubusercontent.com/1294454/28074120-72b7c38a-6660-11e7-92d9-d9027502281d.jpg) | lakebtc | [LakeBTC](https://www.lakebtc.com) | | 2 | [API](https://www.lakebtc.com/s/api_v2) | US | |![lbank](https://user-images.githubusercontent.com/1294454/38063602-9605e28a-3302-11e8-81be-64b1e53c4cfb.jpg) | lbank | [LBank](https://www.lbank.info) | | 1 | [API](https://github.com/LBank-exchange/lbank-official-api-docs) | China | |![liqui](https://user-images.githubusercontent.com/1294454/27982022-75aea828-63a0-11e7-9511-ca584a8edd74.jpg) | liqui | [Liqui](https://liqui.io) | | 3 | [API](https://liqui.io/api) | Ukraine | +|![liquid](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | liquid | [Liquid](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | Japan, China, Taiwan | |![livecoin](https://user-images.githubusercontent.com/1294454/27980768-f22fc424-638a-11e7-89c9-6010a54ff9be.jpg) | livecoin | [LiveCoin](https://www.livecoin.net) | | * | [API](https://www.livecoin.net/api?lang=en) | US, UK, Russia | |![luno](https://user-images.githubusercontent.com/1294454/27766607-8c1a69d8-5ede-11e7-930c-540b5eb9be24.jpg) | luno | [luno](https://www.luno.com) | | 1 | [API](https://www.luno.com/en/api) | UK, Singapore, South Africa | |![lykke](https://user-images.githubusercontent.com/1294454/34487620-3139a7b0-efe6-11e7-90f5-e520cef74451.jpg) | lykke | [Lykke](https://www.lykke.com) | | 1 | [API](https://hft-api.lykke.com/swagger/ui/) | Switzerland | @@ -167,9 +168,9 @@ The ccxt library currently supports the following 131 cryptocurrency exchange ma |![okex](https://user-images.githubusercontent.com/1294454/32552768-0d6dd3c6-c4a6-11e7-90f8-c043b64756a7.jpg) | okex | [OKEX](https://www.okex.com) | | 1 | [API](https://github.com/okcoin-okex/API-docs-OKEx.com) | China, US | |![paymium](https://user-images.githubusercontent.com/1294454/27790564-a945a9d4-5ff9-11e7-9d2d-b635763f2f24.jpg) | paymium | [Paymium](https://www.paymium.com) | | 1 | [API](https://github.com/Paymium/api-documentation) | France, EU | |![poloniex](https://user-images.githubusercontent.com/1294454/27766817-e9456312-5ee6-11e7-9b3c-b628ca5626a5.jpg) | poloniex | [Poloniex](https://poloniex.com) | | * | [API](https://poloniex.com/support/api/) | US | -|![qryptos](https://user-images.githubusercontent.com/1294454/30953915-b1611dc0-a436-11e7-8947-c95bd5a42086.jpg) | qryptos | [QRYPTOS](https://www.qryptos.com) | | 2 | [API](https://developers.quoine.com) | China, Taiwan | +|![qryptos](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | qryptos | [QRYPTOS](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | Japan, China, Taiwan | |![quadrigacx](https://user-images.githubusercontent.com/1294454/27766825-98a6d0de-5ee7-11e7-9fa4-38e11a2c6f52.jpg) | quadrigacx | [QuadrigaCX](https://www.quadrigacx.com) | | 2 | [API](https://www.quadrigacx.com/api_info) | Canada | -|![quoinex](https://user-images.githubusercontent.com/1294454/35047114-0e24ad4a-fbaa-11e7-96a9-69c1a756083b.jpg) | quoinex | [QUOINEX](https://quoinex.com/) | | 2 | [API](https://developers.quoine.com) | Japan, Singapore, Vietnam | +|![quoinex](https://user-images.githubusercontent.com/1294454/45798859-1a872600-bcb4-11e8-8746-69291ce87b04.jpg) | quoinex | [QUOINEX](https://www.liquid.com) | | 2 | [API](https://developers.quoine.com) | Japan, China, Taiwan | |![rightbtc](https://user-images.githubusercontent.com/1294454/42633917-7d20757e-85ea-11e8-9f53-fffe9fbb7695.jpg) | rightbtc | [RightBTC](https://www.rightbtc.com) | | * | [API](https://52.53.159.206/api/trader/) | United Arab Emirates | |![southxchange](https://user-images.githubusercontent.com/1294454/27838912-4f94ec8a-60f6-11e7-9e5d-bbf9bd50a559.jpg) | southxchange | [SouthXchange](https://www.southxchange.com) | | * | [API](https://www.southxchange.com/Home/Api) | Argentina | |![surbitcoin](https://user-images.githubusercontent.com/1294454/27991511-f0a50194-6481-11e7-99b5-8f02932424cc.jpg) | surbitcoin | [SurBitcoin](https://surbitcoin.com) | | 1 | [API](https://blinktrade.com/docs) | Venezuela |