BLD: backing out CCXT update, not enough time to test properly

This commit is contained in:
Frederic Fortier
2018-01-04 01:44:25 -05:00
parent 9bb12eb781
commit 3045c5108a
5 changed files with 22 additions and 22 deletions
+18 -18
View File
@@ -37,7 +37,7 @@ def initialize(context):
context.base_price = None
context.current_day = None
context.RSI_OVERSOLD = 40
context.RSI_OVERSOLD = 50
context.RSI_OVERBOUGHT = 65
context.CANDLE_SIZE = '5T'
@@ -244,9 +244,24 @@ def analyze(context=None, perf=None):
if __name__ == '__main__':
# The execution mode: backtest or live
MODE = 'backtest'
live = True
if MODE == 'backtest':
if live:
run_algorithm(
capital_base=0.03,
initialize=initialize,
handle_data=handle_data,
analyze=analyze,
exchange_name='poloniex',
live=True,
algo_namespace=NAMESPACE,
base_currency='btc',
live_graph=False,
simulate_orders=False,
stats_output=None,
)
else:
folder = os.path.join(
tempfile.gettempdir(), 'catalyst', NAMESPACE
)
@@ -271,18 +286,3 @@ if __name__ == '__main__':
output=out
)
log.info('saved perf stats: {}'.format(out))
elif MODE == 'live':
run_algorithm(
capital_base=0.03,
initialize=initialize,
handle_data=handle_data,
analyze=analyze,
exchange_name='poloniex',
live=True,
algo_namespace=NAMESPACE,
base_currency='btc',
live_graph=False,
simulate_orders=False,
stats_output=None,
)
-1
View File
@@ -681,7 +681,6 @@ class CCXT(Exchange):
)
side = 'buy' if amount > 0 else 'sell'
if hasattr(self.api, 'amount_to_lots'):
adj_amount = self.api.amount_to_lots(
symbol=symbol,
+1 -1
View File
@@ -20,7 +20,7 @@ dependencies:
- bcolz==0.12.1
- bottleneck==1.2.1
- chardet==3.0.4
- ccxt==1.10.560
- ccxt==1.10.283
- click==6.7
- contextlib2==0.5.5
- cycler==0.10.0
+1 -1
View File
@@ -81,6 +81,6 @@ empyrical==0.2.1
tables==3.3.0
#Catalyst dependencies
ccxt==1.10.560
ccxt==1.10.283
boto3==1.4.8
redo==1.6
+2 -1
View File
@@ -3,6 +3,7 @@ from logbook import Logger
from base import BaseExchangeTestCase
from catalyst.exchange.ccxt.ccxt_exchange import CCXT
from catalyst.exchange.exchange_execution import ExchangeLimitOrder
from catalyst.exchange.utils.exchange_utils import get_exchange_auth
from catalyst.finance.order import Order
@@ -27,7 +28,7 @@ class TestCCXT(BaseExchangeTestCase):
asset = self.exchange.get_asset('neo_eth')
order_id = self.exchange.order(
asset=asset,
limit_price=0.07,
style=ExchangeLimitOrder(limit_price=0.7),
amount=1,
)
log.info('order created {}'.format(order_id))