mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-01 09:33:05 +00:00
Deployed ae41ab1 to develop in en with MkDocs 1.6.1 and mike 2.1.3
This commit is contained in:
@@ -2484,14 +2484,14 @@ Hopefully you also want to contribute this back upstream.</p>
|
||||
<p>Override this method if the Pairlist Handler can be used as the leading Pairlist Handler in the chain, defining the initial pairlist which is then handled by all Pairlist Handlers in the chain. Examples are <code>StaticPairList</code> and <code>VolumePairList</code>.</p>
|
||||
<p>This is called with each iteration of the bot (only if the Pairlist Handler is at the first location) - so consider implementing caching for compute/network heavy calculations.</p>
|
||||
<p>It must return the resulting pairlist (which may then be passed into the chain of Pairlist Handlers).</p>
|
||||
<p>Validations are optional, the parent class exposes a <code>_verify_blacklist(pairlist)</code> and <code>_whitelist_for_active_markets(pairlist)</code> to do default filtering. Use this if you limit your result to a certain number of pairs - so the end-result is not shorter than expected.</p>
|
||||
<p>Validations are optional, the parent class exposes a <code>verify_blacklist(pairlist)</code> and <code>_whitelist_for_active_markets(pairlist)</code> to do default filtering. Use this if you limit your result to a certain number of pairs - so the end-result is not shorter than expected.</p>
|
||||
<h4 id="filter_pairlist">filter_pairlist<a class="headerlink" href="#filter_pairlist" title="Permanent link">¶</a></h4>
|
||||
<p>This method is called for each Pairlist Handler in the chain by the pairlist manager.</p>
|
||||
<p>This is called with each iteration of the bot - so consider implementing caching for compute/network heavy calculations.</p>
|
||||
<p>It gets passed a pairlist (which can be the result of previous pairlists) as well as <code>tickers</code>, a pre-fetched version of <code>get_tickers()</code>.</p>
|
||||
<p>The default implementation in the base class simply calls the <code>_validate_pair()</code> method for each pair in the pairlist, but you may override it. So you should either implement the <code>_validate_pair()</code> in your Pairlist Handler or override <code>filter_pairlist()</code> to do something else.</p>
|
||||
<p>If overridden, it must return the resulting pairlist (which may then be passed into the next Pairlist Handler in the chain).</p>
|
||||
<p>Validations are optional, the parent class exposes a <code>_verify_blacklist(pairlist)</code> and <code>_whitelist_for_active_markets(pairlist)</code> to do default filters. Use this if you limit your result to a certain number of pairs - so the end result is not shorter than expected.</p>
|
||||
<p>Validations are optional, the parent class exposes a <code>verify_blacklist(pairlist)</code> and <code>_whitelist_for_active_markets(pairlist)</code> to do default filters. Use this if you limit your result to a certain number of pairs - so the end result is not shorter than expected.</p>
|
||||
<p>In <code>VolumePairList</code>, this implements different methods of sorting, does early validation so only the expected number of pairs is returned.</p>
|
||||
<h5 id="sample">sample<a class="headerlink" href="#sample" title="Permanent link">¶</a></h5>
|
||||
<div class="highlight"><pre><span></span><code> <span class="k">def</span> <span class="nf">filter_pairlist</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">pairlist</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">],</span> <span class="n">tickers</span><span class="p">:</span> <span class="n">Dict</span><span class="p">)</span> <span class="o">-></span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span>
|
||||
|
||||
Reference in New Issue
Block a user