From fadd4abe5af9bc149a248a4ad48730993d01ada0 Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Fri, 20 Oct 2017 10:55:35 -0600 Subject: [PATCH] DOC: naming convention --- catalyst/__main__.py | 2 +- docs/source/index.rst | 1 + docs/source/naming-convention.rst | 66 +++++++++++++++++++++++++++++++ docs/source/welcome.rst | 5 ++- 4 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 docs/source/naming-convention.rst diff --git a/catalyst/__main__.py b/catalyst/__main__.py index 4c48b7e0..1edb53f4 100644 --- a/catalyst/__main__.py +++ b/catalyst/__main__.py @@ -498,7 +498,7 @@ def ingest_exchange(exchange_name, data_frequency, start, end, exchange = get_exchange(exchange_name) exchange_bundle = ExchangeBundle(exchange) - click.echo('ingesting exchange bundle {}'.format(exchange_name)) + click.echo('Ingesting exchange bundle {}...'.format(exchange_name)) exchange_bundle.ingest( data_frequency=data_frequency, include_symbols=include_symbols, diff --git a/docs/source/index.rst b/docs/source/index.rst index 7d9dc349..0efccaeb 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -9,6 +9,7 @@ Table of Contents install beginner-tutorial + naming-convention .. bundles .. development-guidelines .. appendix diff --git a/docs/source/naming-convention.rst b/docs/source/naming-convention.rst new file mode 100644 index 00000000..2a9e0398 --- /dev/null +++ b/docs/source/naming-convention.rst @@ -0,0 +1,66 @@ +Naming Convention +================= + +Catalyst introduces a standardized naming convention for all asset pairs +trading on any exchange in the following form: + + + **{market_currency}_{base_currency}** + +Where {market_currency} is the asset to be traded using {base_currency} as +the reference, both written in lowercase and separated with an underscore. + +This standardization is needed to overcome the lack of consistency in the +naming of assets across different exchanges, and making it easier to the user +to refer to the asset pairs that you want to trade. + +Catalyst maintains a `Market Coverage Overview `_ +where you can check the mapping between Catalyst naming pairs and that of each +exchange. Catalyst will always expect in all its functions that you will refer to +the asset pairs by using the Catalyst naming convention. + +If at any point, you input the wrong name for an asset pair, you will get an error +of that pair not found in the given exchange, and a list of pairs available on that exchange: + +.. code-block:: bash + + $ catalyst ingest-exchange -x poloniex -i btc_usd + +.. parsed-literal:: + + Ingesting exchange bundle poloniex... + Error traceback: /Volumes/Data/Users/victoris/Desktop/Enigma/user-install/catalyst-dev/catalyst/exchange/exchange.py (line 175) + SymbolNotFoundOnExchange: Symbol btc_usd not found on exchange Poloniex. + Choose from: ['rep_usdt', 'gno_btc', 'xvc_btc', 'pink_btc', 'sys_btc', + 'emc2_btc', 'rads_btc', 'note_btc', 'maid_btc', 'bch_btc', 'gnt_btc', + 'bcn_btc', 'rep_btc', 'bcy_btc', 'cvc_btc', 'nxt_xmr', 'zec_usdt', + 'fct_btc', 'gas_btc', 'pot_btc', 'eth_usdt', 'btc_usdt', 'lbc_btc', + 'dcr_btc', 'etc_usdt', 'omg_eth', 'amp_btc', 'xpm_btc', 'nxt_btc', + 'vtc_btc', 'steem_eth', 'blk_xmr', 'pasc_btc', 'zec_xmr', 'grc_btc', + 'nxc_btc', 'btcd_btc', 'ltc_btc', 'dash_btc', 'naut_btc', 'zec_eth', + 'zec_btc', 'burst_btc', 'zrx_eth', 'bela_btc', 'steem_btc', 'etc_btc', + 'eth_btc', 'huc_btc', 'strat_btc', 'lsk_btc', 'exp_btc', 'clam_btc', + 'rep_eth', 'dash_xmr', 'cvc_eth', 'bch_usdt', 'zrx_btc', 'dash_usdt', + 'blk_btc', 'xrp_btc', 'nxt_usdt', 'neos_btc', 'omg_btc', 'bts_btc', + 'doge_btc', 'gnt_eth', 'sbd_btc', 'gno_eth', 'xcp_btc', 'ltc_usdt', + 'btm_btc', 'xmr_usdt', 'lsk_eth', 'omni_btc', 'nav_btc', 'fldc_btc', + 'ppc_btc', 'xbc_btc', 'dgb_btc', 'sc_btc', 'btcd_xmr', 'vrc_btc', + 'ric_btc', 'str_btc', 'maid_xmr', 'xmr_btc', 'sjcx_btc', 'via_btc', + 'xem_btc', 'nmc_btc', 'etc_eth', 'ltc_xmr', 'ardr_btc', 'gas_eth', + 'flo_btc', 'xrp_usdt', 'game_btc', 'bch_eth', 'bcn_xmr', 'str_usdt'] + +In the example above, exchange Poloniex does not use USD, but uses instead the +USDT cryptocurrency asset that is issued on the Bitcoin blockchain via the Omni +Layer Protocol. Each USDT unit is backed by a U.S Dollar held in the reserves of +Tether Limited. USDT can be transferred, stored, and spent, just like bitcoins +or any other cryptocurrency. Given its 1:1 mapping to the USD, is a viable alternative. + +.. code-block:: bash + + $ catalyst ingest-exchange -x poloniex -i btc_usdt + +.. parsed-literal:: + + Ingesting exchange bundle poloniex... + [====================================] Fetching poloniex daily candles: : 100% + diff --git a/docs/source/welcome.rst b/docs/source/welcome.rst index edca29dd..410d8c75 100644 --- a/docs/source/welcome.rst +++ b/docs/source/welcome.rst @@ -10,14 +10,15 @@ Features - Ease of use: Catalyst tries to get out of your way so that you can focus on algorithm development. See - `examples `_ + `examples of trading strategies `_ provided. - Support for several of the top crypto-exchanges by trading volume: `Bitfinex `_, `Bittrex `_, and `Poloniex `_. - Secure: You and only you have access to each exchange API keys for your accounts. - Input of historical pricing data of all crypto-assets by exchange, - with daily and minute resolution. + with daily and minute resolution. See + `Catalyst Market Coverage Overview `_. - Backtesting and live-trading functionality, with a seamless transition between the two modes. - Output of performance statistics are based on Pandas DataFrames to