This repository has been archived by the owner on Nov 26, 2022. It is now read-only.
Crash when a timeout occurs when ordering #356
Labels
Comments
@sam31415 thanks for reporting, we will investigate this. |
Again, the order was executed on the exchange, but not detected by Catalyst, who only saw the btc balance go down. |
Added a retry method and fixed bugs on the missing order process. Thanks for reporting this issue. |
added to release 0.5.14 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Dear Catalyst Maintainers,
Before I tell you about my issue, let me describe my environment:
Environment
aiodns 1.1.1
aiohttp 3.1.3
alembic 0.9.9
async-timeout 2.0.1
attrdict 2.0.0
attrs 17.4.0
bcolz 0.12.1
bcolz 1.1.2 py36h00f5784_0
bokeh 0.12.14 py36_0
boto3 1.7.4
botocore 1.10.4
Bottleneck 1.2.1
bzip2 1.0.6 h9a117a8_4
ca-certificates 2017.08.26 h1d4fec5_0
cchardet 2.1.1
ccxt 1.13.1
certifi 2018.4.16
certifi 2018.1.18 py36_0
chardet 3.0.4
click 6.7 py36h5253387_0
cloudpickle 0.5.2 py36_1
configparser 3.5.0
contextlib2 0.5.5
cycler 0.10.0
cyordereddict 1.0.0
cython 0.27.3 py36h1860423_0
Cython 0.28.2
cytoolz 0.9.0.1 py36h14c3975_0
dask 0.17.2 py36_0
dask-core 0.17.2 py36_0
decorator 4.3.0
distributed 1.21.4 py36_0
docutils 0.14
empyrical 0.2.1
enigma-catalyst 0.5.12
eth-abi 1.0.0
eth-account 0.1.0a2
eth-hash 0.1.2
eth-keyfile 0.5.1
eth-keys 0.2.0b3
eth-rlp 0.1.0
eth-utils 1.0.2
hdf5 1.10.1 h9caa474_1
heapdict 1.0.0 py36_2
hexbytes 0.1.0
idna 2.6
idna-ssl 1.0.1
intel-openmp 2018.0.0 8
intervaltree 2.1.0
jinja2 2.10 py36ha16c418_0
jmespath 0.9.3
kiwisolver 1.0.1
libedit 3.1 heed3624_0
libffi 3.2.1 hd88cf55_4
libgcc-ng 7.2.0 hdf63c60_3
libgfortran-ng 7.2.0 hdf63c60_3
libstdcxx-ng 7.2.0 hdf63c60_3
locket 0.2.0 py36h787c0ad_1
Logbook 1.3.3
lru-dict 1.1.6
lxml 4.2.1
lzo 2.10 h49e0be7_2
Mako 1.0.7
markupsafe 1.0 py36hd9260cd_1
matplotlib 2.2.2
mkl 2018.0.2 1
mpld3 0.3
msgpack-python 0.5.5 py36h6bb024c_0
multidict 4.2.0
multipledispatch 0.5.0
ncurses 6.0 h9df7e31_2
networkx 2.1
numexpr 2.6.4 py36hc4a3f9a_0
numpy 1.14.2
numpy 1.14.2 py36hdbf6ddf_0
openssl 1.0.2n hb7f436b_0
packaging 17.1 py36_0
pandas 0.22.0 py36hf484d3e_0
pandas 0.19.2
pandas-datareader 0.6.0
partd 0.3.8 py36h36fd896_0
patsy 0.5.0 py36_0
patsy 0.5.0
pip 10.0.1
pip 9.0.1 py36_5
psutil 5.4.3 py36h14c3975_0
pycares 2.3.0
pycryptodome 3.6.1
pyparsing 2.2.0 py36hee85983_1
pytables 3.4.2 py36h3b5282a_2
python 3.6.4 hc3d631a_3
python-dateutil 2.7.2
python-dateutil 2.7.0 py36_0
python-editor 1.0.3
pytz 2018.3 py36_0
pytz 2018.4
pyyaml 3.12 py36hafb9ca4_1
readline 7.0 ha6073c6_4
redo 1.6
requests 2.18.4
requests-file 1.4.3
requests-ftp 0.3.1
requests-toolbelt 0.8.0
rlp 0.6.0
s3transfer 0.1.13
scipy 1.0.0 py36hbf646e7_0
scipy 1.0.1
setuptools 39.0.1
setuptools 38.5.1 py36_0
six 1.11.0 py36h372c433_1
six 1.10.0
sortedcontainers 1.5.9 py36_0
SQLAlchemy 1.2.6
sqlite 3.22.0 h1bed415_0
statsmodels 0.8.0 py36h8533d0b_0
statsmodels 0.8.0
tabulate 0.8.2
tblib 1.3.2 py36h34cf8b6_0
tk 8.6.7 hc745277_3
toolz 0.9.0 py36_0
tornado 5.0 py36_0
urllib3 1.22
web3 4.1.0
websockets 4.0.1
wheel 0.30.0 py36hfd4bba0_1
wrapt 1.10.11
xz 5.2.3 h55aa19d_2
yaml 0.1.7 had09818_2
yarl 1.1.0
zict 0.1.3 py36h3a3bf81_0
zlib 1.2.11 ha838bed_2
Now that you know a little about me, let me tell you about the issue I am
having:
Description of Issue
A timeout occured when ordering on Poloniex and the algorithm crashed.
The buy order was placed with the
order
function with a limit price well above the current price. On the exchange, the order has been filled against three limit orders.I expect the algorithm to keep connecting to the exchange until it figures out whether the order has filled or not.
The algorithm considered the order as not filled, detected a lower balance in cash (because the order WAS filled), and then crashed.
This issue seems closely related to #317. At the time, the algorithm was ordering multiple times. Now it crashes.
Side remark: Please, a trading algorithm should ideally never crash. This is terrible. I do my best to handle any error I can within the algorithm, but it's not possible to do so with all of them. In the present case, if a lower balance is detected, at the very least the algo could just send a warning, update its cash variable and continue trading with less money. Why make it crash?
Here is how you can reproduce this issue on your machine:
Reproduction Steps
...
Sincerely,
Samuel
The text was updated successfully, but these errors were encountered: