mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-22 12:40:30 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45978ab193 | ||
|
|
575ac4a36d | ||
|
|
db07ac0abb | ||
|
|
a754497d65 | ||
|
|
d669419d18 |
@@ -285,6 +285,7 @@ def run(ctx,
|
|||||||
analyze_live=None,
|
analyze_live=None,
|
||||||
live_graph=False,
|
live_graph=False,
|
||||||
simulate_orders=True,
|
simulate_orders=True,
|
||||||
|
auth_aliases=None,
|
||||||
stats_output=None,
|
stats_output=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -413,6 +414,15 @@ def catalyst_magic(line, cell=None):
|
|||||||
help='Simulating orders enable the paper trading mode. No orders will be '
|
help='Simulating orders enable the paper trading mode. No orders will be '
|
||||||
'sent to the exchange unless set to false.',
|
'sent to the exchange unless set to false.',
|
||||||
)
|
)
|
||||||
|
@click.option(
|
||||||
|
'--auth-aliases',
|
||||||
|
default=None,
|
||||||
|
help='Authentication file aliases for the specified exchanges. By default,'
|
||||||
|
'each exchange uses the "auth.json" file in the exchange folder. '
|
||||||
|
'Specifying an "auth2" alias would use "auth2.json". It should be '
|
||||||
|
'specified like this: "[exchange_name],[alias],..." For example, '
|
||||||
|
'"binance,auth2" or "binance,auth2,bittrex,auth2".',
|
||||||
|
)
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def live(ctx,
|
def live(ctx,
|
||||||
algofile,
|
algofile,
|
||||||
@@ -427,6 +437,7 @@ def live(ctx,
|
|||||||
base_currency,
|
base_currency,
|
||||||
end,
|
end,
|
||||||
live_graph,
|
live_graph,
|
||||||
|
auth_aliases,
|
||||||
simulate_orders):
|
simulate_orders):
|
||||||
"""Trade live with the given algorithm.
|
"""Trade live with the given algorithm.
|
||||||
"""
|
"""
|
||||||
@@ -480,6 +491,7 @@ def live(ctx,
|
|||||||
live_graph=live_graph,
|
live_graph=live_graph,
|
||||||
analyze_live=None,
|
analyze_live=None,
|
||||||
simulate_orders=simulate_orders,
|
simulate_orders=simulate_orders,
|
||||||
|
auth_aliases=auth_aliases,
|
||||||
stats_output=None,
|
stats_output=None,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ from time import sleep
|
|||||||
|
|
||||||
import click
|
import click
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
from six import string_types
|
||||||
|
|
||||||
from catalyst.data.bundles import load
|
from catalyst.data.bundles import load
|
||||||
from catalyst.data.data_portal import DataPortal
|
from catalyst.data.data_portal import DataPortal
|
||||||
from catalyst.exchange.exchange_pricing_loader import ExchangePricingLoader, \
|
from catalyst.exchange.exchange_pricing_loader import ExchangePricingLoader, \
|
||||||
@@ -97,6 +99,7 @@ def _run(handle_data,
|
|||||||
|
|
||||||
This is shared between the cli and :func:`catalyst.run_algo`.
|
This is shared between the cli and :func:`catalyst.run_algo`.
|
||||||
"""
|
"""
|
||||||
|
# TODO: refactor for more granularity
|
||||||
if algotext is not None:
|
if algotext is not None:
|
||||||
if local_namespace:
|
if local_namespace:
|
||||||
ip = get_ipython() # noqa
|
ip = get_ipython() # noqa
|
||||||
@@ -163,6 +166,17 @@ def _run(handle_data,
|
|||||||
if exchange_name is None:
|
if exchange_name is None:
|
||||||
raise ValueError('Please specify at least one exchange.')
|
raise ValueError('Please specify at least one exchange.')
|
||||||
|
|
||||||
|
if isinstance(auth_aliases, string_types):
|
||||||
|
aliases = auth_aliases.split(',')
|
||||||
|
if len(aliases) < 2 or len(aliases) % 2 != 0:
|
||||||
|
raise ValueError(
|
||||||
|
'the `auth_aliases` parameter must contain an even list '
|
||||||
|
'of comma-delimited values. For example, '
|
||||||
|
'"binance,auth2" or "binance,auth2,bittrex,auth2".'
|
||||||
|
)
|
||||||
|
|
||||||
|
auth_aliases = dict(zip(aliases[::2], aliases[1::2]))
|
||||||
|
|
||||||
exchange_list = [x.strip().lower() for x in exchange.split(',')]
|
exchange_list = [x.strip().lower() for x in exchange.split(',')]
|
||||||
exchanges = dict()
|
exchanges = dict()
|
||||||
for name in exchange_list:
|
for name in exchange_list:
|
||||||
|
|||||||
+5
-5
@@ -23,7 +23,7 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
|
|||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Please use \`make <target>' where <target> is one of"
|
@echo "Please use \`make <target>' where <target> is one of"
|
||||||
@echo " build to build the C and Cython extensions for zipline"
|
@echo " build to build the C and Cython extensions for catalyst"
|
||||||
@echo " html to make standalone HTML files"
|
@echo " html to make standalone HTML files"
|
||||||
@echo " livehtml to run a persistent process that rebuilds the docs"
|
@echo " livehtml to run a persistent process that rebuilds the docs"
|
||||||
@echo " dirhtml to make HTML files named index.html in directories"
|
@echo " dirhtml to make HTML files named index.html in directories"
|
||||||
@@ -96,9 +96,9 @@ qthelp: build
|
|||||||
@echo
|
@echo
|
||||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/zipline.qhcp"
|
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/catalyst.qhcp"
|
||||||
@echo "To view the help file:"
|
@echo "To view the help file:"
|
||||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/zipline.qhc"
|
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/catalyst.qhc"
|
||||||
|
|
||||||
applehelp: build
|
applehelp: build
|
||||||
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
|
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
|
||||||
@@ -113,8 +113,8 @@ devhelp: build
|
|||||||
@echo
|
@echo
|
||||||
@echo "Build finished."
|
@echo "Build finished."
|
||||||
@echo "To view the help file:"
|
@echo "To view the help file:"
|
||||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/zipline"
|
@echo "# mkdir -p $$HOME/.local/share/devhelp/catalyst"
|
||||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/zipline"
|
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/catalyst"
|
||||||
@echo "# devhelp"
|
@echo "# devhelp"
|
||||||
|
|
||||||
epub: build
|
epub: build
|
||||||
|
|||||||
+5
-5
@@ -8,8 +8,8 @@ from shutil import move, rmtree
|
|||||||
from subprocess import check_call
|
from subprocess import check_call
|
||||||
|
|
||||||
HERE = dirname(abspath(__file__))
|
HERE = dirname(abspath(__file__))
|
||||||
ZIPLINE_ROOT = dirname(HERE)
|
CATALYST_ROOT = dirname(HERE)
|
||||||
TEMP_LOCATION = '/tmp/zipline-doc'
|
TEMP_LOCATION = '/tmp/catalyst-doc'
|
||||||
TEMP_LOCATION_GLOB = TEMP_LOCATION + '/*'
|
TEMP_LOCATION_GLOB = TEMP_LOCATION + '/*'
|
||||||
|
|
||||||
|
|
||||||
@@ -46,8 +46,8 @@ def main():
|
|||||||
print("Copying built files to temp location.")
|
print("Copying built files to temp location.")
|
||||||
move('build/html', TEMP_LOCATION)
|
move('build/html', TEMP_LOCATION)
|
||||||
|
|
||||||
print("Moving to '%s'" % ZIPLINE_ROOT)
|
print("Moving to '%s'" % CATALYST_ROOT)
|
||||||
os.chdir(ZIPLINE_ROOT)
|
os.chdir(CATALYST_ROOT)
|
||||||
|
|
||||||
print("Checking out gh-pages branch.")
|
print("Checking out gh-pages branch.")
|
||||||
check_call(
|
check_call(
|
||||||
@@ -70,7 +70,7 @@ def main():
|
|||||||
os.chdir(old_dir)
|
os.chdir(old_dir)
|
||||||
|
|
||||||
print()
|
print()
|
||||||
print("Updated documentation branch in directory %s" % ZIPLINE_ROOT)
|
print("Updated documentation branch in directory %s" % CATALYST_ROOT)
|
||||||
print("If you are happy with these changes, commit and push to gh-pages.")
|
print("If you are happy with these changes, commit and push to gh-pages.")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
+2
-2
@@ -127,9 +127,9 @@ if "%1" == "qthelp" (
|
|||||||
echo.
|
echo.
|
||||||
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
||||||
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
||||||
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\zipline.qhcp
|
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\catalyst.qhcp
|
||||||
echo.To view the help file:
|
echo.To view the help file:
|
||||||
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\zipline.ghc
|
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\catalyst.ghc
|
||||||
goto end
|
goto end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -41,11 +41,11 @@ master_doc = 'index'
|
|||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = u'Catalyst'
|
project = u'Catalyst'
|
||||||
copyright = u'2017, Enigma MPC, Inc.'
|
copyright = u'2018, Enigma MPC, Inc.'
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags, but excluding the commit hash
|
# The full version, including alpha/beta/rc tags, but excluding the commit hash
|
||||||
#release = version.split('+', 1)[0]
|
#release = version.split('+', 1)[0]
|
||||||
release = '0.3'
|
release = '0.4'
|
||||||
|
|
||||||
# List of patterns, relative to source directory, that match files and
|
# List of patterns, relative to source directory, that match files and
|
||||||
# directories to ignore when looking for source files.
|
# directories to ignore when looking for source files.
|
||||||
|
|||||||
@@ -2,6 +2,18 @@
|
|||||||
Release Notes
|
Release Notes
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
Version 0.4.7
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
**Release Date**: 2018-01-19
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
~~~~~~~~~
|
||||||
|
- Fixing issue :issue:`137` impacting the CLI
|
||||||
|
|
||||||
|
Build
|
||||||
|
~~~~~
|
||||||
|
- Implemented authentication aliases (:issue:`60`)
|
||||||
|
|
||||||
Version 0.4.6
|
Version 0.4.6
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
**Release Date**: 2018-01-18
|
**Release Date**: 2018-01-18
|
||||||
|
|||||||
Reference in New Issue
Block a user