Hello,
Thanks for the app - looks really interesting.
I've just installed it and attempted to run the simple_market_making strategy.
I'm getting this error - full trace below.
SAWarning: Unicode type received non-unicode bind param value 'SIMPLEMARKETMAKING'.
Do I need to setup the MYSQL DB with a specific encoding?
---- Full Trace ----
(venv) zen:gryphon matt$ gryphon-exec strategy simple_market_making --builtin --exchange BITSTAMP_BTC_USD
INFO: Running strategy simple_market_making with configuration={'platform': {'audit': None, 'execute': False, 'config_file': None, 'sentry': None, 'strategy': 'simple_market_making', 'builtin': True, 'emerald': None, 'heartbeat': None}, 'strategy': {'tick_sleep': None, 'exchange': 'BITSTAMP_BTC_USD'}, 'exchanges': {}}
INFO:cement:app:gryphon-fury:Running strategy simple_market_making with configuration={'platform': {'audit': None, 'execute': False, 'config_file': None, 'sentry': None, 'strategy': 'simple_market_making', 'builtin': True, 'emerald': None, 'heartbeat': None}, 'strategy': {'tick_sleep': None, 'exchange': 'BITSTAMP_BTC_USD'}, 'exchanges': {}}
INFO:gryphon.execution.live_runner:live_run(simple_market_making, False)
INFO:gryphon.execution.harness.harness:[HARNESS_SETUP] (25/06/19 13:28:41 UTC) The following exchanges will be tradable: []
SimpleMarketMaking
/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py:273: SAWarning: Unicode type received non-unicode bind param value 'SIMPLEMARKETMAKING'. (this warning may be suppressed after 10 occurrences)
(util.ellipses_string(value),),
INFO:gryphon.execution.harness.harness:[SimpleMarketMaking] (25/06/19 13:28:41 UTC) Open position: BTC 0.00000000
INFO:gryphon.execution.harness.harness:[SimpleMarketMaking] (25/06/19 13:28:41 UTC) Available balances:
INFO:gryphon.execution.harness.harness:[SimpleMarketMaking] (25/06/19 13:28:41 UTC) Open Orders:
ERROR:gryphon.execution.live_runner:[TypeError] string indices must be integers
Traceback (most recent call last):
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/gryphon/execution/live_runner.py", line 281, in live_run
harness.tick()
File "harness.pyx", line 161, in gryphon.execution.harness.harness.Harness.tick (/Users/matt/.pyxbld/temp.macosx-10.14-x86_64-2.7/pyrex/gryphon/execution/harness/harness.c:3195)
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/gryphon/lib/util/profile.py", line 59, in inner
t, result = timeit.timeit(run_func, number=1)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 237, in timeit
return Timer(stmt, setup, timer).timeit(number)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 202, in timeit
timing = self.inner(it, self.timer)
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/gryphon/lib/util/monkeypatch_timeit.py", line 14, in inner
retval = _func()
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/gryphon/lib/util/profile.py", line 57, in run_func
return func(*args, **kwargs)
File "harness.pyx", line 169, in gryphon.execution.harness.harness.Harness.tick_algo (/Users/matt/.pyxbld/temp.macosx-10.14-x86_64-2.7/pyrex/gryphon/execution/harness/harness.c:3394)
File "simple_market_making.pyx", line 41, in gryphon.execution.strategies.builtin.simple_market_making.SimpleMarketMaking.tick (/Users/matt/.pyxbld/temp.macosx-10.14-x86_64-2.7/pyrex/gryphon/execution/strategies/builtin/simple_market_making.c:1530)
File "exchange_coordinator.pyx", line 378, in gryphon.execution.harness.exchange_coordinator.ExchangeCoordinator.cancel_all_open_orders (/Users/matt/.pyxbld/temp.macosx-10.14-x86_64-2.7/pyrex/gryphon/execution/harness/exchange_coordinator.c:6923)
File "exchange_api_wrapper.pyx", line 164, in gryphon.lib.exchange.exchange_api_wrapper.ExchangeAPIWrapper.cancel_all_open_orders (/Users/matt/.pyxbld/temp.macosx-10.14-x86_64-2.7/pyrex/gryphon/lib/exchange/exchange_api_wrapper.c:4500)
File "exchange_api_wrapper.pyx", line 138, in gryphon.lib.exchange.exchange_api_wrapper.ExchangeAPIWrapper.get_open_orders (/Users/matt/.pyxbld/temp.macosx-10.14-x86_64-2.7/pyrex/gryphon/lib/exchange/exchange_api_wrapper.c:3902)
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/gryphon/lib/exchange/bitstamp_btc_usd.py", line 307, in get_open_orders_resp
if raw_order['type'] == '0':
TypeError: string indices must be integers
INFO:gryphon.execution.live_runner:handle_exception succeeded, full speed ahead
SimpleMarketMaking
INFO:gryphon.execution.harness.harness:[SimpleMarketMaking] (25/06/19 13:28:47 UTC) Open position: BTC 0.00000000
INFO:gryphon.execution.harness.harness:[SimpleMarketMaking] (25/06/19 13:28:47 UTC) Available balances:
INFO:gryphon.execution.harness.harness:[SimpleMarketMaking] (25/06/19 13:28:47 UTC) Open Orders:
ERROR:gryphon.execution.live_runner:[TypeError] string indices must be integers
Traceback (most recent call last):
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/gryphon/execution/live_runner.py", line 281, in live_run
harness.tick()
File "harness.pyx", line 161, in gryphon.execution.harness.harness.Harness.tick (/Users/matt/.pyxbld/temp.macosx-10.14-x86_64-2.7/pyrex/gryphon/execution/harness/harness.c:3195)
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/gryphon/lib/util/profile.py", line 59, in inner
t, result = timeit.timeit(run_func, number=1)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 237, in timeit
return Timer(stmt, setup, timer).timeit(number)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/timeit.py", line 202, in timeit
timing = self.inner(it, self.timer)
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/gryphon/lib/util/monkeypatch_timeit.py", line 14, in inner
retval = _func()
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/gryphon/lib/util/profile.py", line 57, in run_func
return func(*args, **kwargs)
File "harness.pyx", line 169, in gryphon.execution.harness.harness.Harness.tick_algo (/Users/matt/.pyxbld/temp.macosx-10.14-x86_64-2.7/pyrex/gryphon/execution/harness/harness.c:3394)
File "simple_market_making.pyx", line 41, in gryphon.execution.strategies.builtin.simple_market_making.SimpleMarketMaking.tick (/Users/matt/.pyxbld/temp.macosx-10.14-x86_64-2.7/pyrex/gryphon/execution/strategies/builtin/simple_market_making.c:1530)
File "exchange_coordinator.pyx", line 378, in gryphon.execution.harness.exchange_coordinator.ExchangeCoordinator.cancel_all_open_orders (/Users/matt/.pyxbld/temp.macosx-10.14-x86_64-2.7/pyrex/gryphon/execution/harness/exchange_coordinator.c:6923)
File "exchange_api_wrapper.pyx", line 164, in gryphon.lib.exchange.exchange_api_wrapper.ExchangeAPIWrapper.cancel_all_open_orders (/Users/matt/.pyxbld/temp.macosx-10.14-x86_64-2.7/pyrex/gryphon/lib/exchange/exchange_api_wrapper.c:4500)
File "exchange_api_wrapper.pyx", line 138, in gryphon.lib.exchange.exchange_api_wrapper.ExchangeAPIWrapper.get_open_orders (/Users/matt/.pyxbld/temp.macosx-10.14-x86_64-2.7/pyrex/gryphon/lib/exchange/exchange_api_wrapper.c:3902)
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/gryphon/lib/exchange/bitstamp_btc_usd.py", line 307, in get_open_orders_resp
if raw_order['type'] == '0':
TypeError: string indices must be integers
INFO:gryphon.execution.live_runner:handle_exception succeeded, full speed ahead
^CINFO:gryphon.execution.live_runner:Setting Warm Shutdown Flag
SimpleMarketMaking
INFO:gryphon.execution.live_runner:Initiating Warm Shutdown
INFO:gryphon.execution.live_runner:Warm Shutdown Complete
(venv) zen:gryphon matt$