From 54b63e89f8a687ee9bd488fd010a57dd243ce355 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Fri, 8 Nov 2019 17:32:18 +0300 Subject: [PATCH 01/18] Wordings on top of #2495 --- docs/installation.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index ce35572c4..61ce6c7b2 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -29,16 +29,18 @@ You will need to create API Keys (Usually you get `key` and `secret`) from the E Freqtrade provides a Linux/MacOS script to install all dependencies and help you to configure the bot. !!! Note - Python3.6 or higher and the corresponding pip are assumed to be available. The install-script will warn and stop if that's not the case. + Python3.6 or higher and the corresponding `pip` are assumed to be available. The install-script will warn and stop if that's not the case. ```bash git clone git@github.com:freqtrade/freqtrade.git cd freqtrade +git checkout master # Optional, see (1) ./setup.sh --install ``` +(1) This command switches the cloned repository to the use of the `master` branch. This command is not needed if you wish to stay on the `develop` branch. You may later switch between branches at any time with the `git checkout master`/`git checkout develop` commands. !!! Note "Version considerations" - When cloning the repository the default working branch is name `develop`. This branch contains the last features (can be considered as relatively stable thanks to automated tests). The `master` branch contains the code of the last release (done once per month with a one week old snapshot of the `develop` branch to prevent packaging bugs so potentially more stable). + When cloning the repository the default working branch has the name `develop`. This branch contains all last features (can be considered as relatively stable, thanks to automated tests). The `master` branch contains the code of the last release (done usually once per month on an approximately one week old snapshot of the `develop` branch to prevent packaging bugs, so potentially it's more stable). !!! Note Windows installation is explained [here](#windows). From 1f042f5e32a92cf93ee721ecece6a5830408d35a Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Fri, 8 Nov 2019 19:38:32 +0300 Subject: [PATCH 02/18] Quick start and easy installation sections reworked --- docs/installation.md | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 61ce6c7b2..1330e0994 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -26,10 +26,20 @@ You will need to create API Keys (Usually you get `key` and `secret`) from the E ## Quick start -Freqtrade provides a Linux/MacOS script to install all dependencies and help you to configure the bot. +Freqtrade provides the Linux/MacOS Easy Installation script to install all dependencies and help you configure the bot. !!! Note - Python3.6 or higher and the corresponding `pip` are assumed to be available. The install-script will warn and stop if that's not the case. + Windows installation is explained [here](#windows). + +The easiest way to install and run Freqtrade is to clone the bot GitHub repository and then run the Easy Installation script, if it's available for your platform. + +!!! Note "Version considerations" + When cloning the repository the default working branch has the name `develop`. This branch contains all last features (can be considered as relatively stable, thanks to automated tests). The `master` branch contains the code of the last release (done usually once per month on an approximately one week old snapshot of the `develop` branch to prevent packaging bugs, so potentially it's more stable). + +!!! Note + Python3.6 or higher and the corresponding `pip` are assumed to be available. The install-script will warn you and stop if that's not the case. `git` is also needed to clone the Freqtrade repository. + +This can be achieved with the following commands: ```bash git clone git@github.com:freqtrade/freqtrade.git @@ -37,17 +47,11 @@ cd freqtrade git checkout master # Optional, see (1) ./setup.sh --install ``` -(1) This command switches the cloned repository to the use of the `master` branch. This command is not needed if you wish to stay on the `develop` branch. You may later switch between branches at any time with the `git checkout master`/`git checkout develop` commands. +(1) This command switches the cloned repository to the use of the `master` branch. It's not needed if you wish to stay on the `develop` branch. You may later switch between branches at any time with the `git checkout master`/`git checkout develop` commands. -!!! Note "Version considerations" - When cloning the repository the default working branch has the name `develop`. This branch contains all last features (can be considered as relatively stable, thanks to automated tests). The `master` branch contains the code of the last release (done usually once per month on an approximately one week old snapshot of the `develop` branch to prevent packaging bugs, so potentially it's more stable). +## Easy Installation Script (Linux/MacOS) -!!! Note - Windows installation is explained [here](#windows). - -## Easy Installation - Linux Script - -If you are on Debian, Ubuntu or MacOS freqtrade provides a script to Install, Update, Configure, and Reset your bot. +If you are on Debian, Ubuntu or MacOS Freqtrade provides the script to install, update, configure and reset the codebase of your bot. ```bash $ ./setup.sh @@ -60,25 +64,25 @@ usage: ** --install ** -This script will install everything you need to run the bot: +With this option, the script will install everything you need to run the bot: * Mandatory software as: `ta-lib` * Setup your virtualenv * Configure your `config.json` file -This script is a combination of `install script` `--reset`, `--config` +This option is a combination of installation tasks, `--reset` and `--config`. ** --update ** -Update parameter will pull the last version of your current branch and update your virtualenv. +This option will pull the last version of your current branch and update your virtualenv. Run the script with this option periodically to update your bot. ** --reset ** -Reset parameter will hard reset your branch (only if you are on `master` or `develop`) and recreate your virtualenv. +This option will hard reset your branch (only if you are on either `master` or `develop`) and recreate your virtualenv. ** --config ** -Config parameter is a `config.json` configurator. This script will ask you questions to setup your bot and create your `config.json`. +Use this option to configure the `config.json` configuration file. The script will interactively ask you questions to setup your bot and create your `config.json`. ------ From 12654cb810789031232fa58f25634cf000f4cb5b Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 9 Nov 2019 16:14:18 +0100 Subject: [PATCH 03/18] Add seperate exchange section in docs --- README.md | 8 +------- docs/configuration.md | 13 ++++--------- docs/data-download.md | 6 ++---- docs/exchanges.md | 35 +++++++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 5 files changed, 43 insertions(+), 20 deletions(-) create mode 100644 docs/exchanges.md diff --git a/README.md b/README.md index 6d57dcd89..a1feeab67 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,6 @@ git checkout develop For any other type of installation please refer to [Installation doc](https://www.freqtrade.io/en/latest/installation/). - ## Basic Usage ### Bot commands @@ -106,7 +105,7 @@ optional arguments: ### Telegram RPC commands -Telegram is not mandatory. However, this is a great way to control your bot. More details on our [documentation](https://www.freqtrade.io/en/latest/telegram-usage/) +Telegram is not mandatory. However, this is a great way to control your bot. More details and the full command list on our [documentation](https://www.freqtrade.io/en/latest/telegram-usage/) - `/start`: Starts the trader - `/stop`: Stops the trader @@ -129,11 +128,6 @@ The project is currently setup in two main branches: - `master` - This branch contains the latest stable release. The bot 'should' be stable on this branch, and is generally well tested. - `feat/*` - These are feature branches, which are being worked on heavily. Please don't use these unless you want to test a specific feature. -## A note on Binance - -For Binance, please add `"BNB/"` to your blacklist to avoid issues. -Accounts having BNB accounts use this to pay for fees - if your first trade happens to be on `BNB`, further trades will consume this position and make the initial BNB order unsellable as the expected amount is not there anymore. - ## Support ### Help / Slack diff --git a/docs/configuration.md b/docs/configuration.md index e250a81ec..6439c9258 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -357,19 +357,12 @@ For example, to test the order type `FOK` with Kraken, and modify candle_limit t !!! Warning Please make sure to fully understand the impacts of these settings before modifying them. -#### Random notes for other exchanges - -* The Ocean (ccxt id: 'theocean') exchange uses Web3 functionality and requires web3 package to be installed: -```shell -$ pip3 install web3 -``` - ### What values can be used for fiat_display_currency? The `fiat_display_currency` configuration parameter sets the base currency to use for the conversion from coin to fiat in the bot Telegram reports. -The valid values are: +The valid values are:p ```json "AUD", "BRL", "CAD", "CHF", "CLP", "CNY", "CZK", "DKK", "EUR", "GBP", "HKD", "HUF", "IDR", "ILS", "INR", "JPY", "KRW", "MXN", "MYR", "NOK", "NZD", "PHP", "PKR", "PLN", "RUB", "SEK", "SGD", "THB", "TRY", "TWD", "ZAR", "USD" @@ -476,11 +469,13 @@ you run it in production mode. "secret": "08a9dc6db3d7b53e1acebd9275677f4b0a04f1a5", ... } - ``` + !!! Note If you have an exchange API key yet, [see our tutorial](/pre-requisite). +You should also make sure to read the [Exchanges](exchanges.md) section of the documentation to be aware of potential configuration details specific to your exchange. + ### Using proxy with FreqTrade To use a proxy with freqtrade, add the kwarg `"aiohttp_trust_env"=true` to the `"ccxt_async_kwargs"` dict in the exchange section of the configuration. diff --git a/docs/data-download.md b/docs/data-download.md index f105e7a56..1f03b124a 100644 --- a/docs/data-download.md +++ b/docs/data-download.md @@ -78,10 +78,8 @@ freqtrade download-data --exchange binance --pairs XRP/ETH ETH/BTC --days 20 --d !!! Warning The historic trades are not available during Freqtrade dry-run and live trade modes because all exchanges tested provide this data with a delay of few 100 candles, so it's not suitable for real-time trading. -### Historic Kraken data - -The Kraken API does only provide 720 historic candles, which is sufficient for FreqTrade dry-run and live trade modes, but is a problem for backtesting. -To download data for the Kraken exchange, using `--dl-trades` is mandatory, otherwise the bot will download the same 720 candles over and over, and you'll not have enough backtest data. +!!! Note "Kraken user" + Kraken users should read [this](exchanges.md#historic-kraken-data) before starting to download data. ## Next step diff --git a/docs/exchanges.md b/docs/exchanges.md new file mode 100644 index 000000000..8df76c1ba --- /dev/null +++ b/docs/exchanges.md @@ -0,0 +1,35 @@ +# Exchange-specific Notes + +This page combines common gotchas and informations which are exchange-specific and most likely don't apply to other exchanges. + +## Binance + +!!! Tip "Stoploss on Exchange" + Binance is currently the only exchange supporting `stoploss_on_exchange`. It provides great advantages, so we recommend to benefit from it. + +### Blacklists + +For Binance, please add `"BNB/"` to your blacklist to avoid issues. +Accounts having BNB accounts use this to pay for fees - if your first trade happens to be on `BNB`, further trades will consume this position and make the initial BNB order unsellable as the expected amount is not there anymore. + +### Binance sites + +Binance has been split into 3, and users must use the correct ccxt exchange ID for their exchange, otherwise API keys are not recognized. + +* [binance.com](https://www.binance.com/) - International users - ccxt id: `binance` +* [binance.us](https://www.binance.us/) US based users- ccxt id: `binanceus` +* [binance.je](https://www.binance.je/) Trading FIAT currencies - ccxt id: `binanceje` + +### Kraken + +### Historic Kraken data + +The Kraken API does only provide 720 historic candles, which is sufficient for FreqTrade dry-run and live trade modes, but is a problem for backtesting. +To download data for the Kraken exchange, using `--dl-trades` is mandatory, otherwise the bot will download the same 720 candles over and over, and you'll not have enough backtest data. + +#### Random notes for other exchanges + +* The Ocean (ccxt id: 'theocean') exchange uses Web3 functionality and requires web3 package to be installed: +```shell +$ pip3 install web3 +``` diff --git a/mkdocs.yml b/mkdocs.yml index 2c3f70191..0fd8070f5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -16,6 +16,7 @@ nav: - Hyperopt: hyperopt.md - Edge Positioning: edge.md - Utility Subcommands: utils.md + - Exchanges: exchanges.md - FAQ: faq.md - Data Analysis: - Jupyter Notebooks: data-analysis.md From de2d04f06b2221559a6703cfe3c77a3c74ab5257 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 9 Nov 2019 16:24:24 +0100 Subject: [PATCH 04/18] Add note about systemd load location closes #2461 --- docs/advanced-setup.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/advanced-setup.md b/docs/advanced-setup.md index e6334d2c1..97d52850c 100644 --- a/docs/advanced-setup.md +++ b/docs/advanced-setup.md @@ -8,6 +8,9 @@ If you do not know what things mentioned here mean, you probably do not need it. Copy the `freqtrade.service` file to your systemd user directory (usually `~/.config/systemd/user`) and update `WorkingDirectory` and `ExecStart` to match your setup. +!!! Note + Certain systems (like Raspbian) don't load service unit files from the user directory. In this case, copy `freqtrade.service` into `/etc/systemd/user/` (requires superuser permissions). + After that you can start the daemon with: ```bash From eba55c27832240febb5f9ec10651931b04cc686e Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 10 Nov 2019 19:31:13 +0100 Subject: [PATCH 05/18] Change link --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 0fd8070f5..43d6acc1d 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -16,7 +16,7 @@ nav: - Hyperopt: hyperopt.md - Edge Positioning: edge.md - Utility Subcommands: utils.md - - Exchanges: exchanges.md + - Exchange-specific Notes: exchanges.md - FAQ: faq.md - Data Analysis: - Jupyter Notebooks: data-analysis.md From 692d6afbd9ec1953e713e2947270f4b2080ee755 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Mon, 11 Nov 2019 02:17:41 +0300 Subject: [PATCH 06/18] Minor exchange notes typographical cosmetics --- docs/exchanges.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/exchanges.md b/docs/exchanges.md index 8df76c1ba..2cf4ed355 100644 --- a/docs/exchanges.md +++ b/docs/exchanges.md @@ -16,9 +16,9 @@ Accounts having BNB accounts use this to pay for fees - if your first trade happ Binance has been split into 3, and users must use the correct ccxt exchange ID for their exchange, otherwise API keys are not recognized. -* [binance.com](https://www.binance.com/) - International users - ccxt id: `binance` -* [binance.us](https://www.binance.us/) US based users- ccxt id: `binanceus` -* [binance.je](https://www.binance.je/) Trading FIAT currencies - ccxt id: `binanceje` +* [binance.com](https://www.binance.com/) - International users, ccxt id: `binance`. +* [binance.us](https://www.binance.us/) - US based users, ccxt id: `binanceus`. +* [binance.je](https://www.binance.je/) - Binance Jersey, trading fiat currencies. Use ccxt id: `binanceje`. ### Kraken From e810597eec91727b53ac3fe910887972a59850cd Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 11 Nov 2019 07:16:35 +0100 Subject: [PATCH 07/18] Add restricted markets snippet to documentation --- docs/exchanges.md | 24 +++++++++++++++++++++++- docs/faq.md | 6 +----- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/docs/exchanges.md b/docs/exchanges.md index 8df76c1ba..bb30e3f6d 100644 --- a/docs/exchanges.md +++ b/docs/exchanges.md @@ -20,7 +20,7 @@ Binance has been split into 3, and users must use the correct ccxt exchange ID f * [binance.us](https://www.binance.us/) US based users- ccxt id: `binanceus` * [binance.je](https://www.binance.je/) Trading FIAT currencies - ccxt id: `binanceje` -### Kraken +## Kraken ### Historic Kraken data @@ -33,3 +33,25 @@ To download data for the Kraken exchange, using `--dl-trades` is mandatory, othe ```shell $ pip3 install web3 ``` + +## Bittrex + +### Restricted markets + +Bittrex split its exchange into US and International versions. +The International version has more pairs available, however the API always returns all pairs, so there is currently no automated way to detect if you're affected by the restriction. + +If you have restricted pairs in your whitelist, you'll get a warning message in the log on FreqTrade startup for each restricted pair. +If you're an "International" Customer on the Bittrex exchange, then this warning will probably not impact you. +If you're a US customer, the bot will fail to create orders for these pairs, and you should remove them from your Whitelist. + +You can get a list of restricted markets by using the following snipptet: + +``` python +import ccxt +ct = ccxt.bittrex() +_ = ct.load_markets() +res = [ f"{x['MarketCurrency']}/{x['BaseCurrency']}" for x in ct.publicGetMarkets()['result'] if x['IsRestricted']] +print(res) + +``` diff --git a/docs/faq.md b/docs/faq.md index 7fdd54958..3ff668bae 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -48,12 +48,8 @@ You can use the `/forcesell all` command from Telegram. ### I get the message "RESTRICTED_MARKET" Currently known to happen for US Bittrex users. -Bittrex split its exchange into US and International versions. -The International version has more pairs available, however the API always returns all pairs, so there is currently no automated way to detect if you're affected by the restriction. -If you have restricted pairs in your whitelist, you'll get a warning message in the log on FreqTrade startup for each restricted pair. -If you're an "International" Customer on the Bittrex exchange, then this warning will probably not impact you. -If you're a US customer, the bot will fail to create orders for these pairs, and you should remove them from your Whitelist. +Read [the Bittrex section about restricted markets](exchanges.md#Restricted markets) for more information. ### How do I search the bot logs for something? From 04b51a982e4aa6c5d88e699b4b0eab45af5183e5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 11 Nov 2019 08:55:37 +0100 Subject: [PATCH 08/18] Include warning-message to bittrex explanation --- docs/exchanges.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/exchanges.md b/docs/exchanges.md index bb30e3f6d..0006dfa34 100644 --- a/docs/exchanges.md +++ b/docs/exchanges.md @@ -42,6 +42,13 @@ Bittrex split its exchange into US and International versions. The International version has more pairs available, however the API always returns all pairs, so there is currently no automated way to detect if you're affected by the restriction. If you have restricted pairs in your whitelist, you'll get a warning message in the log on FreqTrade startup for each restricted pair. + +The warning message will look similar to the following: + +``` output +[...] Message: bittrex {"success":false,"message":"RESTRICTED_MARKET","result":null,"explanation":null}" +``` + If you're an "International" Customer on the Bittrex exchange, then this warning will probably not impact you. If you're a US customer, the bot will fail to create orders for these pairs, and you should remove them from your Whitelist. From 83067c1edc4ac138c2d87b8b8cfc555f0ab384ff Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Mon, 11 Nov 2019 11:18:43 +0300 Subject: [PATCH 09/18] minor: Fix link in the Faq docs --- docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/faq.md b/docs/faq.md index 3ff668bae..b9c662085 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -49,7 +49,7 @@ You can use the `/forcesell all` command from Telegram. Currently known to happen for US Bittrex users. -Read [the Bittrex section about restricted markets](exchanges.md#Restricted markets) for more information. +Read [the Bittrex section about restricted markets](exchanges.md#restricted-markets) for more information. ### How do I search the bot logs for something? From 661c8251c55ab01de6519be576214b867ca033a9 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Mon, 11 Nov 2019 11:23:29 +0300 Subject: [PATCH 10/18] minor: Exchange notes docs * Formatting (structure of sections) * Cosmetic changes This was not noticed in terms of #2505 --- docs/exchanges.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/exchanges.md b/docs/exchanges.md index 0006dfa34..ac742a350 100644 --- a/docs/exchanges.md +++ b/docs/exchanges.md @@ -27,13 +27,6 @@ Binance has been split into 3, and users must use the correct ccxt exchange ID f The Kraken API does only provide 720 historic candles, which is sufficient for FreqTrade dry-run and live trade modes, but is a problem for backtesting. To download data for the Kraken exchange, using `--dl-trades` is mandatory, otherwise the bot will download the same 720 candles over and over, and you'll not have enough backtest data. -#### Random notes for other exchanges - -* The Ocean (ccxt id: 'theocean') exchange uses Web3 functionality and requires web3 package to be installed: -```shell -$ pip3 install web3 -``` - ## Bittrex ### Restricted markets @@ -41,7 +34,7 @@ $ pip3 install web3 Bittrex split its exchange into US and International versions. The International version has more pairs available, however the API always returns all pairs, so there is currently no automated way to detect if you're affected by the restriction. -If you have restricted pairs in your whitelist, you'll get a warning message in the log on FreqTrade startup for each restricted pair. +If you have restricted pairs in your whitelist, you'll get a warning message in the log on Freqtrade startup for each restricted pair. The warning message will look similar to the following: @@ -49,8 +42,8 @@ The warning message will look similar to the following: [...] Message: bittrex {"success":false,"message":"RESTRICTED_MARKET","result":null,"explanation":null}" ``` -If you're an "International" Customer on the Bittrex exchange, then this warning will probably not impact you. -If you're a US customer, the bot will fail to create orders for these pairs, and you should remove them from your Whitelist. +If you're an "International" customer on the Bittrex exchange, then this warning will probably not impact you. +If you're a US customer, the bot will fail to create orders for these pairs, and you should remove them from your whitelist. You can get a list of restricted markets by using the following snipptet: @@ -62,3 +55,10 @@ res = [ f"{x['MarketCurrency']}/{x['BaseCurrency']}" for x in ct.publicGetMarket print(res) ``` + +## Random notes for other exchanges + +* The Ocean (ccxt id: 'theocean') exchange uses Web3 functionality and requires web3 package to be installed: +```shell +$ pip3 install web3 +``` From 95492958f9fc74c113a02fbfbc51347f8e0d5e56 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Mon, 11 Nov 2019 11:37:57 +0300 Subject: [PATCH 11/18] wordings --- docs/exchanges.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/exchanges.md b/docs/exchanges.md index 2cf4ed355..6e4ddf9a8 100644 --- a/docs/exchanges.md +++ b/docs/exchanges.md @@ -16,9 +16,9 @@ Accounts having BNB accounts use this to pay for fees - if your first trade happ Binance has been split into 3, and users must use the correct ccxt exchange ID for their exchange, otherwise API keys are not recognized. -* [binance.com](https://www.binance.com/) - International users, ccxt id: `binance`. -* [binance.us](https://www.binance.us/) - US based users, ccxt id: `binanceus`. -* [binance.je](https://www.binance.je/) - Binance Jersey, trading fiat currencies. Use ccxt id: `binanceje`. +* [binance.com](https://www.binance.com/) - International users. Use exchange id: `binance`. +* [binance.us](https://www.binance.us/) - US based users. Use exchange id: `binanceus`. +* [binance.je](https://www.binance.je/) - Binance Jersey, trading fiat currencies. Use exchange id: `binanceje`. ### Kraken From 27d81bb68c6cabadfc929c49e3f1f5b1c537af57 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Mon, 11 Nov 2019 12:23:24 +0300 Subject: [PATCH 12/18] minor: More cosmetics on Exchange Notes --- docs/exchanges.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/exchanges.md b/docs/exchanges.md index 090d70e1f..5bd283a69 100644 --- a/docs/exchanges.md +++ b/docs/exchanges.md @@ -24,7 +24,7 @@ Binance has been split into 3, and users must use the correct ccxt exchange ID f ### Historic Kraken data -The Kraken API does only provide 720 historic candles, which is sufficient for FreqTrade dry-run and live trade modes, but is a problem for backtesting. +The Kraken API does only provide 720 historic candles, which is sufficient for Freqtrade dry-run and live trade modes, but is a problem for backtesting. To download data for the Kraken exchange, using `--dl-trades` is mandatory, otherwise the bot will download the same 720 candles over and over, and you'll not have enough backtest data. ## Bittrex @@ -45,7 +45,7 @@ The warning message will look similar to the following: If you're an "International" customer on the Bittrex exchange, then this warning will probably not impact you. If you're a US customer, the bot will fail to create orders for these pairs, and you should remove them from your whitelist. -You can get a list of restricted markets by using the following snipptet: +You can get a list of restricted markets by using the following snippet: ``` python import ccxt @@ -53,12 +53,11 @@ ct = ccxt.bittrex() _ = ct.load_markets() res = [ f"{x['MarketCurrency']}/{x['BaseCurrency']}" for x in ct.publicGetMarkets()['result'] if x['IsRestricted']] print(res) - ``` ## Random notes for other exchanges -* The Ocean (ccxt id: 'theocean') exchange uses Web3 functionality and requires web3 package to be installed: +* The Ocean (exchange id: `theocean`) exchange uses Web3 functionality and requires `web3` python package to be installed: ```shell $ pip3 install web3 ``` From 0a13f7e1c780d1ebc643f235eb0f0f523d2eeb45 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2019 10:18:58 +0000 Subject: [PATCH 13/18] Bump ccxt from 1.19.14 to 1.19.25 Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.19.14 to 1.19.25. - [Release notes](https://github.com/ccxt/ccxt/releases) - [Changelog](https://github.com/ccxt/ccxt/blob/master/CHANGELOG.md) - [Commits](https://github.com/ccxt/ccxt/compare/1.19.14...1.19.25) Signed-off-by: dependabot-preview[bot] --- requirements-common.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-common.txt b/requirements-common.txt index c11179fbb..33a5d0776 100644 --- a/requirements-common.txt +++ b/requirements-common.txt @@ -1,6 +1,6 @@ # requirements without requirements installable via conda # mainly used for Raspberry pi installs -ccxt==1.19.14 +ccxt==1.19.25 SQLAlchemy==1.3.10 python-telegram-bot==12.2.0 arrow==0.15.4 From c65d217d1eae52a20a5a4834ec6031c621ebc256 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2019 10:19:36 +0000 Subject: [PATCH 14/18] Bump scipy from 1.3.1 to 1.3.2 Bumps [scipy](https://github.com/scipy/scipy) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/scipy/scipy/releases) - [Commits](https://github.com/scipy/scipy/compare/v1.3.1...v1.3.2) Signed-off-by: dependabot-preview[bot] --- requirements-hyperopt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-hyperopt.txt b/requirements-hyperopt.txt index f5dae7332..ff8de9cb2 100644 --- a/requirements-hyperopt.txt +++ b/requirements-hyperopt.txt @@ -2,7 +2,7 @@ -r requirements.txt # Required for hyperopt -scipy==1.3.1 +scipy==1.3.2 scikit-learn==0.21.3 scikit-optimize==0.5.2 filelock==3.0.12 From 031157f2153e581496c048e1151a2c3b4916a53a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2019 10:20:30 +0000 Subject: [PATCH 15/18] Bump numpy from 1.17.3 to 1.17.4 Bumps [numpy](https://github.com/numpy/numpy) from 1.17.3 to 1.17.4. - [Release notes](https://github.com/numpy/numpy/releases) - [Changelog](https://github.com/numpy/numpy/blob/master/doc/HOWTO_RELEASE.rst.txt) - [Commits](https://github.com/numpy/numpy/compare/v1.17.3...v1.17.4) Signed-off-by: dependabot-preview[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 331e3dc67..ebf27abd4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # Load common requirements -r requirements-common.txt -numpy==1.17.3 +numpy==1.17.4 pandas==0.25.3 From 75d5ff69ef78c30f63c061d0012f1ae9c822703c Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 11 Nov 2019 20:09:58 +0100 Subject: [PATCH 16/18] Add ping endpoing --- docs/rest-api.md | 9 ++++++++- freqtrade/rpc/api_server.py | 9 +++++++++ tests/rpc/test_rpc_apiserver.py | 4 ++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/rest-api.md b/docs/rest-api.md index 4d5bc5730..85435e0db 100644 --- a/docs/rest-api.md +++ b/docs/rest-api.md @@ -22,7 +22,14 @@ Sample configuration: !!! Danger "Password selection" Please make sure to select a very strong, unique password to protect your bot from unauthorized access. -You can then access the API by going to `http://127.0.0.1:8080/api/v1/version` to check if the API is running correctly. +You can then access the API by going to `http://127.0.0.1:8080/api/v1/ping` to check if the API is running correctly. +This should return the response: + +``` output +{"status":"pong"} +``` + +All other endpoints will require authentication, so are not available through a webrowser. To generate a secure password, either use a password manager, or use the below code snipped. diff --git a/freqtrade/rpc/api_server.py b/freqtrade/rpc/api_server.py index 67bbfdc78..5167823fd 100644 --- a/freqtrade/rpc/api_server.py +++ b/freqtrade/rpc/api_server.py @@ -169,6 +169,8 @@ class ApiServer(RPC): view_func=self._status, methods=['GET']) self.app.add_url_rule(f'{BASE_URI}/version', 'version', view_func=self._version, methods=['GET']) + self.app.add_url_rule(f'{BASE_URI}/ping', 'ping', + view_func=self._ping, methods=['GET']) # Combined actions and infos self.app.add_url_rule(f'{BASE_URI}/blacklist', 'blacklist', view_func=self._blacklist, @@ -224,6 +226,13 @@ class ApiServer(RPC): msg = self._rpc_stopbuy() return self.rest_dump(msg) + @rpc_catch_errors + def _ping(self): + """ + simple poing version + """ + return self.rest_dump({"status": "pong"}) + @require_login @rpc_catch_errors def _version(self): diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index b572a0514..6e65cf934 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -64,6 +64,10 @@ def test_api_not_found(botclient): def test_api_unauthorized(botclient): ftbot, client = botclient + rc = client.get(f"{BASE_URI}/ping") + assert_response(rc) + assert rc.json == {'status': 'pong'} + # Don't send user/pass information rc = client.get(f"{BASE_URI}/version") assert_response(rc, 401) From 800997437a521cf7ab2923f03b354ce0ca5c5152 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 11 Nov 2019 20:25:44 +0100 Subject: [PATCH 17/18] Update documentation --- docs/rest-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/rest-api.md b/docs/rest-api.md index 85435e0db..00c2d8e39 100644 --- a/docs/rest-api.md +++ b/docs/rest-api.md @@ -22,14 +22,14 @@ Sample configuration: !!! Danger "Password selection" Please make sure to select a very strong, unique password to protect your bot from unauthorized access. -You can then access the API by going to `http://127.0.0.1:8080/api/v1/ping` to check if the API is running correctly. +You can then access the API by going to `http://127.0.0.1:8080/api/v1/ping` in a browser to check if the API is running correctly. This should return the response: ``` output {"status":"pong"} ``` -All other endpoints will require authentication, so are not available through a webrowser. +All other endpoints return sensitive info and require authentication, so are not available through a webrowser. To generate a secure password, either use a password manager, or use the below code snipped. From 025350ebff08351f29c1171b4057ed4a391658f4 Mon Sep 17 00:00:00 2001 From: hroff-1902 <47309513+hroff-1902@users.noreply.github.com> Date: Tue, 12 Nov 2019 00:07:27 +0300 Subject: [PATCH 18/18] Fix typo in the rest-api docs --- docs/rest-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rest-api.md b/docs/rest-api.md index 00c2d8e39..d0e4c8247 100644 --- a/docs/rest-api.md +++ b/docs/rest-api.md @@ -29,7 +29,7 @@ This should return the response: {"status":"pong"} ``` -All other endpoints return sensitive info and require authentication, so are not available through a webrowser. +All other endpoints return sensitive info and require authentication, so are not available through a web browser. To generate a secure password, either use a password manager, or use the below code snipped.