Deployed 6edfebd to develop in en with MkDocs 1.6.1 and mike 2.1.3

This commit is contained in:
github-actions[bot]
2024-12-19 07:10:32 +00:00
parent d95d078626
commit 2ce76cf2ae
4 changed files with 355 additions and 245 deletions

View File

@@ -1923,8 +1923,8 @@ This <strong>may</strong> be safe if you're running the bot in a secure environm
</div>
<h2 id="rest-api_1">Rest API<a class="headerlink" href="#rest-api_1" title="Permanent link">&para;</a></h2>
<h3 id="consuming-the-api">Consuming the API<a class="headerlink" href="#consuming-the-api" title="Permanent link">&para;</a></h3>
<p>You can consume the API by using <code>freqtrade-client</code> (also available as <code>scripts/rest_client.py</code>).
This command can be installed independent of the bot by using <code>pip install freqtrade-client</code>.</p>
<p>We advise consuming the API by using the supported <code>freqtrade-client</code> package (also available as <code>scripts/rest_client.py</code>).</p>
<p>This command can be installed independent of any running freqtrade bot by using <code>pip install freqtrade-client</code>.</p>
<p>This module is designed to be lightweight, and only depends on the <code>requests</code> and <code>python-rapidjson</code> modules, skipping all heavy dependencies freqtrade otherwise needs.</p>
<div class="highlight"><pre><span></span><code>freqtrade-client<span class="w"> </span>&lt;command&gt;<span class="w"> </span><span class="o">[</span>optional<span class="w"> </span>parameters<span class="o">]</span>
</code></pre></div>
@@ -1963,193 +1963,6 @@ to do so, please use the following:</p>
</code></pre></div>
<p>For a full list of available commands, please refer to the list below.</p>
</details>
<h3 id="available-endpoints">Available endpoints<a class="headerlink" href="#available-endpoints" title="Permanent link">&para;</a></h3>
<table>
<thead>
<tr>
<th>Command</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ping</code></td>
<td>Simple command testing the API Readiness - requires no authentication.</td>
</tr>
<tr>
<td><code>start</code></td>
<td>Starts the trader.</td>
</tr>
<tr>
<td><code>stop</code></td>
<td>Stops the trader.</td>
</tr>
<tr>
<td><code>stopbuy</code></td>
<td>Stops the trader from opening new trades. Gracefully closes open trades according to their rules.</td>
</tr>
<tr>
<td><code>reload_config</code></td>
<td>Reloads the configuration file.</td>
</tr>
<tr>
<td><code>trades</code></td>
<td>List last trades. Limited to 500 trades per call.</td>
</tr>
<tr>
<td><code>trade/&lt;tradeid&gt;</code></td>
<td>Get specific trade.</td>
</tr>
<tr>
<td><code>trades/&lt;tradeid&gt;</code></td>
<td>DELETE - Remove trade from the database. Tries to close open orders. Requires manual handling of this trade on the exchange.</td>
</tr>
<tr>
<td><code>trades/&lt;tradeid&gt;/open-order</code></td>
<td>DELETE - Cancel open order for this trade.</td>
</tr>
<tr>
<td><code>trades/&lt;tradeid&gt;/reload</code></td>
<td>GET - Reload a trade from the Exchange. Only works in live, and can potentially help recover a trade that was manually sold on the exchange.</td>
</tr>
<tr>
<td><code>show_config</code></td>
<td>Shows part of the current configuration with relevant settings to operation.</td>
</tr>
<tr>
<td><code>logs</code></td>
<td>Shows last log messages.</td>
</tr>
<tr>
<td><code>status</code></td>
<td>Lists all open trades.</td>
</tr>
<tr>
<td><code>count</code></td>
<td>Displays number of trades used and available.</td>
</tr>
<tr>
<td><code>entries [pair]</code></td>
<td>Shows profit statistics for each enter tags for given pair (or all pairs if pair isn't given). Pair is optional.</td>
</tr>
<tr>
<td><code>exits [pair]</code></td>
<td>Shows profit statistics for each exit reasons for given pair (or all pairs if pair isn't given). Pair is optional.</td>
</tr>
<tr>
<td><code>mix_tags [pair]</code></td>
<td>Shows profit statistics for each combinations of enter tag + exit reasons for given pair (or all pairs if pair isn't given). Pair is optional.</td>
</tr>
<tr>
<td><code>locks</code></td>
<td>Displays currently locked pairs.</td>
</tr>
<tr>
<td><code>delete_lock &lt;lock_id&gt;</code></td>
<td>Deletes (disables) the lock by id.</td>
</tr>
<tr>
<td><code>locks add &lt;pair&gt;, &lt;until&gt;, [side], [reason]</code></td>
<td>Locks a pair until "until". (Until will be rounded up to the nearest timeframe).</td>
</tr>
<tr>
<td><code>profit</code></td>
<td>Display a summary of your profit/loss from close trades and some stats about your performance.</td>
</tr>
<tr>
<td><code>forceexit &lt;trade_id&gt; [order_type] [amount]</code></td>
<td>Instantly exits the given trade (ignoring <code>minimum_roi</code>), using the given order type ("market" or "limit", uses your config setting if not specified), and the chosen amount (full sell if not specified).</td>
</tr>
<tr>
<td><code>forceexit all</code></td>
<td>Instantly exits all open trades (Ignoring <code>minimum_roi</code>).</td>
</tr>
<tr>
<td><code>forceenter &lt;pair&gt; [rate]</code></td>
<td>Instantly enters the given pair. Rate is optional. (<code>force_entry_enable</code> must be set to True)</td>
</tr>
<tr>
<td><code>forceenter &lt;pair&gt; &lt;side&gt; [rate]</code></td>
<td>Instantly longs or shorts the given pair. Rate is optional. (<code>force_entry_enable</code> must be set to True)</td>
</tr>
<tr>
<td><code>performance</code></td>
<td>Show performance of each finished trade grouped by pair.</td>
</tr>
<tr>
<td><code>balance</code></td>
<td>Show account balance per currency.</td>
</tr>
<tr>
<td><code>daily &lt;n&gt;</code></td>
<td>Shows profit or loss per day, over the last n days (n defaults to 7).</td>
</tr>
<tr>
<td><code>weekly &lt;n&gt;</code></td>
<td>Shows profit or loss per week, over the last n days (n defaults to 4).</td>
</tr>
<tr>
<td><code>monthly &lt;n&gt;</code></td>
<td>Shows profit or loss per month, over the last n days (n defaults to 3).</td>
</tr>
<tr>
<td><code>stats</code></td>
<td>Display a summary of profit / loss reasons as well as average holding times.</td>
</tr>
<tr>
<td><code>whitelist</code></td>
<td>Show the current whitelist.</td>
</tr>
<tr>
<td><code>blacklist [pair]</code></td>
<td>Show the current blacklist, or adds a pair to the blacklist.</td>
</tr>
<tr>
<td><code>edge</code></td>
<td>Show validated pairs by Edge if it is enabled.</td>
</tr>
<tr>
<td><code>pair_candles</code></td>
<td>Returns dataframe for a pair / timeframe combination while the bot is running. <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>pair_history</code></td>
<td>Returns an analyzed dataframe for a given timerange, analyzed by a given strategy. <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>plot_config</code></td>
<td>Get plot config from the strategy (or nothing if not configured). <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>strategies</code></td>
<td>List strategies in strategy directory. <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>strategy &lt;strategy&gt;</code></td>
<td>Get specific Strategy content. <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>available_pairs</code></td>
<td>List available backtest data. <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>version</code></td>
<td>Show version.</td>
</tr>
<tr>
<td><code>sysinfo</code></td>
<td>Show information about the system load.</td>
</tr>
<tr>
<td><code>health</code></td>
<td>Show bot health (last bot loop).</td>
</tr>
</tbody>
</table>
<div class="admonition warning">
<p class="admonition-title">Alpha status</p>
<p>Endpoints labeled with <em>Alpha status</em> above may change at any time without notice.</p>
</div>
<p>Possible commands can be listed from the rest-client script using the <code>help</code> command.</p>
<div class="highlight"><pre><span></span><code>freqtrade-client<span class="w"> </span><span class="nb">help</span>
</code></pre></div>
@@ -2217,6 +2030,14 @@ to do so, please use the following:</p>
<span class="go">health</span>
<span class="go"> Provides a quick health check of the running bot.</span>
<span class="go">lock_add</span>
<span class="go"> Manually lock a specific pair</span>
<span class="go"> :param pair: Pair to lock</span>
<span class="go"> :param until: Lock until this date (format &quot;2024-03-30 16:00:00Z&quot;)</span>
<span class="go"> :param side: Side to lock (long, short, *)</span>
<span class="go"> :param reason: Reason for the lock </span>
<span class="go">locks</span>
<span class="go"> Return current locks</span>
@@ -2301,6 +2122,295 @@ to do so, please use the following:</p>
<span class="go">whitelist</span>
<span class="go"> Show the current whitelist.</span>
</code></pre></div>
<h3 id="available-endpoints">Available endpoints<a class="headerlink" href="#available-endpoints" title="Permanent link">&para;</a></h3>
<p>If you wish to call the REST API manually via another route, e.g. directly via <code>curl</code>, the table below shows the relevant URL endpoints and parameters.
All endpoints in the below table need to be prefixed with the base URL of the API, e.g. <code>http://127.0.0.1:8080/api/v1/</code> - so the command becomes <code>http://127.0.0.1:8080/api/v1/&lt;command&gt;</code>.</p>
<table>
<thead>
<tr>
<th>Endpoint</th>
<th>Params (type)</th>
<th>Method</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>/ping</code></td>
<td></td>
<td>GET</td>
<td>Simple command testing the API Readiness - requires no authentication.</td>
</tr>
<tr>
<td><code>/start</code></td>
<td></td>
<td>POST</td>
<td>Starts the trader.</td>
</tr>
<tr>
<td><code>/stop</code></td>
<td></td>
<td>POST</td>
<td>Stops the trader.</td>
</tr>
<tr>
<td><code>/stopbuy</code></td>
<td></td>
<td>POST</td>
<td>Stops the trader from opening new trades. Gracefully closes open trades according to their rules.</td>
</tr>
<tr>
<td><code>/reload_config</code></td>
<td></td>
<td>POST</td>
<td>Reloads the configuration file.</td>
</tr>
<tr>
<td><code>/trades</code></td>
<td></td>
<td>GET</td>
<td>List last trades. Limited to 500 trades per call.</td>
</tr>
<tr>
<td><code>/trade/&lt;tradeid&gt;</code></td>
<td><code>tradeid</code> (<code>int</code>)</td>
<td>GET</td>
<td>Get specific trade.</td>
</tr>
<tr>
<td><code>/trades/&lt;tradeid&gt;</code></td>
<td><code>tradeid</code> (<code>int</code>)</td>
<td>DELETE</td>
<td>Remove trade from the database. Tries to close open orders. Requires manual handling of this trade on the exchange.</td>
</tr>
<tr>
<td><code>/trades/&lt;tradeid&gt;/open-order</code></td>
<td><code>tradeid</code> (<code>int</code>)</td>
<td>DELETE</td>
<td>Cancel open order for this trade.</td>
</tr>
<tr>
<td><code>/trades/&lt;tradeid&gt;/reload</code></td>
<td><code>tradeid</code> (<code>int</code>)</td>
<td>POST</td>
<td>Reload a trade from the Exchange. Only works in live, and can potentially help recover a trade that was manually sold on the exchange.</td>
</tr>
<tr>
<td><code>/show_config</code></td>
<td></td>
<td>GET</td>
<td>Shows part of the current configuration with relevant settings to operation.</td>
</tr>
<tr>
<td><code>/logs</code></td>
<td></td>
<td>GET</td>
<td>Shows last log messages.</td>
</tr>
<tr>
<td><code>/status</code></td>
<td></td>
<td>GET</td>
<td>Lists all open trades.</td>
</tr>
<tr>
<td><code>/count</code></td>
<td></td>
<td>GET</td>
<td>Displays number of trades used and available.</td>
</tr>
<tr>
<td><code>/entries</code></td>
<td><code>pair</code> (<code>str</code>)</td>
<td>GET</td>
<td>Shows profit statistics for each enter tags for given pair (or all pairs if pair isn't given). Pair is optional.</td>
</tr>
<tr>
<td><code>/exits</code></td>
<td><code>pair</code> (<code>str</code>)</td>
<td>GET</td>
<td>Shows profit statistics for each exit reasons for given pair (or all pairs if pair isn't given). Pair is optional.</td>
</tr>
<tr>
<td><code>/mix_tags</code></td>
<td><code>pair</code> (<code>str</code>)</td>
<td>GET</td>
<td>Shows profit statistics for each combinations of enter tag + exit reasons for given pair (or all pairs if pair isn't given). Pair is optional.</td>
</tr>
<tr>
<td><code>/locks</code></td>
<td></td>
<td>GET</td>
<td>Displays currently locked pairs.</td>
</tr>
<tr>
<td><code>/locks</code></td>
<td><code>&lt;pair&gt;</code> (<code>str</code>)<br/> <code>&lt;until&gt;</code> (<code>datetime</code>)<br/> <code>[side]</code> (<code>str</code>)<br/> <code>[reason]</code> (<code>str</code>)</td>
<td>POST</td>
<td>Locks a pair until "until". (Until will be rounded up to the nearest timeframe). Side is optional and is either <code>long</code> or <code>short</code> (default is <code>long</code>). Reason is optional.</td>
</tr>
<tr>
<td><code>/locks/&lt;lockid&gt;</code></td>
<td><code>lockid</code> (<code>int</code>)</td>
<td>DELETE</td>
<td>Deletes (disables) the lock by id.</td>
</tr>
<tr>
<td><code>/profit</code></td>
<td></td>
<td>GET</td>
<td>Display a summary of your profit/loss from close trades and some stats about your performance.</td>
</tr>
<tr>
<td><code>/forceexit</code></td>
<td><code>&lt;tradeid&gt;</code> (<code>int</code> or <code>str</code>)<br/> <code>&lt;ordertype&gt;</code> (<code>str</code>)<br/> <code>[amount]</code> (<code>float</code>)</td>
<td>POST</td>
<td>Instantly exits the given trade (ignoring <code>minimum_roi</code>), using the given order type ("market" or "limit", uses your config setting if not specified), and the chosen amount (full sell if not specified). If <code>all</code> is supplied as the <code>tradeid</code>, then all currently open trades will be forced to exit.</td>
</tr>
<tr>
<td><code>/forceenter</code></td>
<td><code>&lt;pair&gt;</code> (<code>str</code>)<br/> <code>&lt;side&gt;</code> (<code>str</code>)<br/> <code>[rate]</code> (<code>float</code>)</td>
<td>POST</td>
<td>Instantly enters the given pair. Side is optional and is either <code>long</code> or <code>short</code> (default is <code>long</code>). Rate is optional. (<code>force_entry_enable</code> must be set to True)</td>
</tr>
<tr>
<td><code>/performance</code></td>
<td></td>
<td>GET</td>
<td>Show performance of each finished trade grouped by pair.</td>
</tr>
<tr>
<td><code>/balance</code></td>
<td></td>
<td>GET</td>
<td>Show account balance per currency.</td>
</tr>
<tr>
<td><code>/daily</code></td>
<td><code>&lt;n&gt;</code> (<code>int</code>)</td>
<td>GET</td>
<td>Shows profit or loss per day, over the last n days (n defaults to 7).</td>
</tr>
<tr>
<td><code>/weekly</code></td>
<td><code>&lt;n&gt;</code> (<code>int</code>)</td>
<td>GET</td>
<td>Shows profit or loss per week, over the last n days (n defaults to 4).</td>
</tr>
<tr>
<td><code>/monthly</code></td>
<td><code>&lt;n&gt;</code> (<code>int</code>)</td>
<td>GET</td>
<td>Shows profit or loss per month, over the last n days (n defaults to 3).</td>
</tr>
<tr>
<td><code>/stats</code></td>
<td></td>
<td>GET</td>
<td>Display a summary of profit / loss reasons as well as average holding times.</td>
</tr>
<tr>
<td><code>/whitelist</code></td>
<td></td>
<td>GET</td>
<td>Show the current whitelist.</td>
</tr>
<tr>
<td><code>/blacklist</code></td>
<td></td>
<td>GET</td>
<td>Show the current blacklist.</td>
</tr>
<tr>
<td><code>/blacklist</code></td>
<td><code>pair</code> (<code>str</code>)</td>
<td>POST</td>
<td>Adds the specified pair to the blacklist.</td>
</tr>
<tr>
<td><code>/blacklist</code></td>
<td><code>[pair,pair]</code> (<code>list[str]</code>)</td>
<td>DELETE</td>
<td>Deletes the specified list of pairs from the blacklist.</td>
</tr>
<tr>
<td><code>/edge</code></td>
<td></td>
<td>GET</td>
<td>Show validated pairs by Edge if it is enabled.</td>
</tr>
<tr>
<td><code>/pair_candles</code></td>
<td></td>
<td>GET</td>
<td>Returns dataframe for a pair / timeframe combination while the bot is running. <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>/pair_candles</code></td>
<td><code>&lt;column_list&gt;</code> (<code>list[str]</code>)</td>
<td>POST</td>
<td>Returns dataframe for a pair / timeframe combination while the bot is running, filtered by a provided list of columns to return. <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>/pair_history</code></td>
<td></td>
<td>GET</td>
<td>Returns an analyzed dataframe for a given timerange, analyzed by a given strategy. <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>/pair_history</code></td>
<td><code>&lt;column_list&gt;</code> (<code>list[str]</code>)</td>
<td>POST</td>
<td>Returns an analyzed dataframe for a given timerange, analyzed by a given strategy, filtered by a provided list of columns to return. <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>/plot_config</code></td>
<td></td>
<td>GET</td>
<td>Get plot config from the strategy (or nothing if not configured). <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>/strategies</code></td>
<td></td>
<td>GET</td>
<td>List strategies in strategy directory. <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>/strategy/&lt;strategy&gt;</code></td>
<td><code>&lt;strategy&gt;</code> (<code>str</code>)</td>
<td>GET</td>
<td>Get specific Strategy content by strategy class name. <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>/available_pairs</code></td>
<td></td>
<td>GET</td>
<td>List available backtest data. <strong>Alpha</strong></td>
</tr>
<tr>
<td><code>/version</code></td>
<td></td>
<td>GET</td>
<td>Show version.</td>
</tr>
<tr>
<td><code>/sysinfo</code></td>
<td></td>
<td>GET</td>
<td>Show information about the system load.</td>
</tr>
<tr>
<td><code>/health</code></td>
<td></td>
<td>GET</td>
<td>Show bot health (last bot loop).</td>
</tr>
</tbody>
</table>
<div class="admonition warning">
<p class="admonition-title">Alpha status</p>
<p>Endpoints labeled with <em>Alpha status</em> above may change at any time without notice.</p>
</div>
<h3 id="message-websocket">Message WebSocket<a class="headerlink" href="#message-websocket" title="Permanent link">&para;</a></h3>
<p>The API Server includes a websocket endpoint for subscribing to RPC messages from the freqtrade Bot.
This can be used to consume real-time data from your bot, such as entry/exit fill messages, whitelist changes, populated indicators for pairs, and more.</p>