mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 12:13:57 +00:00
1735 lines
50 KiB
HTML
1735 lines
50 KiB
HTML
|
|
<!doctype html>
|
|
<html lang="en" class="no-js">
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
|
|
|
|
|
|
|
|
<link rel="prev" href="../deprecated/">
|
|
|
|
|
|
|
|
<link rel="icon" href="../assets/images/favicon.png">
|
|
<meta name="generator" content="mkdocs-1.6.0, mkdocs-material-9.5.30">
|
|
|
|
|
|
|
|
<title>Contributors Guide - Freqtrade</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../assets/stylesheets/main.3cba04c6.min.css">
|
|
|
|
|
|
<link rel="stylesheet" href="../assets/stylesheets/palette.06af60db.min.css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
|
|
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../stylesheets/ft.extra.css">
|
|
|
|
<script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="blue-grey" data-md-color-accent="tear">
|
|
|
|
|
|
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
|
|
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
|
|
<label class="md-overlay" for="__drawer"></label>
|
|
<div data-md-component="skip">
|
|
|
|
|
|
<a href="#development-help" class="md-skip">
|
|
Skip to content
|
|
</a>
|
|
|
|
</div>
|
|
<div data-md-component="announce">
|
|
|
|
</div>
|
|
|
|
<div data-md-color-scheme="default" data-md-component="outdated" hidden>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<header class="md-header md-header--shadow" data-md-component="header">
|
|
<nav class="md-header__inner md-grid" aria-label="Header">
|
|
<a href=".." title="Freqtrade" class="md-header__button md-logo" aria-label="Freqtrade" data-md-component="logo">
|
|
|
|
<img src="../images/logo.png" alt="logo">
|
|
|
|
</a>
|
|
<label class="md-header__button md-icon" for="__drawer">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg>
|
|
</label>
|
|
<div class="md-header__title" data-md-component="header-title">
|
|
<div class="md-header__ellipsis">
|
|
<div class="md-header__topic">
|
|
<span class="md-ellipsis">
|
|
Freqtrade
|
|
</span>
|
|
</div>
|
|
<div class="md-header__topic" data-md-component="header-topic">
|
|
<span class="md-ellipsis">
|
|
|
|
Contributors Guide
|
|
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<label class="md-header__button md-icon" for="__search">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
|
|
</label>
|
|
<div class="md-search" data-md-component="search" role="dialog">
|
|
<label class="md-search__overlay" for="__search"></label>
|
|
<div class="md-search__inner" role="search">
|
|
<form class="md-search__form" name="search">
|
|
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
|
|
<label class="md-search__icon md-icon" for="__search">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
|
|
</label>
|
|
<nav class="md-search__options" aria-label="Search">
|
|
|
|
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>
|
|
</button>
|
|
</nav>
|
|
|
|
</form>
|
|
<div class="md-search__output">
|
|
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
|
|
<div class="md-search-result" data-md-component="search-result">
|
|
<div class="md-search-result__meta">
|
|
Initializing search
|
|
</div>
|
|
<ol class="md-search-result__list" role="presentation"></ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
<div class="md-container" data-md-component="container">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<main class="md-main" data-md-component="main">
|
|
<div class="md-main__inner md-grid">
|
|
|
|
|
|
|
|
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
|
|
<div class="md-sidebar__scrollwrap">
|
|
<div class="md-sidebar__inner">
|
|
|
|
|
|
|
|
|
|
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
|
|
<label class="md-nav__title" for="__drawer">
|
|
<a href=".." title="Freqtrade" class="md-nav__button md-logo" aria-label="Freqtrade" data-md-component="logo">
|
|
|
|
<img src="../images/logo.png" alt="logo">
|
|
|
|
</a>
|
|
Freqtrade
|
|
</label>
|
|
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href=".." class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
About
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../installation/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Installation
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../docker/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Installation Docker
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../configuration/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Configuration
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../strategy-customization/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Strategy Customization
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../stoploss/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Stoploss
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../bot-usage/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Start the bot
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Control the bot
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_8">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Control the bot
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../telegram-usage/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Telegram
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../webhook-config/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Web Hook
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../rest-api/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
REST API
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../data-download/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Data Downloading
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../backtesting/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Backtesting
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../hyperopt/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Hyperopt
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../edge/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Edge Positioning
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../utils/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Utility Subcommands
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../exchanges/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Exchange-specific Notes
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../faq/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
FAQ
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_16" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_16" id="__nav_16_label" tabindex="0">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Data Analysis
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_16_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_16">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Data Analysis
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../data-analysis/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Jupyter Notebooks
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../strategy_analysis_example/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Strategy analysis
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../plotting/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Plotting
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../sql_cheatsheet/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
SQL Cheatsheet
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../advanced-setup/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Advanced Post-installation Tasks
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../advanced-hyperopt/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Advanced Hyperopt
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../sandbox-testing/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Sandbox Testing
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../deprecated/" class="md-nav__link">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Deprecated Features
|
|
</span>
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--active">
|
|
|
|
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
|
|
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__link md-nav__link--active" for="__toc">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Contributors Guide
|
|
</span>
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<a href="./" class="md-nav__link md-nav__link--active">
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
Contributors Guide
|
|
</span>
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__title" for="__toc">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Table of contents
|
|
</label>
|
|
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#documentation" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Documentation
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#developer-setup" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Developer setup
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Developer setup">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#tests" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Tests
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Tests">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#checking-log-content-in-tests" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Checking log content in tests
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#local-docker-usage" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Local docker usage
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Local docker usage">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#install" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Install
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#starting-the-bot" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Starting the bot
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Starting the bot">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#use-the-develop-dockerfile" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Use the develop dockerfile
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#docker-compose" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Docker Compose
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Docker Compose">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#starting" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Starting
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#rebuilding" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Rebuilding
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#execing-effectively-ssh-into-the-container" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Execing (effectively SSH into the container)
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#modules" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Modules
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Modules">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#dynamic-pairlist" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Dynamic Pairlist
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Dynamic Pairlist">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pairlist-configuration" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Pairlist configuration
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#short_desc" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
short_desc
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#filter_pairlist" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
filter_pairlist
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="filter_pairlist">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#sample" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
sample
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#_gen_pair_whitelist" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
_gen_pair_whitelist
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implement-a-new-exchange-wip" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Implement a new Exchange (WIP)
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Implement a new Exchange (WIP)">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#stoploss-on-exchange" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Stoploss On Exchange
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#incomplete-candles" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Incomplete candles
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#updating-example-notebooks" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Updating example notebooks
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#continuous-integration" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Continuous integration
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#creating-a-release" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Creating a release
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Creating a release">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#create-release-branch" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Create release branch
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#create-changelog-from-git-commits" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Create changelog from git commits
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#create-github-release-tag" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Create github release / tag
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
|
|
<div class="md-sidebar__scrollwrap">
|
|
<div class="md-sidebar__inner">
|
|
|
|
|
|
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__title" for="__toc">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Table of contents
|
|
</label>
|
|
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#documentation" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Documentation
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#developer-setup" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Developer setup
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Developer setup">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#tests" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Tests
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Tests">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#checking-log-content-in-tests" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Checking log content in tests
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#local-docker-usage" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Local docker usage
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Local docker usage">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#install" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Install
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#starting-the-bot" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Starting the bot
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Starting the bot">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#use-the-develop-dockerfile" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Use the develop dockerfile
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#docker-compose" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Docker Compose
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Docker Compose">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#starting" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Starting
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#rebuilding" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Rebuilding
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#execing-effectively-ssh-into-the-container" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Execing (effectively SSH into the container)
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#modules" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Modules
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Modules">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#dynamic-pairlist" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Dynamic Pairlist
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Dynamic Pairlist">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#pairlist-configuration" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Pairlist configuration
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#short_desc" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
short_desc
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#filter_pairlist" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
filter_pairlist
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="filter_pairlist">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#sample" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
sample
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#_gen_pair_whitelist" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
_gen_pair_whitelist
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implement-a-new-exchange-wip" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Implement a new Exchange (WIP)
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Implement a new Exchange (WIP)">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#stoploss-on-exchange" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Stoploss On Exchange
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#incomplete-candles" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Incomplete candles
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#updating-example-notebooks" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Updating example notebooks
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#continuous-integration" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Continuous integration
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#creating-a-release" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Creating a release
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Creating a release">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#create-release-branch" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Create release branch
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#create-changelog-from-git-commits" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Create changelog from git commits
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#create-github-release-tag" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
Create github release / tag
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="md-content" data-md-component="content">
|
|
<article class="md-content__inner md-typeset">
|
|
|
|
|
|
|
|
|
|
<h1 id="development-help">Development Help<a class="headerlink" href="#development-help" title="Permanent link">¶</a></h1>
|
|
<p>This page is intended for developers of FreqTrade, people who want to contribute to the FreqTrade codebase or documentation, or people who want to understand the source code of the application they're running.</p>
|
|
<p>All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome. We <a href="https://github.com/freqtrade/freqtrade/issues">track issues</a> on <a href="https://github.com">GitHub</a> and also have a dev channel in <a href="https://join.slack.com/t/highfrequencybot/shared_invite/enQtNjU5ODcwNjI1MDU3LTU1MTgxMjkzNmYxNWE1MDEzYzQ3YmU4N2MwZjUyNjJjODRkMDVkNjg4YTAyZGYzYzlhOTZiMTE4ZjQ4YzM0OGE">slack</a> where you can ask questions.</p>
|
|
<h2 id="documentation">Documentation<a class="headerlink" href="#documentation" title="Permanent link">¶</a></h2>
|
|
<p>Documentation is available at <a href="https://www.freqtrade.io/">https://freqtrade.io</a> and needs to be provided with every new feature PR.</p>
|
|
<p>Special fields for the documentation (like Note boxes, ...) can be found <a href="https://squidfunk.github.io/mkdocs-material/extensions/admonition/">here</a>.</p>
|
|
<h2 id="developer-setup">Developer setup<a class="headerlink" href="#developer-setup" title="Permanent link">¶</a></h2>
|
|
<p>To configure a development environment, best use the <code>setup.sh</code> script and answer "y" when asked "Do you want to install dependencies for dev [y/N]? ".
|
|
Alternatively (if your system is not supported by the setup.sh script), follow the manual installation process and run <code>pip3 install -e .[all]</code>.</p>
|
|
<p>This will install all required tools for development, including <code>pytest</code>, <code>flake8</code>, <code>mypy</code>, and <code>coveralls</code>.</p>
|
|
<h3 id="tests">Tests<a class="headerlink" href="#tests" title="Permanent link">¶</a></h3>
|
|
<p>New code should be covered by basic unittests. Depending on the complexity of the feature, Reviewers may request more in-depth unittests.
|
|
If necessary, the Freqtrade team can assist and give guidance with writing good tests (however please don't expect anyone to write the tests for you).</p>
|
|
<h4 id="checking-log-content-in-tests">Checking log content in tests<a class="headerlink" href="#checking-log-content-in-tests" title="Permanent link">¶</a></h4>
|
|
<p>Freqtrade uses 2 main methods to check log content in tests, <code>log_has()</code> and <code>log_has_re()</code> (to check using regex, in case of dynamic log-messages).
|
|
These are available from <code>conftest.py</code> and can be imported in any test module.</p>
|
|
<p>A sample check looks as follows:</p>
|
|
<div class="highlight"><pre><span></span><code><span class="kn">from</span> <span class="nn">tests.conftest</span> <span class="kn">import</span> <span class="n">log_has</span><span class="p">,</span> <span class="n">log_has_re</span>
|
|
|
|
<span class="k">def</span> <span class="nf">test_method_to_test</span><span class="p">(</span><span class="n">caplog</span><span class="p">):</span>
|
|
<span class="n">method_to_test</span><span class="p">()</span>
|
|
|
|
<span class="k">assert</span> <span class="n">log_has</span><span class="p">(</span><span class="s2">"This event happened"</span><span class="p">,</span> <span class="n">caplog</span><span class="p">)</span>
|
|
<span class="c1"># Check regex with trailing number ...</span>
|
|
<span class="k">assert</span> <span class="n">log_has_re</span><span class="p">(</span><span class="sa">r</span><span class="s2">"This dynamic event happened and produced \d+"</span><span class="p">,</span> <span class="n">caplog</span><span class="p">)</span>
|
|
</code></pre></div>
|
|
<h3 id="local-docker-usage">Local docker usage<a class="headerlink" href="#local-docker-usage" title="Permanent link">¶</a></h3>
|
|
<p>The fastest and easiest way to start up is to use docker-compose.develop which gives developers the ability to start the bot up with all the required dependencies, <em>without</em> needing to install any freqtrade specific dependencies on your local machine.</p>
|
|
<h4 id="install">Install<a class="headerlink" href="#install" title="Permanent link">¶</a></h4>
|
|
<ul>
|
|
<li><a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git">git</a></li>
|
|
<li><a href="https://docs.docker.com/install/">docker</a></li>
|
|
<li><a href="https://docs.docker.com/compose/install/">docker-compose</a></li>
|
|
</ul>
|
|
<h4 id="starting-the-bot">Starting the bot<a class="headerlink" href="#starting-the-bot" title="Permanent link">¶</a></h4>
|
|
<h5 id="use-the-develop-dockerfile">Use the develop dockerfile<a class="headerlink" href="#use-the-develop-dockerfile" title="Permanent link">¶</a></h5>
|
|
<div class="highlight"><pre><span></span><code>rm<span class="w"> </span>docker-compose.yml<span class="w"> </span><span class="o">&&</span><span class="w"> </span>mv<span class="w"> </span>docker-compose.develop.yml<span class="w"> </span>docker-compose.yml
|
|
</code></pre></div>
|
|
<h4 id="docker-compose">Docker Compose<a class="headerlink" href="#docker-compose" title="Permanent link">¶</a></h4>
|
|
<h5 id="starting">Starting<a class="headerlink" href="#starting" title="Permanent link">¶</a></h5>
|
|
<div class="highlight"><pre><span></span><code>docker-compose<span class="w"> </span>up
|
|
</code></pre></div>
|
|
<p><img alt="Docker compose up" src="https://user-images.githubusercontent.com/419355/65456322-47f63a80-de06-11e9-90c6-3c74d1bad0b8.png" /></p>
|
|
<h5 id="rebuilding">Rebuilding<a class="headerlink" href="#rebuilding" title="Permanent link">¶</a></h5>
|
|
<div class="highlight"><pre><span></span><code>docker-compose<span class="w"> </span>build
|
|
</code></pre></div>
|
|
<h5 id="execing-effectively-ssh-into-the-container">Execing (effectively SSH into the container)<a class="headerlink" href="#execing-effectively-ssh-into-the-container" title="Permanent link">¶</a></h5>
|
|
<p>The <code>exec</code> command requires that the container already be running, if you want to start it
|
|
that can be effected by <code>docker-compose up</code> or <code>docker-compose run freqtrade_develop</code></p>
|
|
<div class="highlight"><pre><span></span><code>docker-compose<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>freqtrade_develop<span class="w"> </span>/bin/bash
|
|
</code></pre></div>
|
|
<p><img alt="image" src="https://user-images.githubusercontent.com/419355/65456522-ba671a80-de06-11e9-9598-df9ca0d8dcac.png" /></p>
|
|
<h2 id="modules">Modules<a class="headerlink" href="#modules" title="Permanent link">¶</a></h2>
|
|
<h3 id="dynamic-pairlist">Dynamic Pairlist<a class="headerlink" href="#dynamic-pairlist" title="Permanent link">¶</a></h3>
|
|
<p>You have a great idea for a new pair selection algorithm you would like to try out? Great.
|
|
Hopefully you also want to contribute this back upstream.</p>
|
|
<p>Whatever your motivations are - This should get you off the ground in trying to develop a new Pairlist provider.</p>
|
|
<p>First of all, have a look at the <a href="https://github.com/freqtrade/freqtrade/blob/develop/freqtrade/pairlist/VolumePairList.py">VolumePairList</a> provider, and best copy this file with a name of your new Pairlist Provider.</p>
|
|
<p>This is a simple provider, which however serves as a good example on how to start developing.</p>
|
|
<p>Next, modify the classname of the provider (ideally align this with the Filename).</p>
|
|
<p>The base-class provides an instance of the exchange (<code>self._exchange</code>) the pairlist manager (<code>self._pairlistmanager</code>), as well as the main configuration (<code>self._config</code>), the pairlist dedicated configuration (<code>self._pairlistconfig</code>) and the absolute position within the list of pairlists.</p>
|
|
<div class="highlight"><pre><span></span><code> <span class="bp">self</span><span class="o">.</span><span class="n">_exchange</span> <span class="o">=</span> <span class="n">exchange</span>
|
|
<span class="bp">self</span><span class="o">.</span><span class="n">_pairlistmanager</span> <span class="o">=</span> <span class="n">pairlistmanager</span>
|
|
<span class="bp">self</span><span class="o">.</span><span class="n">_config</span> <span class="o">=</span> <span class="n">config</span>
|
|
<span class="bp">self</span><span class="o">.</span><span class="n">_pairlistconfig</span> <span class="o">=</span> <span class="n">pairlistconfig</span>
|
|
<span class="bp">self</span><span class="o">.</span><span class="n">_pairlist_pos</span> <span class="o">=</span> <span class="n">pairlist_pos</span>
|
|
</code></pre></div>
|
|
<p>Now, let's step through the methods which require actions:</p>
|
|
<h4 id="pairlist-configuration">Pairlist configuration<a class="headerlink" href="#pairlist-configuration" title="Permanent link">¶</a></h4>
|
|
<p>Configuration for PairListProvider is done in the bot configuration file in the element <code>"pairlist"</code>.
|
|
This Pairlist-object may contain configurations with additional configurations for the configured pairlist.
|
|
By convention, <code>"number_assets"</code> is used to specify the maximum number of pairs to keep in the whitelist. Please follow this to ensure a consistent user experience.</p>
|
|
<p>Additional elements can be configured as needed. <code>VolumePairList</code> uses <code>"sort_key"</code> to specify the sorting value - however feel free to specify whatever is necessary for your great algorithm to be successfull and dynamic.</p>
|
|
<h4 id="short_desc">short_desc<a class="headerlink" href="#short_desc" title="Permanent link">¶</a></h4>
|
|
<p>Returns a description used for Telegram messages.
|
|
This should contain the name of the Provider, as well as a short description containing the number of assets. Please follow the format <code>"PairlistName - top/bottom X pairs"</code>.</p>
|
|
<h4 id="filter_pairlist">filter_pairlist<a class="headerlink" href="#filter_pairlist" title="Permanent link">¶</a></h4>
|
|
<p>Override this method and run all calculations needed in this method.
|
|
This is called with each iteration of the bot - so consider implementing caching for compute/network heavy calculations.</p>
|
|
<p>It get's 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>It must return the resulting pairlist (which may then be passed into the next pairlist filter).</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 endresult is not shorter than expected.</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>
|
|
<span class="c1"># Generate dynamic whitelist</span>
|
|
<span class="n">pairs</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_calculate_pairlist</span><span class="p">(</span><span class="n">pairlist</span><span class="p">,</span> <span class="n">tickers</span><span class="p">)</span>
|
|
<span class="k">return</span> <span class="n">pairs</span>
|
|
</code></pre></div>
|
|
<h4 id="_gen_pair_whitelist">_gen_pair_whitelist<a class="headerlink" href="#_gen_pair_whitelist" title="Permanent link">¶</a></h4>
|
|
<p>This is a simple method used by <code>VolumePairList</code> - however serves as a good example.
|
|
In VolumePairList, this implements different methods of sorting, does early validation so only the expected number of pairs is returned.</p>
|
|
<h2 id="implement-a-new-exchange-wip">Implement a new Exchange (WIP)<a class="headerlink" href="#implement-a-new-exchange-wip" title="Permanent link">¶</a></h2>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<p>This section is a Work in Progress and is not a complete guide on how to test a new exchange with FreqTrade.</p>
|
|
</div>
|
|
<p>Most exchanges supported by CCXT should work out of the box.</p>
|
|
<h3 id="stoploss-on-exchange">Stoploss On Exchange<a class="headerlink" href="#stoploss-on-exchange" title="Permanent link">¶</a></h3>
|
|
<p>Check if the new exchange supports Stoploss on Exchange orders through their API.</p>
|
|
<p>Since CCXT does not provide unification for Stoploss On Exchange yet, we'll need to implement the exchange-specific parameters ourselfs. Best look at <code>binance.py</code> for an example implementation of this. You'll need to dig through the documentation of the Exchange's API on how exactly this can be done. <a href="https://github.com/ccxt/ccxt/issues">CCXT Issues</a> may also provide great help, since others may have implemented something similar for their projects.</p>
|
|
<h3 id="incomplete-candles">Incomplete candles<a class="headerlink" href="#incomplete-candles" title="Permanent link">¶</a></h3>
|
|
<p>While fetching OHLCV data, we're may end up getting incomplete candles (Depending on the exchange).
|
|
To demonstrate this, we'll use daily candles (<code>"1d"</code>) to keep things simple.
|
|
We query the api (<code>ct.fetch_ohlcv()</code>) for the timeframe and look at the date of the last entry. If this entry changes or shows the date of a "incomplete" candle, then we should drop this since having incomplete candles is problematic because indicators assume that only complete candles are passed to them, and will generate a lot of false buy signals. By default, we're therefore removing the last candle assuming it's incomplete.</p>
|
|
<p>To check how the new exchange behaves, you can use the following snippet:</p>
|
|
<div class="highlight"><pre><span></span><code><span class="kn">import</span> <span class="nn">ccxt</span>
|
|
<span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span>
|
|
<span class="kn">from</span> <span class="nn">freqtrade.data.converter</span> <span class="kn">import</span> <span class="n">parse_ticker_dataframe</span>
|
|
<span class="n">ct</span> <span class="o">=</span> <span class="n">ccxt</span><span class="o">.</span><span class="n">binance</span><span class="p">()</span>
|
|
<span class="n">timeframe</span> <span class="o">=</span> <span class="s2">"1d"</span>
|
|
<span class="n">pair</span> <span class="o">=</span> <span class="s2">"XLM/BTC"</span> <span class="c1"># Make sure to use a pair that exists on that exchange!</span>
|
|
<span class="n">raw</span> <span class="o">=</span> <span class="n">ct</span><span class="o">.</span><span class="n">fetch_ohlcv</span><span class="p">(</span><span class="n">pair</span><span class="p">,</span> <span class="n">timeframe</span><span class="o">=</span><span class="n">timeframe</span><span class="p">)</span>
|
|
|
|
<span class="c1"># convert to dataframe</span>
|
|
<span class="n">df1</span> <span class="o">=</span> <span class="n">parse_ticker_dataframe</span><span class="p">(</span><span class="n">raw</span><span class="p">,</span> <span class="n">timeframe</span><span class="p">,</span> <span class="n">pair</span><span class="o">=</span><span class="n">pair</span><span class="p">,</span> <span class="n">drop_incomplete</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
|
|
|
<span class="nb">print</span><span class="p">(</span><span class="n">df1</span><span class="p">[</span><span class="s2">"date"</span><span class="p">]</span><span class="o">.</span><span class="n">tail</span><span class="p">(</span><span class="mi">1</span><span class="p">))</span>
|
|
<span class="nb">print</span><span class="p">(</span><span class="n">datetime</span><span class="o">.</span><span class="n">utcnow</span><span class="p">())</span>
|
|
</code></pre></div>
|
|
<div class="highlight"><pre><span></span><code><span class="go">19 2019-06-08 00:00:00+00:00</span>
|
|
<span class="go">2019-06-09 12:30:27.873327</span>
|
|
</code></pre></div>
|
|
<p>The output will show the last entry from the Exchange as well as the current UTC date.
|
|
If the day shows the same day, then the last candle can be assumed as incomplete and should be dropped (leave the setting <code>"ohlcv_partial_candle"</code> from the exchange-class untouched / True). Otherwise, set <code>"ohlcv_partial_candle"</code> to <code>False</code> to not drop Candles (shown in the example above).</p>
|
|
<h2 id="updating-example-notebooks">Updating example notebooks<a class="headerlink" href="#updating-example-notebooks" title="Permanent link">¶</a></h2>
|
|
<p>To keep the jupyter notebooks aligned with the documentation, the following should be ran after updating a example notebook.</p>
|
|
<div class="highlight"><pre><span></span><code>jupyter<span class="w"> </span>nbconvert<span class="w"> </span>--ClearOutputPreprocessor.enabled<span class="o">=</span>True<span class="w"> </span>--inplace<span class="w"> </span>freqtrade/templates/strategy_analysis_example.ipynb
|
|
jupyter<span class="w"> </span>nbconvert<span class="w"> </span>--ClearOutputPreprocessor.enabled<span class="o">=</span>True<span class="w"> </span>--to<span class="w"> </span>markdown<span class="w"> </span>freqtrade/templates/strategy_analysis_example.ipynb<span class="w"> </span>--stdout<span class="w"> </span>><span class="w"> </span>docs/strategy_analysis_example.md
|
|
</code></pre></div>
|
|
<h2 id="continuous-integration">Continuous integration<a class="headerlink" href="#continuous-integration" title="Permanent link">¶</a></h2>
|
|
<p>This documents some decisions taken for the CI Pipeline.</p>
|
|
<ul>
|
|
<li>CI runs on all OS variants, Linux (ubuntu), macOS and Windows.</li>
|
|
<li>Docker images are build for the branches <code>master</code> and <code>develop</code>.</li>
|
|
<li>Raspberry PI Docker images are postfixed with <code>_pi</code> - so tags will be <code>:master_pi</code> and <code>develop_pi</code>.</li>
|
|
<li>Docker images contain a file, <code>/freqtrade/freqtrade_commit</code> containing the commit this image is based of.</li>
|
|
<li>Full docker image rebuilds are run once a week via schedule.</li>
|
|
<li>Deployments run on ubuntu.</li>
|
|
<li>ta-lib binaries are contained in the build_helpers directory to avoid fails related to external unavailability.</li>
|
|
<li>All tests must pass for a PR to be merged to <code>master</code> or <code>develop</code>.</li>
|
|
</ul>
|
|
<h2 id="creating-a-release">Creating a release<a class="headerlink" href="#creating-a-release" title="Permanent link">¶</a></h2>
|
|
<p>This part of the documentation is aimed at maintainers, and shows how to create a release.</p>
|
|
<h3 id="create-release-branch">Create release branch<a class="headerlink" href="#create-release-branch" title="Permanent link">¶</a></h3>
|
|
<p>First, pick a commit that's about one week old (to not include latest additions to releases).</p>
|
|
<div class="highlight"><pre><span></span><code><span class="c1"># create new branch</span>
|
|
git<span class="w"> </span>checkout<span class="w"> </span>-b<span class="w"> </span>new_release<span class="w"> </span><commitid>
|
|
</code></pre></div>
|
|
<p>Determine if crucial bugfixes have been made between this commit and the current state, and eventually cherry-pick these.</p>
|
|
<ul>
|
|
<li>Edit <code>freqtrade/__init__.py</code> and add the version matching the current date (for example <code>2019.7</code> for July 2019). Minor versions can be <code>2019.7-1</code> should we need to do a second release that month.</li>
|
|
<li>Commit this part</li>
|
|
<li>push that branch to the remote and create a PR against the master branch</li>
|
|
</ul>
|
|
<h3 id="create-changelog-from-git-commits">Create changelog from git commits<a class="headerlink" href="#create-changelog-from-git-commits" title="Permanent link">¶</a></h3>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<p>Make sure that the master branch is uptodate!</p>
|
|
</div>
|
|
<div class="highlight"><pre><span></span><code><span class="c1"># Needs to be done before merging / pulling that branch.</span>
|
|
git<span class="w"> </span>log<span class="w"> </span>--oneline<span class="w"> </span>--no-decorate<span class="w"> </span>--no-merges<span class="w"> </span>master..new_release
|
|
</code></pre></div>
|
|
<h3 id="create-github-release-tag">Create github release / tag<a class="headerlink" href="#create-github-release-tag" title="Permanent link">¶</a></h3>
|
|
<p>Once the PR against master is merged (best right after merging):</p>
|
|
<ul>
|
|
<li>Use the button "Draft a new release" in the Github UI (subsection releases).</li>
|
|
<li>Use the version-number specified as tag.</li>
|
|
<li>Use "master" as reference (this step comes after the above PR is merged).</li>
|
|
<li>Use the above changelog as release comment (as codeblock).</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
</div>
|
|
|
|
|
|
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
|
|
</div>
|
|
|
|
</main>
|
|
|
|
<footer class="md-footer">
|
|
|
|
<div class="md-footer-meta md-typeset">
|
|
<div class="md-footer-meta__inner md-grid">
|
|
<div class="md-copyright">
|
|
|
|
|
|
Made with
|
|
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
|
Material for MkDocs
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
</div>
|
|
<div class="md-dialog" data-md-component="dialog">
|
|
<div class="md-dialog__inner md-typeset"></div>
|
|
</div>
|
|
|
|
|
|
<script id="__config" type="application/json">{"base": "..", "features": [], "search": "../assets/javascripts/workers/search.b8dbb3d2.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}</script>
|
|
|
|
|
|
<script src="../assets/javascripts/bundle.fe8b6f2b.min.js"></script>
|
|
|
|
|
|
</body>
|
|
</html> |