Skip to content

Commit

Permalink
detached transpiler merged master
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Oct 23, 2019
2 parents 2331342 + 46175f2 commit d7bd30d
Show file tree
Hide file tree
Showing 52 changed files with 53,182 additions and 46,759 deletions.
36 changes: 19 additions & 17 deletions README.md

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions build/transpile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

"use strict";

const { createFolderRecursively } = require ('./common.js')
, log = require ('ololog')

const log = require ('ololog')
, { createFolderRecursively } = require ('./common.js')
, {
transpileDerivedExchangeFiles,
transpilePythonAsyncToSync,
Expand All @@ -16,7 +15,6 @@ const { createFolderRecursively } = require ('./common.js')
transpileDateTimeTests,
transpileCryptoTests,
} = require ('./transpiler.js')

, python2Folder = './python/ccxt/'
, python3Folder = './python/ccxt/async_support/'
, phpFolder = './php/'
Expand Down
5 changes: 4 additions & 1 deletion build/transpiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const commonRegexes = [
[ /\.safeCurrencyCode\s/g, '.safe_currency_code'],
[ /\.roundTimeframe/g, '.round_timeframe'],
[ /errorHierarchy/g, 'error_hierarchy'],
[ /'.base16ToBinary/g, '.base16_to_binary'],
[ /\'use strict\';?\s+/g, '' ],
]

Expand Down Expand Up @@ -162,6 +163,7 @@ const pythonRegexes = [
[ /\!\=\=?/g, '!=' ],
[ /this\.stringToBinary\s*\((.*)\)/g, '$1' ],
[ /this\.stringToBase64\s/g, 'base64.b64encode' ],
[ /this\.binaryToBase16\s/g, 'base64.b16encode' ],
[ /this\.base64ToBinary\s/g, 'base64.b64decode' ],
[ /\.shift\s*\(\)/g, '.pop(0)' ],

Expand Down Expand Up @@ -196,7 +198,7 @@ const pythonRegexes = [
[ /\s\|\|\s/g, ' or ' ],
[ /\s\&\&\s/g, ' and ' ],
[ /\!([^\=])/g, 'not $1'],
[ /([^\s]+)\.length/g, 'len($1)' ],
[ /([^\s(]+)\.length/g, 'len($1)' ],
[ /\.push\s*\(([\s\S]+?)\);/g, '.append($1);' ],
[ /^(\s*}\s*$)+/gm, '' ],
[ /\;(\s+?\/\/.+?)/g, '$1' ],
Expand Down Expand Up @@ -280,6 +282,7 @@ const phpRegexes = [
[ /this\.extend/g, 'array_merge' ],
[ /this\.stringToBinary\s*\((.*)\)/g, '$1' ],
[ /this\.stringToBase64/g, 'base64_encode' ],
[ /this\.binaryToBase16\s/g, 'bin2hex' ],
[ /this\.base64ToBinary/g, 'base64_decode' ],
[ /this\.deepExtend/g, 'array_replace_recursive'],
[ /(\w+)\.shift\s*\(\)/g, 'array_shift($1)' ],
Expand Down
1 change: 1 addition & 0 deletions ccxt.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ declare module 'ccxt' {
export class btctradeua extends Exchange {}
export class btcturk extends Exchange {}
export class buda extends Exchange {}
export class bytetrade extends Exchange {}
export class cex extends Exchange {}
export class chilebit extends foxbit {}
export class cobinhood extends Exchange {}
Expand Down
3 changes: 2 additions & 1 deletion ccxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.18.1312'
const version = '1.18.1315'

Exchange.ccxtVersion = version

Expand Down Expand Up @@ -83,6 +83,7 @@ const exchanges = {
'btctradeua': require ('./js/btctradeua.js'),
'btcturk': require ('./js/btcturk.js'),
'buda': require ('./js/buda.js'),
'bytetrade': require ('./js/bytetrade.js'),
'cex': require ('./js/cex.js'),
'chilebit': require ('./js/chilebit.js'),
'cobinhood': require ('./js/cobinhood.js'),
Expand Down
94,468 changes: 47,897 additions & 46,571 deletions dist/ccxt.browser.js

Large diffs are not rendered by default.

58 changes: 31 additions & 27 deletions doc/README.rst

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions doc/exchanges-by-country.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ The ccxt library currently supports the following cryptocurrency exchange market
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| Hong Kong | `bitz <https://u.bit-z.com/register?invite_code=1429193>`__ | bitz | `Bit-Z <https://u.bit-z.com/register?invite_code=1429193>`__ | 2 | `API <https://apidoc.bit-z.com/en/>`__ | |
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| Hong Kong | `coolcoin <https://www.coolcoin.com/user/register?invite_code=bhaega>`__ | coolcoin | `CoolCoin <https://www.coolcoin.com/user/register?invite_code=bhaega>`__ | \* | `API <https://www.coolcoin.com/help.api.html>`__ | |
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| Hong Kong | `hitbtc <https://hitbtc.com/?ref_id=5a5d39a65d466>`__ | hitbtc | `HitBTC <https://hitbtc.com/?ref_id=5a5d39a65d466>`__ | 1 | `API <https://github.com/hitbtc-com/hitbtc-api/blob/master/APIv1.md>`__ | |
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| Hong Kong | `hitbtc2 <https://hitbtc.com/?ref_id=5a5d39a65d466>`__ | hitbtc2 | `HitBTC <https://hitbtc.com/?ref_id=5a5d39a65d466>`__ | 2 | `API <https://api.hitbtc.com>`__ | |
Expand All @@ -132,9 +134,9 @@ The ccxt library currently supports the following cryptocurrency exchange market
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| Hong Kong | `tidebit <http://bit.ly/2IX0LrM>`__ | tidebit | `TideBit <http://bit.ly/2IX0LrM>`__ | 2 | `API <https://www.tidebit.com/documents/api/guide>`__ | |
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| Hong Kong | `bitmart <http://www.bitmart.com/?r=rQCFLh>`__ | bitmart | `BitMart <http://www.bitmart.com/?r=rQCFLh>`__ | 2 | `API <https://github.com/bitmartexchange/bitmart-official-api-docs>`__ | |
| Hong Kong | `bytetrade <https://www.bytetrade.com>`__ | bytetrade | `ByteTrade <https://www.bytetrade.com>`__ | \* | `API <https://github.com/Bytetrade/bytetrade-official-api-docs/wiki>`__ | |
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| Hong Kong | `coolcoin <https://www.coolcoin.com/user/register?invite_code=bhaega>`__ | coolcoin | `CoolCoin <https://www.coolcoin.com/user/register?invite_code=bhaega>`__ | \* | `API <https://www.coolcoin.com/help.api.html>`__ | |
| Hong Kong | `bitmart <http://www.bitmart.com/?r=rQCFLh>`__ | bitmart | `BitMart <http://www.bitmart.com/?r=rQCFLh>`__ | 2 | `API <https://github.com/bitmartexchange/bitmart-official-api-docs>`__ | |
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| Hong Kong | `anxpro <https://anxpro.com>`__ | anxpro | `ANXPro <https://anxpro.com>`__ | \* | `API <https://anxv2.docs.apiary.io>`__ | |
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
Expand Down Expand Up @@ -234,10 +236,10 @@ The ccxt library currently supports the following cryptocurrency exchange market
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| South Africa | `ice3x <https://ice3x.com?ref=14341802>`__ | ice3x | `ICE3X <https://ice3x.com?ref=14341802>`__ | 1 | `API <https://ice3x.co.za/ice-cubed-bitcoin-exchange-api-documentation-1-june-2017>`__ | |
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| South Korea | `coinone <https://coinone.co.kr>`__ | coinone | `CoinOne <https://coinone.co.kr>`__ | 2 | `API <https://doc.coinone.co.kr>`__ | |
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| South Korea | `upbit <https://upbit.com>`__ | upbit | `Upbit <https://upbit.com>`__ | 1 | `API <https://docs.upbit.com/docs/%EC%9A%94%EC%B2%AD-%EC%88%98-%EC%A0%9C%ED%95%9C>`__ | |
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| South Korea | `coinone <https://coinone.co.kr>`__ | coinone | `CoinOne <https://coinone.co.kr>`__ | 2 | `API <https://doc.coinone.co.kr>`__ | |
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| South Korea | `bitmart <http://www.bitmart.com/?r=rQCFLh>`__ | bitmart | `BitMart <http://www.bitmart.com/?r=rQCFLh>`__ | 2 | `API <https://github.com/bitmartexchange/bitmart-official-api-docs>`__ | |
+------------------------+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+---+
| South Korea | `bithumb <https://www.bithumb.com>`__ | bithumb | `Bithumb <https://www.bithumb.com>`__ | \* | `API <https://apidocs.bithumb.com>`__ | |
Expand Down
4 changes: 3 additions & 1 deletion doc/exchanges.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Supported Exchanges
===================

The ccxt library currently supports the following 124 cryptocurrency exchange markets and trading APIs:
The ccxt library currently supports the following 125 cryptocurrency exchange markets and trading APIs:

+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+
|        logo        | id | name | ver | doc | certified |
Expand Down Expand Up @@ -88,6 +88,8 @@ The ccxt library currently supports the following 124 cryptocurrency exchange ma
+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+
| `buda <https://www.buda.com>`__ | buda | `Buda <https://www.buda.com>`__ | 2 | `API <https://api.buda.com>`__ | |
+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+
| `bytetrade <https://www.bytetrade.com>`__ | bytetrade | `ByteTrade <https://www.bytetrade.com>`__ | \* | `API <https://github.com/Bytetrade/bytetrade-official-api-docs/wiki>`__ | `CCXT Certified <https://github.com/ccxt/ccxt/wiki/Certification>`__ |
+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+
| `cex <https://cex.io/r/0/up105393824/0/>`__ | cex | `CEX.IO <https://cex.io/r/0/up105393824/0/>`__ | \* | `API <https://cex.io/cex-api>`__ | |
+-------------------------------------------------------------------------------------------+--------------------+--------------------------------------------------------------------------------------------+-----+-------------------------------------------------------------------------------------------------+----------------------------------------------------------------------+
| `chilebit <https://chilebit.net>`__ | chilebit | `ChileBit <https://chilebit.net>`__ | 1 | `API <https://blinktrade.com/docs>`__ | |
Expand Down
6 changes: 3 additions & 3 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ JavaScript (for use with the ``<script>`` tag):

All-in-one browser bundle (dependencies included), served from a CDN of your choice:

- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].1312/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].1312/dist/ccxt.browser.js
- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].1315/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].1315/dist/ccxt.browser.js

You can obtain a live-updated version of the bundle by removing the version number from the URL (the ``@a.b.c`` thing) — however, we do not recommend to do that, as it may break your app eventually. Also, please keep in mind that we are not responsible for the correct operation of those CDN servers.

.. code:: html

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].1312/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].1315/dist/ccxt.browser.js"></script>

Creates a global ``ccxt`` object:

Expand Down
Loading

0 comments on commit d7bd30d

Please sign in to comment.