diff --git a/README.md b/README.md index 1633bbf13..ccc82733a 100644 --- a/README.md +++ b/README.md @@ -200,6 +200,10 @@ to understand the requirements before sending your pull-requests. ## Requirements +### Uptodate clock + +The clock must be uptodate, ideally syncronized to a NTP server rather frequently. Drifting time can lead to losses. + ### Min hardware required To run this bot we recommend you a cloud instance with a minimum of: diff --git a/docs/installation.md b/docs/installation.md index 0fecfcf78..1ceda6b1c 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -267,7 +267,7 @@ Official webpage: https://mrjbq7.github.io/ta-lib/install.html wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz tar xvzf ta-lib-0.4.0-src.tar.gz cd ta-lib -sed -i "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h +sed -i.bak "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h ./configure --prefix=/usr make make install diff --git a/freqtrade/exchange/__init__.py b/freqtrade/exchange/__init__.py index 5eaa2b377..d3c60c256 100644 --- a/freqtrade/exchange/__init__.py +++ b/freqtrade/exchange/__init__.py @@ -599,7 +599,8 @@ class Exchange(object): if not self.exchange_has('fetchMyTrades'): return [] try: - my_trades = self._api.fetch_my_trades(pair, since.timestamp()) + # Allow 5s offset to catch slight time offsets (discovered in #1185) + my_trades = self._api.fetch_my_trades(pair, since.timestamp() - 5) matched_trades = [trade for trade in my_trades if trade['order'] == order_id] return matched_trades diff --git a/install_ta-lib.sh b/install_ta-lib.sh index 18e7b8bbb..d8ae2eeaa 100755 --- a/install_ta-lib.sh +++ b/install_ta-lib.sh @@ -1,6 +1,6 @@ if [ ! -f "ta-lib/CHANGELOG.TXT" ]; then tar zxvf ta-lib-0.4.0-src.tar.gz - cd ta-lib && sed -i "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h && ./configure && make && sudo make install && cd .. + cd ta-lib && sed -i.bak "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h && ./configure && make && sudo make install && cd .. else echo "TA-lib already installed, skipping download and build." cd ta-lib && sudo make install && cd ..