mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
Compare commits
874 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfe9aac16b | ||
|
|
1770a68457 | ||
|
|
57fd455adf | ||
|
|
61ecaa4c41 | ||
|
|
682c4137b4 | ||
|
|
759c18df3d | ||
|
|
04fda255de | ||
|
|
26f23c10b5 | ||
|
|
001baa07b1 | ||
|
|
72724037af | ||
|
|
1bd60c2afb | ||
|
|
c0a1911f22 | ||
|
|
f4920f199c | ||
|
|
6b8968ed0f | ||
|
|
85a88d3594 | ||
|
|
b5e17735a6 | ||
|
|
67beeb6f26 | ||
|
|
f94acc9173 | ||
|
|
a7ac957399 | ||
|
|
b337b075ab | ||
|
|
3152e97b2f | ||
|
|
77e8a53572 | ||
|
|
4eea0cca08 | ||
|
|
8274a6c3a9 | ||
|
|
f0a5b95ec0 | ||
|
|
e4dd3b2821 | ||
|
|
7698ee9f3d | ||
|
|
c5127ba522 | ||
|
|
024d2db2e2 | ||
|
|
f2498df99b | ||
|
|
37ce645bad | ||
|
|
d4188a093b | ||
|
|
bc3342b4d2 | ||
|
|
64cf284c07 | ||
|
|
15b0cc28f8 | ||
|
|
a647ceb753 | ||
|
|
54840a3f7e | ||
|
|
2b1ef1bf59 | ||
|
|
757439a594 | ||
|
|
73dccb0780 | ||
|
|
aa7aac3a14 | ||
|
|
2015ccc727 | ||
|
|
47301830b6 | ||
|
|
b7b280de96 | ||
|
|
7edc2e8c94 | ||
|
|
972e25a6a7 | ||
|
|
649db69314 | ||
|
|
d0fb4cdc37 | ||
|
|
efabcef330 | ||
|
|
a4e6ac0c7f | ||
|
|
0ce9149ddd | ||
|
|
2750643e07 | ||
|
|
b92535deea | ||
|
|
2fa0503993 | ||
|
|
3932470190 | ||
|
|
d901f4b10b | ||
|
|
8269384077 | ||
|
|
b364153d02 | ||
|
|
916d8324cb | ||
|
|
60309b9e57 | ||
|
|
a05d142af6 | ||
|
|
1feb11bac0 | ||
|
|
93936c9946 | ||
|
|
ce78039ea8 | ||
|
|
1db871e42d | ||
|
|
1513ba9af9 | ||
|
|
22b88249ff | ||
|
|
18f73af6e6 | ||
|
|
b8c835e24e | ||
|
|
2f392b483c | ||
|
|
220480327c | ||
|
|
2c6ff3f018 | ||
|
|
56a8fb4aae | ||
|
|
3f782fc482 | ||
|
|
d02e5f2b90 | ||
|
|
92fd9411e5 | ||
|
|
650cdf5eb3 | ||
|
|
060a1543e9 | ||
|
|
50402c5cdc | ||
|
|
0835414f24 | ||
|
|
6449074658 | ||
|
|
b8d558a455 | ||
|
|
4017b010f4 | ||
|
|
7e178cb032 | ||
|
|
e17936c407 | ||
|
|
f437d4a55b | ||
|
|
a731b73457 | ||
|
|
b5be462dd1 | ||
|
|
b55e7bcf4e | ||
|
|
d1e71544af | ||
|
|
6e1367fa94 | ||
|
|
58452ebc7c | ||
|
|
7b1dd61ae4 | ||
|
|
1321991fca | ||
|
|
8ae8b615b2 | ||
|
|
1c96dfd58f | ||
|
|
f98efdbe07 | ||
|
|
e67c2eefff | ||
|
|
2ea19f2ab0 | ||
|
|
44a6d2ead7 | ||
|
|
5fa314e4a8 | ||
|
|
89a8adcbcf | ||
|
|
57f216e9c7 | ||
|
|
927a771f2e | ||
|
|
3a1fffeeb7 | ||
|
|
9a5622fe33 | ||
|
|
ec51820074 | ||
|
|
4425e0cd40 | ||
|
|
97a830b4f0 | ||
|
|
cb28498890 | ||
|
|
1747114b57 | ||
|
|
1056b2562e | ||
|
|
64f680ed86 | ||
|
|
028c60ce5a | ||
|
|
d27ee227cb | ||
|
|
81c49136d1 | ||
|
|
4297207226 | ||
|
|
3877fb46de | ||
|
|
22707b8664 | ||
|
|
d2c380c83b | ||
|
|
bc516db3f8 | ||
|
|
5c0cf8f228 | ||
|
|
b753231d3c | ||
|
|
af728f8224 | ||
|
|
5000927939 | ||
|
|
89274bfcdb | ||
|
|
ef86b4113d | ||
|
|
38ff755533 | ||
|
|
70ec376657 | ||
|
|
1a506dc4b4 | ||
|
|
47451dd989 | ||
|
|
705849db3d | ||
|
|
14d3096a22 | ||
|
|
72889e2edb | ||
|
|
0f17b04b2f | ||
|
|
179a5ba6ed | ||
|
|
ed65b012b8 | ||
|
|
625629b9db | ||
|
|
9fa9f0860c | ||
|
|
5970881bb8 | ||
|
|
bed93429cd | ||
|
|
3af9089d51 | ||
|
|
3aed562806 | ||
|
|
7f32ce498b | ||
|
|
9e89ba6eed | ||
|
|
82309c3f47 | ||
|
|
d5613cf471 | ||
|
|
73f91eab15 | ||
|
|
35fb598017 | ||
|
|
40b9a836eb | ||
|
|
7189c0ff35 | ||
|
|
0eb206c7b3 | ||
|
|
728d2c9bcb | ||
|
|
f22feb7dee | ||
|
|
c6bf0e1843 | ||
|
|
68836cb7be | ||
|
|
706955e5fc | ||
|
|
9aec10b0f3 | ||
|
|
b6b817e051 | ||
|
|
40107b9380 | ||
|
|
8804850170 | ||
|
|
d246933c28 | ||
|
|
777ff1938e | ||
|
|
2846d9478e | ||
|
|
5d494eac51 | ||
|
|
e26c3cbe5a | ||
|
|
81a5056e1b | ||
|
|
1876656afc | ||
|
|
889ab7ea00 | ||
|
|
2d4b02f7e5 | ||
|
|
c5a339eaf3 | ||
|
|
1e50a2da53 | ||
|
|
7d1c2d3a1b | ||
|
|
a9f9b73a3a | ||
|
|
236df5be6f | ||
|
|
6ea83ba0e7 | ||
|
|
992c2f9e3e | ||
|
|
5e74700e31 | ||
|
|
4a225cab23 | ||
|
|
524ceebcbb | ||
|
|
f93c906614 | ||
|
|
b32ba68a6e | ||
|
|
649aff8076 | ||
|
|
a3efba019f | ||
|
|
ff4230af8a | ||
|
|
d1014ce3ce | ||
|
|
3bad6d3341 | ||
|
|
7526fd0e0d | ||
|
|
a2ec085dab | ||
|
|
cce7702e9c | ||
|
|
1cf7f4f9d8 | ||
|
|
1328df772b | ||
|
|
68dea691c2 | ||
|
|
f214942ff1 | ||
|
|
91866c1165 | ||
|
|
f73cbed843 | ||
|
|
5ad817f59e | ||
|
|
4a8f487b68 | ||
|
|
d1b553cecc | ||
|
|
1a2f261ee2 | ||
|
|
cfd4926f47 | ||
|
|
36593ec593 | ||
|
|
dc5f646f24 | ||
|
|
d7e4965cde | ||
|
|
e22bf5c681 | ||
|
|
007ab1b796 | ||
|
|
c748ac2aa2 | ||
|
|
c091426c44 | ||
|
|
ab28e43050 | ||
|
|
74a18bdb11 | ||
|
|
367b9fa7f6 | ||
|
|
8269333d9c | ||
|
|
d83f222a13 | ||
|
|
2ba9172526 | ||
|
|
465af62c16 | ||
|
|
231a145716 | ||
|
|
4cabbe4d52 | ||
|
|
72c87b7cbd | ||
|
|
3da6006a44 | ||
|
|
6f48b82297 | ||
|
|
ac51b41fdf | ||
|
|
4b0b306c44 | ||
|
|
fd0acc074c | ||
|
|
39c37980d5 | ||
|
|
6dc2547177 | ||
|
|
d1224367e5 | ||
|
|
c88a92b4f9 | ||
|
|
ffab6c3c50 | ||
|
|
cb7e04bfb0 | ||
|
|
c6a7b84684 | ||
|
|
97afb4a56a | ||
|
|
886c15a7fb | ||
|
|
e34e84c5c6 | ||
|
|
4cac68d774 | ||
|
|
a792744c0d | ||
|
|
384ed3fafb | ||
|
|
80ea476497 | ||
|
|
8ddbf4ba08 | ||
|
|
041d93a254 | ||
|
|
167f264bc4 | ||
|
|
5c036f5fcc | ||
|
|
964ed8099c | ||
|
|
71b169616f | ||
|
|
d824755597 | ||
|
|
8e41699348 | ||
|
|
a580ba1903 | ||
|
|
edcb3696f1 | ||
|
|
f1f07a1764 | ||
|
|
5139ea4e1c | ||
|
|
fdf9d4da81 | ||
|
|
65267b2bb7 | ||
|
|
420bb720c1 | ||
|
|
bfbb6404e6 | ||
|
|
6ffc88b3b3 | ||
|
|
54501b5c16 | ||
|
|
d7ef5e8bd2 | ||
|
|
c7e64360cd | ||
|
|
55b66ca5e6 | ||
|
|
1fc6cf4c89 | ||
|
|
918e7c4bf8 | ||
|
|
cfc406709c | ||
|
|
9f55dac605 | ||
|
|
00a6575fb4 | ||
|
|
c6eb63ab77 | ||
|
|
db63d433f7 | ||
|
|
635af046bf | ||
|
|
86381955a3 | ||
|
|
3cfa366ec9 | ||
|
|
baa5b1a58e | ||
|
|
5be0a9c069 | ||
|
|
8978da7c20 | ||
|
|
b3bbb92358 | ||
|
|
06ac40fdbb | ||
|
|
d38d8167d8 | ||
|
|
5684d0de0b | ||
|
|
a2f887aabb | ||
|
|
f72e708627 | ||
|
|
781d8501cb | ||
|
|
015f1055a7 | ||
|
|
2466cf85a1 | ||
|
|
e6ddeef07f | ||
|
|
e23a211503 | ||
|
|
2e78440ef1 | ||
|
|
cbaba293b5 | ||
|
|
cdd9968831 | ||
|
|
6b4318a801 | ||
|
|
95f2cc0f88 | ||
|
|
1d652d1284 | ||
|
|
614b85e833 | ||
|
|
758f1eea93 | ||
|
|
f952502af5 | ||
|
|
b17a274ee8 | ||
|
|
4adab37b2a | ||
|
|
ff7b1e0edc | ||
|
|
b2aa392a98 | ||
|
|
0c1b892713 | ||
|
|
ee0952a848 | ||
|
|
a166f452cb | ||
|
|
a458264bc5 | ||
|
|
13919054ac | ||
|
|
8e4aeb62d3 | ||
|
|
609ac560fb | ||
|
|
5ae0328722 | ||
|
|
89802da1c7 | ||
|
|
43be6eef67 | ||
|
|
dc736da971 | ||
|
|
aae1731e3b | ||
|
|
f39acd5585 | ||
|
|
50f32ee56a | ||
|
|
7d62e97024 | ||
|
|
15eb454103 | ||
|
|
179cefa89f | ||
|
|
c251877aba | ||
|
|
8352b0fe07 | ||
|
|
2a7859b3df | ||
|
|
4064586d18 | ||
|
|
7ddb6d3554 | ||
|
|
9206c0086f | ||
|
|
0c6e5ace59 | ||
|
|
47f5b25265 | ||
|
|
e3c8ef19c3 | ||
|
|
803ef41a75 | ||
|
|
984f505fa6 | ||
|
|
b89266225d | ||
|
|
a45930a5cf | ||
|
|
fe06a87aa2 | ||
|
|
f9940c4f1f | ||
|
|
5c3ebd3761 | ||
|
|
9050325fda | ||
|
|
9ca2342a0b | ||
|
|
ad9bb75fd5 | ||
|
|
f96dfd04f7 | ||
|
|
d63982c32c | ||
|
|
14b5392d5f | ||
|
|
16dd4073ff | ||
|
|
9595936d73 | ||
|
|
c18a52fd2d | ||
|
|
75c39d3617 | ||
|
|
911a803a56 | ||
|
|
f04315fa8f | ||
|
|
89e68d7d4d | ||
|
|
4fc5f33fa1 | ||
|
|
c2056085c9 | ||
|
|
9f7b7ef889 | ||
|
|
cdb194a363 | ||
|
|
0986350f05 | ||
|
|
119cadcb2b | ||
|
|
803db3b55b | ||
|
|
c2fd6e3237 | ||
|
|
bf7fc79519 | ||
|
|
cded5bcb4c | ||
|
|
f8d3373e13 | ||
|
|
f1d48c8189 | ||
|
|
866bda8606 | ||
|
|
78a00ef249 | ||
|
|
b6bc3042b4 | ||
|
|
4ee699d27b | ||
|
|
2effa7a31b | ||
|
|
c50b77303d | ||
|
|
40bfaa6245 | ||
|
|
f4656a0c6e | ||
|
|
161e5e3dfa | ||
|
|
023da4fc29 | ||
|
|
5c8261f8d1 | ||
|
|
080aafa1da | ||
|
|
43d6a6782a | ||
|
|
f0028a6b6e | ||
|
|
98439f4e48 | ||
|
|
78802ae9aa | ||
|
|
99b4e5382e | ||
|
|
2b24f939da | ||
|
|
3271e5cd43 | ||
|
|
94bd6b7142 | ||
|
|
b59c4caf81 | ||
|
|
8bfa3a5d11 | ||
|
|
b161924941 | ||
|
|
aad125211e | ||
|
|
39f8149e27 | ||
|
|
d6541d81c3 | ||
|
|
763f08a08e | ||
|
|
886d5d1db6 | ||
|
|
9b1fc7a6d4 | ||
|
|
8d95ca3506 | ||
|
|
44ec500744 | ||
|
|
8526733b36 | ||
|
|
9041000bc4 | ||
|
|
be16ffea23 | ||
|
|
a0c4b520fc | ||
|
|
dcd9e2ef14 | ||
|
|
46dc378472 | ||
|
|
d1e73c1916 | ||
|
|
0f60ee8763 | ||
|
|
5b45f1bbc8 | ||
|
|
d283252ac7 | ||
|
|
02a0ce8c49 | ||
|
|
f82d8f3b52 | ||
|
|
1f620257f9 | ||
|
|
16e9109e96 | ||
|
|
0c65c915a4 | ||
|
|
7aca82b590 | ||
|
|
99566b4d9b | ||
|
|
eb31581c7b | ||
|
|
d46af09c10 | ||
|
|
badc7ed18c | ||
|
|
3da36eae31 | ||
|
|
fcbe58e971 | ||
|
|
572ce0b739 | ||
|
|
0f31607617 | ||
|
|
6a15f0c271 | ||
|
|
d77bcf0e18 | ||
|
|
5df0530223 | ||
|
|
522fa092ba | ||
|
|
8f6f2ab872 | ||
|
|
7185026378 | ||
|
|
db11844661 | ||
|
|
163d8a0e10 | ||
|
|
7a38423c1e | ||
|
|
46e0219040 | ||
|
|
1ff49aa614 | ||
|
|
c878c673ab | ||
|
|
642f24eba5 | ||
|
|
bdd60ecbbd | ||
|
|
4cf736911d | ||
|
|
0bf83f8744 | ||
|
|
6bd7fdb8ac | ||
|
|
a745136190 | ||
|
|
a672c32d6a | ||
|
|
1294724ee8 | ||
|
|
b13af0e88b | ||
|
|
0041bf5e4e | ||
|
|
d7c027fc7a | ||
|
|
b3ceaa87d7 | ||
|
|
d237974ebe | ||
|
|
a82c852675 | ||
|
|
bb76099b5a | ||
|
|
01ca34ebee | ||
|
|
4af18a3471 | ||
|
|
5d8500ff7f | ||
|
|
8a59dfd495 | ||
|
|
f4da8edb90 | ||
|
|
f1824f6f2e | ||
|
|
54b01bd44d | ||
|
|
634be642f2 | ||
|
|
2e5000a016 | ||
|
|
b51ed49dbf | ||
|
|
92d2bde559 | ||
|
|
92ae444026 | ||
|
|
51795474d7 | ||
|
|
63a37fc2d3 | ||
|
|
7d79ac1e56 | ||
|
|
acf6d94ee1 | ||
|
|
a03e726aad | ||
|
|
6ce27e50f0 | ||
|
|
d3bdf1ab96 | ||
|
|
a0ec5f6fe2 | ||
|
|
d512ae6c86 | ||
|
|
612790c730 | ||
|
|
0e84c203e6 | ||
|
|
61119d60b9 | ||
|
|
3870758ab8 | ||
|
|
1b76900b9e | ||
|
|
b63d61f2b2 | ||
|
|
90e36700c3 | ||
|
|
d79b82d24e | ||
|
|
b8e288e613 | ||
|
|
ca76ccb6af | ||
|
|
bb6e33c8c4 | ||
|
|
f529b7b526 | ||
|
|
ea0c51c498 | ||
|
|
a9447e7edf | ||
|
|
93b87696c6 | ||
|
|
876875cff2 | ||
|
|
2649ba0916 | ||
|
|
923f687a33 | ||
|
|
613fdad671 | ||
|
|
d8a89a3a42 | ||
|
|
34cba1480e | ||
|
|
9ea249180a | ||
|
|
4ba13a4254 | ||
|
|
e6371f38fd | ||
|
|
e55a196e8f | ||
|
|
f9696d557c | ||
|
|
0715f46a4a | ||
|
|
a5450672b1 | ||
|
|
39bf71680c | ||
|
|
372cfeee33 | ||
|
|
ca4e4efeb8 | ||
|
|
4c9e608a1a | ||
|
|
90665731c1 | ||
|
|
7a9ea40d72 | ||
|
|
96c65dacdd | ||
|
|
c46080f0b2 | ||
|
|
cfd7d0a38b | ||
|
|
0df1650f2d | ||
|
|
8bba3081ab | ||
|
|
d5f23bb5a8 | ||
|
|
b81df43132 | ||
|
|
c5f303f0c4 | ||
|
|
3a51db79c9 | ||
|
|
bda9606ae3 | ||
|
|
b59e208468 | ||
|
|
6b6f0a1d87 | ||
|
|
5676dd89af | ||
|
|
3ec26e169e | ||
|
|
2115af3857 | ||
|
|
ed3f619db6 | ||
|
|
e58f42de21 | ||
|
|
0f26fe4bc9 | ||
|
|
69a715dff1 | ||
|
|
dba758b5e4 | ||
|
|
d6218892bf | ||
|
|
4608279305 | ||
|
|
bbd7a19ef9 | ||
|
|
9a95ad1435 | ||
|
|
5bd42d5625 | ||
|
|
0c446d45df | ||
|
|
2bfc8d86a9 | ||
|
|
98ab14f67e | ||
|
|
845e96f12e | ||
|
|
1ad75f5ec5 | ||
|
|
89b6e69340 | ||
|
|
2d40807b66 | ||
|
|
8e44bc48b8 | ||
|
|
082fd0fd8b | ||
|
|
9e4af4f8ad | ||
|
|
0740f87a32 | ||
|
|
5542febef6 | ||
|
|
4eba2c6a24 | ||
|
|
e654c29c82 | ||
|
|
0bcd6e078b | ||
|
|
4698c0a066 | ||
|
|
70fa12f1b2 | ||
|
|
8d86cc1173 | ||
|
|
c7aaa77e44 | ||
|
|
1e8252ffcc | ||
|
|
361b34641c | ||
|
|
88c0c3503f | ||
|
|
102fc3e184 | ||
|
|
abd02979dd | ||
|
|
f6c4227ca6 | ||
|
|
d6bc8f4a24 | ||
|
|
a9c3799547 | ||
|
|
3ea4603d1c | ||
|
|
84dfb035b1 | ||
|
|
aacd8f49f4 | ||
|
|
c66e221012 | ||
|
|
f38d2466df | ||
|
|
1cc92c645a | ||
|
|
ab764df411 | ||
|
|
5363ee7198 | ||
|
|
4b78ba42b1 | ||
|
|
567f118ce1 | ||
|
|
230e892482 | ||
|
|
9e616e81ad | ||
|
|
d1e055c015 | ||
|
|
3bcd6694b7 | ||
|
|
86d8fc5ee3 | ||
|
|
78f291264e | ||
|
|
fdc3c7ba09 | ||
|
|
f8621e850f | ||
|
|
87c5f89b6c | ||
|
|
780c794ef0 | ||
|
|
8b4070dbcf | ||
|
|
4e089fd17e | ||
|
|
f454006ec3 | ||
|
|
f5002929ee | ||
|
|
4e1d75a3e1 | ||
|
|
d4462ba5d8 | ||
|
|
6dc71269a2 | ||
|
|
730ccba535 | ||
|
|
1175721579 | ||
|
|
e5157d5471 | ||
|
|
7fcb23e0c7 | ||
|
|
f075d90d99 | ||
|
|
bf94748058 | ||
|
|
2890d13d92 | ||
|
|
9232778732 | ||
|
|
70a25f9837 | ||
|
|
4434df1999 | ||
|
|
b9e9f6f040 | ||
|
|
f92caf0f1f | ||
|
|
55b90917e4 | ||
|
|
d0546e998a | ||
|
|
e9f414b29c | ||
|
|
7638261e8f | ||
|
|
a049d6eab1 | ||
|
|
61f46b959e | ||
|
|
ccb1e4af02 | ||
|
|
06424cae28 | ||
|
|
9aeb2eaabd | ||
|
|
c6061daec4 | ||
|
|
5be0352705 | ||
|
|
06995f26fd | ||
|
|
7b45844670 | ||
|
|
0a0c2adf7d | ||
|
|
7aab3b34d6 | ||
|
|
c4aa221c9b | ||
|
|
da12071d8f | ||
|
|
581a9bb1c9 | ||
|
|
f5258510cc | ||
|
|
99401f9d69 | ||
|
|
c1cd14cad2 | ||
|
|
729bea2d8e | ||
|
|
8b72e4f23e | ||
|
|
17202c6d29 | ||
|
|
567d4331fd | ||
|
|
565b343dee | ||
|
|
92c9f443e8 | ||
|
|
dd2d7bb863 | ||
|
|
9c0d612729 | ||
|
|
07d5636d1e | ||
|
|
977cabb580 | ||
|
|
15a7e1d9d1 | ||
|
|
953ffcf204 | ||
|
|
b24e6e72c7 | ||
|
|
82b05f6b5a | ||
|
|
a662802011 | ||
|
|
5483ade786 | ||
|
|
ae02a7007b | ||
|
|
3c6e058b00 | ||
|
|
ad3ddcaadb | ||
|
|
be56052417 | ||
|
|
9a888d9896 | ||
|
|
24a7e585e4 | ||
|
|
2120f1ed5b | ||
|
|
3a2bb22cb3 | ||
|
|
a7c4ec6eaf | ||
|
|
f7b934b306 | ||
|
|
d34e7a1e8e | ||
|
|
4804ec986a | ||
|
|
16117e5b6c | ||
|
|
985805e0d5 | ||
|
|
78acaf8f4c | ||
|
|
a1dad065b2 | ||
|
|
3b03d4346c | ||
|
|
c6551819cd | ||
|
|
e58635a881 | ||
|
|
8e3331d0db | ||
|
|
8391a0612d | ||
|
|
68c00d1c4d | ||
|
|
f48f24ce2e | ||
|
|
9d5a88416a | ||
|
|
a314786056 | ||
|
|
aee9b2c749 | ||
|
|
3fffee3b05 | ||
|
|
72abae7b94 | ||
|
|
a300df7ff3 | ||
|
|
8e500d4601 | ||
|
|
f6e1442fdf | ||
|
|
d8d8260d76 | ||
|
|
72dd0d062b | ||
|
|
03c67d6a3b | ||
|
|
314cd10e27 | ||
|
|
6e6a929fac | ||
|
|
d069f5477e | ||
|
|
a4a5fbe4a8 | ||
|
|
01e288297a | ||
|
|
7564b1e6df | ||
|
|
cf010c3f17 | ||
|
|
5ff95db9e1 | ||
|
|
ada72d2264 | ||
|
|
9f436dcd1e | ||
|
|
95a710d4a8 | ||
|
|
bf5d300a54 | ||
|
|
f7a1325339 | ||
|
|
e13152715c | ||
|
|
19a35ed111 | ||
|
|
e62ba8ed1e | ||
|
|
f62ded94bb | ||
|
|
74f459d7ed | ||
|
|
815a351435 | ||
|
|
9857f30703 | ||
|
|
a7de2cf682 | ||
|
|
5e2f4924d6 | ||
|
|
b74a334f25 | ||
|
|
58c9a61cf0 | ||
|
|
d5620cf8b5 | ||
|
|
2e50c100f9 | ||
|
|
776d9ac5e0 | ||
|
|
301e348789 | ||
|
|
6467d85059 | ||
|
|
4b4d090d39 | ||
|
|
2ddafa28f2 | ||
|
|
d6bb47816c | ||
|
|
f40d90cf08 | ||
|
|
ab7c1ec24f | ||
|
|
be5969a1e1 | ||
|
|
992d173adc | ||
|
|
5396519b20 | ||
|
|
d8122f5d33 | ||
|
|
92f8b2dd02 | ||
|
|
29e35cf824 | ||
|
|
26ff88c71a | ||
|
|
7b3951f1e5 | ||
|
|
5dbfc92c5a | ||
|
|
0ca846b2c5 | ||
|
|
747eac0417 | ||
|
|
88cc24c5b9 | ||
|
|
0111e97856 | ||
|
|
a14281722a | ||
|
|
a80f3ae919 | ||
|
|
5f558137d3 | ||
|
|
ecd66f8a64 | ||
|
|
8d965d4833 | ||
|
|
25a3de653c | ||
|
|
ac519a273b | ||
|
|
68429f9c37 | ||
|
|
5cb41badc1 | ||
|
|
54bebeabb7 | ||
|
|
3a17c2b55c | ||
|
|
7b7b8b8f8b | ||
|
|
55201b6224 | ||
|
|
49b9296cd9 | ||
|
|
09fabd911e | ||
|
|
43be752847 | ||
|
|
6cfd31c705 | ||
|
|
3bce9278bd | ||
|
|
068caf159d | ||
|
|
eb8875b64b | ||
|
|
97578c0831 | ||
|
|
7219f71bc1 | ||
|
|
eea9133b3f | ||
|
|
a8f543ce62 | ||
|
|
b35172a3b8 | ||
|
|
7b8f0583a4 | ||
|
|
7ae89711dd | ||
|
|
a2c3729254 | ||
|
|
14c9f783d5 | ||
|
|
6c9c709c65 | ||
|
|
1c2ffc6aaa | ||
|
|
a6d2bc5238 | ||
|
|
737d2804d2 | ||
|
|
3e14c2664e | ||
|
|
78bd8554aa | ||
|
|
f1d5679fba | ||
|
|
a9e82b7fc2 | ||
|
|
21f77f9c5d | ||
|
|
c4c0198d20 | ||
|
|
d72d13ed58 | ||
|
|
5ea0705547 | ||
|
|
575b50deda | ||
|
|
a0d1a04605 | ||
|
|
aa4704e37d | ||
|
|
4143a2559a | ||
|
|
693a8fa979 | ||
|
|
6ec639d347 | ||
|
|
52d5d35afb | ||
|
|
8a21cc6d18 | ||
|
|
b6bedf20ce | ||
|
|
9f02279d5a | ||
|
|
6f9906e935 | ||
|
|
e934c3934d | ||
|
|
d6f78e4cc8 | ||
|
|
f9cc05b202 | ||
|
|
76eb92b821 | ||
|
|
e749051dbc | ||
|
|
6de7c70e7e | ||
|
|
74f52b14cd | ||
|
|
e33363bf6c | ||
|
|
7d77e63b81 | ||
|
|
cfa855dec8 | ||
|
|
34a72a0555 | ||
|
|
a9db7d0286 | ||
|
|
19140e9cfa | ||
|
|
b0c3f2ff7f | ||
|
|
8686b56b9e | ||
|
|
6ab731acdb | ||
|
|
8ca63cf0ee | ||
|
|
5774c08b4a | ||
|
|
b731cdef56 | ||
|
|
b51c93fbc1 | ||
|
|
e948839fb5 | ||
|
|
587ec513db | ||
|
|
efed5700be | ||
|
|
5ddaea7efc | ||
|
|
66577b741f | ||
|
|
09017980b6 | ||
|
|
3a7721ebe8 | ||
|
|
35cc3efd5a | ||
|
|
95ad756909 | ||
|
|
816ca2ea15 | ||
|
|
246891a8f6 | ||
|
|
25fd63c6d0 | ||
|
|
cadbbd0e2e | ||
|
|
65b83c46fb | ||
|
|
31204a37a5 | ||
|
|
67774c71e5 | ||
|
|
44b65daf1c | ||
|
|
48ff0c5744 | ||
|
|
3934aa118f | ||
|
|
d40efb883c | ||
|
|
84ec09565a | ||
|
|
387431e4df | ||
|
|
662747c06c | ||
|
|
89272e9ddb | ||
|
|
23d4d25e39 | ||
|
|
488a608c90 | ||
|
|
a94d18a10b | ||
|
|
94aba0f9ac | ||
|
|
35c3ca91eb | ||
|
|
53328bc595 | ||
|
|
bb7a4c4739 | ||
|
|
7d38963c61 | ||
|
|
a7e7c17134 | ||
|
|
0544af1f68 | ||
|
|
70d7dcd189 | ||
|
|
d36fdc1d69 | ||
|
|
b9482f420d | ||
|
|
ba87f3e7d7 | ||
|
|
3fe721a772 | ||
|
|
b60a3802e7 | ||
|
|
4beb6a8049 | ||
|
|
a53c4a3ed1 | ||
|
|
bd10afc796 | ||
|
|
2868efa779 | ||
|
|
fe466e2e86 | ||
|
|
6c5771b40c | ||
|
|
5c81d31bd1 | ||
|
|
b1b3b42489 | ||
|
|
5b03fc1a89 | ||
|
|
dd73c724c4 | ||
|
|
5cbcd68446 | ||
|
|
3bc1afd149 | ||
|
|
877761ecd3 | ||
|
|
9ef464e002 | ||
|
|
3deb089d64 | ||
|
|
f4f2249447 | ||
|
|
1c5a4f4f39 | ||
|
|
1909fc3139 | ||
|
|
2de831f1b2 | ||
|
|
1739200ee4 | ||
|
|
31a44178a4 | ||
|
|
eb9f233a78 | ||
|
|
3986dc2617 | ||
|
|
1f7f2ee3dd | ||
|
|
6e0da1aa3a | ||
|
|
af3b0ed39f | ||
|
|
1302b67772 | ||
|
|
6d44248607 | ||
|
|
5f1d9cbab1 | ||
|
|
aad21195df | ||
|
|
739a67fdcb | ||
|
|
48bd5cb2c0 | ||
|
|
2542102280 | ||
|
|
81a5d49687 | ||
|
|
321b44b779 | ||
|
|
61a1ed897f | ||
|
|
5bb4cffa21 | ||
|
|
5c314b6f1c | ||
|
|
9d5295fdb4 | ||
|
|
eaf3fc8833 | ||
|
|
94c5ddc13d | ||
|
|
a3fedbaba7 | ||
|
|
564634be45 | ||
|
|
ab3ae3dc62 | ||
|
|
d037f67f74 | ||
|
|
b1b6341a6e | ||
|
|
8c92f9407d | ||
|
|
e0aa660b56 | ||
|
|
59ab51c06c | ||
|
|
2eb2617b6f | ||
|
|
b284572ea7 | ||
|
|
1e5d9ecfa3 | ||
|
|
e8bda298e3 | ||
|
|
489cd008d6 | ||
|
|
3ff1e31a81 | ||
|
|
f21c5ea88a | ||
|
|
82903cc567 | ||
|
|
0233c38711 | ||
|
|
4e2ccfc091 | ||
|
|
e4b1e1118b | ||
|
|
ba2e798f7d | ||
|
|
85edef8394 | ||
|
|
559f6e2791 |
@@ -14,10 +14,11 @@ MANIFEST.in
|
||||
README.md
|
||||
freqtrade.service
|
||||
freqtrade.egg-info
|
||||
.venv/
|
||||
|
||||
config.json*
|
||||
*.sqlite
|
||||
user_data
|
||||
user_data/
|
||||
*.log
|
||||
|
||||
.vscode
|
||||
|
||||
92
.github/actions/docker-tags/action.yml
vendored
Normal file
92
.github/actions/docker-tags/action.yml
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
name: 'docker-tags'
|
||||
description: 'Set Docker default Tag environment variables'
|
||||
# inputs:
|
||||
outputs:
|
||||
BRANCH_NAME:
|
||||
description: 'The branch name'
|
||||
value: ${{ steps.tags.outputs.BRANCH_NAME }}
|
||||
TAG:
|
||||
description: 'The Docker tag'
|
||||
value: ${{ steps.tags.outputs.TAG }}
|
||||
TAG_PLOT:
|
||||
description: 'The Docker tag for the plot'
|
||||
value: ${{ steps.tags.outputs.TAG_PLOT }}
|
||||
TAG_FREQAI:
|
||||
description: 'The Docker tag for the freqai'
|
||||
value: ${{ steps.tags.outputs.TAG_FREQAI }}
|
||||
TAG_FREQAI_RL:
|
||||
description: 'The Docker tag for the freqai_rl'
|
||||
value: ${{ steps.tags.outputs.TAG_FREQAI_RL }}
|
||||
TAG_FREQAI_TORCH:
|
||||
description: 'The Docker tag for the freqai_torch'
|
||||
value: ${{ steps.tags.outputs.TAG_FREQAI_TORCH }}
|
||||
TAG_ARM:
|
||||
description: 'The Docker tag for the arm'
|
||||
value: ${{ steps.tags.outputs.TAG_ARM }}
|
||||
TAG_PLOT_ARM:
|
||||
description: 'The Docker tag for the plot arm'
|
||||
value: ${{ steps.tags.outputs.TAG_PLOT_ARM }}
|
||||
TAG_FREQAI_ARM:
|
||||
description: 'The Docker tag for the freqai arm'
|
||||
value: ${{ steps.tags.outputs.TAG_FREQAI_ARM }}
|
||||
TAG_FREQAI_RL_ARM:
|
||||
description: 'The Docker tag for the freqai_rl arm'
|
||||
value: ${{ steps.tags.outputs.TAG_FREQAI_RL_ARM }}
|
||||
TAG_PI:
|
||||
description: 'The Docker tag for the pi'
|
||||
value: ${{ steps.tags.outputs.TAG_PI }}
|
||||
CACHE_TAG_PI:
|
||||
description: 'The Docker cache tag for the pi'
|
||||
value: ${{ steps.tags.outputs.CACHE_TAG_PI }}
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
id: tags
|
||||
env:
|
||||
BRANCH_NAME_INPUT: ${{ github.event.inputs.branch_name }}
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
BRANCH_NAME="${BRANCH_NAME_INPUT}"
|
||||
else
|
||||
BRANCH_NAME="${GITHUB_REF##*/}"
|
||||
fi
|
||||
|
||||
# Replace / with _ to create a valid tag
|
||||
TAG=$(echo "${BRANCH_NAME}" | sed -e "s/\//_/g")
|
||||
TAG_PLOT=${TAG}_plot
|
||||
TAG_FREQAI=${TAG}_freqai
|
||||
TAG_FREQAI_RL=${TAG_FREQAI}rl
|
||||
TAG_FREQAI_TORCH=${TAG_FREQAI}torch
|
||||
|
||||
TAG_ARM=${TAG}_arm
|
||||
TAG_PLOT_ARM=${TAG_PLOT}_arm
|
||||
TAG_FREQAI_ARM=${TAG_FREQAI}_arm
|
||||
TAG_FREQAI_RL_ARM=${TAG_FREQAI_RL}_arm
|
||||
|
||||
TAG_PI="${TAG}_pi"
|
||||
|
||||
CACHE_TAG_PI=${CACHE_IMAGE}:${TAG_PI}_cache
|
||||
|
||||
echo "BRANCH_NAME=${BRANCH_NAME}" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG=${TAG}" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_PLOT=${TAG_PLOT}" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_FREQAI=${TAG_FREQAI}" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_FREQAI_RL=${TAG_FREQAI_RL}" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_FREQAI_TORCH=${TAG_FREQAI_TORCH}" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_ARM=${TAG_ARM}" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_PLOT_ARM=${TAG_PLOT_ARM}" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_FREQAI_ARM=${TAG_FREQAI_ARM}" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_FREQAI_RL_ARM=${TAG_FREQAI_RL_ARM}" >> "$GITHUB_OUTPUT"
|
||||
echo "TAG_PI=${TAG_PI}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
echo "CACHE_TAG_PI=${CACHE_TAG_PI}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
cat "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Save commit SHA to file
|
||||
shell: bash
|
||||
# Add commit to docker container
|
||||
run: |
|
||||
echo "${GITHUB_SHA}" > freqtrade_commit
|
||||
16
.github/dependabot.yml
vendored
16
.github/dependabot.yml
vendored
@@ -1,6 +1,8 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: docker
|
||||
cooldown:
|
||||
default-days: 4
|
||||
directories:
|
||||
- "/"
|
||||
- "/docker"
|
||||
@@ -11,8 +13,20 @@ updates:
|
||||
update-types: ["version-update:semver-major"]
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: devcontainers
|
||||
directory: "/"
|
||||
cooldown:
|
||||
default-days: 4
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: pip
|
||||
directory: "/"
|
||||
cooldown:
|
||||
default-days: 4
|
||||
exclude:
|
||||
- ccxt
|
||||
schedule:
|
||||
interval: weekly
|
||||
time: "03:00"
|
||||
@@ -36,6 +50,8 @@ updates:
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
cooldown:
|
||||
default-days: 4
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
|
||||
338
.github/workflows/ci.yml
vendored
338
.github/workflows/ci.yml
vendored
@@ -19,12 +19,12 @@ concurrency:
|
||||
permissions:
|
||||
repository-projects: read
|
||||
jobs:
|
||||
build-linux:
|
||||
|
||||
tests:
|
||||
name: "Tests and Linting"
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ "ubuntu-22.04", "ubuntu-24.04" ]
|
||||
os: [ "ubuntu-22.04", "ubuntu-24.04", "macos-14", "macos-15" , "windows-2022", "windows-2025" ]
|
||||
python-version: ["3.11", "3.12", "3.13"]
|
||||
|
||||
steps:
|
||||
@@ -33,21 +33,27 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
|
||||
with:
|
||||
activate-environment: true
|
||||
enable-cache: true
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache-dependency-glob: "requirements**.txt"
|
||||
cache-suffix: "${{ matrix.python-version }}"
|
||||
prune-cache: false
|
||||
|
||||
- name: Installation - *nix
|
||||
- name: Installation - macOS (Brew)
|
||||
if: ${{ runner.os == 'macOS' }}
|
||||
run: |
|
||||
# brew update
|
||||
# TODO: Should be the brew upgrade
|
||||
brew install libomp
|
||||
|
||||
- name: Installation (python)
|
||||
run: |
|
||||
uv pip install --upgrade wheel
|
||||
uv pip install -r requirements-dev.txt
|
||||
@@ -61,22 +67,24 @@ jobs:
|
||||
- name: Tests
|
||||
if: (!(runner.os == 'Linux' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-24.04'))
|
||||
run: |
|
||||
pytest --random-order
|
||||
pytest --random-order --durations 20 -n auto
|
||||
|
||||
- name: Tests with Coveralls
|
||||
if: (runner.os == 'Linux' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-24.04')
|
||||
run: |
|
||||
pytest --random-order --cov=freqtrade --cov=freqtrade_client --cov-config=.coveragerc
|
||||
|
||||
- name: Coveralls
|
||||
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
|
||||
if: (runner.os == 'Linux' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-24.04')
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
- name: Cleanup codecov dirty state files
|
||||
if: (runner.os == 'Linux' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-24.04')
|
||||
env:
|
||||
# Coveralls token. Not used as secret due to github not providing secrets to forked repositories
|
||||
COVERALLS_REPO_TOKEN: 6D1m0xupS3FgutfuGao8keFf9Hc0FpIXu
|
||||
run: |
|
||||
# Allow failure for coveralls
|
||||
uv pip install coveralls
|
||||
coveralls || true
|
||||
# See https://github.com/codecov/codecov-action/issues/1851
|
||||
rm -rf codecov codecov.SHA256SUM codecov.SHA256SUM.sig
|
||||
|
||||
- name: Run json schema extract
|
||||
# This should be kept before the repository check to ensure that the schema is up-to-date
|
||||
@@ -85,12 +93,12 @@ jobs:
|
||||
|
||||
- name: Run command docs partials extract
|
||||
# This should be kept before the repository check to ensure that the docs are up-to-date
|
||||
if: ${{ (matrix.python-version == '3.13') }}
|
||||
run: |
|
||||
python build_helpers/create_command_partials.py
|
||||
|
||||
- name: Check for repository changes
|
||||
# TODO: python 3.13 slightly changed the output of argparse.
|
||||
if: (matrix.python-version != '3.13')
|
||||
- name: Check for repository changes - *nix
|
||||
if: ${{ (runner.os != 'Windows') }}
|
||||
run: |
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "Repository is dirty, changes detected:"
|
||||
@@ -101,13 +109,27 @@ jobs:
|
||||
echo "Repository is clean, no changes detected."
|
||||
fi
|
||||
|
||||
- name: Check for repository changes - Windows
|
||||
if: ${{ runner.os == 'Windows' && (matrix.python-version != '3.13') }}
|
||||
run: |
|
||||
if (git status --porcelain) {
|
||||
Write-Host "Repository is dirty, changes detected:"
|
||||
git status
|
||||
git diff
|
||||
exit 1
|
||||
}
|
||||
else {
|
||||
Write-Host "Repository is clean, no changes detected."
|
||||
}
|
||||
|
||||
- name: Backtesting (multi)
|
||||
run: |
|
||||
cp tests/testdata/config.tests.json config.json
|
||||
freqtrade create-userdir --userdir user_data
|
||||
cp tests/testdata/config.tests.json user_data/config.json
|
||||
freqtrade new-strategy -s AwesomeStrategy
|
||||
freqtrade new-strategy -s AwesomeStrategyMin --template minimal
|
||||
freqtrade backtesting --datadir tests/testdata --strategy-list AwesomeStrategy AwesomeStrategyMin -i 5m
|
||||
freqtrade new-strategy -s AwesomeStrategyAdv --template advanced
|
||||
freqtrade backtesting --datadir tests/testdata --strategy-list AwesomeStrategy AwesomeStrategyMin AwesomeStrategyAdv -i 5m
|
||||
|
||||
- name: Hyperopt
|
||||
run: |
|
||||
@@ -128,208 +150,13 @@ jobs:
|
||||
ruff format --check
|
||||
|
||||
- name: Mypy
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
run: |
|
||||
mypy freqtrade scripts tests
|
||||
|
||||
- name: Discord notification
|
||||
uses: rjstone/discord-webhook-notify@c2597273488aeda841dd1e891321952b51f7996f #v2.2.1
|
||||
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
|
||||
with:
|
||||
severity: error
|
||||
details: Freqtrade CI failed on ${{ matrix.os }}
|
||||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
build-macos:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ "macos-14", "macos-15" ]
|
||||
python-version: ["3.11", "3.12", "3.13"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
check-latest: true
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
with:
|
||||
activate-environment: true
|
||||
enable-cache: true
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache-dependency-glob: "requirements**.txt"
|
||||
cache-suffix: "${{ matrix.python-version }}"
|
||||
prune-cache: false
|
||||
|
||||
- name: Installation - macOS (Brew)
|
||||
run: |
|
||||
# brew update
|
||||
# TODO: Should be the brew upgrade
|
||||
# homebrew fails to update python due to unlinking failures
|
||||
# https://github.com/actions/runner-images/issues/6817
|
||||
rm /usr/local/bin/2to3 || true
|
||||
rm /usr/local/bin/2to3-3.11 || true
|
||||
rm /usr/local/bin/2to3-3.12 || true
|
||||
rm /usr/local/bin/idle3 || true
|
||||
rm /usr/local/bin/idle3.11 || true
|
||||
rm /usr/local/bin/idle3.12 || true
|
||||
rm /usr/local/bin/pydoc3 || true
|
||||
rm /usr/local/bin/pydoc3.11 || true
|
||||
rm /usr/local/bin/pydoc3.12 || true
|
||||
rm /usr/local/bin/python3 || true
|
||||
rm /usr/local/bin/python3.11 || true
|
||||
rm /usr/local/bin/python3.12 || true
|
||||
rm /usr/local/bin/python3-config || true
|
||||
rm /usr/local/bin/python3.11-config || true
|
||||
rm /usr/local/bin/python3.12-config || true
|
||||
|
||||
brew install libomp
|
||||
|
||||
- name: Installation (python)
|
||||
run: |
|
||||
uv pip install wheel
|
||||
uv pip install -r requirements-dev.txt
|
||||
uv pip install -e ft_client/
|
||||
uv pip install -e .
|
||||
|
||||
- name: Tests
|
||||
run: |
|
||||
pytest --random-order
|
||||
|
||||
- name: Check for repository changes
|
||||
run: |
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "Repository is dirty, changes detected:"
|
||||
git status
|
||||
git diff
|
||||
exit 1
|
||||
else
|
||||
echo "Repository is clean, no changes detected."
|
||||
fi
|
||||
|
||||
- name: Backtesting
|
||||
run: |
|
||||
cp tests/testdata/config.tests.json config.json
|
||||
freqtrade create-userdir --userdir user_data
|
||||
freqtrade new-strategy -s AwesomeStrategyAdv --template advanced
|
||||
freqtrade backtesting --datadir tests/testdata --strategy AwesomeStrategyAdv
|
||||
|
||||
- name: Hyperopt
|
||||
run: |
|
||||
cp tests/testdata/config.tests.json config.json
|
||||
freqtrade create-userdir --userdir user_data
|
||||
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all
|
||||
|
||||
- name: Sort imports (isort)
|
||||
run: |
|
||||
isort --check .
|
||||
|
||||
- name: Run Ruff
|
||||
run: |
|
||||
ruff check --output-format=github
|
||||
|
||||
- name: Run Ruff format check
|
||||
run: |
|
||||
ruff format --check
|
||||
|
||||
- name: Mypy
|
||||
if: matrix.os == 'macos-15'
|
||||
run: |
|
||||
mypy freqtrade scripts
|
||||
|
||||
- name: Discord notification
|
||||
uses: rjstone/discord-webhook-notify@c2597273488aeda841dd1e891321952b51f7996f #v2.2.1
|
||||
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
|
||||
with:
|
||||
severity: info
|
||||
details: Test Succeeded!
|
||||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
build-windows:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ "windows-2022", "windows-2025" ]
|
||||
python-version: ["3.11", "3.12", "3.13"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
with:
|
||||
activate-environment: true
|
||||
enable-cache: true
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache-dependency-glob: "requirements**.txt"
|
||||
cache-suffix: "${{ matrix.python-version }}"
|
||||
prune-cache: false
|
||||
|
||||
- name: Installation
|
||||
run: |
|
||||
function uvpipFunction { uv pip $args }
|
||||
Set-Alias -name pip -value uvpipFunction
|
||||
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements-dev.txt
|
||||
pip install -e .
|
||||
|
||||
- name: Tests
|
||||
run: |
|
||||
pytest --random-order --durations 20 -n auto
|
||||
|
||||
- name: Check for repository changes
|
||||
run: |
|
||||
if (git status --porcelain) {
|
||||
Write-Host "Repository is dirty, changes detected:"
|
||||
git status
|
||||
git diff
|
||||
exit 1
|
||||
}
|
||||
else {
|
||||
Write-Host "Repository is clean, no changes detected."
|
||||
}
|
||||
|
||||
- name: Backtesting
|
||||
run: |
|
||||
cp tests/testdata/config.tests.json config.json
|
||||
freqtrade create-userdir --userdir user_data
|
||||
freqtrade backtesting --datadir tests/testdata --strategy SampleStrategy
|
||||
|
||||
- name: Hyperopt
|
||||
run: |
|
||||
cp tests/testdata/config.tests.json config.json
|
||||
freqtrade create-userdir --userdir user_data
|
||||
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all
|
||||
|
||||
- name: Run Ruff
|
||||
run: |
|
||||
ruff check --output-format=github
|
||||
|
||||
- name: Run Ruff format check
|
||||
run: |
|
||||
ruff format --check
|
||||
|
||||
- name: Mypy
|
||||
if: ${{ matrix.os == 'ubuntu-24.04' || matrix.os == 'macos-15' }}
|
||||
run: |
|
||||
mypy freqtrade scripts tests
|
||||
|
||||
- name: Run Pester tests (PowerShell)
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: powershell
|
||||
run: |
|
||||
$PSVersionTable
|
||||
Set-PSRepository psgallery -InstallationPolicy trusted
|
||||
@@ -338,25 +165,24 @@ jobs:
|
||||
Invoke-Pester -Path "tests" -CI
|
||||
if ($Error.Length -gt 0) {exit 1}
|
||||
|
||||
shell: powershell
|
||||
|
||||
- name: Discord notification
|
||||
uses: rjstone/discord-webhook-notify@c2597273488aeda841dd1e891321952b51f7996f #v2.2.1
|
||||
if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
|
||||
if: ${{ failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) }}
|
||||
with:
|
||||
severity: error
|
||||
details: Test Failed
|
||||
details: Freqtrade CI failed on ${{ matrix.os }} with Python ${{ matrix.python-version }}!
|
||||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
mypy-version-check:
|
||||
runs-on: ubuntu-22.04
|
||||
name: "Mypy Version Check"
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
@@ -366,18 +192,20 @@ jobs:
|
||||
python build_helpers/pre_commit_update.py
|
||||
|
||||
pre-commit:
|
||||
name: "Pre-commit checks"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.12"
|
||||
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
|
||||
|
||||
docs-check:
|
||||
name: "Documentation build"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
@@ -389,7 +217,7 @@ jobs:
|
||||
./tests/test_docs.sh
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
@@ -409,6 +237,7 @@ jobs:
|
||||
|
||||
build-linux-online:
|
||||
# Run pytest with "live" checks
|
||||
name: "Tests and Linting - Online tests"
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
@@ -416,19 +245,18 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
|
||||
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
|
||||
with:
|
||||
activate-environment: true
|
||||
enable-cache: true
|
||||
python-version: "3.12"
|
||||
cache-dependency-glob: "requirements**.txt"
|
||||
cache-suffix: "3.12"
|
||||
prune-cache: false
|
||||
|
||||
- name: Installation - *nix
|
||||
run: |
|
||||
@@ -439,7 +267,7 @@ jobs:
|
||||
|
||||
- name: Tests incl. ccxt compatibility tests
|
||||
env:
|
||||
CI_WEB_PROXY: http://152.67.78.211:13128
|
||||
CI_WEB_PROXY: http://152.67.66.8:13128
|
||||
run: |
|
||||
pytest --random-order --longrun --durations 20 -n auto
|
||||
|
||||
@@ -447,12 +275,7 @@ jobs:
|
||||
# Notify only once - when CI completes (and after deploy) in case it's successful
|
||||
notify-complete:
|
||||
needs: [
|
||||
build-linux,
|
||||
build-macos,
|
||||
build-windows,
|
||||
docs-check,
|
||||
mypy-version-check,
|
||||
pre-commit,
|
||||
build,
|
||||
build-linux-online
|
||||
]
|
||||
runs-on: ubuntu-22.04
|
||||
@@ -480,17 +303,29 @@ jobs:
|
||||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
build:
|
||||
if: always()
|
||||
name: "Build"
|
||||
needs: [ build-linux, build-macos, build-windows, docs-check, mypy-version-check, pre-commit ]
|
||||
needs: [
|
||||
tests,
|
||||
docs-check,
|
||||
mypy-version-check,
|
||||
pre-commit,
|
||||
]
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
|
||||
- name: Decide whether the needed jobs succeeded or failed
|
||||
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
|
||||
with:
|
||||
jobs: ${{ toJSON(needs) }}
|
||||
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
@@ -500,7 +335,7 @@ jobs:
|
||||
python -m build --sdist --wheel
|
||||
|
||||
- name: Upload artifacts 📦
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: freqtrade-build
|
||||
path: |
|
||||
@@ -513,7 +348,7 @@ jobs:
|
||||
python -m build --sdist --wheel ft_client
|
||||
|
||||
- name: Upload artifacts 📦
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: freqtrade-client-build
|
||||
path: |
|
||||
@@ -537,14 +372,14 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Download artifact 📦
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
pattern: freqtrade*-build
|
||||
path: dist
|
||||
merge-multiple: true
|
||||
|
||||
- name: Publish to PyPI (Test)
|
||||
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
|
||||
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
|
||||
with:
|
||||
repository-url: https://test.pypi.org/legacy/
|
||||
|
||||
@@ -566,19 +401,21 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Download artifact 📦
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
pattern: freqtrade*-build
|
||||
path: dist
|
||||
merge-multiple: true
|
||||
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
|
||||
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
|
||||
|
||||
|
||||
docker-build:
|
||||
name: "Docker Build and Deploy"
|
||||
needs: [ build-linux, build-macos, build-windows, docs-check, mypy-version-check, pre-commit ]
|
||||
needs: [
|
||||
build,
|
||||
]
|
||||
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release') && github.repository == 'freqtrade/freqtrade'
|
||||
uses: ./.github/workflows/docker-build.yml
|
||||
permissions:
|
||||
@@ -588,3 +425,14 @@ jobs:
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
|
||||
packages-cleanup:
|
||||
name: "Docker Package Cleanup"
|
||||
uses: ./.github/workflows/packages-cleanup.yml
|
||||
# Only run on push, schedule, or release events
|
||||
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.repository == 'freqtrade/freqtrade'
|
||||
permissions:
|
||||
packages: write
|
||||
with:
|
||||
package_name: 'freqtrade'
|
||||
|
||||
2
.github/workflows/deploy-docs.yml
vendored
2
.github/workflows/deploy-docs.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
persist-credentials: true
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
|
||||
2
.github/workflows/devcontainer-build.yml
vendored
2
.github/workflows/devcontainer-build.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
|
||||
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
|
||||
270
.github/workflows/docker-build.yml
vendored
270
.github/workflows/docker-build.yml
vendored
@@ -20,6 +20,12 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
IMAGE_NAME: "freqtradeorg/freqtrade"
|
||||
CACHE_IMAGE: "freqtradeorg/freqtrade_cache"
|
||||
GHCR_IMAGE_NAME: "ghcr.io/freqtrade/freqtrade"
|
||||
PI_PLATFORM: "linux/arm/v7"
|
||||
|
||||
jobs:
|
||||
deploy-docker:
|
||||
name: "Deploy Docker x64 and armv7l"
|
||||
@@ -31,33 +37,20 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
- name: Set docker tag names
|
||||
id: tags
|
||||
uses: ./.github/actions/docker-tags
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Extract branch name
|
||||
id: extract-branch
|
||||
env:
|
||||
BRANCH_NAME_INPUT: ${{ github.event.inputs.branch_name }}
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
BRANCH_NAME="${BRANCH_NAME_INPUT}"
|
||||
else
|
||||
BRANCH_NAME="${GITHUB_REF##*/}"
|
||||
fi
|
||||
echo "GITHUB_REF='${GITHUB_REF}'"
|
||||
echo "branch=${BRANCH_NAME}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Dockerhub login
|
||||
env:
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
run: |
|
||||
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
|
||||
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||
with:
|
||||
cache-image: false
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
@@ -68,11 +61,86 @@ jobs:
|
||||
env:
|
||||
PLATFORMS: ${{ steps.buildx.outputs.platforms }}
|
||||
|
||||
- name: Build and test and push docker images
|
||||
- name: Build image without cache
|
||||
if: github.event_name == 'schedule'
|
||||
env:
|
||||
BRANCH_NAME: ${{ steps.extract-branch.outputs.branch }}
|
||||
TAG: ${{ steps.tags.outputs.TAG }}
|
||||
run: |
|
||||
build_helpers/publish_docker_multi.sh
|
||||
docker build -t ${CACHE_IMAGE}:${TAG} .
|
||||
|
||||
- name: Build ARMHF image without cache
|
||||
if: github.event_name == 'schedule'
|
||||
env:
|
||||
TAG_PI: ${{ steps.tags.outputs.TAG_PI }}
|
||||
CACHE_TAG_PI: ${{ steps.tags.outputs.CACHE_TAG_PI }}
|
||||
run: |
|
||||
docker buildx build \
|
||||
--cache-to=type=registry,ref=${CACHE_TAG_PI} \
|
||||
-f docker/Dockerfile.armhf \
|
||||
--platform ${PI_PLATFORM} \
|
||||
-t ${IMAGE_NAME}:${TAG_PI} \
|
||||
--push \
|
||||
--provenance=false \
|
||||
.
|
||||
|
||||
- name: Build image with cache
|
||||
if: github.event_name != 'schedule'
|
||||
env:
|
||||
TAG: ${{ steps.tags.outputs.TAG }}
|
||||
run: |
|
||||
docker pull ${IMAGE_NAME}:${TAG} || true
|
||||
docker build --cache-from ${IMAGE_NAME}:${TAG} -t ${CACHE_IMAGE}:${TAG} .
|
||||
|
||||
- name: Build ARMHF image with cache
|
||||
if: github.event_name != 'schedule'
|
||||
# disable provenance due to https://github.com/docker/buildx/issues/1509
|
||||
env:
|
||||
TAG_PI: ${{ steps.tags.outputs.TAG_PI }}
|
||||
CACHE_TAG_PI: ${{ steps.tags.outputs.CACHE_TAG_PI }}
|
||||
run: |
|
||||
docker buildx build \
|
||||
--cache-from=type=registry,ref=${CACHE_TAG_PI} \
|
||||
--cache-to=type=registry,ref=${CACHE_TAG_PI} \
|
||||
-f docker/Dockerfile.armhf \
|
||||
--platform ${PI_PLATFORM} \
|
||||
-t ${IMAGE_NAME}:${TAG_PI} \
|
||||
--push \
|
||||
--provenance=false \
|
||||
.
|
||||
|
||||
- name: Run build for AI images
|
||||
env:
|
||||
TAG: ${{ steps.tags.outputs.TAG }}
|
||||
TAG_PLOT: ${{ steps.tags.outputs.TAG_PLOT }}
|
||||
TAG_FREQAI: ${{ steps.tags.outputs.TAG_FREQAI }}
|
||||
TAG_FREQAI_RL: ${{ steps.tags.outputs.TAG_FREQAI_RL }}
|
||||
run: |
|
||||
docker build --build-arg sourceimage=${CACHE_IMAGE} --build-arg sourcetag=${TAG} -t ${CACHE_IMAGE}:${TAG_PLOT} -f docker/Dockerfile.plot .
|
||||
docker build --build-arg sourceimage=${CACHE_IMAGE} --build-arg sourcetag=${TAG} -t ${CACHE_IMAGE}:${TAG_FREQAI} -f docker/Dockerfile.freqai .
|
||||
docker build --build-arg sourceimage=${CACHE_IMAGE} --build-arg sourcetag=${TAG_FREQAI} -t ${CACHE_IMAGE}:${TAG_FREQAI_RL} -f docker/Dockerfile.freqai_rl .
|
||||
|
||||
|
||||
- name: Run backtest in Docker
|
||||
env:
|
||||
TAG: ${{ steps.tags.outputs.TAG }}
|
||||
run: |
|
||||
docker run --rm -v $(pwd)/tests/testdata/config.tests.json:/freqtrade/config.json:ro -v $(pwd)/tests:/tests ${CACHE_IMAGE}:${TAG} backtesting --datadir /tests/testdata --strategy-path /tests/strategy/strats/ --strategy StrategyTestV3
|
||||
|
||||
- name: Push cache images
|
||||
env:
|
||||
TAG: ${{ steps.tags.outputs.TAG }}
|
||||
TAG_PLOT: ${{ steps.tags.outputs.TAG_PLOT }}
|
||||
TAG_FREQAI: ${{ steps.tags.outputs.TAG_FREQAI }}
|
||||
TAG_FREQAI_RL: ${{ steps.tags.outputs.TAG_FREQAI_RL }}
|
||||
run: |
|
||||
docker push ${CACHE_IMAGE}:$TAG
|
||||
docker push ${CACHE_IMAGE}:$TAG_PLOT
|
||||
docker push ${CACHE_IMAGE}:$TAG_FREQAI
|
||||
docker push ${CACHE_IMAGE}:$TAG_FREQAI_RL
|
||||
|
||||
- name: list Images
|
||||
run: |
|
||||
docker images
|
||||
|
||||
deploy-arm:
|
||||
name: "Deploy Docker ARM64"
|
||||
@@ -88,33 +156,135 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Extract branch name
|
||||
id: extract-branch
|
||||
env:
|
||||
BRANCH_NAME_INPUT: ${{ github.event.inputs.branch_name }}
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
BRANCH_NAME="${BRANCH_NAME_INPUT}"
|
||||
else
|
||||
BRANCH_NAME="${GITHUB_REF##*/}"
|
||||
fi
|
||||
echo "GITHUB_REF='${GITHUB_REF}'"
|
||||
echo "branch=${BRANCH_NAME}" >> "$GITHUB_OUTPUT"
|
||||
- name: Set docker tag names
|
||||
id: tags
|
||||
uses: ./.github/actions/docker-tags
|
||||
|
||||
- name: Dockerhub login
|
||||
env:
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
run: |
|
||||
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and test and push docker images
|
||||
- name: Login to github
|
||||
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build image without cache
|
||||
if: github.event_name == 'schedule'
|
||||
env:
|
||||
BRANCH_NAME: ${{ steps.extract-branch.outputs.branch }}
|
||||
GHCR_USERNAME: ${{ github.actor }}
|
||||
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAG_ARM: ${{ steps.tags.outputs.TAG_ARM }}
|
||||
run: |
|
||||
build_helpers/publish_docker_arm64.sh
|
||||
docker build -t ${IMAGE_NAME}:${TAG_ARM} .
|
||||
|
||||
- name: Build image with cache
|
||||
if: github.event_name != 'schedule'
|
||||
env:
|
||||
TAG_ARM: ${{ steps.tags.outputs.TAG_ARM }}
|
||||
run: |
|
||||
docker pull ${IMAGE_NAME}:${TAG_ARM} || true
|
||||
docker build --cache-from ${IMAGE_NAME}:${TAG_ARM} -t ${CACHE_IMAGE}:${TAG_ARM} .
|
||||
|
||||
- name: Run build for AI images
|
||||
env:
|
||||
TAG_ARM: ${{ steps.tags.outputs.TAG_ARM }}
|
||||
TAG_PLOT_ARM: ${{ steps.tags.outputs.TAG_PLOT_ARM }}
|
||||
TAG_FREQAI_ARM: ${{ steps.tags.outputs.TAG_FREQAI_ARM }}
|
||||
TAG_FREQAI_RL_ARM: ${{ steps.tags.outputs.TAG_FREQAI_RL_ARM }}
|
||||
run: |
|
||||
docker build --build-arg sourceimage=${CACHE_IMAGE} --build-arg sourcetag=${TAG_ARM} -t ${CACHE_IMAGE}:${TAG_PLOT_ARM} -f docker/Dockerfile.plot .
|
||||
docker build --build-arg sourceimage=${CACHE_IMAGE} --build-arg sourcetag=${TAG_ARM} -t ${CACHE_IMAGE}:${TAG_FREQAI_ARM} -f docker/Dockerfile.freqai .
|
||||
docker build --build-arg sourceimage=${CACHE_IMAGE} --build-arg sourcetag=${TAG_FREQAI_ARM} -t ${CACHE_IMAGE}:${TAG_FREQAI_RL_ARM} -f docker/Dockerfile.freqai_rl .
|
||||
|
||||
|
||||
- name: Run backtest in Docker
|
||||
env:
|
||||
TAG_ARM: ${{ steps.tags.outputs.TAG_ARM }}
|
||||
run: |
|
||||
docker run --rm -v $(pwd)/tests/testdata/config.tests.json:/freqtrade/config.json:ro -v $(pwd)/tests:/tests ${CACHE_IMAGE}:${TAG_ARM} backtesting --datadir /tests/testdata --strategy-path /tests/strategy/strats/ --strategy StrategyTestV3
|
||||
|
||||
- name: Docker images
|
||||
run: |
|
||||
docker images
|
||||
|
||||
- name: Push cache images
|
||||
env:
|
||||
TAG_ARM: ${{ steps.tags.outputs.TAG_ARM }}
|
||||
TAG_PLOT_ARM: ${{ steps.tags.outputs.TAG_PLOT_ARM }}
|
||||
TAG_FREQAI_ARM: ${{ steps.tags.outputs.TAG_FREQAI_ARM }}
|
||||
TAG_FREQAI_RL_ARM: ${{ steps.tags.outputs.TAG_FREQAI_RL_ARM }}
|
||||
run: |
|
||||
docker push ${CACHE_IMAGE}:$TAG_PLOT_ARM
|
||||
docker push ${CACHE_IMAGE}:$TAG_FREQAI_ARM
|
||||
docker push ${CACHE_IMAGE}:$TAG_FREQAI_RL_ARM
|
||||
docker push ${CACHE_IMAGE}:$TAG_ARM
|
||||
|
||||
- name: Create manifests
|
||||
env:
|
||||
TAG_ARM: ${{ steps.tags.outputs.TAG_ARM }}
|
||||
TAG: ${{ steps.tags.outputs.TAG }}
|
||||
TAG_PI: ${{ steps.tags.outputs.TAG_PI }}
|
||||
run: |
|
||||
docker buildx imagetools create \
|
||||
--tag ${IMAGE_NAME}:${TAG} \
|
||||
--tag ${GHCR_IMAGE_NAME}:${TAG} \
|
||||
${CACHE_IMAGE}:${TAG} ${CACHE_IMAGE}:${TAG_ARM} ${IMAGE_NAME}:${TAG_PI}
|
||||
|
||||
- name: Create multiarch image - Plot
|
||||
env:
|
||||
TAG_PLOT: ${{ steps.tags.outputs.TAG_PLOT }}
|
||||
TAG_PLOT_ARM: ${{ steps.tags.outputs.TAG_PLOT_ARM }}
|
||||
run: |
|
||||
docker buildx imagetools create \
|
||||
--tag ${IMAGE_NAME}:${TAG_PLOT} \
|
||||
--tag ${GHCR_IMAGE_NAME}:${TAG_PLOT} \
|
||||
${CACHE_IMAGE}:${TAG_PLOT} ${CACHE_IMAGE}:${TAG_PLOT_ARM}
|
||||
|
||||
- name: Create multiarch image - FreqAI
|
||||
env:
|
||||
TAG_FREQAI: ${{ steps.tags.outputs.TAG_FREQAI }}
|
||||
TAG_FREQAI_ARM: ${{ steps.tags.outputs.TAG_FREQAI_ARM }}
|
||||
run: |
|
||||
docker buildx imagetools create \
|
||||
--tag ${IMAGE_NAME}:${TAG_FREQAI} \
|
||||
--tag ${GHCR_IMAGE_NAME}:${TAG_FREQAI} \
|
||||
${CACHE_IMAGE}:${TAG_FREQAI} ${CACHE_IMAGE}:${TAG_FREQAI_ARM}
|
||||
|
||||
- name: Create multiarch image - FreqAI RL
|
||||
env:
|
||||
TAG_FREQAI_RL: ${{ steps.tags.outputs.TAG_FREQAI_RL }}
|
||||
TAG_FREQAI_RL_ARM: ${{ steps.tags.outputs.TAG_FREQAI_RL_ARM }}
|
||||
TAG_FREQAI_TORCH: ${{ steps.tags.outputs.TAG_FREQAI_TORCH }}
|
||||
run: |
|
||||
# Create special Torch tag - which is identical to the RL tag.
|
||||
docker buildx imagetools create \
|
||||
--tag ${IMAGE_NAME}:${TAG_FREQAI_RL} \
|
||||
--tag ${GHCR_IMAGE_NAME}:${TAG_FREQAI_RL} \
|
||||
--tag ${IMAGE_NAME}:${TAG_FREQAI_TORCH} \
|
||||
--tag ${GHCR_IMAGE_NAME}:${TAG_FREQAI_TORCH} \
|
||||
${CACHE_IMAGE}:${TAG_FREQAI_RL} ${CACHE_IMAGE}:${TAG_FREQAI_RL_ARM}
|
||||
|
||||
- name: Tag latest
|
||||
if: env.TAG == 'develop'
|
||||
env:
|
||||
TAG: ${{ steps.tags.outputs.TAG }}
|
||||
run: |
|
||||
# Tag image as latest
|
||||
docker buildx imagetools create \
|
||||
--tag ${GHCR_IMAGE_NAME}:${TAG} \
|
||||
--tag ${GHCR_IMAGE_NAME}:latest \
|
||||
${IMAGE_NAME}:${TAG}
|
||||
|
||||
- name: Docker images
|
||||
run: |
|
||||
docker images
|
||||
|
||||
- name: Image cleanup
|
||||
run: |
|
||||
docker image prune -a --force --filter "until=24h"
|
||||
|
||||
- name: Discord notification
|
||||
uses: rjstone/discord-webhook-notify@c2597273488aeda841dd1e891321952b51f7996f #v2.2.1
|
||||
|
||||
2
.github/workflows/docker-update-readme.yml
vendored
2
.github/workflows/docker-update-readme.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Docker Hub Description
|
||||
uses: peter-evans/dockerhub-description@432a30c9e07499fd01da9f8a49f0faf9e0ca5b77 # v4.0.2
|
||||
uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5.0.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
46
.github/workflows/packages-cleanup.yml
vendored
Normal file
46
.github/workflows/packages-cleanup.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Cleanup Packages
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
package_name:
|
||||
description: 'Package name to clean up'
|
||||
required: false
|
||||
default: 'freqtrade'
|
||||
type: string
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
package_name:
|
||||
description: 'Package name to clean up'
|
||||
required: false
|
||||
default: 'freqtrade'
|
||||
type: choice
|
||||
options:
|
||||
- 'freqtrade'
|
||||
- 'freqtrade-devcontainer'
|
||||
delete-untagged:
|
||||
description: 'Whether to delete only untagged images'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
|
||||
env:
|
||||
PACKAGE_NAME: "freqtrade"
|
||||
|
||||
jobs:
|
||||
deploy-docker:
|
||||
name: "Delete Packages"
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.repository == 'freqtrade/freqtrade'
|
||||
permissions:
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: "Delete untagged Package Versions"
|
||||
uses: actions/delete-package-versions@v5
|
||||
with:
|
||||
package-name: ${{ inputs.package_name || env.PACKAGE_NAME }}
|
||||
package-type: 'container'
|
||||
min-versions-to-keep: 10
|
||||
delete-only-untagged-versions: ${{ inputs.delete-untagged || 'true' }}
|
||||
2
.github/workflows/pre-commit-update.yml
vendored
2
.github/workflows/pre-commit-update.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
|
||||
5
.github/workflows/zizmor.yml
vendored
5
.github/workflows/zizmor.yml
vendored
@@ -14,6 +14,7 @@ permissions: {}
|
||||
|
||||
jobs:
|
||||
zizmor:
|
||||
name: Run zizmor 🌈
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write
|
||||
@@ -21,9 +22,9 @@ jobs:
|
||||
# actions: read # only needed for private repos
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v4.2.2
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Run zizmor 🌈
|
||||
uses: zizmorcore/zizmor-action@5ca5fc7a4779c5263a3ffa0e1f693009994446d1 # v0.1.2
|
||||
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 # v0.2.0
|
||||
|
||||
@@ -21,22 +21,22 @@ repos:
|
||||
# stages: [push]
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: "v1.17.1"
|
||||
rev: "v1.18.2"
|
||||
hooks:
|
||||
- id: mypy
|
||||
exclude: build_helpers
|
||||
additional_dependencies:
|
||||
- types-cachetools==6.1.0.20250717
|
||||
- types-cachetools==6.2.0.20251022
|
||||
- types-filelock==3.2.7
|
||||
- types-requests==2.32.4.20250809
|
||||
- types-requests==2.32.4.20250913
|
||||
- types-tabulate==0.9.0.20241207
|
||||
- types-python-dateutil==2.9.0.20250822
|
||||
- scipy-stubs==1.16.1.1
|
||||
- SQLAlchemy==2.0.43
|
||||
- types-python-dateutil==2.9.0.20251115
|
||||
- scipy-stubs==1.16.3.0
|
||||
- SQLAlchemy==2.0.44
|
||||
# stages: [push]
|
||||
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: "6.0.1"
|
||||
rev: "7.0.0"
|
||||
hooks:
|
||||
- id: isort
|
||||
name: isort (python)
|
||||
@@ -44,7 +44,7 @@ repos:
|
||||
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: 'v0.12.10'
|
||||
rev: 'v0.14.6'
|
||||
hooks:
|
||||
- id: ruff
|
||||
- id: ruff-format
|
||||
@@ -70,7 +70,7 @@ repos:
|
||||
)$
|
||||
|
||||
- repo: https://github.com/stefmolin/exif-stripper
|
||||
rev: 1.1.0
|
||||
rev: 1.2.0
|
||||
hooks:
|
||||
- id: strip-exif
|
||||
|
||||
@@ -83,6 +83,6 @@ repos:
|
||||
|
||||
# Ensure github actions remain safe
|
||||
- repo: https://github.com/woodruffw/zizmor-pre-commit
|
||||
rev: v1.12.1
|
||||
rev: v1.16.3
|
||||
hooks:
|
||||
- id: zizmor
|
||||
|
||||
@@ -9,8 +9,10 @@ Issues labeled [good first issue](https://github.com/freqtrade/freqtrade/labels/
|
||||
Few pointers for contributions:
|
||||
|
||||
- Create your PR against the `develop` branch, not `stable`.
|
||||
- New features need to contain unit tests, must conform to PEP8 (max-line-length = 100) and should be documented with the introduction PR.
|
||||
- PR's can be declared as `[WIP]` - which signify Work in Progress Pull Requests (which are not finished).
|
||||
- Stick to english in both commit messages, PR descriptions and code comments and variable names.
|
||||
- New features need to contain unit tests, must pass CI (run pre-commit and pytest to get an early feedback) and should be documented with the introduction PR.
|
||||
- PR's can be declared as draft - signaling Work in Progress for Pull Requests (which are not finished). We'll still aim to provide feedback on draft PR's in a timely manner.
|
||||
- If you're using AI for your PR, please both mention it in the PR description and do a thorough review of the generated code. The final responsibility for the code with the PR author, not with the AI.
|
||||
|
||||
If you are unsure, discuss the feature on our [discord server](https://discord.gg/p7nuUNVfP7) or in a [issue](https://github.com/freqtrade/freqtrade/issues) before a Pull Request.
|
||||
|
||||
@@ -43,43 +45,43 @@ pytest tests/test_<file_name>.py
|
||||
pytest tests/test_<file_name>.py::test_<method_name>
|
||||
```
|
||||
|
||||
### 2. Test if your code is PEP8 compliant
|
||||
### 2. Test if your code corresponds to our style guide
|
||||
|
||||
#### Run Ruff
|
||||
We receive a lot of code that fails preliminary CI checks.
|
||||
To help with that, we encourage contributors to install the git pre-commit hook that will let you know immediately when you try to commit code that fails these checks.
|
||||
|
||||
You can manually run pre-commit with `pre-commit run -a` - or install the git hook with `pre-commit install` to have it run automatically on each commit.
|
||||
|
||||
Running `pre-commit run -a` will run all checks, including `ruff`, `mypy` and `codespell` (among others).
|
||||
|
||||
#### Additional styles applied
|
||||
|
||||
- Have docstrings on all public methods
|
||||
- Use double-quotes for docstrings
|
||||
- Multiline docstrings should be indented to the level of the first quote
|
||||
- Doc-strings should follow the reST format (`:param xxx: ...`, `:return: ...`, `:raises KeyError: ...`)
|
||||
|
||||
#### Manually run the individual checks
|
||||
|
||||
The following sections describe how to run the individual checks that are running as part of the pre-commit hook.
|
||||
|
||||
##### Run ruff
|
||||
|
||||
Check your code with ruff to ensure that it follows the style guide.
|
||||
|
||||
```bash
|
||||
ruff check .
|
||||
ruff format .
|
||||
```
|
||||
|
||||
We receive a lot of code that fails the `ruff` checks.
|
||||
To help with that, we encourage you to install the git pre-commit
|
||||
hook that will warn you when you try to commit code that fails these checks.
|
||||
##### Run mypy
|
||||
|
||||
you can manually run pre-commit with `pre-commit run -a`.
|
||||
|
||||
##### Additional styles applied
|
||||
|
||||
* Have docstrings on all public methods
|
||||
* Use double-quotes for docstrings
|
||||
* Multiline docstrings should be indented to the level of the first quote
|
||||
* Doc-strings should follow the reST format (`:param xxx: ...`, `:return: ...`, `:raises KeyError: ... `)
|
||||
|
||||
### 3. Test if all type-hints are correct
|
||||
|
||||
#### Run mypy
|
||||
Check your code with mypy to ensure that it follows the type-hinting rules.
|
||||
|
||||
``` bash
|
||||
mypy freqtrade
|
||||
```
|
||||
|
||||
### 4. Ensure formatting is correct
|
||||
|
||||
#### Run ruff
|
||||
|
||||
``` bash
|
||||
ruff format .
|
||||
```
|
||||
|
||||
## (Core)-Committer Guide
|
||||
|
||||
### Process: Pull Requests
|
||||
@@ -118,18 +120,18 @@ Exceptions:
|
||||
- Ensure cross-platform compatibility for every change that's accepted. Windows, Mac & Linux.
|
||||
- Ensure no malicious code is introduced into the core code.
|
||||
- Create issues for any major changes and enhancements that you wish to make. Discuss things transparently and get community feedback.
|
||||
- Keep feature versions as small as possible, preferably one new feature per version.
|
||||
- Keep feature PR's as small as possible, preferably one new feature per PR.
|
||||
- Be welcoming to newcomers and encourage diverse new contributors from all backgrounds. See the Python Community Code of Conduct (https://www.python.org/psf/codeofconduct/).
|
||||
|
||||
### Becoming a Committer
|
||||
|
||||
Contributors may be given commit privileges. Preference will be given to those with:
|
||||
|
||||
1. Past contributions to Freqtrade and other related open-source projects. Contributions to Freqtrade include both code (both accepted and pending) and friendly participation in the issue tracker and Pull request reviews. Both quantity and quality are considered.
|
||||
1. Past contributions to Freqtrade and other related open source projects. Contributions to Freqtrade include both code (both accepted and pending) and friendly participation in the issue tracker and Pull request reviews. Both quantity and quality are considered.
|
||||
1. A coding style that the other core committers find simple, minimal, and clean.
|
||||
1. Access to resources for cross-platform development and testing.
|
||||
1. Time to devote to the project regularly.
|
||||
|
||||
Being a Committer does not grant write permission on `develop` or `stable` for security reasons (Users trust Freqtrade with their Exchange API keys).
|
||||
Being a Committer does not automatically grant write permission on `develop` or `stable` for security reasons (Users trust Freqtrade with their Exchange API keys).
|
||||
|
||||
After being Committer for some time, a Committer may be named Core Committer and given full repository access.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM python:3.13.7-slim-bookworm AS base
|
||||
FROM python:3.13.8-slim-bookworm AS base
|
||||
|
||||
# Setup env
|
||||
ENV LANG=C.UTF-8
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 
|
||||
|
||||
[](https://github.com/freqtrade/freqtrade/actions/)
|
||||
[](https://github.com/freqtrade/freqtrade/actions/workflows/ci.yml)
|
||||
[](https://doi.org/10.21105/joss.04864)
|
||||
[](https://coveralls.io/github/freqtrade/freqtrade?branch=develop)
|
||||
[](https://www.freqtrade.io)
|
||||
@@ -27,8 +27,9 @@ hesitate to read the source code and understand the mechanism of this bot.
|
||||
Please read the [exchange specific notes](docs/exchanges.md) to learn about eventual, special configurations needed for each exchange.
|
||||
|
||||
- [X] [Binance](https://www.binance.com/)
|
||||
- [X] [Bitmart](https://bitmart.com/)
|
||||
- [X] [BingX](https://bingx.com/invite/0EM9RX)
|
||||
- [X] [Bitget](https://www.bitget.com/)
|
||||
- [X] [Bitmart](https://bitmart.com/)
|
||||
- [X] [Bybit](https://bybit.com/)
|
||||
- [X] [Gate.io](https://www.gate.io/ref/6266643)
|
||||
- [X] [HTX](https://www.htx.com/)
|
||||
@@ -41,6 +42,7 @@ Please read the [exchange specific notes](docs/exchanges.md) to learn about even
|
||||
### Supported Futures Exchanges (experimental)
|
||||
|
||||
- [X] [Binance](https://www.binance.com/)
|
||||
- [X] [Bitget](https://www.bitget.com/)
|
||||
- [X] [Gate.io](https://www.gate.io/ref/6266643)
|
||||
- [X] [Hyperliquid](https://hyperliquid.xyz/) (A decentralized exchange, or DEX)
|
||||
- [X] [OKX](https://okx.com/)
|
||||
|
||||
@@ -1,53 +1,71 @@
|
||||
import subprocess # noqa: S404, RUF100
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
subcommands = [
|
||||
"trade",
|
||||
"create-userdir",
|
||||
"new-config",
|
||||
"show-config",
|
||||
"new-strategy",
|
||||
"download-data",
|
||||
"convert-data",
|
||||
"convert-trade-data",
|
||||
"trades-to-ohlcv",
|
||||
"list-data",
|
||||
"backtesting",
|
||||
"backtesting-show",
|
||||
"backtesting-analysis",
|
||||
"edge",
|
||||
"hyperopt",
|
||||
"hyperopt-list",
|
||||
"hyperopt-show",
|
||||
"list-exchanges",
|
||||
"list-markets",
|
||||
"list-pairs",
|
||||
"list-strategies",
|
||||
"list-hyperoptloss",
|
||||
"list-freqaimodels",
|
||||
"list-timeframes",
|
||||
"show-trades",
|
||||
"test-pairlist",
|
||||
"convert-db",
|
||||
"install-ui",
|
||||
"plot-dataframe",
|
||||
"plot-profit",
|
||||
"webserver",
|
||||
"strategy-updater",
|
||||
"lookahead-analysis",
|
||||
"recursive-analysis",
|
||||
]
|
||||
|
||||
result = subprocess.run(["freqtrade", "--help"], capture_output=True, text=True)
|
||||
|
||||
with Path("docs/commands/main.md").open("w") as f:
|
||||
f.write(f"```\n{result.stdout}\n```\n")
|
||||
def _write_partial_file(filename: str, content: str):
|
||||
with Path(filename).open("w") as f:
|
||||
f.write(f"``` output\n{content}\n```\n")
|
||||
|
||||
|
||||
for command in subcommands:
|
||||
print(f"Running for {command}")
|
||||
result = subprocess.run(["freqtrade", command, "--help"], capture_output=True, text=True)
|
||||
def extract_command_partials():
|
||||
subcommands = [
|
||||
"trade",
|
||||
"create-userdir",
|
||||
"new-config",
|
||||
"show-config",
|
||||
"new-strategy",
|
||||
"download-data",
|
||||
"convert-data",
|
||||
"convert-trade-data",
|
||||
"trades-to-ohlcv",
|
||||
"list-data",
|
||||
"backtesting",
|
||||
"backtesting-show",
|
||||
"backtesting-analysis",
|
||||
"edge",
|
||||
"hyperopt",
|
||||
"hyperopt-list",
|
||||
"hyperopt-show",
|
||||
"list-exchanges",
|
||||
"list-markets",
|
||||
"list-pairs",
|
||||
"list-strategies",
|
||||
"list-hyperoptloss",
|
||||
"list-freqaimodels",
|
||||
"list-timeframes",
|
||||
"show-trades",
|
||||
"test-pairlist",
|
||||
"convert-db",
|
||||
"install-ui",
|
||||
"plot-dataframe",
|
||||
"plot-profit",
|
||||
"webserver",
|
||||
"strategy-updater",
|
||||
"lookahead-analysis",
|
||||
"recursive-analysis",
|
||||
]
|
||||
|
||||
with Path(f"docs/commands/{command}.md").open("w") as f:
|
||||
f.write(f"```\n{result.stdout}\n```\n")
|
||||
result = subprocess.run(["freqtrade", "--help"], capture_output=True, text=True)
|
||||
|
||||
_write_partial_file("docs/commands/main.md", result.stdout)
|
||||
|
||||
for command in subcommands:
|
||||
print(f"Running for {command}")
|
||||
result = subprocess.run(["freqtrade", command, "--help"], capture_output=True, text=True)
|
||||
|
||||
_write_partial_file(f"docs/commands/{command}.md", result.stdout)
|
||||
|
||||
print("Running for freqtrade-client")
|
||||
result_client = subprocess.run(["freqtrade-client", "--show"], capture_output=True, text=True)
|
||||
|
||||
_write_partial_file("docs/commands/freqtrade-client.md", result_client.stdout)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if sys.version_info < (3, 13): # pragma: no cover
|
||||
sys.exit(
|
||||
"argparse output changed in Python 3.13+. "
|
||||
"To keep command partials up to date, please run this script with Python 3.13+."
|
||||
)
|
||||
extract_command_partials()
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Use BuildKit, otherwise building on ARM fails
|
||||
export DOCKER_BUILDKIT=1
|
||||
|
||||
IMAGE_NAME=freqtradeorg/freqtrade
|
||||
CACHE_IMAGE=freqtradeorg/freqtrade_cache
|
||||
GHCR_IMAGE_NAME=ghcr.io/freqtrade/freqtrade
|
||||
|
||||
# Replace / with _ to create a valid tag
|
||||
TAG=$(echo "${BRANCH_NAME}" | sed -e "s/\//_/g")
|
||||
TAG_PLOT=${TAG}_plot
|
||||
TAG_FREQAI=${TAG}_freqai
|
||||
TAG_FREQAI_RL=${TAG_FREQAI}rl
|
||||
TAG_FREQAI_TORCH=${TAG_FREQAI}torch
|
||||
TAG_PI="${TAG}_pi"
|
||||
|
||||
TAG_ARM=${TAG}_arm
|
||||
TAG_PLOT_ARM=${TAG_PLOT}_arm
|
||||
TAG_FREQAI_ARM=${TAG_FREQAI}_arm
|
||||
TAG_FREQAI_RL_ARM=${TAG_FREQAI_RL}_arm
|
||||
|
||||
echo "Running for ${TAG}"
|
||||
|
||||
# Add commit and commit_message to docker container
|
||||
echo "${GITHUB_SHA}" > freqtrade_commit
|
||||
|
||||
if [ "${GITHUB_EVENT_NAME}" = "schedule" ]; then
|
||||
echo "event ${GITHUB_EVENT_NAME}: full rebuild - skipping cache"
|
||||
# Build regular image
|
||||
docker build -t freqtrade:${TAG_ARM} .
|
||||
|
||||
else
|
||||
echo "event ${GITHUB_EVENT_NAME}: building with cache"
|
||||
# Build regular image
|
||||
docker pull ${IMAGE_NAME}:${TAG_ARM}
|
||||
docker build --cache-from ${IMAGE_NAME}:${TAG_ARM} -t freqtrade:${TAG_ARM} .
|
||||
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "failed building multiarch images"
|
||||
return 1
|
||||
fi
|
||||
|
||||
docker build --build-arg sourceimage=freqtrade --build-arg sourcetag=${TAG_ARM} -t freqtrade:${TAG_PLOT_ARM} -f docker/Dockerfile.plot .
|
||||
docker build --build-arg sourceimage=freqtrade --build-arg sourcetag=${TAG_ARM} -t freqtrade:${TAG_FREQAI_ARM} -f docker/Dockerfile.freqai .
|
||||
docker build --build-arg sourceimage=freqtrade --build-arg sourcetag=${TAG_FREQAI_ARM} -t freqtrade:${TAG_FREQAI_RL_ARM} -f docker/Dockerfile.freqai_rl .
|
||||
|
||||
# Tag image for upload and next build step
|
||||
docker tag freqtrade:$TAG_ARM ${CACHE_IMAGE}:$TAG_ARM
|
||||
docker tag freqtrade:$TAG_PLOT_ARM ${CACHE_IMAGE}:$TAG_PLOT_ARM
|
||||
docker tag freqtrade:$TAG_FREQAI_ARM ${CACHE_IMAGE}:$TAG_FREQAI_ARM
|
||||
docker tag freqtrade:$TAG_FREQAI_RL_ARM ${CACHE_IMAGE}:$TAG_FREQAI_RL_ARM
|
||||
|
||||
# Run backtest
|
||||
docker run --rm -v $(pwd)/tests/testdata/config.tests.json:/freqtrade/config.json:ro -v $(pwd)/tests:/tests freqtrade:${TAG_ARM} backtesting --datadir /tests/testdata --strategy-path /tests/strategy/strats/ --strategy StrategyTestV3
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "failed running backtest"
|
||||
return 1
|
||||
fi
|
||||
|
||||
docker images
|
||||
|
||||
docker push ${CACHE_IMAGE}:$TAG_PLOT_ARM
|
||||
docker push ${CACHE_IMAGE}:$TAG_FREQAI_ARM
|
||||
docker push ${CACHE_IMAGE}:$TAG_FREQAI_RL_ARM
|
||||
docker push ${CACHE_IMAGE}:$TAG_ARM
|
||||
|
||||
# Create multi-arch image
|
||||
# Make sure that all images contained here are pushed to github first.
|
||||
# Otherwise installation might fail.
|
||||
echo "create manifests"
|
||||
|
||||
docker manifest create ${IMAGE_NAME}:${TAG} ${CACHE_IMAGE}:${TAG} ${CACHE_IMAGE}:${TAG_ARM} ${IMAGE_NAME}:${TAG_PI}
|
||||
docker manifest push -p ${IMAGE_NAME}:${TAG}
|
||||
|
||||
docker manifest create ${IMAGE_NAME}:${TAG_PLOT} ${CACHE_IMAGE}:${TAG_PLOT} ${CACHE_IMAGE}:${TAG_PLOT_ARM}
|
||||
docker manifest push -p ${IMAGE_NAME}:${TAG_PLOT}
|
||||
|
||||
docker manifest create ${IMAGE_NAME}:${TAG_FREQAI} ${CACHE_IMAGE}:${TAG_FREQAI} ${CACHE_IMAGE}:${TAG_FREQAI_ARM}
|
||||
docker manifest push -p ${IMAGE_NAME}:${TAG_FREQAI}
|
||||
|
||||
docker manifest create ${IMAGE_NAME}:${TAG_FREQAI_RL} ${CACHE_IMAGE}:${TAG_FREQAI_RL} ${CACHE_IMAGE}:${TAG_FREQAI_RL_ARM}
|
||||
docker manifest push -p ${IMAGE_NAME}:${TAG_FREQAI_RL}
|
||||
|
||||
# Create special Torch tag - which is identical to the RL tag.
|
||||
docker manifest create ${IMAGE_NAME}:${TAG_FREQAI_TORCH} ${CACHE_IMAGE}:${TAG_FREQAI_RL} ${CACHE_IMAGE}:${TAG_FREQAI_RL_ARM}
|
||||
docker manifest push -p ${IMAGE_NAME}:${TAG_FREQAI_TORCH}
|
||||
|
||||
# copy images to ghcr.io
|
||||
|
||||
alias crane="docker run --rm -i -v $(pwd)/.crane:/home/nonroot/.docker/ gcr.io/go-containerregistry/crane"
|
||||
mkdir .crane
|
||||
chmod a+rwx .crane
|
||||
|
||||
echo "${GHCR_TOKEN}" | crane auth login ghcr.io -u "${GHCR_USERNAME}" --password-stdin
|
||||
|
||||
crane copy ${IMAGE_NAME}:${TAG_FREQAI_RL} ${GHCR_IMAGE_NAME}:${TAG_FREQAI_RL}
|
||||
crane copy ${IMAGE_NAME}:${TAG_FREQAI_RL} ${GHCR_IMAGE_NAME}:${TAG_FREQAI_TORCH}
|
||||
crane copy ${IMAGE_NAME}:${TAG_FREQAI} ${GHCR_IMAGE_NAME}:${TAG_FREQAI}
|
||||
crane copy ${IMAGE_NAME}:${TAG_PLOT} ${GHCR_IMAGE_NAME}:${TAG_PLOT}
|
||||
crane copy ${IMAGE_NAME}:${TAG} ${GHCR_IMAGE_NAME}:${TAG}
|
||||
|
||||
# Tag as latest for develop builds
|
||||
if [ "${TAG}" = "develop" ]; then
|
||||
echo 'Tagging image as latest'
|
||||
docker manifest create ${IMAGE_NAME}:latest ${CACHE_IMAGE}:${TAG_ARM} ${IMAGE_NAME}:${TAG_PI} ${CACHE_IMAGE}:${TAG}
|
||||
docker manifest push -p ${IMAGE_NAME}:latest
|
||||
|
||||
crane copy ${IMAGE_NAME}:latest ${GHCR_IMAGE_NAME}:latest
|
||||
fi
|
||||
|
||||
docker images
|
||||
rm -rf .crane
|
||||
|
||||
# Cleanup old images from arm64 node.
|
||||
docker image prune -a --force --filter "until=24h"
|
||||
@@ -1,89 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# The below assumes a correctly setup docker buildx environment
|
||||
|
||||
IMAGE_NAME=freqtradeorg/freqtrade
|
||||
CACHE_IMAGE=freqtradeorg/freqtrade_cache
|
||||
# Replace / with _ to create a valid tag
|
||||
TAG=$(echo "${BRANCH_NAME}" | sed -e "s/\//_/g")
|
||||
TAG_PLOT=${TAG}_plot
|
||||
TAG_FREQAI=${TAG}_freqai
|
||||
TAG_FREQAI_RL=${TAG_FREQAI}rl
|
||||
TAG_PI="${TAG}_pi"
|
||||
|
||||
PI_PLATFORM="linux/arm/v7"
|
||||
echo "Running for ${TAG}"
|
||||
CACHE_TAG=${CACHE_IMAGE}:${TAG_PI}_cache
|
||||
|
||||
# Add commit and commit_message to docker container
|
||||
echo "${GITHUB_SHA}" > freqtrade_commit
|
||||
|
||||
if [ "${GITHUB_EVENT_NAME}" = "schedule" ]; then
|
||||
echo "event ${GITHUB_EVENT_NAME}: full rebuild - skipping cache"
|
||||
# Build regular image
|
||||
docker build -t freqtrade:${TAG} .
|
||||
# Build PI image
|
||||
docker buildx build \
|
||||
--cache-to=type=registry,ref=${CACHE_TAG} \
|
||||
-f docker/Dockerfile.armhf \
|
||||
--platform ${PI_PLATFORM} \
|
||||
-t ${IMAGE_NAME}:${TAG_PI} \
|
||||
--push \
|
||||
--provenance=false \
|
||||
.
|
||||
else
|
||||
echo "event ${GITHUB_EVENT_NAME}: building with cache"
|
||||
# Build regular image
|
||||
docker pull ${IMAGE_NAME}:${TAG}
|
||||
docker build --cache-from ${IMAGE_NAME}:${TAG} -t freqtrade:${TAG} .
|
||||
|
||||
# Pull last build to avoid rebuilding the whole image
|
||||
# docker pull --platform ${PI_PLATFORM} ${IMAGE_NAME}:${TAG}
|
||||
# disable provenance due to https://github.com/docker/buildx/issues/1509
|
||||
docker buildx build \
|
||||
--cache-from=type=registry,ref=${CACHE_TAG} \
|
||||
--cache-to=type=registry,ref=${CACHE_TAG} \
|
||||
-f docker/Dockerfile.armhf \
|
||||
--platform ${PI_PLATFORM} \
|
||||
-t ${IMAGE_NAME}:${TAG_PI} \
|
||||
--push \
|
||||
--provenance=false \
|
||||
.
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "failed building multiarch images"
|
||||
return 1
|
||||
fi
|
||||
# Tag image for upload and next build step
|
||||
docker tag freqtrade:$TAG ${CACHE_IMAGE}:$TAG
|
||||
|
||||
docker build --build-arg sourceimage=freqtrade --build-arg sourcetag=${TAG} -t freqtrade:${TAG_PLOT} -f docker/Dockerfile.plot .
|
||||
docker build --build-arg sourceimage=freqtrade --build-arg sourcetag=${TAG} -t freqtrade:${TAG_FREQAI} -f docker/Dockerfile.freqai .
|
||||
docker build --build-arg sourceimage=freqtrade --build-arg sourcetag=${TAG_FREQAI} -t freqtrade:${TAG_FREQAI_RL} -f docker/Dockerfile.freqai_rl .
|
||||
|
||||
docker tag freqtrade:$TAG_PLOT ${CACHE_IMAGE}:$TAG_PLOT
|
||||
docker tag freqtrade:$TAG_FREQAI ${CACHE_IMAGE}:$TAG_FREQAI
|
||||
docker tag freqtrade:$TAG_FREQAI_RL ${CACHE_IMAGE}:$TAG_FREQAI_RL
|
||||
|
||||
# Run backtest
|
||||
docker run --rm -v $(pwd)/tests/testdata/config.tests.json:/freqtrade/config.json:ro -v $(pwd)/tests:/tests freqtrade:${TAG} backtesting --datadir /tests/testdata --strategy-path /tests/strategy/strats/ --strategy StrategyTestV3
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "failed running backtest"
|
||||
return 1
|
||||
fi
|
||||
|
||||
docker images
|
||||
|
||||
docker push ${CACHE_IMAGE}:$TAG
|
||||
docker push ${CACHE_IMAGE}:$TAG_PLOT
|
||||
docker push ${CACHE_IMAGE}:$TAG_FREQAI
|
||||
docker push ${CACHE_IMAGE}:$TAG_FREQAI_RL
|
||||
|
||||
docker images
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "failed building image"
|
||||
return 1
|
||||
fi
|
||||
Binary file not shown.
@@ -268,10 +268,73 @@
|
||||
"day",
|
||||
"week",
|
||||
"month",
|
||||
"year"
|
||||
"year",
|
||||
"weekday"
|
||||
]
|
||||
}
|
||||
},
|
||||
"backtest_cache": {
|
||||
"description": "Load a cached backtest result no older than specified age.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"day",
|
||||
"week",
|
||||
"month"
|
||||
]
|
||||
},
|
||||
"hyperopt_path": {
|
||||
"description": "Specify additional lookup path for Hyperopt Loss functions.",
|
||||
"type": "string"
|
||||
},
|
||||
"epochs": {
|
||||
"description": "Number of training epochs for Hyperopt.",
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"early_stop": {
|
||||
"description": "Early stop hyperopt if no improvement after <epochs>. Set to 0 to disable.",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"spaces": {
|
||||
"description": "Hyperopt parameter spaces to optimize. Default is the default set andincludes all spaces except for 'trailing', 'protection', and 'trades'.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"analyze_per_epoch": {
|
||||
"description": "Perform analysis after each epoch in Hyperopt.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"print_all": {
|
||||
"description": "Print all hyperopt trials, not just the best ones.",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"hyperopt_jobs": {
|
||||
"description": "The number of concurrently running jobs for hyperoptimization (hyperopt worker processes). If -1 (default), all CPUs are used, for -2, all CPUs but one are used, etc. If 1 is given, no parallel computing is used.",
|
||||
"type": "integer",
|
||||
"default": -1
|
||||
},
|
||||
"hyperopt_random_state": {
|
||||
"description": "Random state for hyperopt trials.",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"hyperopt_min_trades": {
|
||||
"description": "Minimum number of trades per epoch for hyperopt.",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"hyperopt_loss": {
|
||||
"description": "The class name of the hyperopt loss function class (IHyperOptLoss). Different functions can generate completely different results, since the target for optimization is different. Built-in Hyperopt-loss-functions are: ShortTradeDurHyperOptLoss, OnlyProfitHyperOptLoss, SharpeHyperOptLoss, SharpeHyperOptLossDaily, SortinoHyperOptLoss, SortinoHyperOptLossDaily, CalmarHyperOptLoss, MaxDrawDownHyperOptLoss, MaxDrawDownRelativeHyperOptLoss, MaxDrawDownPerPairHyperOptLoss, ProfitDrawDownHyperOptLoss, MultiMetricHyperOptLoss",
|
||||
"type": "string"
|
||||
},
|
||||
"bot_name": {
|
||||
"description": "Name of the trading bot. Passed via API to a client.",
|
||||
"type": "string"
|
||||
@@ -587,6 +650,7 @@
|
||||
"RemotePairList",
|
||||
"MarketCapPairList",
|
||||
"AgeFilter",
|
||||
"DelistFilter",
|
||||
"FullTradesFilter",
|
||||
"OffsetFilter",
|
||||
"PerformanceFilter",
|
||||
@@ -1460,6 +1524,11 @@
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"override_exchange_check": {
|
||||
"description": "Override the exchange check to force FreqAI to use exchanges that may not have enough historic data. Turn this to True if you know your FreqAI model and strategy do not require historical data.",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"feature_parameters": {
|
||||
"description": "The parameters used to engineer the feature set",
|
||||
"type": "object",
|
||||
|
||||
Binary file not shown.
BIN
build_helpers/ta_lib-0.6.8-cp311-cp311-manylinux_2_31_armv7l.whl
Normal file
BIN
build_helpers/ta_lib-0.6.8-cp311-cp311-manylinux_2_31_armv7l.whl
Normal file
Binary file not shown.
BIN
build_helpers/ta_lib-0.6.8-cp313-cp313-manylinux_2_31_armv7l.whl
Normal file
BIN
build_helpers/ta_lib-0.6.8-cp313-cp313-manylinux_2_31_armv7l.whl
Normal file
Binary file not shown.
@@ -25,10 +25,10 @@
|
||||
"trading_mode": "spot",
|
||||
"margin_mode": "",
|
||||
"minimal_roi": {
|
||||
"40": 0.0,
|
||||
"30": 0.01,
|
||||
"20": 0.02,
|
||||
"0": 0.04
|
||||
"40": 0.0,
|
||||
"30": 0.01,
|
||||
"20": 0.02,
|
||||
"0": 0.04
|
||||
},
|
||||
"stoploss": -0.10,
|
||||
"unfilledtimeout": {
|
||||
@@ -47,7 +47,7 @@
|
||||
"bids_to_ask_delta": 1
|
||||
}
|
||||
},
|
||||
"exit_pricing":{
|
||||
"exit_pricing": {
|
||||
"price_side": "same",
|
||||
"use_order_book": true,
|
||||
"order_book_top": 1,
|
||||
@@ -70,18 +70,38 @@
|
||||
"exit": "GTC"
|
||||
},
|
||||
"pairlists": [
|
||||
{"method": "StaticPairList"},
|
||||
{"method": "FullTradesFilter"},
|
||||
{
|
||||
"method": "StaticPairList"
|
||||
},
|
||||
{
|
||||
"method": "DelistFilter",
|
||||
"max_days_from_now": 0,
|
||||
},
|
||||
{
|
||||
"method": "FullTradesFilter"
|
||||
},
|
||||
{
|
||||
"method": "VolumePairList",
|
||||
"number_assets": 20,
|
||||
"sort_key": "quoteVolume",
|
||||
"refresh_period": 1800
|
||||
},
|
||||
{"method": "AgeFilter", "min_days_listed": 10},
|
||||
{"method": "PrecisionFilter"},
|
||||
{"method": "PriceFilter", "low_price_ratio": 0.01, "min_price": 0.00000010},
|
||||
{"method": "SpreadFilter", "max_spread_ratio": 0.005},
|
||||
{
|
||||
"method": "AgeFilter",
|
||||
"min_days_listed": 10
|
||||
},
|
||||
{
|
||||
"method": "PrecisionFilter"
|
||||
},
|
||||
{
|
||||
"method": "PriceFilter",
|
||||
"low_price_ratio": 0.01,
|
||||
"min_price": 0.00000010
|
||||
},
|
||||
{
|
||||
"method": "SpreadFilter",
|
||||
"max_spread_ratio": 0.005
|
||||
},
|
||||
{
|
||||
"method": "RangeStabilityFilter",
|
||||
"lookback_days": 10,
|
||||
@@ -166,12 +186,12 @@
|
||||
"external_message_consumer": {
|
||||
"enabled": false,
|
||||
"producers": [
|
||||
{
|
||||
"name": "default",
|
||||
"host": "127.0.0.2",
|
||||
"port": 8080,
|
||||
"ws_token": "secret_ws_t0ken."
|
||||
}
|
||||
{
|
||||
"name": "default",
|
||||
"host": "127.0.0.2",
|
||||
"port": 8080,
|
||||
"ws_token": "secret_ws_t0ken."
|
||||
}
|
||||
],
|
||||
"wait_timeout": 300,
|
||||
"ping_timeout": 10,
|
||||
@@ -195,4 +215,4 @@
|
||||
"reduce_df_footprint": false,
|
||||
"dataformat_ohlcv": "feather",
|
||||
"dataformat_trades": "feather"
|
||||
}
|
||||
}
|
||||
@@ -34,8 +34,7 @@ COPY build_helpers/* /tmp/
|
||||
# Install dependencies
|
||||
COPY --chown=ftuser:ftuser requirements.txt /freqtrade/
|
||||
USER ftuser
|
||||
RUN pip install --user --prefer-binary --no-cache-dir "numpy<3.0" build \
|
||||
&& pip install --user --no-index --find-links /tmp/ pyarrow TA-Lib \
|
||||
RUN pip install --user --only-binary=:all: --find-links /tmp/ pyarrow TA-Lib \
|
||||
&& pip install --user --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy dependencies to runtime-image
|
||||
|
||||
@@ -134,10 +134,10 @@ The following systems have been tested and are known to work with freqtrade:
|
||||
### PostgreSQL
|
||||
|
||||
Installation:
|
||||
`pip install psycopg2-binary`
|
||||
`pip install "psycopg[binary]"`
|
||||
|
||||
Usage:
|
||||
`... --db-url postgresql+psycopg2://<username>:<password>@localhost:5432/<database>`
|
||||
`... --db-url postgresql+psycopg://<username>:<password>@localhost:5432/<database>`
|
||||
|
||||
Freqtrade will automatically create the tables necessary upon startup.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade backtesting-analysis [-h] [-v] [--no-color] [--logfile FILE]
|
||||
[-V] [-c PATH] [-d PATH]
|
||||
[--userdir PATH]
|
||||
@@ -15,13 +15,13 @@ usage: freqtrade backtesting-analysis [-h] [-v] [--no-color] [--logfile FILE]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--backtest-filename PATH, --export-filename PATH
|
||||
--backtest-filename, --export-filename PATH
|
||||
Use this filename for backtest results.Example:
|
||||
`--backtest-
|
||||
filename=backtest_results_2020-09-27_16-20-48.json`.
|
||||
Assumes either `user_data/backtest_results/` or
|
||||
`--export-directory` as base directory.
|
||||
--backtest-directory PATH, --export-directory PATH
|
||||
--backtest-directory, --export-directory PATH
|
||||
Directory to use for backtest results. Example:
|
||||
`--export-directory=user_data/backtest_results/`.
|
||||
--analysis-groups {0,1,2,3,4,5} [{0,1,2,3,4,5} ...]
|
||||
@@ -54,21 +54,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,46 +1,45 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade backtesting-show [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH]
|
||||
[--backtest-filename PATH]
|
||||
[--backtest-directory PATH]
|
||||
[--show-pair-list]
|
||||
[--breakdown {day,week,month,year} [{day,week,month,year} ...]]
|
||||
[--breakdown {day,week,month,year,weekday} [{day,week,month,year,weekday} ...]]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--backtest-filename PATH, --export-filename PATH
|
||||
--backtest-filename, --export-filename PATH
|
||||
Use this filename for backtest results.Example:
|
||||
`--backtest-
|
||||
filename=backtest_results_2020-09-27_16-20-48.json`.
|
||||
Assumes either `user_data/backtest_results/` or
|
||||
`--export-directory` as base directory.
|
||||
--backtest-directory PATH, --export-directory PATH
|
||||
--backtest-directory, --export-directory PATH
|
||||
Directory to use for backtest results. Example:
|
||||
`--export-directory=user_data/backtest_results/`.
|
||||
--show-pair-list Show backtesting pairlist sorted by profit.
|
||||
--breakdown {day,week,month,year} [{day,week,month,year} ...]
|
||||
--breakdown {day,week,month,year,weekday} [{day,week,month,year,weekday} ...]
|
||||
Show backtesting breakdown per [day, week, month,
|
||||
year].
|
||||
year, weekday].
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade backtesting [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH] [-s NAME]
|
||||
[--strategy-path PATH]
|
||||
@@ -10,19 +10,20 @@ usage: freqtrade backtesting [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[--stake-amount STAKE_AMOUNT] [--fee FLOAT]
|
||||
[-p PAIRS [PAIRS ...]] [--eps]
|
||||
[--enable-protections]
|
||||
[--enable-dynamic-pairlist]
|
||||
[--dry-run-wallet DRY_RUN_WALLET]
|
||||
[--timeframe-detail TIMEFRAME_DETAIL]
|
||||
[--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]]
|
||||
[--export {none,trades,signals}]
|
||||
[--backtest-filename PATH]
|
||||
[--backtest-directory PATH]
|
||||
[--breakdown {day,week,month,year} [{day,week,month,year} ...]]
|
||||
[--breakdown {day,week,month,year,weekday} [{day,week,month,year,weekday} ...]]
|
||||
[--cache {none,day,week,month}]
|
||||
[--freqai-backtest-live-models] [--notes TEXT]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-i TIMEFRAME, --timeframe TIMEFRAME
|
||||
-i, --timeframe TIMEFRAME
|
||||
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
|
||||
--timerange TIMERANGE
|
||||
Specify what timerange of data to use.
|
||||
@@ -37,17 +38,22 @@ options:
|
||||
setting.
|
||||
--fee FLOAT Specify fee ratio. Will be applied twice (on trade
|
||||
entry and exit).
|
||||
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
|
||||
-p, --pairs PAIRS [PAIRS ...]
|
||||
Limit command to these pairs. Pairs are space-
|
||||
separated.
|
||||
--eps, --enable-position-stacking
|
||||
Allow buying the same pair multiple times (position
|
||||
stacking).
|
||||
--enable-protections, --enableprotections
|
||||
Enable protections for backtesting.Will slow
|
||||
Enable protections for backtesting. Will slow
|
||||
backtesting down by a considerable amount, but will
|
||||
include configured protections
|
||||
--dry-run-wallet DRY_RUN_WALLET, --starting-balance DRY_RUN_WALLET
|
||||
--enable-dynamic-pairlist
|
||||
Enables dynamic pairlist refreshes in backtesting. The
|
||||
pairlist will be generated for each new candle if
|
||||
you're using a pairlist handler that supports this
|
||||
feature, for example, ShuffleFilter.
|
||||
--dry-run-wallet, --starting-balance DRY_RUN_WALLET
|
||||
Starting balance, used for backtesting / hyperopt and
|
||||
dry-runs.
|
||||
--timeframe-detail TIMEFRAME_DETAIL
|
||||
@@ -62,18 +68,18 @@ options:
|
||||
becomes `backtest-data-SampleStrategy.json`
|
||||
--export {none,trades,signals}
|
||||
Export backtest results (default: trades).
|
||||
--backtest-filename PATH, --export-filename PATH
|
||||
--backtest-filename, --export-filename PATH
|
||||
Use this filename for backtest results.Example:
|
||||
`--backtest-
|
||||
filename=backtest_results_2020-09-27_16-20-48.json`.
|
||||
Assumes either `user_data/backtest_results/` or
|
||||
`--export-directory` as base directory.
|
||||
--backtest-directory PATH, --export-directory PATH
|
||||
--backtest-directory, --export-directory PATH
|
||||
Directory to use for backtest results. Example:
|
||||
`--export-directory=user_data/backtest_results/`.
|
||||
--breakdown {day,week,month,year} [{day,week,month,year} ...]
|
||||
--breakdown {day,week,month,year,weekday} [{day,week,month,year,weekday} ...]
|
||||
Show backtesting breakdown per [day, week, month,
|
||||
year].
|
||||
year, weekday].
|
||||
--cache {none,day,week,month}
|
||||
Load a cached backtest result no older than specified
|
||||
age (default: day).
|
||||
@@ -85,26 +91,24 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
-s, --strategy NAME Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
--recursive-strategy-search
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade convert-data [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH]
|
||||
[-p PAIRS [PAIRS ...]] --format-from
|
||||
{json,jsongz,feather,parquet} --format-to
|
||||
{json,jsongz,feather,parquet} [--erase]
|
||||
[--exchange EXCHANGE]
|
||||
[-p PAIRS [PAIRS ...]]
|
||||
--format-from {json,jsongz,feather,parquet}
|
||||
--format-to {json,jsongz,feather,parquet}
|
||||
[--erase] [--exchange EXCHANGE]
|
||||
[-t TIMEFRAMES [TIMEFRAMES ...]]
|
||||
[--trading-mode {spot,margin,futures}]
|
||||
[--candle-types {spot,futures,mark,index,premiumIndex,funding_rate} [{spot,futures,mark,index,premiumIndex,funding_rate} ...]]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
|
||||
-p, --pairs PAIRS [PAIRS ...]
|
||||
Limit command to these pairs. Pairs are space-
|
||||
separated.
|
||||
--format-from {json,jsongz,feather,parquet}
|
||||
@@ -21,10 +21,10 @@ options:
|
||||
--erase Clean all existing data for the selected
|
||||
exchange/pairs/timeframes.
|
||||
--exchange EXCHANGE Exchange name. Only valid if no config is provided.
|
||||
-t TIMEFRAMES [TIMEFRAMES ...], --timeframes TIMEFRAMES [TIMEFRAMES ...]
|
||||
-t, --timeframes TIMEFRAMES [TIMEFRAMES ...]
|
||||
Specify which tickers to download. Space-separated
|
||||
list. Default: `1m 5m`.
|
||||
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
|
||||
--trading-mode, --tradingmode {spot,margin,futures}
|
||||
Select Trading mode
|
||||
--candle-types {spot,futures,mark,index,premiumIndex,funding_rate} [{spot,futures,mark,index,premiumIndex,funding_rate} ...]
|
||||
Select candle type to convert. Defaults to all
|
||||
@@ -34,21 +34,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade convert-db [-h] [--db-url PATH] [--db-url-from PATH]
|
||||
|
||||
options:
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade convert-trade-data [-h] [-v] [--no-color] [--logfile FILE]
|
||||
[-V] [-c PATH] [-d PATH] [--userdir PATH]
|
||||
[-p PAIRS [PAIRS ...]] --format-from
|
||||
{json,jsongz,feather,parquet,kraken_csv}
|
||||
[-p PAIRS [PAIRS ...]]
|
||||
--format-from {json,jsongz,feather,parquet,kraken_csv}
|
||||
--format-to {json,jsongz,feather,parquet}
|
||||
[--erase] [--exchange EXCHANGE]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
|
||||
-p, --pairs PAIRS [PAIRS ...]
|
||||
Limit command to these pairs. Pairs are space-
|
||||
separated.
|
||||
--format-from {json,jsongz,feather,parquet,kraken_csv}
|
||||
@@ -23,21 +23,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade create-userdir [-h] [--userdir PATH] [--reset]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
--reset Reset sample files to their original state.
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade download-data [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH]
|
||||
[-p PAIRS [PAIRS ...]] [--pairs-file FILE]
|
||||
[--days INT] [--new-pairs-days INT]
|
||||
[--include-inactive-pairs]
|
||||
[--no-parallel-download]
|
||||
[--timerange TIMERANGE] [--dl-trades]
|
||||
[--convert] [--exchange EXCHANGE]
|
||||
[-t TIMEFRAMES [TIMEFRAMES ...]] [--erase]
|
||||
@@ -14,7 +15,7 @@ usage: freqtrade download-data [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
|
||||
-p, --pairs PAIRS [PAIRS ...]
|
||||
Limit command to these pairs. Pairs are space-
|
||||
separated.
|
||||
--pairs-file FILE File containing a list of pairs. Takes precedence over
|
||||
@@ -24,6 +25,9 @@ options:
|
||||
Default: `None`.
|
||||
--include-inactive-pairs
|
||||
Also download data from inactive pairs.
|
||||
--no-parallel-download
|
||||
Disable parallel startup download. Only use this if
|
||||
you experience issues.
|
||||
--timerange TIMERANGE
|
||||
Specify what timerange of data to use.
|
||||
--dl-trades Download trades instead of OHLCV data.
|
||||
@@ -33,7 +37,7 @@ options:
|
||||
OHLCV (e.g. Kraken). If not provided, use `trades-to-
|
||||
ohlcv` to convert trades data to OHLCV data.
|
||||
--exchange EXCHANGE Exchange name. Only valid if no config is provided.
|
||||
-t TIMEFRAMES [TIMEFRAMES ...], --timeframes TIMEFRAMES [TIMEFRAMES ...]
|
||||
-t, --timeframes TIMEFRAMES [TIMEFRAMES ...]
|
||||
Specify which tickers to download. Space-separated
|
||||
list. Default: `1m 5m`.
|
||||
--erase Clean all existing data for the selected
|
||||
@@ -44,7 +48,7 @@ options:
|
||||
--data-format-trades {json,jsongz,feather,parquet}
|
||||
Storage format for downloaded trades data. (default:
|
||||
`feather`).
|
||||
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
|
||||
--trading-mode, --tradingmode {spot,margin,futures}
|
||||
Select Trading mode
|
||||
--prepend Allow data prepending. (Data-appending is disabled)
|
||||
|
||||
@@ -52,21 +56,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade edge [-h] [-v] [--no-color] [--logfile FILE] [-V] [-c PATH]
|
||||
[-d PATH] [--userdir PATH] [-s NAME]
|
||||
[--strategy-path PATH] [--recursive-strategy-search]
|
||||
@@ -10,7 +10,7 @@ usage: freqtrade edge [-h] [-v] [--no-color] [--logfile FILE] [-V] [-c PATH]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-i TIMEFRAME, --timeframe TIMEFRAME
|
||||
-i, --timeframe TIMEFRAME
|
||||
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
|
||||
--timerange TIMERANGE
|
||||
Specify what timerange of data to use.
|
||||
@@ -25,7 +25,7 @@ options:
|
||||
setting.
|
||||
--fee FLOAT Specify fee ratio. Will be applied twice (on trade
|
||||
entry and exit).
|
||||
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
|
||||
-p, --pairs PAIRS [PAIRS ...]
|
||||
Limit command to these pairs. Pairs are space-
|
||||
separated.
|
||||
|
||||
@@ -33,26 +33,24 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
-s, --strategy NAME Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
--recursive-strategy-search
|
||||
|
||||
197
docs/commands/freqtrade-client.md
Normal file
197
docs/commands/freqtrade-client.md
Normal file
@@ -0,0 +1,197 @@
|
||||
``` output
|
||||
Possible commands:
|
||||
|
||||
available_pairs
|
||||
Return available pair (backtest data) based on timeframe / stake_currency selection
|
||||
|
||||
:param timeframe: Only pairs with this timeframe available.
|
||||
:param stake_currency: Only pairs that include this stake currency.
|
||||
|
||||
balance
|
||||
Get the account balance.
|
||||
|
||||
blacklist
|
||||
Show the current blacklist.
|
||||
|
||||
:param add: List of coins to add (example: "BNB/BTC")
|
||||
|
||||
cancel_open_order
|
||||
Cancel open order for trade.
|
||||
|
||||
:param trade_id: Cancels open orders for this trade.
|
||||
|
||||
count
|
||||
Return the amount of open trades.
|
||||
|
||||
daily
|
||||
Return the profits for each day, and amount of trades.
|
||||
|
||||
delete_lock
|
||||
Delete (disable) lock from the database.
|
||||
|
||||
:param lock_id: ID for the lock to delete
|
||||
|
||||
delete_trade
|
||||
Delete trade from the database.
|
||||
Tries to close open orders. Requires manual handling of this asset on the exchange.
|
||||
|
||||
:param trade_id: Deletes the trade with this ID from the database.
|
||||
|
||||
entries
|
||||
Returns List of dicts containing all Trades, based on buy tag performance
|
||||
Can either be average for all pairs or a specific pair provided
|
||||
|
||||
exits
|
||||
Returns List of dicts containing all Trades, based on exit reason performance
|
||||
Can either be average for all pairs or a specific pair provided
|
||||
|
||||
forcebuy
|
||||
Buy an asset.
|
||||
|
||||
:param pair: Pair to buy (ETH/BTC)
|
||||
:param price: Optional - price to buy
|
||||
|
||||
forceenter
|
||||
Force entering a trade
|
||||
|
||||
:param pair: Pair to buy (ETH/BTC)
|
||||
:param side: 'long' or 'short'
|
||||
:param price: Optional - price to buy
|
||||
:param order_type: Optional keyword argument - 'limit' or 'market'
|
||||
:param stake_amount: Optional keyword argument - stake amount (as float)
|
||||
:param leverage: Optional keyword argument - leverage (as float)
|
||||
:param enter_tag: Optional keyword argument - entry tag (as string, default: 'force_enter')
|
||||
|
||||
forceexit
|
||||
Force-exit a trade.
|
||||
|
||||
:param tradeid: Id of the trade (can be received via status command)
|
||||
:param ordertype: Order type to use (must be market or limit)
|
||||
:param amount: Amount to sell. Full sell if not given
|
||||
|
||||
health
|
||||
Provides a quick health check of the running bot.
|
||||
|
||||
list_custom_data
|
||||
List custom-data of the running bot for a specific trade.
|
||||
|
||||
:param trade_id: ID of the trade
|
||||
:param key: str, optional - Key of the custom-data
|
||||
|
||||
list_open_trades_custom_data
|
||||
List open trades custom-data of the running bot.
|
||||
|
||||
:param key: str, optional - Key of the custom-data
|
||||
:param limit: limit of trades
|
||||
:param offset: trades offset for pagination
|
||||
|
||||
lock_add
|
||||
Lock pair
|
||||
|
||||
:param pair: Pair to lock
|
||||
:param until: Lock until this date (format "2024-03-30 16:00:00Z")
|
||||
:param side: Side to lock (long, short, *)
|
||||
:param reason: Reason for the lock
|
||||
|
||||
locks
|
||||
Return current locks
|
||||
|
||||
logs
|
||||
Show latest logs.
|
||||
|
||||
:param limit: Limits log messages to the last <limit> logs. No limit to get the entire log.
|
||||
|
||||
mix_tags
|
||||
Returns List of dicts containing all Trades, based on entry_tag + exit_reason performance
|
||||
Can either be average for all pairs or a specific pair provided
|
||||
|
||||
monthly
|
||||
Return the profits for each month, and amount of trades.
|
||||
|
||||
pair_candles
|
||||
Return live dataframe for <pair><timeframe>.
|
||||
|
||||
:param pair: Pair to get data for
|
||||
:param timeframe: Only pairs with this timeframe available.
|
||||
:param limit: Limit result to the last n candles.
|
||||
:param columns: List of dataframe columns to return. Empty list will return OHLCV.
|
||||
|
||||
pair_history
|
||||
Return historic, analyzed dataframe
|
||||
|
||||
:param pair: Pair to get data for
|
||||
:param timeframe: Only pairs with this timeframe available.
|
||||
:param strategy: Strategy to analyze and get values for
|
||||
:param freqaimodel: FreqAI model to use for analysis
|
||||
:param timerange: Timerange to get data for (same format than --timerange endpoints)
|
||||
|
||||
pairlists_available
|
||||
Lists available pairlist providers
|
||||
|
||||
performance
|
||||
Return the performance of the different coins.
|
||||
|
||||
ping
|
||||
simple ping
|
||||
|
||||
plot_config
|
||||
Return plot configuration if the strategy defines one.
|
||||
|
||||
profit
|
||||
Return the profit summary.
|
||||
|
||||
reload_config
|
||||
Reload configuration.
|
||||
|
||||
show_config
|
||||
Returns part of the configuration, relevant for trading operations.
|
||||
|
||||
start
|
||||
Start the bot if it's in the stopped state.
|
||||
|
||||
stats
|
||||
Return the stats report (durations, sell-reasons).
|
||||
|
||||
status
|
||||
Get the status of open trades.
|
||||
|
||||
stop
|
||||
Stop the bot. Use `start` to restart.
|
||||
|
||||
stopbuy
|
||||
Stop buying (but handle sells gracefully). Use `reload_config` to reset.
|
||||
|
||||
strategies
|
||||
Lists available strategies
|
||||
|
||||
strategy
|
||||
Get strategy details
|
||||
|
||||
:param strategy: Strategy class name
|
||||
|
||||
sysinfo
|
||||
Provides system information (CPU, RAM usage)
|
||||
|
||||
trade
|
||||
Return specific trade
|
||||
|
||||
:param trade_id: Specify which trade to get.
|
||||
|
||||
trades
|
||||
Return trades history, sorted by id (or by latest timestamp if order_by_id=False)
|
||||
|
||||
:param limit: Limits trades to the X last trades. Max 500 trades.
|
||||
:param offset: Offset by this amount of trades.
|
||||
:param order_by_id: Sort trades by id (default: True). If False, sorts by latest timestamp.
|
||||
|
||||
version
|
||||
Return the version of the bot.
|
||||
|
||||
weekly
|
||||
Return the profits for each week, and amount of trades.
|
||||
|
||||
whitelist
|
||||
Show the current whitelist.
|
||||
|
||||
|
||||
```
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade hyperopt-list [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH] [--best]
|
||||
[--profitable] [--min-trades INT]
|
||||
@@ -44,21 +44,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade hyperopt-show [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH] [--best]
|
||||
[--profitable] [-n INT] [--print-json]
|
||||
[--hyperopt-filename FILENAME] [--no-header]
|
||||
[--disable-param-export]
|
||||
[--breakdown {day,week,month,year} [{day,week,month,year} ...]]
|
||||
[--breakdown {day,week,month,year,weekday} [{day,week,month,year,weekday} ...]]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--best Select only best epochs.
|
||||
--profitable Select only profitable epochs.
|
||||
-n INT, --index INT Specify the index of the epoch to print details for.
|
||||
-n, --index INT Specify the index of the epoch to print details for.
|
||||
--print-json Print output in JSON format.
|
||||
--hyperopt-filename FILENAME
|
||||
Hyperopt result filename.Example: `--hyperopt-
|
||||
@@ -18,29 +18,28 @@ options:
|
||||
--no-header Do not print epoch details header.
|
||||
--disable-param-export
|
||||
Disable automatic hyperopt parameter export.
|
||||
--breakdown {day,week,month,year} [{day,week,month,year} ...]
|
||||
--breakdown {day,week,month,year,weekday} [{day,week,month,year,weekday} ...]
|
||||
Show backtesting breakdown per [day, week, month,
|
||||
year].
|
||||
year, weekday].
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade hyperopt [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH] [-s NAME]
|
||||
[--strategy-path PATH] [--recursive-strategy-search]
|
||||
@@ -11,16 +11,15 @@ usage: freqtrade hyperopt [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[--eps] [--enable-protections]
|
||||
[--dry-run-wallet DRY_RUN_WALLET]
|
||||
[--timeframe-detail TIMEFRAME_DETAIL] [-e INT]
|
||||
[--spaces {all,buy,sell,roi,stoploss,trailing,protection,trades,default} [{all,buy,sell,roi,stoploss,trailing,protection,trades,default} ...]]
|
||||
[--print-all] [--print-json] [-j JOBS]
|
||||
[--random-state INT] [--min-trades INT]
|
||||
[--hyperopt-loss NAME] [--disable-param-export]
|
||||
[--ignore-missing-spaces] [--analyze-per-epoch]
|
||||
[--early-stop INT]
|
||||
[--spaces SPACES [SPACES ...]] [--print-all]
|
||||
[--print-json] [-j JOBS] [--random-state INT]
|
||||
[--min-trades INT] [--hyperopt-loss NAME]
|
||||
[--disable-param-export] [--ignore-missing-spaces]
|
||||
[--analyze-per-epoch] [--early-stop INT]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-i TIMEFRAME, --timeframe TIMEFRAME
|
||||
-i, --timeframe TIMEFRAME
|
||||
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
|
||||
--timerange TIMERANGE
|
||||
Specify what timerange of data to use.
|
||||
@@ -35,7 +34,7 @@ options:
|
||||
setting.
|
||||
--fee FLOAT Specify fee ratio. Will be applied twice (on trade
|
||||
entry and exit).
|
||||
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
|
||||
-p, --pairs PAIRS [PAIRS ...]
|
||||
Limit command to these pairs. Pairs are space-
|
||||
separated.
|
||||
--hyperopt-path PATH Specify additional lookup path for Hyperopt Loss
|
||||
@@ -44,22 +43,26 @@ options:
|
||||
Allow buying the same pair multiple times (position
|
||||
stacking).
|
||||
--enable-protections, --enableprotections
|
||||
Enable protections for backtesting.Will slow
|
||||
Enable protections for backtesting. Will slow
|
||||
backtesting down by a considerable amount, but will
|
||||
include configured protections
|
||||
--dry-run-wallet DRY_RUN_WALLET, --starting-balance DRY_RUN_WALLET
|
||||
--dry-run-wallet, --starting-balance DRY_RUN_WALLET
|
||||
Starting balance, used for backtesting / hyperopt and
|
||||
dry-runs.
|
||||
--timeframe-detail TIMEFRAME_DETAIL
|
||||
Specify detail timeframe for backtesting (`1m`, `5m`,
|
||||
`30m`, `1h`, `1d`).
|
||||
-e INT, --epochs INT Specify number of epochs (default: 100).
|
||||
--spaces {all,buy,sell,roi,stoploss,trailing,protection,trades,default} [{all,buy,sell,roi,stoploss,trailing,protection,trades,default} ...]
|
||||
-e, --epochs INT Specify number of epochs (default: 100).
|
||||
--spaces SPACES [SPACES ...]
|
||||
Specify which parameters to hyperopt. Space-separated
|
||||
list.
|
||||
list. Available builtin options (custom spaces will
|
||||
not be listed here): default, all, buy, sell, enter,
|
||||
exit, roi, stoploss, trailing, protection, trades.
|
||||
Default: `default` - which includes all spaces except
|
||||
for 'trailing', 'protection', and 'trades'.
|
||||
--print-all Print all results, not only the best ones.
|
||||
--print-json Print output in JSON format.
|
||||
-j JOBS, --job-workers JOBS
|
||||
-j, --job-workers JOBS
|
||||
The number of concurrently running jobs for
|
||||
hyperoptimization (hyperopt worker processes). If -1
|
||||
(default), all CPUs are used, for -2, all CPUs but one
|
||||
@@ -69,7 +72,7 @@ options:
|
||||
reproducible hyperopt results.
|
||||
--min-trades INT Set minimal desired number of trades for evaluations
|
||||
in the hyperopt optimization path (default: 1).
|
||||
--hyperopt-loss NAME, --hyperoptloss NAME
|
||||
--hyperopt-loss, --hyperoptloss NAME
|
||||
Specify the class name of the hyperopt loss function
|
||||
class (IHyperOptLoss). Different functions can
|
||||
generate completely different results, since the
|
||||
@@ -95,26 +98,24 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
-s, --strategy NAME Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
--recursive-strategy-search
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade install-ui [-h] [--erase] [--prerelease]
|
||||
[--ui-version UI_VERSION]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade list-data [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH]
|
||||
[--exchange EXCHANGE]
|
||||
@@ -18,10 +18,10 @@ options:
|
||||
Storage format for downloaded trades data. (default:
|
||||
`feather`).
|
||||
--trades Work on trades data instead of OHLCV data.
|
||||
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
|
||||
-p, --pairs PAIRS [PAIRS ...]
|
||||
Limit command to these pairs. Pairs are space-
|
||||
separated.
|
||||
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
|
||||
--trading-mode, --tradingmode {spot,margin,futures}
|
||||
Select Trading mode
|
||||
--show-timerange Show timerange available for available data. (May take
|
||||
a while to calculate).
|
||||
@@ -30,21 +30,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade list-exchanges [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH] [-1] [-a]
|
||||
[--trading-mode {spot,margin,futures}]
|
||||
@@ -8,7 +8,7 @@ options:
|
||||
-h, --help show this help message and exit
|
||||
-1, --one-column Print output in one column.
|
||||
-a, --all Print all exchanges known to the ccxt library.
|
||||
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
|
||||
--trading-mode, --tradingmode {spot,margin,futures}
|
||||
Select Trading mode
|
||||
--dex-exchanges Print only DEX exchanges.
|
||||
|
||||
@@ -16,21 +16,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade list-freqaimodels [-h] [-v] [--no-color] [--logfile FILE]
|
||||
[-V] [-c PATH] [-d PATH] [--userdir PATH]
|
||||
[--freqaimodel-path PATH] [-1]
|
||||
@@ -13,21 +13,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade list-hyperoptloss [-h] [-v] [--no-color] [--logfile FILE]
|
||||
[-V] [-c PATH] [-d PATH] [--userdir PATH]
|
||||
[--hyperopt-path PATH] [-1]
|
||||
@@ -13,21 +13,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade list-markets [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH]
|
||||
[--exchange EXCHANGE] [--print-list]
|
||||
@@ -21,28 +21,27 @@ options:
|
||||
Specify quote currency(-ies). Space-separated list.
|
||||
-a, --all Print all pairs or market symbols. By default only
|
||||
active ones are shown.
|
||||
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
|
||||
--trading-mode, --tradingmode {spot,margin,futures}
|
||||
Select Trading mode
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade list-pairs [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH]
|
||||
[--exchange EXCHANGE] [--print-list]
|
||||
@@ -21,28 +21,27 @@ options:
|
||||
Specify quote currency(-ies). Space-separated list.
|
||||
-a, --all Print all pairs or market symbols. By default only
|
||||
active ones are shown.
|
||||
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
|
||||
--trading-mode, --tradingmode {spot,margin,futures}
|
||||
Select Trading mode
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade list-strategies [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH]
|
||||
[--strategy-path PATH] [-1]
|
||||
@@ -16,21 +16,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,32 +1,34 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade list-timeframes [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH]
|
||||
[--exchange EXCHANGE] [-1]
|
||||
[--trading-mode {spot,margin,futures}]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--exchange EXCHANGE Exchange name. Only valid if no config is provided.
|
||||
-1, --one-column Print output in one column.
|
||||
--trading-mode, --tradingmode {spot,margin,futures}
|
||||
Select Trading mode
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade lookahead-analysis [-h] [-v] [--no-color] [--logfile FILE]
|
||||
[-V] [-c PATH] [-d PATH] [--userdir PATH]
|
||||
[-s NAME] [--strategy-path PATH]
|
||||
@@ -11,6 +11,7 @@ usage: freqtrade lookahead-analysis [-h] [-v] [--no-color] [--logfile FILE]
|
||||
[--stake-amount STAKE_AMOUNT]
|
||||
[--fee FLOAT] [-p PAIRS [PAIRS ...]]
|
||||
[--enable-protections]
|
||||
[--enable-dynamic-pairlist]
|
||||
[--dry-run-wallet DRY_RUN_WALLET]
|
||||
[--timeframe-detail TIMEFRAME_DETAIL]
|
||||
[--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]]
|
||||
@@ -21,10 +22,11 @@ usage: freqtrade lookahead-analysis [-h] [-v] [--no-color] [--logfile FILE]
|
||||
[--minimum-trade-amount INT]
|
||||
[--targeted-trade-amount INT]
|
||||
[--lookahead-analysis-exportfilename LOOKAHEAD_ANALYSIS_EXPORTFILENAME]
|
||||
[--allow-limit-orders]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-i TIMEFRAME, --timeframe TIMEFRAME
|
||||
-i, --timeframe TIMEFRAME
|
||||
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
|
||||
--timerange TIMERANGE
|
||||
Specify what timerange of data to use.
|
||||
@@ -39,14 +41,19 @@ options:
|
||||
setting.
|
||||
--fee FLOAT Specify fee ratio. Will be applied twice (on trade
|
||||
entry and exit).
|
||||
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
|
||||
-p, --pairs PAIRS [PAIRS ...]
|
||||
Limit command to these pairs. Pairs are space-
|
||||
separated.
|
||||
--enable-protections, --enableprotections
|
||||
Enable protections for backtesting.Will slow
|
||||
Enable protections for backtesting. Will slow
|
||||
backtesting down by a considerable amount, but will
|
||||
include configured protections
|
||||
--dry-run-wallet DRY_RUN_WALLET, --starting-balance DRY_RUN_WALLET
|
||||
--enable-dynamic-pairlist
|
||||
Enables dynamic pairlist refreshes in backtesting. The
|
||||
pairlist will be generated for each new candle if
|
||||
you're using a pairlist handler that supports this
|
||||
feature, for example, ShuffleFilter.
|
||||
--dry-run-wallet, --starting-balance DRY_RUN_WALLET
|
||||
Starting balance, used for backtesting / hyperopt and
|
||||
dry-runs.
|
||||
--timeframe-detail TIMEFRAME_DETAIL
|
||||
@@ -61,13 +68,13 @@ options:
|
||||
becomes `backtest-data-SampleStrategy.json`
|
||||
--export {none,trades,signals}
|
||||
Export backtest results (default: trades).
|
||||
--backtest-filename PATH, --export-filename PATH
|
||||
--backtest-filename, --export-filename PATH
|
||||
Use this filename for backtest results.Example:
|
||||
`--backtest-
|
||||
filename=backtest_results_2020-09-27_16-20-48.json`.
|
||||
Assumes either `user_data/backtest_results/` or
|
||||
`--export-directory` as base directory.
|
||||
--backtest-directory PATH, --export-directory PATH
|
||||
--backtest-directory, --export-directory PATH
|
||||
Directory to use for backtest results. Example:
|
||||
`--export-directory=user_data/backtest_results/`.
|
||||
--freqai-backtest-live-models
|
||||
@@ -79,31 +86,31 @@ options:
|
||||
--lookahead-analysis-exportfilename LOOKAHEAD_ANALYSIS_EXPORTFILENAME
|
||||
Use this csv-filename to store lookahead-analysis-
|
||||
results
|
||||
--allow-limit-orders Allow limit orders in lookahead analysis (could cause
|
||||
false positives in lookahead analysis results).
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
-s, --strategy NAME Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
--recursive-strategy-search
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade [-h] [-V]
|
||||
{trade,create-userdir,new-config,show-config,new-strategy,download-data,convert-data,convert-trade-data,trades-to-ohlcv,list-data,backtesting,backtesting-show,backtesting-analysis,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-markets,list-pairs,list-strategies,list-hyperoptloss,list-freqaimodels,list-timeframes,show-trades,test-pairlist,convert-db,install-ui,plot-dataframe,plot-profit,webserver,strategy-updater,lookahead-analysis,recursive-analysis}
|
||||
...
|
||||
{trade,create-userdir,new-config,show-config,new-strategy,download-data,convert-data,convert-trade-data,trades-to-ohlcv,list-data,backtesting,backtesting-show,backtesting-analysis,edge,hyperopt,hyperopt-list,hyperopt-show,list-exchanges,list-markets,list-pairs,list-strategies,list-hyperoptloss,list-freqaimodels,list-timeframes,show-trades,test-pairlist,convert-db,install-ui,plot-dataframe,plot-profit,webserver,strategy-updater,lookahead-analysis,recursive-analysis} ...
|
||||
|
||||
Free, open source crypto trading bot
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade new-config [-h] [-c PATH]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-h, --help show this help message and exit
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever exists).
|
||||
Multiple --config options may be used. Can be set to `-`
|
||||
to read config from stdin.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade new-strategy [-h] [--userdir PATH] [-s NAME]
|
||||
[--strategy-path PATH]
|
||||
[--template {full,minimal,advanced}]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
-s, --strategy NAME Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
--template {full,minimal,advanced}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade plot-dataframe [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH] [-s NAME]
|
||||
[--strategy-path PATH]
|
||||
@@ -16,7 +16,7 @@ usage: freqtrade plot-dataframe [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
|
||||
-p, --pairs PAIRS [PAIRS ...]
|
||||
Limit command to these pairs. Pairs are space-
|
||||
separated.
|
||||
--indicators1 INDICATORS1 [INDICATORS1 ...]
|
||||
@@ -38,7 +38,7 @@ options:
|
||||
(backtest file)) Default: file
|
||||
--export {none,trades,signals}
|
||||
Export backtest results (default: trades).
|
||||
--backtest-filename PATH, --export-filename PATH
|
||||
--backtest-filename, --export-filename PATH
|
||||
Use this filename for backtest results.Example:
|
||||
`--backtest-
|
||||
filename=backtest_results_2020-09-27_16-20-48.json`.
|
||||
@@ -46,7 +46,7 @@ options:
|
||||
`--export-directory` as base directory.
|
||||
--timerange TIMERANGE
|
||||
Specify what timerange of data to use.
|
||||
-i TIMEFRAME, --timeframe TIMEFRAME
|
||||
-i, --timeframe TIMEFRAME
|
||||
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
|
||||
--no-trades Skip using trades from backtesting file and DB.
|
||||
|
||||
@@ -54,26 +54,24 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
-s, --strategy NAME Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
--recursive-strategy-search
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade plot-profit [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH] [-s NAME]
|
||||
[--strategy-path PATH]
|
||||
@@ -12,14 +12,14 @@ usage: freqtrade plot-profit [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
|
||||
-p, --pairs PAIRS [PAIRS ...]
|
||||
Limit command to these pairs. Pairs are space-
|
||||
separated.
|
||||
--timerange TIMERANGE
|
||||
Specify what timerange of data to use.
|
||||
--export {none,trades,signals}
|
||||
Export backtest results (default: trades).
|
||||
--backtest-filename PATH, --export-filename PATH
|
||||
--backtest-filename, --export-filename PATH
|
||||
Use this filename for backtest results.Example:
|
||||
`--backtest-
|
||||
filename=backtest_results_2020-09-27_16-20-48.json`.
|
||||
@@ -32,7 +32,7 @@ options:
|
||||
--trade-source {DB,file}
|
||||
Specify the source for trades (Can be DB or file
|
||||
(backtest file)) Default: file
|
||||
-i TIMEFRAME, --timeframe TIMEFRAME
|
||||
-i, --timeframe TIMEFRAME
|
||||
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
|
||||
--auto-open Automatically open generated plot.
|
||||
|
||||
@@ -40,26 +40,24 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
-s, --strategy NAME Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
--recursive-strategy-search
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade recursive-analysis [-h] [-v] [--no-color] [--logfile FILE]
|
||||
[-V] [-c PATH] [-d PATH] [--userdir PATH]
|
||||
[-s NAME] [--strategy-path PATH]
|
||||
@@ -12,14 +12,14 @@ usage: freqtrade recursive-analysis [-h] [-v] [--no-color] [--logfile FILE]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-i TIMEFRAME, --timeframe TIMEFRAME
|
||||
-i, --timeframe TIMEFRAME
|
||||
Specify timeframe (`1m`, `5m`, `30m`, `1h`, `1d`).
|
||||
--timerange TIMERANGE
|
||||
Specify what timerange of data to use.
|
||||
--data-format-ohlcv {json,jsongz,feather,parquet}
|
||||
Storage format for downloaded candle (OHLCV) data.
|
||||
(default: `feather`).
|
||||
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
|
||||
-p, --pairs PAIRS [PAIRS ...]
|
||||
Limit command to these pairs. Pairs are space-
|
||||
separated.
|
||||
--startup-candle STARTUP_CANDLE [STARTUP_CANDLE ...]
|
||||
@@ -30,26 +30,24 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
-s, --strategy NAME Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
--recursive-strategy-search
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade show-config [-h] [--userdir PATH] [-c PATH]
|
||||
[--show-sensitive]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade show-trades [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH]
|
||||
[--db-url PATH]
|
||||
@@ -19,21 +19,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade strategy-updater [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH]
|
||||
[--strategy-list STRATEGY_LIST [STRATEGY_LIST ...]]
|
||||
@@ -23,21 +23,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade test-pairlist [-h] [--userdir PATH] [-v] [-c PATH]
|
||||
[--quote QUOTE_CURRENCY [QUOTE_CURRENCY ...]]
|
||||
[-1] [--print-json] [--exchange EXCHANGE]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade trade [-h] [-v] [--no-color] [--logfile FILE] [-V] [-c PATH]
|
||||
[-d PATH] [--userdir PATH] [-s NAME]
|
||||
[--strategy-path PATH] [--recursive-strategy-search]
|
||||
@@ -15,7 +15,7 @@ options:
|
||||
--sd-notify Notify systemd service manager.
|
||||
--dry-run Enforce dry-run for trading (removes Exchange secrets
|
||||
and simulates trades).
|
||||
--dry-run-wallet DRY_RUN_WALLET, --starting-balance DRY_RUN_WALLET
|
||||
--dry-run-wallet, --starting-balance DRY_RUN_WALLET
|
||||
Starting balance, used for backtesting / hyperopt and
|
||||
dry-runs.
|
||||
--fee FLOAT Specify fee ratio. Will be applied twice (on trade
|
||||
@@ -25,26 +25,24 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
Strategy arguments:
|
||||
-s NAME, --strategy NAME
|
||||
Specify strategy class name which will be used by the
|
||||
-s, --strategy NAME Specify strategy class name which will be used by the
|
||||
bot.
|
||||
--strategy-path PATH Specify additional strategy lookup path.
|
||||
--recursive-strategy-search
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade trades-to-ohlcv [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH]
|
||||
[-p PAIRS [PAIRS ...]]
|
||||
@@ -10,10 +10,10 @@ usage: freqtrade trades-to-ohlcv [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-p PAIRS [PAIRS ...], --pairs PAIRS [PAIRS ...]
|
||||
-p, --pairs PAIRS [PAIRS ...]
|
||||
Limit command to these pairs. Pairs are space-
|
||||
separated.
|
||||
-t TIMEFRAMES [TIMEFRAMES ...], --timeframes TIMEFRAMES [TIMEFRAMES ...]
|
||||
-t, --timeframes TIMEFRAMES [TIMEFRAMES ...]
|
||||
Specify which tickers to download. Space-separated
|
||||
list. Default: `1m 5m`.
|
||||
--exchange EXCHANGE Exchange name. Only valid if no config is provided.
|
||||
@@ -23,28 +23,27 @@ options:
|
||||
--data-format-trades {json,jsongz,feather,parquet}
|
||||
Storage format for downloaded trades data. (default:
|
||||
`feather`).
|
||||
--trading-mode {spot,margin,futures}, --tradingmode {spot,margin,futures}
|
||||
--trading-mode, --tradingmode {spot,margin,futures}
|
||||
Select Trading mode
|
||||
|
||||
Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
```
|
||||
``` output
|
||||
usage: freqtrade webserver [-h] [-v] [--no-color] [--logfile FILE] [-V]
|
||||
[-c PATH] [-d PATH] [--userdir PATH]
|
||||
|
||||
@@ -9,21 +9,20 @@ Common arguments:
|
||||
-v, --verbose Verbose mode (-vv for more, -vvv to get all messages).
|
||||
--no-color Disable colorization of hyperopt results. May be
|
||||
useful if you are redirecting output to a file.
|
||||
--logfile FILE, --log-file FILE
|
||||
--logfile, --log-file FILE
|
||||
Log to the file specified. Special values are:
|
||||
'syslog', 'journald'. See the documentation for more
|
||||
details.
|
||||
-V, --version show program's version number and exit
|
||||
-c PATH, --config PATH
|
||||
Specify configuration file (default:
|
||||
-c, --config PATH Specify configuration file (default:
|
||||
`userdir/config.json` or `config.json` whichever
|
||||
exists). Multiple --config options may be used. Can be
|
||||
set to `-` to read config from stdin.
|
||||
-d PATH, --datadir PATH, --data-dir PATH
|
||||
-d, --datadir, --data-dir PATH
|
||||
Path to the base directory of the exchange with
|
||||
historical backtesting data. To see futures data, use
|
||||
trading-mode additionally.
|
||||
--userdir PATH, --user-data-dir PATH
|
||||
--userdir, --user-data-dir PATH
|
||||
Path to userdata directory.
|
||||
|
||||
```
|
||||
|
||||
@@ -571,9 +571,7 @@ Commonly used time in force are:
|
||||
|
||||
**GTC (Good Till Canceled):**
|
||||
|
||||
This is most of the time the default time in force. It means the order will remain
|
||||
on exchange till it is cancelled by the user. It can be fully or partially fulfilled.
|
||||
If partially fulfilled, the remaining will stay on the exchange till cancelled.
|
||||
This is most of the time the default time in force. It means the order will remain on exchange till it is cancelled by the user. It can be fully or partially fulfilled. If partially fulfilled, the remaining will stay on the exchange till cancelled.
|
||||
|
||||
**FOK (Fill Or Kill):**
|
||||
|
||||
@@ -581,8 +579,9 @@ It means if the order is not executed immediately AND fully then it is cancelled
|
||||
|
||||
**IOC (Immediate Or Canceled):**
|
||||
|
||||
It is the same as FOK (above) except it can be partially fulfilled. The remaining part
|
||||
is automatically cancelled by the exchange.
|
||||
It is the same as FOK (above) except it can be partially fulfilled. The remaining part is automatically cancelled by the exchange.
|
||||
|
||||
Not necessarily recommended, as this can lead to partial fills below the minimum trade size.
|
||||
|
||||
**PO (Post only):**
|
||||
|
||||
@@ -676,7 +675,7 @@ Should you experience problems you suspect are caused by websockets, you can dis
|
||||
Should you be required to use a proxy, please refer to the [proxy section](#using-a-proxy-with-freqtrade) for more information.
|
||||
|
||||
!!! Info "Rollout"
|
||||
We're implementing this out slowly, ensuring stability of your bots.
|
||||
We're rolling this out slowly, ensuring stability of your bots.
|
||||
Currently, usage is limited to ohlcv data streams.
|
||||
It's also limited to a few exchanges, with new exchanges being added on an ongoing basis.
|
||||
|
||||
|
||||
@@ -26,10 +26,19 @@ Alternatively (e.g. if your system is not supported by the setup.sh script), fol
|
||||
|
||||
This will install all required tools for development, including `pytest`, `ruff`, `mypy`, and `coveralls`.
|
||||
|
||||
Then install the git hook scripts by running `pre-commit install`, so your changes will be verified locally before committing.
|
||||
This avoids a lot of waiting for CI already, as some basic formatting checks are done locally on your machine.
|
||||
Run the following command to install the git hook scripts:
|
||||
|
||||
Before opening a pull request, please familiarize yourself with our [Contributing Guidelines](https://github.com/freqtrade/freqtrade/blob/develop/CONTRIBUTING.md).
|
||||
``` bash
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
These pre-commit scripts check your changes automatically before each commit.
|
||||
If any formatting issues are found, the commit will fail and will prompt for fixes.
|
||||
This reduces unnecessary CI failures, reduces maintenance burden, and improves code quality.
|
||||
|
||||
You can run the checks manually when necessary with `pre-commit run -a`.
|
||||
|
||||
Before opening a pull request, please also familiarize yourself with our [Contributing Guidelines](https://github.com/freqtrade/freqtrade/blob/develop/CONTRIBUTING.md).
|
||||
|
||||
### Devcontainer setup
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
This page combines common gotchas and Information which are exchange-specific and most likely don't apply to other exchanges.
|
||||
|
||||
## Quick overview of supported exchange features
|
||||
|
||||
--8<-- "includes/exchange-features.md"
|
||||
|
||||
## Exchange configuration
|
||||
|
||||
Freqtrade is based on [CCXT library](https://github.com/ccxt/ccxt) that supports over 100 cryptocurrency
|
||||
@@ -294,7 +298,14 @@ Without these permissions, the bot will not start correctly and show errors like
|
||||
|
||||
Bybit supports [time_in_force](configuration.md#understand-order_time_in_force) with settings "GTC" (good till cancelled), "FOK" (full-or-cancel), "IOC" (immediate-or-cancel) and "PO" (Post only) settings.
|
||||
|
||||
Futures trading on bybit is currently supported for isolated futures mode.
|
||||
!!! Warning "Unified accounts"
|
||||
Freqtrade assumes accounts to be dedicated to the bot.
|
||||
We therefore recommend the usage of one subaccount per bot. This is especially important when using unified accounts.
|
||||
Other configurations (multiple bots on one account, manual non-bot trades on the bot account) are not supported and may lead to unexpected behavior.
|
||||
|
||||
### Bybit Futures
|
||||
|
||||
Futures trading on bybit is supported for isolated futures mode.
|
||||
|
||||
On startup, freqtrade will set the position mode to "One-way Mode" for the whole (sub)account. This avoids making this call over and over again (slowing down bot operations), but means that manual changes to this setting may result in exceptions and errors.
|
||||
|
||||
@@ -308,10 +319,6 @@ API Keys for live futures trading must have the following permissions:
|
||||
|
||||
We do strongly recommend to limit all API keys to the IP you're going to use it from.
|
||||
|
||||
!!! Warning "Unified accounts"
|
||||
Freqtrade assumes accounts to be dedicated to the bot.
|
||||
We therefore recommend the usage of one subaccount per bot. This is especially important when using unified accounts.
|
||||
Other configurations (multiple bots on one account, manual non-bot trades on the bot account) are not supported and may lead to unexpected behavior.
|
||||
|
||||
## Bitmart
|
||||
|
||||
@@ -351,6 +358,12 @@ Bitget supports [time_in_force](configuration.md#understand-order_time_in_force)
|
||||
Bitget supports `stoploss_on_exchange` and can use both stop-loss-market and stop-loss-limit orders. It provides great advantages, so we recommend to benefit from it.
|
||||
You can use either `"limit"` or `"market"` in the `order_types.stoploss` configuration setting to decide which type of stoploss shall be used.
|
||||
|
||||
### Bitget Futures
|
||||
|
||||
Futures trading on bitget is supported for isolated futures mode.
|
||||
|
||||
On startup, freqtrade will set the position mode to "One-way Mode" for the whole (sub)account. This avoids making this call over and over again (slowing down bot operations), but means that manual changes to this setting may result in exceptions and errors.
|
||||
|
||||
## Hyperliquid
|
||||
|
||||
!!! Tip "Stoploss on Exchange"
|
||||
@@ -394,11 +407,12 @@ To use these with Freqtrade, you will need to use the following configuration pa
|
||||
``` json
|
||||
"exchange": {
|
||||
"name": "hyperliquid",
|
||||
"walletAddress": "your_vault_address", // Vault or subaccount address
|
||||
"privateKey": "your_api_private_key",
|
||||
"walletAddress": "your_master_wallet_address", // Your master wallet address (not the API wallet address and not the vault/subaccount address).
|
||||
"privateKey": "your_api_private_key", // API wallet private key (see https://app.hyperliquid.xyz/API). You'll only need the private key.
|
||||
"ccxt_config": {
|
||||
"options": {
|
||||
"vaultAddress": "your_vault_address" // Optional, only if you want to use a vault or subaccount
|
||||
"vaultAddress": "your_vault_address", // Optional, only if you want to use a vault ...
|
||||
"subAccountAddress": "your_subaccount_address" // OR optional, only if you want to use a subaccount
|
||||
}
|
||||
},
|
||||
// ...
|
||||
@@ -407,6 +421,9 @@ To use these with Freqtrade, you will need to use the following configuration pa
|
||||
|
||||
Your balance and trades will now be used from your vault / subaccount - and no longer from your main account.
|
||||
|
||||
!!! Note
|
||||
You can only use either a vault or a subaccount - not both at the same time.
|
||||
|
||||
### Historic Hyperliquid data
|
||||
|
||||
The Hyperliquid API does not provide historic data beyond the single call to fetch current data, so downloading data is not possible, as the downloaded data would not constitute proper historic data.
|
||||
@@ -474,3 +491,5 @@ 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.
|
||||
Using `_ft_has_params` overrides may lead to unexpected behavior, and may even break your bot.
|
||||
We will not be able to provide support for issues caused by custom settings in `_ft_has_params`.
|
||||
|
||||
@@ -297,6 +297,13 @@ Should you be asked to expose your exchange keys or send funds to some random wa
|
||||
|
||||
Failing to follow these guidelines will not be responsibility of freqtrade.
|
||||
|
||||
## Support policy
|
||||
|
||||
We provide free support for Freqtrade on our [Discord server](https://discord.gg/p7nuUNVfP7) and via GitHub issues.
|
||||
We only support the most recent release (e.g. 2025.8) and the current development branch (e.g. 2025.9-dev).
|
||||
|
||||
If you're on an older version, please follow the [upgrade instructions](updating.md) and see if your problem has already been addressed.
|
||||
|
||||
## "Freqtrade token"
|
||||
|
||||
Freqtrade does not have a Crypto token offering.
|
||||
|
||||
@@ -4,7 +4,7 @@ Freqtrade provides a builtin webserver, which can serve [FreqUI](https://github.
|
||||
|
||||
By default, the UI is automatically installed as part of the installation (script, docker).
|
||||
freqUI can also be manually installed by using the `freqtrade install-ui` command.
|
||||
This same command can also be used to update freqUI to new new releases.
|
||||
This same command can also be used to update freqUI to new releases.
|
||||
|
||||
Once the bot is started in trade / dry-run mode (with `freqtrade trade`) - the UI will be available under the configured API port (by default `http://127.0.0.1:8080`).
|
||||
|
||||
@@ -70,7 +70,16 @@ Things you can change (among others):
|
||||

|
||||

|
||||
|
||||
## Backtesting
|
||||
## Webserver mode
|
||||
|
||||
when freqtrade is started in [webserver mode](utils.md#webserver-mode) (freqtrade started with `freqtrade webserver`), the webserver will start in a special mode allowing for additional features, for example:
|
||||
|
||||
* Downloading data
|
||||
* Testing pairlists
|
||||
* [Backtesting strategies](#backtesting)
|
||||
* ... to be expanded
|
||||
|
||||
### Backtesting
|
||||
|
||||
When freqtrade is started in [webserver mode](utils.md#webserver-mode) (freqtrade started with `freqtrade webserver`), the backtesting view becomes available.
|
||||
This view allows you to backtest strategies and visualize the results.
|
||||
|
||||
@@ -79,7 +79,7 @@ Mandatory parameters are marked as **Required** and have to be set in one of the
|
||||
| `model_type` | Model string from stable_baselines3 or SBcontrib. Available strings include: `'TRPO', 'ARS', 'RecurrentPPO', 'MaskablePPO', 'PPO', 'A2C', 'DQN'`. User should ensure that `model_training_parameters` match those available to the corresponding stable_baselines3 model by visiting their documentation. [PPO doc](https://stable-baselines3.readthedocs.io/en/master/modules/ppo.html) (external website) <br> **Datatype:** string.
|
||||
| `policy_type` | One of the available policy types from stable_baselines3 <br> **Datatype:** string.
|
||||
| `max_training_drawdown_pct` | The maximum drawdown that the agent is allowed to experience during training. <br> **Datatype:** float. <br> Default: 0.8
|
||||
| `cpu_count` | Number of threads/cpus to dedicate to the Reinforcement Learning training process (depending on if `ReinforcementLearning_multiproc` is selected or not). Recommended to leave this untouched, by default, this value is set to the total number of physical cores minus 1. <br> **Datatype:** int.
|
||||
| `cpu_count` | Number of threads/cpus to dedicate to the Reinforcement Learning training process (depending on if `ReinforcementLearner_multiproc` is selected or not). Recommended to leave this untouched, by default, this value is set to the total number of physical cores minus 1. <br> **Datatype:** int.
|
||||
| `model_reward_parameters` | Parameters used inside the customizable `calculate_reward()` function in `ReinforcementLearner.py` <br> **Datatype:** int.
|
||||
| `add_state_info` | Tell FreqAI to include state information in the feature set for training and inferencing. The current state variables include trade duration, current profit, trade position. This is only available in dry/live runs, and is automatically switched to false for backtesting. <br> **Datatype:** bool. <br> Default: `False`.
|
||||
| `net_arch` | Network architecture which is well described in [`stable_baselines3` doc](https://stable-baselines3.readthedocs.io/en/master/guide/custom_policy.html#examples). In summary: `[<shared layers>, dict(vf=[<non-shared value network layers>], pi=[<non-shared policy network layers>])]`. By default this is set to `[128, 128]`, which defines 2 shared hidden layers with 128 units each.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
FreqAI is a software designed to automate a variety of tasks associated with training a predictive machine learning model to generate market forecasts given a set of input signals. In general, FreqAI aims to be a sandbox for easily deploying robust machine learning libraries on real-time data ([details](#freqai-position-in-open-source-machine-learning-landscape)).
|
||||
|
||||
!!! Note
|
||||
FreqAI is, and always will be, a not-for-profit, open-source project. FreqAI does *not* have a crypto token, FreqAI does *not* sell signals, and FreqAI does not have a domain besides the present [freqtrade documentation](https://www.freqtrade.io/en/latest/freqai/).
|
||||
FreqAI is, and always will be, a not-for-profit, open source project. FreqAI does *not* have a crypto token, FreqAI does *not* sell signals, and FreqAI does not have a domain besides the present [freqtrade documentation](https://www.freqtrade.io/en/latest/freqai/).
|
||||
|
||||
Features include:
|
||||
|
||||
@@ -81,9 +81,9 @@ If you are using docker, a dedicated tag with FreqAI dependencies is available a
|
||||
!!! note "docker-compose-freqai.yml"
|
||||
We do provide an explicit docker-compose file for this in `docker/docker-compose-freqai.yml` - which can be used via `docker compose -f docker/docker-compose-freqai.yml run ...` - or can be copied to replace the original docker file. This docker-compose file also contains a (disabled) section to enable GPU resources within docker containers. This obviously assumes the system has GPU resources available.
|
||||
|
||||
### FreqAI position in open-source machine learning landscape
|
||||
### FreqAI position in open source machine learning landscape
|
||||
|
||||
Forecasting chaotic time-series based systems, such as equity/cryptocurrency markets, requires a broad set of tools geared toward testing a wide range of hypotheses. Fortunately, a recent maturation of robust machine learning libraries (e.g. `scikit-learn`) has opened up a wide range of research possibilities. Scientists from a diverse range of fields can now easily prototype their studies on an abundance of established machine learning algorithms. Similarly, these user-friendly libraries enable "citizen scientists" to use their basic Python skills for data exploration. However, leveraging these machine learning libraries on historical and live chaotic data sources can be logistically difficult and expensive. Additionally, robust data collection, storage, and handling presents a disparate challenge. [`FreqAI`](#freqai) aims to provide a generalized and extensible open-sourced framework geared toward live deployments of adaptive modeling for market forecasting. The `FreqAI` framework is effectively a sandbox for the rich world of open-source machine learning libraries. Inside the `FreqAI` sandbox, users find they can combine a wide variety of third-party libraries to test creative hypotheses on a free live 24/7 chaotic data source - cryptocurrency exchange data.
|
||||
Forecasting chaotic time-series based systems, such as equity/cryptocurrency markets, requires a broad set of tools geared toward testing a wide range of hypotheses. Fortunately, a recent maturation of robust machine learning libraries (e.g. `scikit-learn`) has opened up a wide range of research possibilities. Scientists from a diverse range of fields can now easily prototype their studies on an abundance of established machine learning algorithms. Similarly, these user-friendly libraries enable "citizen scientists" to use their basic Python skills for data exploration. However, leveraging these machine learning libraries on historical and live chaotic data sources can be logistically difficult and expensive. Additionally, robust data collection, storage, and handling presents a disparate challenge. [`FreqAI`](#freqai) aims to provide a generalized and extensible open-sourced framework geared toward live deployments of adaptive modeling for market forecasting. The `FreqAI` framework is effectively a sandbox for the rich world of open source machine learning libraries. Inside the `FreqAI` sandbox, users find they can combine a wide variety of third-party libraries to test creative hypotheses on a free live 24/7 chaotic data source - cryptocurrency exchange data.
|
||||
|
||||
### Citing FreqAI
|
||||
|
||||
|
||||
@@ -46,10 +46,17 @@ Depending on the space you want to optimize, only some of the below are required
|
||||
|
||||
* define parameters with `space='buy'` - for entry signal optimization
|
||||
* define parameters with `space='sell'` - for exit signal optimization
|
||||
* define parameters with `space='enter'` - for entry signal optimization
|
||||
* define parameters with `space='exit'` - for exit signal optimization
|
||||
* define parameters with `space='protection'` - for protection optimization
|
||||
* define parameters with `space='random_spacename'` - for better control over which parameters are optimized together
|
||||
|
||||
Pick the space name that suits the parameter best. We recommend to use either `buy` / `sell` or `enter` / `exit` for clarity (however there's no technical limitation in this regard).
|
||||
|
||||
!!! Note
|
||||
`populate_indicators` needs to create all indicators any of the spaces may use, otherwise hyperopt will not work.
|
||||
|
||||
|
||||
Rarely you may also need to create a [nested class](advanced-hyperopt.md#overriding-pre-defined-spaces) named `HyperOpt` and implement
|
||||
|
||||
* `roi_space` - for custom ROI optimization (if you need the ranges for the ROI parameters in the optimization hyperspace that differ from default)
|
||||
@@ -79,15 +86,15 @@ Based on the loss function result, hyperopt will determine the next set of param
|
||||
|
||||
### Configure your Guards and Triggers
|
||||
|
||||
There are two places you need to change in your strategy file to add a new buy hyperopt for testing:
|
||||
There are two places you need to change in your strategy file to add a new hyperopt parameter for optimization:
|
||||
|
||||
* Define the parameters at the class level hyperopt shall be optimizing.
|
||||
* Within `populate_entry_trend()` - use defined parameter values instead of raw constants.
|
||||
|
||||
There you have two different types of indicators: 1. `guards` and 2. `triggers`.
|
||||
|
||||
1. Guards are conditions like "never buy if ADX < 10", or never buy if current price is over EMA10.
|
||||
2. Triggers are ones that actually trigger buy in specific moment, like "buy when EMA5 crosses over EMA10" or "buy when close price touches lower Bollinger band".
|
||||
1. Guards are conditions like "never enter if ADX < 10", or never enter if current price is over EMA10.
|
||||
2. Triggers are ones that actually trigger entry in specific moment, like "enter when EMA5 crosses over EMA10" or "enter when close price touches lower Bollinger band".
|
||||
|
||||
!!! Hint "Guards and Triggers"
|
||||
Technically, there is no difference between Guards and Triggers.
|
||||
@@ -160,9 +167,11 @@ We use these to either enable or disable the ADX and RSI guards.
|
||||
The last one we call `trigger` and use it to decide which buy trigger we want to use.
|
||||
|
||||
!!! Note "Parameter space assignment"
|
||||
Parameters must either be assigned to a variable named `buy_*` or `sell_*` - or contain `space='buy'` | `space='sell'` to be assigned to a space correctly.
|
||||
If no parameter is available for a space, you'll receive the error that no space was found when running hyperopt.
|
||||
- Parameters must either be assigned to a variable named `buy_*`, `sell_*`, `enter_*` or `exit_*` or `protection_*` - or contain have a space assigned explicitly via parameter (`space='buy'`, `space='sell'`, `space='protection'`).
|
||||
- Parameters with conflicting assignments (e.g. `buy_adx = IntParameter(4, 24, default=14, space='sell')`) will use the explicit space assignment.
|
||||
- If no parameter is available for a space, you'll receive the error that no space was found when running hyperopt.
|
||||
Parameters with unclear space (e.g. `adx_period = IntParameter(4, 24, default=14)` - no explicit nor implicit space) will not be detected and will therefore be ignored.
|
||||
Spaces can also be custom named (e.g. `space='my_custom_space'`), with the only limitation that the space name cannot be `all`, `default` - and must result in a valid python identifier.
|
||||
|
||||
So let's write the buy strategy using these values:
|
||||
|
||||
@@ -520,21 +529,24 @@ freqtrade hyperopt --strategy <strategyname> --timerange 20210101-20210201
|
||||
### Running Hyperopt with Smaller Search Space
|
||||
|
||||
Use the `--spaces` option to limit the search space used by hyperopt.
|
||||
Letting Hyperopt optimize everything is a huuuuge search space.
|
||||
Often it might make more sense to start by just searching for initial buy algorithm.
|
||||
Or maybe you just want to optimize your stoploss or roi table for that awesome new buy strategy you have.
|
||||
Letting Hyperopt optimize everything is often a huuuuge search space.
|
||||
Often it might make more sense to start by just searching for initial entry algorithm.
|
||||
Or maybe you just want to optimize your stoploss or roi table for that awesome new strategy you have.
|
||||
|
||||
Legal values are:
|
||||
|
||||
* `all`: optimize everything
|
||||
* `all`: optimize everything (including custom spaces)
|
||||
* `buy`: just search for a new buy strategy
|
||||
* `sell`: just search for a new sell strategy
|
||||
* `enter`: just search for a new entry logic
|
||||
* `exit`: just search for a new entry logic
|
||||
* `roi`: just optimize the minimal profit table for your strategy
|
||||
* `stoploss`: search for the best stoploss value
|
||||
* `trailing`: search for the best trailing stop values
|
||||
* `trades`: search for the best max open trades values
|
||||
* `protection`: search for the best protection parameters (read the [protections section](#optimizing-protections) on how to properly define these)
|
||||
* `default`: `all` except `trailing`, `trades` and `protection`
|
||||
* `custom_space_name`: any custom space used by any parameter in your strategy
|
||||
* space-separated list of any of the above values for example `--spaces roi stoploss`
|
||||
|
||||
The default Hyperopt Search Space, used when no `--space` command line option is specified, does not include the `trailing` hyperspace. We recommend you to run optimization for the `trailing` hyperspace separately, when the best parameters for other hyperspaces were found, validated and pasted into your custom strategy.
|
||||
|
||||
21
docs/includes/exchange-features.md
Normal file
21
docs/includes/exchange-features.md
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
| Exchange | Mode | Margin mode | Stoploss type |
|
||||
|---------|---------|------|------------------|
|
||||
| [Binance](exchanges.md#binance) | spot | | limit |
|
||||
| [Binance](exchanges.md#binance) | futures | isolated, cross | market, limit |
|
||||
| [Bingx](exchanges.md#bingx) | spot | | market, limit |
|
||||
| [Bitmart](exchanges.md#bitmart) | spot | | ❌ (not supported) |
|
||||
| [Bitget](exchanges.md#bitget) | spot | | market, limit |
|
||||
| [Bitget](exchanges.md#bitget) | futures | isolated | market, limit |
|
||||
| [Bybit](exchanges.md#bybit) | spot | | ❌ (not supported) |
|
||||
| [Bybit](exchanges.md#bybit) | futures | isolated | market, limit |
|
||||
| [Gate.io](exchanges.md#gateio) | spot | | limit |
|
||||
| [Gate.io](exchanges.md#gateio) | futures | isolated | limit |
|
||||
| [HTX](exchanges.md#htx) | spot | | limit |
|
||||
| [Hyperliquid](exchanges.md#hyperliquid) | spot | | ❌ (not supported) |
|
||||
| [Hyperliquid](exchanges.md#hyperliquid) | futures | isolated, cross | limit |
|
||||
| [Kraken](exchanges.md#kraken) | spot | | market, limit |
|
||||
| [OKX](exchanges.md#okx) | spot | | limit |
|
||||
| [OKX](exchanges.md#okx) | futures | isolated | limit |
|
||||
| [Bitvavo](exchanges.md#bitvavo) | spot | | ❌ (not supported) |
|
||||
| [Kucoin](exchanges.md#kucoin) | spot | | market, limit |
|
||||
@@ -4,7 +4,7 @@ Pairlist Handlers define the list of pairs (pairlist) that the bot should trade.
|
||||
|
||||
In your configuration, you can use Static Pairlist (defined by the [`StaticPairList`](#static-pair-list) Pairlist Handler) and Dynamic Pairlist (defined by the [`VolumePairList`](#volume-pair-list) and [`PercentChangePairList`](#percent-change-pair-list) Pairlist Handlers).
|
||||
|
||||
Additionally, [`AgeFilter`](#agefilter), [`PrecisionFilter`](#precisionfilter), [`PriceFilter`](#pricefilter), [`ShuffleFilter`](#shufflefilter), [`SpreadFilter`](#spreadfilter) and [`VolatilityFilter`](#volatilityfilter) act as Pairlist Filters, removing certain pairs and/or moving their positions in the pairlist.
|
||||
Additionally, [`AgeFilter`](#agefilter), [`DelistFilter`](#delistfilter), [`PrecisionFilter`](#precisionfilter), [`PriceFilter`](#pricefilter), [`ShuffleFilter`](#shufflefilter), [`SpreadFilter`](#spreadfilter) and [`VolatilityFilter`](#volatilityfilter) act as Pairlist Filters, removing certain pairs and/or moving their positions in the pairlist.
|
||||
|
||||
If multiple Pairlist Handlers are used, they are chained and a combination of all Pairlist Handlers forms the resulting pairlist the bot uses for trading and backtesting. Pairlist Handlers are executed in the sequence they are configured. You can define either `StaticPairList`, `VolumePairList`, `ProducerPairList`, `RemotePairList`, `MarketCapPairList` or `PercentChangePairList` as the starting Pairlist Handler.
|
||||
|
||||
@@ -27,6 +27,7 @@ You may also use something like `.*DOWN/BTC` or `.*UP/BTC` to exclude leveraged
|
||||
* [`RemotePairList`](#remotepairlist)
|
||||
* [`MarketCapPairList`](#marketcappairlist)
|
||||
* [`AgeFilter`](#agefilter)
|
||||
* [`DelistFilter`](#delistfilter)
|
||||
* [`FullTradesFilter`](#fulltradesfilter)
|
||||
* [`OffsetFilter`](#offsetfilter)
|
||||
* [`PerformanceFilter`](#performancefilter)
|
||||
@@ -38,7 +39,7 @@ You may also use something like `.*DOWN/BTC` or `.*UP/BTC` to exclude leveraged
|
||||
* [`VolatilityFilter`](#volatilityfilter)
|
||||
|
||||
!!! Tip "Testing pairlists"
|
||||
Pairlist configurations can be quite tricky to get right. Best use the [`test-pairlist`](utils.md#test-pairlist) utility sub-command to test your configuration quickly.
|
||||
Pairlist configurations can be quite tricky to get right. Best use freqUI in [webserver mode](freq-ui.md#webserver-mode) or the [`test-pairlist`](utils.md#test-pairlist) utility sub-command to test your Pairlist configuration quickly.
|
||||
|
||||
#### Static Pair List
|
||||
|
||||
@@ -180,7 +181,7 @@ More sophisticated approach can be used, by using `lookback_timeframe` for candl
|
||||
* `refresh_period`: Defines the interval (in seconds) at which the pairlist will be refreshed. The default is 1800 seconds (30 minutes).
|
||||
* `lookback_days`: Number of days to look back. When `lookback_days` is selected, the `lookback_timeframe` is defaulted to 1 day.
|
||||
* `lookback_timeframe`: Timeframe to use for the lookback period.
|
||||
* `lookback_period`: Number of periods to look back at.
|
||||
* `lookback_period`: Number of periods to look back at.
|
||||
|
||||
When PercentChangePairList is used after other Pairlist Handlers, it will operate on the outputs of those handlers. If it is the leading Pairlist Handler, it will select pairs from all available markets with the specified stake currency.
|
||||
|
||||
@@ -270,7 +271,6 @@ You can limit the length of the pairlist with the optional parameter `number_ass
|
||||
],
|
||||
```
|
||||
|
||||
|
||||
!!! Tip "Combining pairlists"
|
||||
This pairlist can be combined with all other pairlists and filters for further pairlist reduction, and can also act as an "additional" pairlist, on top of already defined pairs.
|
||||
`ProducerPairList` can also be used multiple times in sequence, combining the pairs from multiple producers.
|
||||
@@ -312,7 +312,7 @@ The `pairlist_url` option specifies the URL of the remote server where the pairl
|
||||
The `save_to_file` option, when provided with a valid filename, saves the processed pairlist to that file in JSON format. This option is optional, and by default, the pairlist is not saved to a file.
|
||||
|
||||
??? Example "Multi bot with shared pairlist example"
|
||||
|
||||
|
||||
`save_to_file` can be used to save the pairlist to a file with Bot1:
|
||||
|
||||
```json
|
||||
@@ -367,7 +367,7 @@ The optional `bearer_token` will be included in the requests Authorization Heade
|
||||
|
||||
#### MarketCapPairList
|
||||
|
||||
`MarketCapPairList` employs sorting/filtering of pairs by their marketcap rank based of CoinGecko. The returned pairlist will be sorted based of their marketcap ranks.
|
||||
`MarketCapPairList` employs sorting/filtering of pairs by their marketcap rank based of CoinGecko. The returned pairlist will be sorted based of their marketcap ranks if used in whitelist `mode`.
|
||||
|
||||
```json
|
||||
"pairlists": [
|
||||
@@ -376,16 +376,21 @@ The optional `bearer_token` will be included in the requests Authorization Heade
|
||||
"number_assets": 20,
|
||||
"max_rank": 50,
|
||||
"refresh_period": 86400,
|
||||
"mode": "whitelist",
|
||||
"categories": ["layer-1"]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
`number_assets` defines the maximum number of pairs returned by the pairlist. `max_rank` will determine the maximum rank used in creating/filtering the pairlist. It's expected that some coins within the top `max_rank` marketcap will not be included in the resulting pairlist since not all pairs will have active trading pairs in your preferred market/stake/exchange combination.
|
||||
`number_assets` defines the maximum number of pairs returned by the pairlist if used in whitelist `mode`. In blacklist `mode`, this setting will be ignored.
|
||||
|
||||
`max_rank` will determine the maximum rank used in creating/filtering the pairlist. It's expected that some coins within the top `max_rank` marketcap will not be included in the resulting pairlist since not all pairs will have active trading pairs in your preferred market/stake/exchange combination.
|
||||
While using a `max_rank` bigger than 250 is supported, it's not recommended, as it'll cause multiple API calls to CoinGecko, which can lead to rate limit issues.
|
||||
|
||||
The `refresh_period` setting defines the interval (in seconds) at which the marketcap rank data will be refreshed. The default is 86,400 seconds (1 day). The pairlist cache (`refresh_period`) applies to both generating pairlists (when in the first position in the list) and filtering instances (when not in the first position in the list).
|
||||
|
||||
The `mode` setting defines whether the plugin will filters in (whitelist `mode`) or filters out (blacklist `mode`) top marketcap ranked coins. By default, the plugin will be in whitelist mode.
|
||||
|
||||
The `categories` setting specifies the [coingecko categories](https://www.coingecko.com/en/categories) from which to select coins from. The default is an empty list `[]`, meaning no category filtering is applied.
|
||||
If an incorrect category string is chosen, the plugin will print the available categories from CoinGecko and fail. The category should be the ID of the category, for example, for `https://www.coingecko.com/en/categories/layer-1`, the category ID would be `layer-1`. You can pass multiple categories such as `["layer-1", "meme-token"]` to select from several categories.
|
||||
|
||||
@@ -407,6 +412,16 @@ be caught out buying before the pair has finished dropping in price.
|
||||
|
||||
This filter allows freqtrade to ignore pairs until they have been listed for at least `min_days_listed` days and listed before `max_days_listed`.
|
||||
|
||||
#### DelistFilter
|
||||
|
||||
Removes pairs that will be delisted on the exchange maximum `max_days_from_now` days from now (defaults to `0` which remove all future delisted pairs no matter how far from now). Currently this filter only supports following exchanges:
|
||||
|
||||
!!! Note "Available exchanges"
|
||||
Delist filter is available on Bybit Futures, Bitget Futures and Binance, where Binance Futures will work for both dry and live modes, while Binance Spot is limited to live mode (for technical reasons).
|
||||
|
||||
!!! Warning "Backtesting"
|
||||
`DelistFilter` does not support backtesting mode.
|
||||
|
||||
#### FullTradesFilter
|
||||
|
||||
Shrink whitelist to consist only in-trade pairs when the trade slots are full (when `max_open_trades` isn't being set to `-1` in the config).
|
||||
@@ -438,7 +453,7 @@ Example to remove the first 10 pairs from the pairlist, and takes the next 20 (t
|
||||
```
|
||||
|
||||
!!! Warning
|
||||
When `OffsetFilter` is used to split a larger pairlist among multiple bots in combination with `VolumeFilter`
|
||||
When `OffsetFilter` is used to split a larger pairlist among multiple bots in combination with `VolumeFilter`
|
||||
it can not be guaranteed that pairs won't overlap due to slightly different refresh intervals for the
|
||||
`VolumeFilter`.
|
||||
|
||||
@@ -601,7 +616,7 @@ Adding `"sort_direction": "asc"` or `"sort_direction": "desc"` enables sorting m
|
||||
|
||||
### Full example of Pairlist Handlers
|
||||
|
||||
The below example blacklists `BNB/BTC`, uses `VolumePairList` with `20` assets, sorting pairs by `quoteVolume` and applies [`PrecisionFilter`](#precisionfilter) and [`PriceFilter`](#pricefilter), filtering all assets where 1 price unit is > 1%. Then the [`SpreadFilter`](#spreadfilter) and [`VolatilityFilter`](#volatilityfilter) is applied and pairs are finally shuffled with the random seed set to some predefined value.
|
||||
The below example blacklists `BNB/BTC`, uses `VolumePairList` with `20` assets, sorting pairs by `quoteVolume`, then filter future delisted pairs using [`DelistFilter`](#delistfilter) and [`AgeFilter`](#agefilter) to remove pairs that are listed less than 10 days ago. After that [`PrecisionFilter`](#precisionfilter) and [`PriceFilter`](#pricefilter) are applied, filtering all assets where 1 price unit is > 1%. Then the [`SpreadFilter`](#spreadfilter) and [`VolatilityFilter`](#volatilityfilter) are applied and pairs are finally shuffled with the random seed set to some predefined value.
|
||||
|
||||
```json
|
||||
"exchange": {
|
||||
@@ -614,6 +629,10 @@ The below example blacklists `BNB/BTC`, uses `VolumePairList` with `20` assets,
|
||||
"number_assets": 20,
|
||||
"sort_key": "quoteVolume"
|
||||
},
|
||||
{
|
||||
"method": "DelistFilter",
|
||||
"max_days_from_now": 0,
|
||||
},
|
||||
{"method": "AgeFilter", "min_days_listed": 10},
|
||||
{"method": "PrecisionFilter"},
|
||||
{"method": "PriceFilter", "low_price_ratio": 0.01},
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
This section will highlight a few projects from members of the community.
|
||||
!!! Note
|
||||
The projects below are for the most part not maintained by the freqtrade , therefore use your own caution before using them.
|
||||
The projects below are for the most part not maintained by the freqtrade team, therefore use your own caution before using them.
|
||||
|
||||
- [Example freqtrade strategies](https://github.com/freqtrade/freqtrade-strategies/)
|
||||
- [FrequentHippo - Statistics of dry/live runs and backtests](http://frequenthippo.ddns.net) (by hippocritical).
|
||||
- [Online pairlist generator](https://remotepairlist.com/) (by Blood4rc).
|
||||
- [Freqtrade Backtesting Project](https://strat.ninja/) (by Blood4rc).
|
||||
- [Freqtrade analysis notebook](https://github.com/froggleston/freqtrade_analysis_notebook) (by Froggleston).
|
||||
- [TUI for freqtrade](https://github.com/froggleston/freqtrade-frogtrade9000) (by Froggleston).
|
||||
- [FTUI - Terminal UI for freqtrade](https://github.com/freqtrade/ftui) (by Froggleston).
|
||||
- [Bot Academy](https://botacademy.ddns.net/) (by stash86) - Blog about crypto bot projects.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||

|
||||
|
||||
[](https://github.com/freqtrade/freqtrade/actions/)
|
||||
[](https://github.com/freqtrade/freqtrade/actions/workflows/ci.yml)
|
||||
[](https://doi.org/10.21105/joss.04864)
|
||||
[](https://coveralls.io/github/freqtrade/freqtrade?branch=develop)
|
||||
|
||||
@@ -39,6 +39,7 @@ Please read the [exchange specific notes](exchanges.md) to learn about eventual,
|
||||
|
||||
- [X] [Binance](https://www.binance.com/)
|
||||
- [X] [BingX](https://bingx.com/invite/0EM9RX)
|
||||
- [X] [Bitget](https://www.bitget.com/)
|
||||
- [X] [Bitmart](https://bitmart.com/)
|
||||
- [X] [Bybit](https://bybit.com/)
|
||||
- [X] [Gate.io](https://www.gate.io/ref/6266643)
|
||||
@@ -52,6 +53,7 @@ Please read the [exchange specific notes](exchanges.md) to learn about eventual,
|
||||
### Supported Futures Exchanges (experimental)
|
||||
|
||||
- [X] [Binance](https://www.binance.com/)
|
||||
- [X] [Bitget](https://www.bitget.com/)
|
||||
- [X] [Bybit](https://bybit.com/)
|
||||
- [X] [Gate.io](https://www.gate.io/ref/6266643)
|
||||
- [X] [Hyperliquid](https://hyperliquid.xyz/) (A decentralized exchange, or DEX)
|
||||
|
||||
@@ -24,7 +24,7 @@ The easiest way to install and run Freqtrade is to clone the bot Github reposito
|
||||
The `stable` 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.11 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.
|
||||
Either [uv](https://docs.astral.sh/uv/), or Python3.11 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.
|
||||
Also, python headers (`python<yourversion>-dev` / `python<yourversion>-devel`) must be available for the installation to complete successfully.
|
||||
|
||||
!!! Warning "Up-to-date clock"
|
||||
|
||||
@@ -17,7 +17,7 @@ If you already have an existing strategy, please read the [strategy migration gu
|
||||
|
||||
## Shorting
|
||||
|
||||
Shorting is not possible when trading with [`trading_mode`](#leverage-trading-modes) set to `spot`. To short trade, `trading_mode` must be set to `margin`(currently unavailable) or [`futures`](#futures), with [`margin_mode`](#margin-mode) set to `cross`(currently unavailable) or [`isolated`](#isolated-margin-mode)
|
||||
Shorting is not possible when trading with [`trading_mode`](#leverage-trading-modes) set to `spot`. To short trade, `trading_mode` must be set to `margin`(currently unavailable) or [`futures`](#futures), with [`margin_mode`](#margin-mode) set to [`cross`](#cross-margin-mode) or [`isolated`](#isolated-margin-mode)
|
||||
|
||||
For a strategy to short, the strategy class must set the class variable `can_short = True`
|
||||
|
||||
@@ -72,7 +72,7 @@ A futures pair will therefore have the naming of `base/quote:settle` (e.g. `ETH/
|
||||
On top of `trading_mode` - you will also have to configure your `margin_mode`.
|
||||
While freqtrade currently only supports one margin mode, this will change, and by configuring it now you're all set for future updates.
|
||||
|
||||
The possible values are: `isolated`, or `cross`(*currently unavailable*).
|
||||
The possible values are: `isolated`, or `cross`.
|
||||
|
||||
#### Isolated margin mode
|
||||
|
||||
@@ -92,6 +92,11 @@ One account is used to share collateral between markets (trading pairs). Margin
|
||||
|
||||
Please read the [exchange specific notes](exchanges.md) for exchanges that support this mode and how they differ.
|
||||
|
||||
!!! Warning "Increased risk of liquidation"
|
||||
Cross margin mode increases the risk of full account liquidation, as all trades share the same collateral.
|
||||
A loss on one trade can affect the liquidation price of other trades.
|
||||
Also, cross-position influence may not be fully simulated in dry-run or backtesting mode.
|
||||
|
||||
## Set leverage to use
|
||||
|
||||
Different strategies and risk profiles will require different levels of leverage.
|
||||
|
||||
@@ -22,6 +22,7 @@ This is done by not looking at the strategy code itself, but at changed indicato
|
||||
- `--dry-run-wallet` is forced to be basically infinite (1 billion).
|
||||
- `--stake-amount` is forced to be a static 10000 (10k).
|
||||
- `--enable-protections` is forced to be off.
|
||||
- `order_types` are forced to be "market" (late entries) unless `--lookahead-allow-limit-orders` is set.
|
||||
|
||||
These are set to avoid users accidentally generating false positives.
|
||||
|
||||
@@ -99,6 +100,9 @@ This would lead to a false-negative, i.e. the strategy will be reported as non-b
|
||||
Please don't use any options like enabling position stacking as this will distort the number of checked signals.
|
||||
If you decide to do so, then make doubly sure that you won't ever run out of `max_open_trades` slots,
|
||||
and that you have enough capital in the backtest wallet configuration.
|
||||
- limit orders in combination with `custom_entry_price()` and `custom_exit_price()` callbacks can cause late / delayed entries and exists, causing false positives.
|
||||
To avoid this - market orders are forced for this command. This implicitly means that `custom_entry_price()` and `custom_exit_price()` callbacks are not called.
|
||||
Using `--lookahead-allow-limit-orders` will skip the override and use your configured order types - however has shown to eventually produce false positives.
|
||||
- In the results table, the `biased_indicators` column
|
||||
will falsely flag FreqAI target indicators defined in `set_freqai_targets()` as biased.
|
||||
**These are not biased and can safely be ignored.**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
markdown==3.8.2
|
||||
markdown==3.10
|
||||
mkdocs==1.6.1
|
||||
mkdocs-material==9.6.18
|
||||
mkdocs-material==9.7.0
|
||||
mdx_truly_sane_lists==1.3
|
||||
pymdown-extensions==10.16.1
|
||||
pymdown-extensions==10.17.1
|
||||
jinja2==3.1.6
|
||||
mike==2.1.3
|
||||
|
||||
209
docs/rest-api.md
209
docs/rest-api.md
@@ -140,189 +140,26 @@ This method will work for all arguments - check the "show" command for a list of
|
||||
# Get the status of the bot
|
||||
ping = client.ping()
|
||||
print(ping)
|
||||
|
||||
# Add pairs to blacklist
|
||||
client.blacklist("BTC/USDT", "ETH/USDT")
|
||||
# Add pairs to blacklist by supplying a list
|
||||
client.blacklist(*listPairs)
|
||||
# ...
|
||||
```
|
||||
|
||||
For a full list of available commands, please refer to the list below.
|
||||
|
||||
#### Freqtrade client- available commands
|
||||
|
||||
Possible commands can be listed from the rest-client script using the `help` command.
|
||||
|
||||
``` bash
|
||||
freqtrade-client help
|
||||
```
|
||||
|
||||
``` output
|
||||
Possible commands:
|
||||
--8<-- "commands/freqtrade-client.md"
|
||||
|
||||
available_pairs
|
||||
Return available pair (backtest data) based on timeframe / stake_currency selection
|
||||
|
||||
:param timeframe: Only pairs with this timeframe available.
|
||||
:param stake_currency: Only pairs that include this timeframe
|
||||
|
||||
balance
|
||||
Get the account balance.
|
||||
|
||||
blacklist
|
||||
Show the current blacklist.
|
||||
|
||||
:param add: List of coins to add (example: "BNB/BTC")
|
||||
|
||||
cancel_open_order
|
||||
Cancel open order for trade.
|
||||
|
||||
:param trade_id: Cancels open orders for this trade.
|
||||
|
||||
count
|
||||
Return the amount of open trades.
|
||||
|
||||
daily
|
||||
Return the profits for each day, and amount of trades.
|
||||
|
||||
delete_lock
|
||||
Delete (disable) lock from the database.
|
||||
|
||||
:param lock_id: ID for the lock to delete
|
||||
|
||||
delete_trade
|
||||
Delete trade from the database.
|
||||
Tries to close open orders. Requires manual handling of this asset on the exchange.
|
||||
|
||||
:param trade_id: Deletes the trade with this ID from the database.
|
||||
|
||||
forcebuy
|
||||
Buy an asset.
|
||||
|
||||
:param pair: Pair to buy (ETH/BTC)
|
||||
:param price: Optional - price to buy
|
||||
|
||||
forceenter
|
||||
Force entering a trade
|
||||
|
||||
:param pair: Pair to buy (ETH/BTC)
|
||||
:param side: 'long' or 'short'
|
||||
:param price: Optional - price to buy
|
||||
|
||||
forceexit
|
||||
Force-exit a trade.
|
||||
|
||||
:param tradeid: Id of the trade (can be received via status command)
|
||||
:param ordertype: Order type to use (must be market or limit)
|
||||
:param amount: Amount to sell. Full sell if not given
|
||||
|
||||
health
|
||||
Provides a quick health check of the running bot.
|
||||
|
||||
lock_add
|
||||
Manually lock a specific pair
|
||||
|
||||
:param pair: Pair to lock
|
||||
:param until: Lock until this date (format "2024-03-30 16:00:00Z")
|
||||
:param side: Side to lock (long, short, *)
|
||||
:param reason: Reason for the lock
|
||||
|
||||
locks
|
||||
Return current locks
|
||||
|
||||
logs
|
||||
Show latest logs.
|
||||
|
||||
:param limit: Limits log messages to the last <limit> logs. No limit to get the entire log.
|
||||
|
||||
pair_candles
|
||||
Return live dataframe for <pair><timeframe>.
|
||||
|
||||
:param pair: Pair to get data for
|
||||
:param timeframe: Only pairs with this timeframe available.
|
||||
:param limit: Limit result to the last n candles.
|
||||
|
||||
pair_history
|
||||
Return historic, analyzed dataframe
|
||||
|
||||
:param pair: Pair to get data for
|
||||
:param timeframe: Only pairs with this timeframe available.
|
||||
:param strategy: Strategy to analyze and get values for
|
||||
:param timerange: Timerange to get data for (same format than --timerange endpoints)
|
||||
|
||||
performance
|
||||
Return the performance of the different coins.
|
||||
|
||||
ping
|
||||
simple ping
|
||||
|
||||
plot_config
|
||||
Return plot configuration if the strategy defines one.
|
||||
|
||||
profit
|
||||
Return the profit summary.
|
||||
|
||||
reload_config
|
||||
Reload configuration.
|
||||
|
||||
show_config
|
||||
Returns part of the configuration, relevant for trading operations.
|
||||
|
||||
start
|
||||
Start the bot if it's in the stopped state.
|
||||
|
||||
pause
|
||||
Pause the bot if it's in the running state. If triggered on stopped state will handle open positions.
|
||||
|
||||
stats
|
||||
Return the stats report (durations, sell-reasons).
|
||||
|
||||
status
|
||||
Get the status of open trades.
|
||||
|
||||
stop
|
||||
Stop the bot. Use `start` to restart.
|
||||
|
||||
stopbuy
|
||||
Stop buying (but handle sells gracefully). Use `reload_config` to reset.
|
||||
|
||||
strategies
|
||||
Lists available strategies
|
||||
|
||||
strategy
|
||||
Get strategy details
|
||||
|
||||
:param strategy: Strategy class name
|
||||
|
||||
sysinfo
|
||||
Provides system information (CPU, RAM usage)
|
||||
|
||||
trade
|
||||
Return specific trade
|
||||
|
||||
:param trade_id: Specify which trade to get.
|
||||
|
||||
trades
|
||||
Return trades history, sorted by id
|
||||
|
||||
:param limit: Limits trades to the X last trades. Max 500 trades.
|
||||
:param offset: Offset by this amount of trades.
|
||||
|
||||
list_open_trades_custom_data
|
||||
Return a dict containing open trades custom-datas
|
||||
|
||||
:param key: str, optional - Key of the custom-data
|
||||
:param limit: Limits trades to X trades.
|
||||
:param offset: Offset by this amount of trades.
|
||||
|
||||
list_custom_data
|
||||
Return a dict containing custom-datas of a specified trade
|
||||
|
||||
:param trade_id: int - ID of the trade
|
||||
:param key: str, optional - Key of the custom-data
|
||||
|
||||
version
|
||||
Return the version of the bot.
|
||||
|
||||
whitelist
|
||||
Show the current whitelist.
|
||||
|
||||
|
||||
```
|
||||
|
||||
### Available endpoints
|
||||
|
||||
@@ -339,32 +176,32 @@ All endpoints in the below table need to be prefixed with the base URL of the AP
|
||||
| `/reload_config` | POST | Reloads the configuration file.
|
||||
| `/trades` | GET | List last trades. Limited to 500 trades per call.
|
||||
| `/trade/<tradeid>` | GET | Get specific trade.<br/>*Params:*<br/>- `tradeid` (`int`)
|
||||
| `/trades/<tradeid>` | DELETE | Remove trade from the database. Tries to close open orders. Requires manual handling of this trade on the exchange.<br/>*Params:*<br/>- `tradeid` (`int`)
|
||||
| `/trades/<tradeid>/open-order` | DELETE | Cancel open order for this trade.<br/>*Params:*<br/>- `tradeid` (`int`)
|
||||
| `/trades/<tradeid>/reload` | POST | Reload a trade from the Exchange. Only works in live, and can potentially help recover a trade that was manually sold on the exchange.<br/>*Params:*<br/>- `tradeid` (`int`)
|
||||
| `/trades/<tradeid>` | DELETE | Remove trade from the database. Tries to close open orders. Requires manual handling of this trade on the exchange.<br/>*Params:*<br/>- `tradeid` (`int`)
|
||||
| `/trades/<tradeid>/open-order` | DELETE | Cancel open order for this trade.<br/>*Params:*<br/>- `tradeid` (`int`)
|
||||
| `/trades/<tradeid>/reload` | POST | Reload a trade from the Exchange. Only works in live, and can potentially help recover a trade that was manually sold on the exchange.<br/>*Params:*<br/>- `tradeid` (`int`)
|
||||
| `/show_config` | GET | Shows part of the current configuration with relevant settings to operation.
|
||||
| `/logs` | GET | Shows last log messages.
|
||||
| `/status` | GET | Lists all open trades.
|
||||
| `/count` | GET | Displays number of trades used and available.
|
||||
| `/entries` | GET | Shows profit statistics for each enter tags for given pair (or all pairs if pair isn't given). Pair is optional.<br/>*Params:*<br/>- `pair` (`str`)
|
||||
| `/exits` | GET | Shows profit statistics for each exit reasons for given pair (or all pairs if pair isn't given). Pair is optional.<br/>*Params:*<br/>- `pair` (`str`)
|
||||
| `/mix_tags` | GET | 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.<br/>*Params:*<br/>- `pair` (`str`)
|
||||
| `/entries` | GET | Shows profit statistics for each enter tags for given pair (or all pairs if pair isn't given). Pair is optional.<br/>*Params:*<br/>- `pair` (`str`)
|
||||
| `/exits` | GET | Shows profit statistics for each exit reasons for given pair (or all pairs if pair isn't given). Pair is optional.<br/>*Params:*<br/>- `pair` (`str`)
|
||||
| `/mix_tags` | GET | 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.<br/>*Params:*<br/>- `pair` (`str`)
|
||||
| `/locks` | GET | Displays currently locked pairs.
|
||||
| `/locks` | POST | Locks a pair until "until". (Until will be rounded up to the nearest timeframe). Side is optional and is either `long` or `short` (default is `long`). Reason is optional.<br/>*Params:*<br/>- `<pair>` (`str`)<br/>- `<until>` (`datetime`)<br/>- `[side]` (`str`)<br/>- `[reason]` (`str`)
|
||||
| `/locks/<lockid>` | DELETE | Deletes (disables) the lock by id.<br/>*Params:*<br/>- `lockid` (`int`)
|
||||
| `/locks` | POST | Locks a pair until "until". (Until will be rounded up to the nearest timeframe). Side is optional and is either `long` or `short` (default is `long`). Reason is optional.<br/>*Params:*<br/>- `<pair>` (`str`)<br/>- `<until>` (`datetime`)<br/>- `[side]` (`str`)<br/>- `[reason]` (`str`)
|
||||
| `/locks/<lockid>` | DELETE | Deletes (disables) the lock by id.<br/>*Params:*<br/>- `lockid` (`int`)
|
||||
| `/profit` | GET | Display a summary of your profit/loss from close trades and some stats about your performance.
|
||||
| `/forceexit` | POST | Instantly exits the given trade (ignoring `minimum_roi`), 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 `all` is supplied as the `tradeid`, then all currently open trades will be forced to exit.<br/>*Params:*<br/>- `<tradeid>` (`int` or `str`)<br/>- `<ordertype>` (`str`)<br/>- `[amount]` (`float`)
|
||||
| `/forceenter` | POST | Instantly enters the given pair. Side is optional and is either `long` or `short` (default is `long`). Rate is optional. (`force_entry_enable` must be set to True)<br/>*Params:*<br/>- `<pair>` (`str`)<br/>- `<side>` (`str`)<br/>- `[rate]` (`float`)
|
||||
| `/forceenter` | POST | Instantly enters the given pair. Side is optional and is either `long` or `short` (default is `long`). Price, stake amount, entry tag and leverage are optional. Order type is optional and is either `market` or `long` (default using the value set in config). (`force_entry_enable` must be set to True)<br/>*Params:*<br/>- `<pair>` (`str`)<br/>- `<side>` (`str`)<br/>- `[price]` (`float`)<br/>- `[ordertype]` (`str`)<br/>- `[stakeamount]` (`float`)<br/>- `[entry_tag]` (`str`)<br/>- `[leverage]` (`float`)
|
||||
| `/performance` | GET | Show performance of each finished trade grouped by pair.
|
||||
| `/balance` | GET | Show account balance per currency.
|
||||
| `/daily` | GET | Shows profit or loss per day, over the last n days (n defaults to 7).<br/>*Params:*<br/>- `<n>` (`int`)
|
||||
| `/weekly` | GET | Shows profit or loss per week, over the last n days (n defaults to 4).<br/>*Params:*<br/>- `<n>` (`int`)
|
||||
| `/monthly` | GET | Shows profit or loss per month, over the last n days (n defaults to 3).<br/>*Params:*<br/>- `<n>` (`int`)
|
||||
| `/daily` | GET | Shows profit or loss per day, over the last n days (n defaults to 7).<br/>*Params:*<br/>- `timescale` (`int`)
|
||||
| `/weekly` | GET | Shows profit or loss per week, over the last n days (n defaults to 4).<br/>*Params:*<br/>- `timescale` (`int`)
|
||||
| `/monthly` | GET | Shows profit or loss per month, over the last n days (n defaults to 3).<br/>*Params:*<br/>- `timescale` (`int`)
|
||||
| `/stats` | GET | Display a summary of profit / loss reasons as well as average holding times.
|
||||
| `/whitelist` | GET | Show the current whitelist.
|
||||
| `/blacklist` | GET | Show the current blacklist.
|
||||
| `/blacklist` | POST | Adds the specified pair to the blacklist.<br/>*Params:*<br/>- `pair` (`str`)
|
||||
| `/blacklist` | DELETE | Deletes the specified list of pairs from the blacklist.<br/>*Params:*<br/>- `[pair,pair]` (`list[str]`)
|
||||
| `/blacklist` | POST | Adds the specified pair to the blacklist.<br/>*Params:*<br/>- `blacklist` (`str`)
|
||||
| `/blacklist` | DELETE | Deletes the specified list of pairs from the blacklist.<br/>*Params:*<br/>- `[pair,pair]` (`list[str]`)
|
||||
| `/pair_candles` | GET | Returns dataframe for a pair / timeframe combination while the bot is running. **Alpha**
|
||||
| `/pair_candles` | POST | Returns dataframe for a pair / timeframe combination while the bot is running, filtered by a provided list of columns to return. **Alpha**<br/>*Params:*<br/>- `<column_list>` (`list[str]`)
|
||||
| `/pair_history` | GET | Returns an analyzed dataframe for a given timerange, analyzed by a given strategy. **Alpha**
|
||||
@@ -488,7 +325,7 @@ To properly configure your reverse proxy (securely), please consult it's documen
|
||||
### OpenAPI interface
|
||||
|
||||
To enable the builtin openAPI interface (Swagger UI), specify `"enable_openapi": true` in the api_server configuration.
|
||||
This will enable the Swagger UI at the `/docs` endpoint. By default, that's running at http://localhost:8080/docs - but it'll depend on your settings.
|
||||
This will enable the Swagger UI at the `/docs` endpoint. By default, that's running at <http://localhost:8080/docs> - but it'll depend on your settings.
|
||||
|
||||
### Advanced API usage using JWT tokens
|
||||
|
||||
|
||||
@@ -26,18 +26,9 @@ These modes can be configured with these values:
|
||||
Stoploss on exchange is only supported for the following exchanges, and not all exchanges support both stop-limit and stop-market.
|
||||
The Order-type will be ignored if only one mode is available.
|
||||
|
||||
| Exchange | stop-loss type |
|
||||
|----------|-------------|
|
||||
| Binance | limit |
|
||||
| Binance Futures | market, limit |
|
||||
| Bingx | market, limit |
|
||||
| Bitget | market, limit |
|
||||
| HTX | limit |
|
||||
| kraken | market, limit |
|
||||
| Gate | limit |
|
||||
| Okx | limit |
|
||||
| Kucoin | stop-limit, stop-market|
|
||||
| Hyperliquid (futures only) | limit |
|
||||
??? info "Supported exchanges and stoploss types"
|
||||
|
||||
--8<-- "includes/exchange-features.md"
|
||||
|
||||
!!! Note "Tight stoploss"
|
||||
<ins>Do not set too low/tight stoploss value when using stop loss on exchange!</ins>
|
||||
|
||||
@@ -1243,15 +1243,23 @@ class AwesomeStrategy(IStrategy):
|
||||
|
||||
```
|
||||
|
||||
!!! Tip "Learn more about storing data"
|
||||
You can learn more about storing data on the [Storing custom trade data](strategy-advanced.md#storing-information-persistent) section.
|
||||
Please keep in mind that this is considered advanced usage, and should be used with care.
|
||||
|
||||
## Plot annotations callback
|
||||
|
||||
The plot annotations callback is called whenever freqUI requests data to display a chart.
|
||||
This callback has no meaning in the trade cycle context and is only used for charting purposes.
|
||||
|
||||
The strategy can then return a list of `AnnotationType` objects to be displayed on the chart.
|
||||
Depending on the content returned - the chart can display horizontal areas, vertical areas, or boxes.
|
||||
Depending on the content returned - the chart can display horizontal areas, vertical areas, boxes or lines.
|
||||
|
||||
The full object looks like this:
|
||||
### Annotation types
|
||||
|
||||
Currently two types of annotations are supported, `area` and `line`.
|
||||
|
||||
#### Area
|
||||
|
||||
``` json
|
||||
{
|
||||
@@ -1261,10 +1269,29 @@ The full object looks like this:
|
||||
"y_start": 94000.2, // Price / y axis value
|
||||
"y_end": 98000, // Price / y axis value
|
||||
"color": "",
|
||||
"z_level": 5, // z-level, higher values are drawn on top of lower values. Positions relative to the Chart elements need to be set in freqUI.
|
||||
"label": "some label"
|
||||
}
|
||||
```
|
||||
|
||||
#### Line
|
||||
|
||||
``` json
|
||||
{
|
||||
"type": "line", // Type of the annotation, currently only "line" is supported
|
||||
"start": "2024-01-01 15:00:00", // Start date of the line
|
||||
"end": "2024-01-01 16:00:00", // End date of the line
|
||||
"y_start": 94000.2, // Price / y axis value
|
||||
"y_end": 98000, // Price / y axis value
|
||||
"color": "",
|
||||
"z_level": 5, // z-level, higher values are drawn on top of lower values. Positions relative to the Chart elements need to be set in freqUI.
|
||||
"label": "some label",
|
||||
"width": 2, // Optional, line width in pixels. Defaults to 1
|
||||
"line_style": "dashed", // Optional, can be "solid", "dashed" or "dotted". Defaults to "solid"
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
The below example will mark the chart with areas for the hours 8 and 15, with a grey color, highlighting the market open and close hours.
|
||||
This is obviously a very basic example.
|
||||
|
||||
@@ -1332,7 +1359,7 @@ Entries will be validated, and won't be passed to the UI if they don't correspon
|
||||
while start_dt < end_date:
|
||||
start_dt += timedelta(hours=1)
|
||||
if (start_dt.hour % 4) == 0:
|
||||
mark_areas.append(
|
||||
annotations.append(
|
||||
{
|
||||
"type": "area",
|
||||
"label": "4h",
|
||||
@@ -1343,7 +1370,7 @@ Entries will be validated, and won't be passed to the UI if they don't correspon
|
||||
)
|
||||
elif (start_dt.hour % 2) == 0:
|
||||
price = dataframe.loc[dataframe["date"] == start_dt, ["close"]].mean()
|
||||
mark_areas.append(
|
||||
annotations.append(
|
||||
{
|
||||
"type": "area",
|
||||
"label": "2h",
|
||||
@@ -1352,6 +1379,7 @@ Entries will be validated, and won't be passed to the UI if they don't correspon
|
||||
"y_end": price * 1.01,
|
||||
"y_start": price * 0.99,
|
||||
"color": "rgba(0, 255, 0, 0.4)",
|
||||
"z_level": 5,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ Check the [configuration documentation](configuration.md) about how to set the b
|
||||
**Always use dry mode when testing as this gives you an idea of how your strategy will work in reality without risking capital.**
|
||||
|
||||
## Diving in deeper
|
||||
|
||||
**For the following section we will use the [user_data/strategies/sample_strategy.py](https://github.com/freqtrade/freqtrade/blob/develop/freqtrade/templates/sample_strategy.py)
|
||||
file as reference.**
|
||||
|
||||
@@ -99,9 +100,9 @@ file as reference.**
|
||||
Some common patterns for this are listed in the [Common Mistakes](#common-mistakes-when-developing-strategies) section of this document.
|
||||
|
||||
??? Hint "Lookahead and recursive analysis"
|
||||
Freqtrade includes two helpful commands to help assess common lookahead (using future data) and
|
||||
recursive bias (variance in indicator values) issues. Before running a strategy in dry or live more,
|
||||
you should always use these commands first. Please check the relevant documentation for
|
||||
Freqtrade includes two helpful commands to help assess common lookahead (using future data) and
|
||||
recursive bias (variance in indicator values) issues. Before running a strategy in dry or live more,
|
||||
you should always use these commands first. Please check the relevant documentation for
|
||||
[lookahead](lookahead-analysis.md) and [recursive](recursive-analysis.md) analysis.
|
||||
|
||||
### Dataframe
|
||||
@@ -154,7 +155,7 @@ Vectorized operations perform calculations across the whole range of data and ar
|
||||
|
||||
!!! Warning "Trade order assumptions"
|
||||
In backtesting, signals are generated on candle close. Trades are then initiated immeditely on next candle open.
|
||||
|
||||
|
||||
In dry and live, this may be delayed due to all pair dataframes needing to be analysed first, then trade processing
|
||||
for each of those pairs happens. This means that in dry/live you need to be mindful of having as low a computation
|
||||
delay as possible, usually by running a low number of pairs and having a CPU with a good clock speed.
|
||||
@@ -284,7 +285,7 @@ It's important to always return the dataframe without removing/modifying the col
|
||||
|
||||
This method will also define a new column, `"enter_long"` (`"enter_short"` for shorts), which needs to contain `1` for entries, and `0` for "no action". `enter_long` is a mandatory column that must be set even if the strategy is shorting only.
|
||||
|
||||
You can name your entry signals by using the `"enter_tag"` column, which can help debug and assess your strategy later.
|
||||
You can name your entry signals by using the `"enter_tag"` column, which can help debug and assess your strategy later.
|
||||
|
||||
Sample from `user_data/strategies/sample_strategy.py`:
|
||||
|
||||
@@ -555,7 +556,7 @@ A full sample can be found [in the DataProvider section](#complete-dataprovider-
|
||||
|
||||
??? Note "Alternative candle types"
|
||||
Informative_pairs can also provide a 3rd tuple element defining the candle type explicitly.
|
||||
Availability of alternative candle-types will depend on the trading-mode and the exchange.
|
||||
Availability of alternative candle-types will depend on the trading-mode and the exchange.
|
||||
In general, spot pairs cannot be used in futures markets, and futures candles can't be used as informative pairs for spot bots.
|
||||
Details about this may vary, if they do, this can be found in the exchange documentation.
|
||||
|
||||
@@ -783,6 +784,8 @@ Please always check the mode of operation to select the correct method to get da
|
||||
- `ohlcv(pair, timeframe)` - Currently cached candle (OHLCV) data for the pair, returns DataFrame or empty DataFrame.
|
||||
- [`orderbook(pair, maximum)`](#orderbookpair-maximum) - Returns latest orderbook data for the pair, a dict with bids/asks with a total of `maximum` entries.
|
||||
- [`ticker(pair)`](#tickerpair) - Returns current ticker data for the pair. See [ccxt documentation](https://github.com/ccxt/ccxt/wiki/Manual#price-tickers) for more details on the Ticker data structure.
|
||||
- [`check_delisting(pair)`](#check_delistingpair) - Return Datetime of the pair delisting schedule if any, otherwise return None
|
||||
- [`funding_rate(pair)`](#funding_ratepair) - Returns current funding rate data for the pair.
|
||||
- `runmode` - Property containing the current runmode.
|
||||
|
||||
### Example Usages
|
||||
@@ -854,6 +857,8 @@ dataframe, last_updated = self.dp.get_analyzed_dataframe(pair=metadata['pair'],
|
||||
|
||||
### *orderbook(pair, maximum)*
|
||||
|
||||
Retrieve the current order book for a pair.
|
||||
|
||||
``` python
|
||||
if self.dp.runmode.value in ('live', 'dry_run'):
|
||||
ob = self.dp.orderbook(metadata['pair'], 1)
|
||||
@@ -903,6 +908,69 @@ if self.dp.runmode.value in ('live', 'dry_run'):
|
||||
!!! Warning "Warning about backtesting"
|
||||
This method will always return up-to-date / real-time values. As such, usage during backtesting / hyperopt without runmode checks will lead to wrong results, e.g. your whole dataframe will contain the same single value in all rows.
|
||||
|
||||
### *check_delisting(pair)*
|
||||
|
||||
```python
|
||||
def custom_exit(self, pair: str, trade: Trade, current_time: datetime, current_rate: float, current_profit: float, **kwargs):
|
||||
if self.dp.runmode.value in ('live', 'dry_run'):
|
||||
delisting_dt = self.dp.check_delisting(pair)
|
||||
if delisting_dt is not None:
|
||||
return "delist"
|
||||
```
|
||||
|
||||
!!! Note "Availabiity of delisting information"
|
||||
This method is only available for certain exchanges and will return `None` in cases this is not available or if the pair is not scheduled for delisting.
|
||||
|
||||
!!! Warning "Warning about backtesting"
|
||||
This method will always return up-to-date / real-time values. As such, usage during backtesting / hyperopt without runmode checks will lead to wrong results, e.g. your whole dataframe will contain the same single value in all rows.
|
||||
|
||||
### *funding_rate(pair)*
|
||||
|
||||
Retrieves the current funding rate for the pair and only works for futures pairs in the format of `base/quote:settle` (e.g. `ETH/USDT:USDT`).
|
||||
|
||||
``` python
|
||||
if self.dp.runmode.value in ('live', 'dry_run'):
|
||||
funding_rate = self.dp.funding_rate(metadata['pair'])
|
||||
dataframe['current_funding_rate'] = funding_rate['fundingRate']
|
||||
dataframe['next_funding_timestamp'] = funding_rate['fundingTimestamp']
|
||||
dataframe['next_funding_datetime'] = funding_rate['fundingDatetime']
|
||||
```
|
||||
|
||||
The funding rate structure is aligned with the funding rate structure from [ccxt](https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure), so the result will be formatted as follows:
|
||||
|
||||
``` python
|
||||
{
|
||||
"info": {
|
||||
# ...
|
||||
},
|
||||
"symbol": "BTC/USDT:USDT",
|
||||
"markPrice": 110730.7,
|
||||
"indexPrice": 110782.52,
|
||||
"interestRate": 0.0001,
|
||||
"estimatedSettlePrice": 110822.67200153,
|
||||
"timestamp": 1757146321001,
|
||||
"datetime": "2025-09-06T08:12:01.001Z",
|
||||
"fundingRate": 5.609e-05,
|
||||
"fundingTimestamp": 1757174400000,
|
||||
"fundingDatetime": "2025-09-06T16:00:00.000Z",
|
||||
"nextFundingRate": None,
|
||||
"nextFundingTimestamp": None,
|
||||
"nextFundingDatetime": None,
|
||||
"previousFundingRate": None,
|
||||
"previousFundingTimestamp": None,
|
||||
"previousFundingDatetime": None,
|
||||
"interval": None,
|
||||
}
|
||||
```
|
||||
|
||||
Therefore, using `funding_rate['fundingRate']` as demonstrated above will use the current funding rate.
|
||||
Actually available data will vary between exchanges, so this code may not work as expected across exchanges.
|
||||
|
||||
!!! Warning "Warning about backtesting"
|
||||
Current funding-rate is not part of the historic data which means backtesting and hyperopt will not work correctly if this method is used, as the method will return up-to-date values.
|
||||
We recommend to use the historically available funding rate for backtesting (which is automatically downloaded, and is at the frequency of what the exchange provides, usually 4h or 8h).
|
||||
`self.dp.get_pair_dataframe(pair=metadata['pair'], timeframe='8h', candle_type="funding_rate")`
|
||||
|
||||
### Send Notification
|
||||
|
||||
The dataprovider `.send_msg()` function allows you to send custom notifications from your strategy.
|
||||
|
||||
@@ -14,11 +14,20 @@ The following attributes / properties are available for each individual trade -
|
||||
| Attribute | DataType | Description |
|
||||
|------------|-------------|-------------|
|
||||
| `pair` | string | Pair of this trade. |
|
||||
| `safe_base_currency` | string | Compatibility layer for base currency . |
|
||||
| `safe_quote_currency` | string | Compatibility layer for quote currency. |
|
||||
| `is_open` | boolean | Is the trade currently open, or has it been concluded. |
|
||||
| `exchange` | string | Exchange where this trade was executed. |
|
||||
| `open_rate` | float | Rate this trade was entered at (Avg. entry rate in case of trade-adjustments). |
|
||||
| `open_rate_requested` | float | The rate that was requested when the trade was opened. |
|
||||
| `open_trade_value` | float | Value of the open trade including fees. |
|
||||
| `close_rate` | float | Close rate - only set when is_open = False. |
|
||||
| `close_rate_requested` | float | The close rate that was requested. |
|
||||
| `safe_close_rate` | float | Close rate or `close_rate_requested` or 0.0 if neither is available. Only makes sense once the trade is closed. |
|
||||
| `stake_amount` | float | Amount in Stake (or Quote) currency. |
|
||||
| `max_stake_amount` | float | Maximum stake amount that was used in this trade (sum of all filled Entry orders). |
|
||||
| `amount` | float | Amount in Asset / Base currency that is currently owned. Will be 0.0 until the initial order fills. |
|
||||
| `amount_requested` | float | Amount that was originally requested for this trade as part of the first entry order. |
|
||||
| `open_date` | datetime | Timestamp when trade was opened **use `open_date_utc` instead** |
|
||||
| `open_date_utc` | datetime | Timestamp when trade was opened - in UTC. |
|
||||
| `close_date` | datetime | Timestamp when trade was closed **use `close_date_utc` instead** |
|
||||
@@ -28,15 +37,47 @@ The following attributes / properties are available for each individual trade -
|
||||
| `realized_profit` | float | Absolute already realized profit (in stake currency) while the trade is still open. |
|
||||
| `leverage` | float | Leverage used for this trade - defaults to 1.0 in spot markets. |
|
||||
| `enter_tag` | string | Tag provided on entry via the `enter_tag` column in the dataframe. |
|
||||
| `exit_reason` | string | Reason why the trade was exited. |
|
||||
| `exit_order_status` | string | Status of the exit order. |
|
||||
| `strategy` | string | Strategy name that was used for this trade. |
|
||||
| `timeframe` | int | Timeframe used for this trade. |
|
||||
| `is_short` | boolean | True for short trades, False otherwise. |
|
||||
| `orders` | Order[] | List of order objects attached to this trade (includes both filled and cancelled orders). |
|
||||
| `date_last_filled_utc` | datetime | Time of the last filled order. |
|
||||
| `date_entry_fill_utc` | datetime | Date of the first filled entry order. |
|
||||
| `entry_side` | "buy" / "sell" | Order Side the trade was entered. |
|
||||
| `exit_side` | "buy" / "sell" | Order Side that will result in a trade exit / position reduction. |
|
||||
| `trade_direction` | "long" / "short" | Trade direction in text - long or short. |
|
||||
| `max_rate` | float | Highest price reached during this trade. Not 100% accurate. |
|
||||
| `min_rate` | float | Lowest price reached during this trade. Not 100% accurate. |
|
||||
| `nr_of_successful_entries` | int | Number of successful (filled) entry orders. |
|
||||
| `nr_of_successful_exits` | int | Number of successful (filled) exit orders. |
|
||||
| `has_open_position` | boolean | True if there is an open position (amount > 0) for this trade. Only false while the initial entry order is unfilled. |
|
||||
| `has_open_orders` | boolean | Has the trade open orders (excluding stoploss orders). |
|
||||
| `has_open_sl_orders` | boolean | True if there are open stoploss orders for this trade. |
|
||||
| `open_orders` | Order[] | All open orders for this trade excluding stoploss orders. |
|
||||
| `open_sl_orders` | Order[] | All open stoploss orders for this trade. |
|
||||
| `fully_canceled_entry_order_count` | int | Number of fully canceled entry orders. |
|
||||
| `canceled_exit_order_count` | int | Number of canceled exit orders. |
|
||||
|
||||
### Stop Loss related attributes
|
||||
|
||||
| Attribute | DataType | Description |
|
||||
|------------|-------------|-------------|
|
||||
| `stop_loss` | float | Absolute value of the stop loss. |
|
||||
| `stop_loss_pct` | float | Relative value of the stop loss. |
|
||||
| `initial_stop_loss` | float | Absolute value of the initial stop loss. |
|
||||
| `initial_stop_loss_pct` | float | Relative value of the initial stop loss. |
|
||||
| `stoploss_last_update_utc` | datetime | Timestamp of the last stoploss on exchange order update. |
|
||||
| `stoploss_or_liquidation` | float | Returns the more restrictive of stoploss or liquidation price and corresponds to the price a stoploss would trigger at. |
|
||||
|
||||
### Futures/Margin trading attributes
|
||||
|
||||
| Attribute | DataType | Description |
|
||||
|------------|-------------|-------------|
|
||||
| `liquidation_price` | float | Liquidation price for leveraged trades. |
|
||||
| `interest_rate` | float | Interest rate for margin trades. |
|
||||
| `funding_fees` | float | Total funding fees for futures trades. |
|
||||
|
||||
## Class methods
|
||||
|
||||
@@ -102,6 +143,10 @@ from freqtrade.persistence import Trade
|
||||
profit = Trade.total_open_trades_stakes()
|
||||
```
|
||||
|
||||
## Class methods not supported in backtesting/hyperopt
|
||||
|
||||
The following class methods are not supported in backtesting/hyperopt mode.
|
||||
|
||||
### get_overall_performance
|
||||
|
||||
Retrieve the overall performance - similar to the `/performance` telegram command.
|
||||
@@ -120,6 +165,17 @@ Sample return value: ETH/BTC had 5 trades, with a total profit of 1.5% (ratio of
|
||||
{"pair": "ETH/BTC", "profit": 0.015, "count": 5}
|
||||
```
|
||||
|
||||
### get_trading_volume
|
||||
|
||||
Get total trading volume based on orders.
|
||||
|
||||
``` python
|
||||
from freqtrade.persistence import Trade
|
||||
|
||||
# ...
|
||||
volume = Trade.get_trading_volume()
|
||||
```
|
||||
|
||||
## Order Object
|
||||
|
||||
An `Order` object represents an order on the exchange (or a simulated order in dry-run mode).
|
||||
@@ -135,6 +191,10 @@ Most properties here can be None as they are dependent on the exchange response.
|
||||
| `trade` | Trade | Trade object this order is attached to |
|
||||
| `ft_pair` | string | Pair this order is for |
|
||||
| `ft_is_open` | boolean | is the order still open? |
|
||||
| `ft_order_side` | string | Order side ('buy', 'sell', or 'stoploss') |
|
||||
| `ft_cancel_reason` | string | Reason why the order was canceled |
|
||||
| `ft_order_tag` | string | Custom order tag |
|
||||
| `order_id` | string | Exchange order ID |
|
||||
| `order_type` | string | Order type as defined on the exchange - usually market, limit or stoploss |
|
||||
| `status` | string | Status as defined by [ccxt's order structure](https://docs.ccxt.com/#/README?id=order-structure). Usually open, closed, expired, canceled or rejected |
|
||||
| `side` | string | buy or sell |
|
||||
@@ -143,12 +203,20 @@ Most properties here can be None as they are dependent on the exchange response.
|
||||
| `amount` | float | Amount in base currency |
|
||||
| `filled` | float | Filled amount (in base currency) (use `safe_filled` instead) |
|
||||
| `safe_filled` | float | Filled amount (in base currency) - guaranteed to not be None |
|
||||
| `safe_amount` | float | Amount - falls back to ft_amount if None |
|
||||
| `safe_price` | float | Price - falls back through average, price, stop_price, ft_price |
|
||||
| `safe_placement_price` | float | Price at which the order was placed |
|
||||
| `remaining` | float | Remaining amount (use `safe_remaining` instead) |
|
||||
| `safe_remaining` | float | Remaining amount - either taken from the exchange or calculated. |
|
||||
| `cost` | float | Cost of the order - usually average * filled (*Exchange dependent on futures, may contain the cost with or without leverage and may be in contracts.*) |
|
||||
| `stake_amount` | float | Stake amount used for this order. *Added in 2023.7.* |
|
||||
| `stake_amount_filled` | float | Filled Stake amount used for this order. *Added in 2024.11.* |
|
||||
| `safe_cost` | float | Cost of the order - guaranteed to not be None |
|
||||
| `safe_fee_base` | float | Fee in base currency - guaranteed to not be None |
|
||||
| `safe_amount_after_fee` | float | Amount after deducting fees |
|
||||
| `cost` | float | Cost of the order - usually average * filled (*Exchange dependent on futures trading, may contain the cost with or without leverage and may be in contracts.*) |
|
||||
| `stop_price` | float | Stop price for stop orders. Empty for non-stoploss orders. |
|
||||
| `stake_amount` | float | Stake amount used for this order. |
|
||||
| `stake_amount_filled` | float | Filled Stake amount used for this order. |
|
||||
| `order_date` | datetime | Order creation date **use `order_date_utc` instead** |
|
||||
| `order_date_utc` | datetime | Order creation date (in UTC) |
|
||||
| `order_fill_date` | datetime | Order fill date **use `order_fill_utc` instead** |
|
||||
| `order_fill_date_utc` | datetime | Order fill date |
|
||||
| `order_filled_date` | datetime | Order fill date **use `order_filled_utc` instead** |
|
||||
| `order_filled_utc` | datetime | Order fill date |
|
||||
| `order_update_date` | datetime | Last order update date |
|
||||
|
||||
@@ -80,6 +80,29 @@ When using the Form-Encoded or JSON-Encoded configuration you can configure any
|
||||
|
||||
The result would be a POST request with e.g. `Status: running` body and `Content-Type: text/plain` header.
|
||||
|
||||
### Nested Webhook Configuration
|
||||
|
||||
Some webhook targets require a nested structure.
|
||||
This can be accomplished by setting the content as dictionary or list instead of as text directly.
|
||||
|
||||
This is only supported for the JSON format.
|
||||
|
||||
```json
|
||||
"webhook": {
|
||||
"enabled": true,
|
||||
"url": "https://<yourhookurl>",
|
||||
"format": "json",
|
||||
"status": {
|
||||
"msgtype": "text",
|
||||
"text": {
|
||||
"content": "Status update: {status}"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The result would be a POST request with e.g. `{"msgtype":"text","text":{"content":"Status update: running"}}` body and `Content-Type: application/json` header.
|
||||
|
||||
## Additional configurations
|
||||
|
||||
The `webhook.retries` parameter can be set for the maximum number of retries the webhook request should attempt if it is unsuccessful (i.e. HTTP response status is not 200). By default this is set to `0` which is disabled. An additional `webhook.retry_delay` parameter can be set to specify the time in seconds between retry attempts. By default this is set to `0.1` (i.e. 100ms). Note that increasing the number of retries or retry delay may slow down the trader if there are connectivity issues with the webhook.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Freqtrade bot"""
|
||||
|
||||
__version__ = "2025.8"
|
||||
__version__ = "2025.11-dev"
|
||||
|
||||
if "dev" in __version__:
|
||||
from pathlib import Path
|
||||
|
||||
@@ -49,6 +49,7 @@ ARGS_BACKTEST = [
|
||||
*ARGS_COMMON_OPTIMIZE,
|
||||
"position_stacking",
|
||||
"enable_protections",
|
||||
"enable_dynamic_pairlist",
|
||||
"dry_run_wallet",
|
||||
"timeframe_detail",
|
||||
"strategy_list",
|
||||
@@ -63,7 +64,6 @@ ARGS_BACKTEST = [
|
||||
|
||||
ARGS_HYPEROPT = [
|
||||
*ARGS_COMMON_OPTIMIZE,
|
||||
"hyperopt",
|
||||
"hyperopt_path",
|
||||
"position_stacking",
|
||||
"enable_protections",
|
||||
@@ -104,7 +104,7 @@ ARGS_BACKTEST_SHOW = [
|
||||
|
||||
ARGS_LIST_EXCHANGES = ["print_one_column", "list_exchanges_all", "trading_mode", "dex_exchanges"]
|
||||
|
||||
ARGS_LIST_TIMEFRAMES = ["exchange", "print_one_column"]
|
||||
ARGS_LIST_TIMEFRAMES = ["exchange", "print_one_column", "trading_mode"]
|
||||
|
||||
ARGS_LIST_PAIRS = [
|
||||
"exchange",
|
||||
@@ -164,6 +164,7 @@ ARGS_DOWNLOAD_DATA = [
|
||||
"days",
|
||||
"new_pairs_days",
|
||||
"include_inactive",
|
||||
"no_parallel_download",
|
||||
"timerange",
|
||||
"download_trades",
|
||||
"convert_trades",
|
||||
@@ -259,7 +260,12 @@ ARGS_LOOKAHEAD_ANALYSIS = [
|
||||
a
|
||||
for a in ARGS_BACKTEST
|
||||
if a not in ("position_stacking", "backtest_cache", "backtest_breakdown", "backtest_notes")
|
||||
] + ["minimum_trade_amount", "targeted_trade_amount", "lookahead_analysis_exportfilename"]
|
||||
] + [
|
||||
"minimum_trade_amount",
|
||||
"targeted_trade_amount",
|
||||
"lookahead_analysis_exportfilename",
|
||||
"lookahead_allow_limit_orders",
|
||||
]
|
||||
|
||||
ARGS_RECURSIVE_ANALYSIS = ["timeframe", "timerange", "dataformat_ohlcv", "pairs", "startup_candle"]
|
||||
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
Definition of cli arguments used in arguments.py
|
||||
"""
|
||||
|
||||
from argparse import SUPPRESS, ArgumentTypeError
|
||||
from argparse import ArgumentTypeError
|
||||
|
||||
from freqtrade import constants
|
||||
from freqtrade.constants import HYPEROPT_LOSS_BUILTIN
|
||||
from freqtrade.constants import (
|
||||
HYPEROPT_BUILTIN_SPACE_OPTIONS,
|
||||
HYPEROPT_LOSS_BUILTIN,
|
||||
)
|
||||
from freqtrade.enums import CandleType
|
||||
|
||||
|
||||
@@ -184,12 +187,20 @@ AVAILABLE_CLI_OPTIONS = {
|
||||
"enable_protections": Arg(
|
||||
"--enable-protections",
|
||||
"--enableprotections",
|
||||
help="Enable protections for backtesting."
|
||||
help="Enable protections for backtesting. "
|
||||
"Will slow backtesting down by a considerable amount, but will include "
|
||||
"configured protections",
|
||||
action="store_true",
|
||||
default=False,
|
||||
),
|
||||
"enable_dynamic_pairlist": Arg(
|
||||
"--enable-dynamic-pairlist",
|
||||
help="Enables dynamic pairlist refreshes in backtesting. "
|
||||
"The pairlist will be generated for each new candle if you're using a "
|
||||
"pairlist handler that supports this feature, for example, ShuffleFilter.",
|
||||
action="store_true",
|
||||
default=False,
|
||||
),
|
||||
"strategy_list": Arg(
|
||||
"--strategy-list",
|
||||
help="Provide a space-separated list of strategies to backtest. "
|
||||
@@ -237,7 +248,7 @@ AVAILABLE_CLI_OPTIONS = {
|
||||
),
|
||||
"backtest_breakdown": Arg(
|
||||
"--breakdown",
|
||||
help="Show backtesting breakdown per [day, week, month, year].",
|
||||
help="Show backtesting breakdown per [day, week, month, year, weekday].",
|
||||
nargs="+",
|
||||
choices=constants.BACKTEST_BREAKDOWNS,
|
||||
),
|
||||
@@ -248,12 +259,6 @@ AVAILABLE_CLI_OPTIONS = {
|
||||
choices=constants.BACKTEST_CACHE_AGE,
|
||||
),
|
||||
# Hyperopt
|
||||
"hyperopt": Arg(
|
||||
"--hyperopt",
|
||||
help=SUPPRESS,
|
||||
metavar="NAME",
|
||||
required=False,
|
||||
),
|
||||
"hyperopt_path": Arg(
|
||||
"--hyperopt-path",
|
||||
help="Specify additional lookup path for Hyperopt Loss functions.",
|
||||
@@ -276,26 +281,18 @@ AVAILABLE_CLI_OPTIONS = {
|
||||
),
|
||||
"spaces": Arg(
|
||||
"--spaces",
|
||||
help="Specify which parameters to hyperopt. Space-separated list.",
|
||||
choices=[
|
||||
"all",
|
||||
"buy",
|
||||
"sell",
|
||||
"roi",
|
||||
"stoploss",
|
||||
"trailing",
|
||||
"protection",
|
||||
"trades",
|
||||
"default",
|
||||
],
|
||||
help=(
|
||||
"Specify which parameters to hyperopt. Space-separated list. "
|
||||
"Available builtin options (custom spaces will not be listed here): "
|
||||
f"{', '.join(HYPEROPT_BUILTIN_SPACE_OPTIONS)}. Default: `default` - "
|
||||
"which includes all spaces except for 'trailing', 'protection', and 'trades'."
|
||||
),
|
||||
nargs="+",
|
||||
default="default",
|
||||
),
|
||||
"analyze_per_epoch": Arg(
|
||||
"--analyze-per-epoch",
|
||||
help="Run populate_indicators once per epoch.",
|
||||
action="store_true",
|
||||
default=False,
|
||||
),
|
||||
"print_all": Arg(
|
||||
"--print-all",
|
||||
@@ -454,6 +451,11 @@ AVAILABLE_CLI_OPTIONS = {
|
||||
help="Also download data from inactive pairs.",
|
||||
action="store_true",
|
||||
),
|
||||
"no_parallel_download": Arg(
|
||||
"--no-parallel-download",
|
||||
help="Disable parallel startup download. Only use this if you experience issues.",
|
||||
action="store_true",
|
||||
),
|
||||
"new_pairs_days": Arg(
|
||||
"--new-pairs-days",
|
||||
help="Download data of new pairs for given number of days. Default: `%(default)s`.",
|
||||
@@ -801,6 +803,14 @@ AVAILABLE_CLI_OPTIONS = {
|
||||
help="Specify startup candles to be checked (`199`, `499`, `999`, `1999`).",
|
||||
nargs="+",
|
||||
),
|
||||
"lookahead_allow_limit_orders": Arg(
|
||||
"--allow-limit-orders",
|
||||
help=(
|
||||
"Allow limit orders in lookahead analysis (could cause false positives "
|
||||
"in lookahead analysis results)."
|
||||
),
|
||||
action="store_true",
|
||||
),
|
||||
"show_sensitive": Arg(
|
||||
"--show-sensitive",
|
||||
help="Show secrets in the output.",
|
||||
|
||||
@@ -66,7 +66,7 @@ def start_list_exchanges(args: dict[str, Any]) -> None:
|
||||
if exchange["is_alias"]:
|
||||
name.stylize("strike")
|
||||
classname.stylize("strike")
|
||||
classname.append(f" (use {exchange['alias_for']})", style="italic")
|
||||
classname.append(f"\n -> use {exchange['alias_for']}", style="italic")
|
||||
|
||||
trade_modes = Text(
|
||||
", ".join(
|
||||
@@ -101,7 +101,7 @@ def _print_objs_tabular(objs: list, print_colorized: bool) -> None:
|
||||
names = [s["name"] for s in objs]
|
||||
objs_to_print: list[dict[str, Text | str]] = [
|
||||
{
|
||||
"name": Text(s["name"] if s["name"] else "--"),
|
||||
"Strategy name": Text(s["name"] if s["name"] else "--"),
|
||||
"location": s["location_rel"],
|
||||
"status": (
|
||||
Text("LOAD FAILED", style="bold red")
|
||||
@@ -115,11 +115,19 @@ def _print_objs_tabular(objs: list, print_colorized: bool) -> None:
|
||||
]
|
||||
for idx, s in enumerate(objs):
|
||||
if "hyperoptable" in s:
|
||||
custom_params = [
|
||||
f"{space}: {len(params)}"
|
||||
for space, params in s["hyperoptable"].items()
|
||||
if space not in ["buy", "sell", "protection"]
|
||||
]
|
||||
hyp = s["hyperoptable"]
|
||||
objs_to_print[idx].update(
|
||||
{
|
||||
"hyperoptable": "Yes" if s["hyperoptable"]["count"] > 0 else "No",
|
||||
"buy-Params": str(len(s["hyperoptable"].get("buy", []))),
|
||||
"sell-Params": str(len(s["hyperoptable"].get("sell", []))),
|
||||
"hyperoptable": "Yes" if len(hyp) > 0 else "No",
|
||||
"buy-Params": str(len(hyp.get("buy", []))),
|
||||
"sell-Params": str(len(hyp.get("sell", []))),
|
||||
"protection-Params": str(len(hyp.get("protection", []))),
|
||||
"custom-Params": ", ".join(custom_params) if custom_params else "",
|
||||
}
|
||||
)
|
||||
table = Table()
|
||||
@@ -140,6 +148,7 @@ def start_list_strategies(args: dict[str, Any]) -> None:
|
||||
"""
|
||||
from freqtrade.configuration import setup_utils_configuration
|
||||
from freqtrade.resolvers import StrategyResolver
|
||||
from freqtrade.strategy.hyper import detect_all_parameters
|
||||
|
||||
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
|
||||
|
||||
@@ -153,9 +162,9 @@ def start_list_strategies(args: dict[str, Any]) -> None:
|
||||
strategy_objs = sorted(strategy_objs, key=lambda x: x["name"])
|
||||
for obj in strategy_objs:
|
||||
if obj["class"]:
|
||||
obj["hyperoptable"] = obj["class"].detect_all_parameters()
|
||||
obj["hyperoptable"] = detect_all_parameters(obj["class"])
|
||||
else:
|
||||
obj["hyperoptable"] = {"count": 0}
|
||||
obj["hyperoptable"] = {}
|
||||
|
||||
if args["print_one_column"]:
|
||||
print("\n".join([s["name"] for s in strategy_objs]))
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
# Required json-schema for user specified config
|
||||
|
||||
|
||||
from freqtrade.constants import (
|
||||
AVAILABLE_DATAHANDLERS,
|
||||
AVAILABLE_PAIRLISTS,
|
||||
BACKTEST_BREAKDOWNS,
|
||||
BACKTEST_CACHE_AGE,
|
||||
DRY_RUN_WALLET,
|
||||
EXPORT_OPTIONS,
|
||||
HYPEROPT_LOSS_BUILTIN,
|
||||
MARGIN_MODES,
|
||||
ORDERTIF_POSSIBILITIES,
|
||||
ORDERTYPE_POSSIBILITIES,
|
||||
@@ -228,6 +231,76 @@ CONF_SCHEMA = {
|
||||
"type": "array",
|
||||
"items": {"type": "string", "enum": BACKTEST_BREAKDOWNS},
|
||||
},
|
||||
"backtest_cache": {
|
||||
"description": "Load a cached backtest result no older than specified age.",
|
||||
"type": "string",
|
||||
"enum": BACKTEST_CACHE_AGE,
|
||||
},
|
||||
# Hyperopt
|
||||
"hyperopt_path": {
|
||||
"description": "Specify additional lookup path for Hyperopt Loss functions.",
|
||||
"type": "string",
|
||||
},
|
||||
"epochs": {
|
||||
"description": "Number of training epochs for Hyperopt.",
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
},
|
||||
"early_stop": {
|
||||
"description": (
|
||||
"Early stop hyperopt if no improvement after <epochs>. Set to 0 to disable."
|
||||
),
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
},
|
||||
"spaces": {
|
||||
"description": (
|
||||
"Hyperopt parameter spaces to optimize. Default is the default set and"
|
||||
"includes all spaces except for 'trailing', 'protection', and 'trades'."
|
||||
),
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"default": ["default"],
|
||||
},
|
||||
"analyze_per_epoch": {
|
||||
"description": "Perform analysis after each epoch in Hyperopt.",
|
||||
"type": "boolean",
|
||||
},
|
||||
"print_all": {
|
||||
"description": "Print all hyperopt trials, not just the best ones.",
|
||||
"type": "boolean",
|
||||
"default": False,
|
||||
},
|
||||
"hyperopt_jobs": {
|
||||
"description": (
|
||||
"The number of concurrently running jobs for hyperoptimization "
|
||||
"(hyperopt worker processes). "
|
||||
"If -1 (default), all CPUs are used, for -2, all CPUs but one are used, etc. "
|
||||
"If 1 is given, no parallel computing is used."
|
||||
),
|
||||
"type": "integer",
|
||||
"default": -1,
|
||||
},
|
||||
"hyperopt_random_state": {
|
||||
"description": "Random state for hyperopt trials.",
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
},
|
||||
"hyperopt_min_trades": {
|
||||
"description": "Minimum number of trades per epoch for hyperopt.",
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
},
|
||||
"hyperopt_loss": {
|
||||
"description": (
|
||||
"The class name of the hyperopt loss function class (IHyperOptLoss). "
|
||||
"Different functions can generate completely different results, "
|
||||
"since the target for optimization is different. "
|
||||
f"Built-in Hyperopt-loss-functions are: {', '.join(HYPEROPT_LOSS_BUILTIN)}"
|
||||
),
|
||||
"type": "string",
|
||||
},
|
||||
# end hyperopt
|
||||
"bot_name": {
|
||||
"description": "Name of the trading bot. Passed via API to a client.",
|
||||
"type": "string",
|
||||
@@ -1142,6 +1215,15 @@ CONF_SCHEMA = {
|
||||
"type": "boolean",
|
||||
"default": False,
|
||||
},
|
||||
"override_exchange_check": {
|
||||
"description": (
|
||||
"Override the exchange check to force FreqAI to use exchanges "
|
||||
"that may not have enough historic data. Turn this to True if "
|
||||
"you know your FreqAI model and strategy do not require historical data."
|
||||
),
|
||||
"type": "boolean",
|
||||
"default": False,
|
||||
},
|
||||
"feature_parameters": {
|
||||
"description": "The parameters used to engineer the feature set",
|
||||
"type": "object",
|
||||
|
||||
@@ -113,7 +113,6 @@ def _validate_price_config(conf: dict[str, Any]) -> None:
|
||||
"""
|
||||
When using market orders, price sides must be using the "other" side of the price
|
||||
"""
|
||||
# TODO: The below could be an enforced setting when using market orders
|
||||
if conf.get("order_types", {}).get("entry") == "market" and conf.get("entry_pricing", {}).get(
|
||||
"price_side"
|
||||
) not in ("ask", "other"):
|
||||
|
||||
@@ -12,13 +12,16 @@ from typing import Any
|
||||
from freqtrade import constants
|
||||
from freqtrade.configuration.deprecated_settings import process_temporary_deprecated_settings
|
||||
from freqtrade.configuration.directory_operations import create_datadir, create_userdata_dir
|
||||
from freqtrade.configuration.environment_vars import enironment_vars_to_dict
|
||||
from freqtrade.configuration.environment_vars import environment_vars_to_dict
|
||||
from freqtrade.configuration.load_config import load_file, load_from_files
|
||||
from freqtrade.constants import Config
|
||||
from freqtrade.enums import (
|
||||
NON_UTIL_MODES,
|
||||
TRADE_MODES,
|
||||
CandleType,
|
||||
MarginMode,
|
||||
RunMode,
|
||||
TradingMode,
|
||||
)
|
||||
from freqtrade.exceptions import OperationalException
|
||||
from freqtrade.loggers import setup_logging
|
||||
@@ -77,7 +80,7 @@ class Configuration:
|
||||
from freqtrade.commands.arguments import NO_CONF_ALLOWED
|
||||
|
||||
if self.args.get("command") not in NO_CONF_ALLOWED:
|
||||
env_data = enironment_vars_to_dict()
|
||||
env_data = environment_vars_to_dict()
|
||||
config = deep_merge_dicts(env_data, config)
|
||||
|
||||
# Normalize config
|
||||
@@ -230,6 +233,9 @@ class Configuration:
|
||||
config["exportdirectory"] = config["user_data_dir"] / "backtest_results"
|
||||
if not config.get("exportfilename"):
|
||||
config["exportfilename"] = None
|
||||
if config.get("exportfilename"):
|
||||
# ensure exportfilename is a Path object
|
||||
config["exportfilename"] = Path(config["exportfilename"])
|
||||
config["exportdirectory"] = Path(config["exportdirectory"])
|
||||
|
||||
if self.args.get("show_sensitive"):
|
||||
@@ -256,7 +262,13 @@ class Configuration:
|
||||
self._args_to_config(
|
||||
config,
|
||||
argname="enable_protections",
|
||||
logstring="Parameter --enable-protections detected, enabling Protections. ...",
|
||||
logstring="Parameter --enable-protections detected, enabling Protections ...",
|
||||
)
|
||||
|
||||
self._args_to_config(
|
||||
config,
|
||||
argname="enable_dynamic_pairlist",
|
||||
logstring="Parameter --enable-dynamic-pairlist detected, enabling dynamic pairlist ...",
|
||||
)
|
||||
|
||||
if self.args.get("max_open_trades"):
|
||||
@@ -312,7 +324,6 @@ class Configuration:
|
||||
"recursive_strategy_search",
|
||||
"Recursively searching for a strategy in the strategies folder.",
|
||||
),
|
||||
("timeframe", "Overriding timeframe with Command line argument"),
|
||||
("export", "Parameter --export detected: {} ..."),
|
||||
("backtest_breakdown", "Parameter --breakdown detected ..."),
|
||||
("backtest_cache", "Parameter --cache={} detected ..."),
|
||||
@@ -325,7 +336,6 @@ class Configuration:
|
||||
# Hyperopt section
|
||||
|
||||
configurations = [
|
||||
("hyperopt", "Using Hyperopt class name: {}"),
|
||||
("hyperopt_path", "Using additional Hyperopt lookup path: {}"),
|
||||
("hyperoptexportfilename", "Using hyperopt file: {}"),
|
||||
("lookahead_analysis_exportfilename", "Saving lookahead analysis results into {} ..."),
|
||||
@@ -391,6 +401,7 @@ class Configuration:
|
||||
("timeframes", "timeframes --timeframes: {}"),
|
||||
("days", "Detected --days: {}"),
|
||||
("include_inactive", "Detected --include-inactive-pairs: {}"),
|
||||
("no_parallel_download", "Detected --no-parallel-download: {}"),
|
||||
("download_trades", "Detected --dl-trades: {}"),
|
||||
("convert_trades", "Detected --convert: {} - Converting Trade data to OHCV {}"),
|
||||
("dataformat_ohlcv", 'Using "{}" to store OHLCV data.'),
|
||||
@@ -406,6 +417,14 @@ class Configuration:
|
||||
self._args_to_config(
|
||||
config, argname="trading_mode", logstring="Detected --trading-mode: {}"
|
||||
)
|
||||
# TODO: The following 3 lines (candle_type_def, trading_mode, margin_mode) are actually
|
||||
# set in the exchange class. They're however necessary as fallback to avoid
|
||||
# random errors in commands that don't initialize an exchange.
|
||||
config["candle_type_def"] = CandleType.get_default(
|
||||
config.get("trading_mode", "spot") or "spot"
|
||||
)
|
||||
config["trading_mode"] = TradingMode(config.get("trading_mode", "spot") or "spot")
|
||||
config["margin_mode"] = MarginMode(config.get("margin_mode", "") or "")
|
||||
self._args_to_config(
|
||||
config, argname="candle_types", logstring="Detected --candle-types: {}"
|
||||
)
|
||||
|
||||
@@ -73,7 +73,7 @@ def _flat_vars_to_nested_dict(env_dict: dict[str, Any], prefix: str) -> dict[str
|
||||
return relevant_vars
|
||||
|
||||
|
||||
def enironment_vars_to_dict() -> dict[str, Any]:
|
||||
def environment_vars_to_dict() -> dict[str, Any]:
|
||||
"""
|
||||
Read environment variables and return a nested dict for relevant variables
|
||||
Relevant variables must follow the FREQTRADE__{section}__{key} pattern
|
||||
|
||||
@@ -80,6 +80,9 @@ class TimeRange:
|
||||
val = stopdt.strftime(DATETIME_PRINT_FORMAT)
|
||||
return val
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"TimeRange({self.timerange_str})"
|
||||
|
||||
def __eq__(self, other):
|
||||
"""Override the default Equals behavior"""
|
||||
return (
|
||||
|
||||
@@ -41,6 +41,19 @@ HYPEROPT_LOSS_BUILTIN = [
|
||||
"ProfitDrawDownHyperOptLoss",
|
||||
"MultiMetricHyperOptLoss",
|
||||
]
|
||||
HYPEROPT_BUILTIN_SPACES = [
|
||||
"buy",
|
||||
"sell",
|
||||
"enter",
|
||||
"exit",
|
||||
"roi",
|
||||
"stoploss",
|
||||
"trailing",
|
||||
"protection",
|
||||
"trades",
|
||||
]
|
||||
HYPEROPT_BUILTIN_SPACE_OPTIONS = ["default", "all"] + HYPEROPT_BUILTIN_SPACES
|
||||
|
||||
AVAILABLE_PAIRLISTS = [
|
||||
"StaticPairList",
|
||||
"VolumePairList",
|
||||
@@ -49,6 +62,7 @@ AVAILABLE_PAIRLISTS = [
|
||||
"RemotePairList",
|
||||
"MarketCapPairList",
|
||||
"AgeFilter",
|
||||
"DelistFilter",
|
||||
"FullTradesFilter",
|
||||
"OffsetFilter",
|
||||
"PerformanceFilter",
|
||||
@@ -60,7 +74,7 @@ AVAILABLE_PAIRLISTS = [
|
||||
"VolatilityFilter",
|
||||
]
|
||||
AVAILABLE_DATAHANDLERS = ["json", "jsongz", "feather", "parquet"]
|
||||
BACKTEST_BREAKDOWNS = ["day", "week", "month", "year"]
|
||||
BACKTEST_BREAKDOWNS = ["day", "week", "month", "year", "weekday"]
|
||||
BACKTEST_CACHE_AGE = ["none", "day", "week", "month"]
|
||||
BACKTEST_CACHE_DEFAULT = "day"
|
||||
DRY_RUN_WALLET = 1000
|
||||
|
||||
@@ -511,8 +511,8 @@ def trade_list_to_dataframe(trades: list[Trade] | list[LocalTrade]) -> pd.DataFr
|
||||
"""
|
||||
df = pd.DataFrame.from_records([t.to_json(True) for t in trades], columns=BT_DATA_COLUMNS)
|
||||
if len(df) > 0:
|
||||
df["close_date"] = pd.to_datetime(df["close_date"], utc=True)
|
||||
df["open_date"] = pd.to_datetime(df["open_date"], utc=True)
|
||||
df["close_date"] = pd.to_datetime(df["close_timestamp"], unit="ms", utc=True)
|
||||
df["open_date"] = pd.to_datetime(df["open_timestamp"], unit="ms", utc=True)
|
||||
df["close_rate"] = df["close_rate"].astype("float64")
|
||||
return df
|
||||
|
||||
|
||||
@@ -181,7 +181,6 @@ def trim_dataframes(
|
||||
|
||||
def order_book_to_dataframe(bids: list, asks: list) -> DataFrame:
|
||||
"""
|
||||
TODO: This should get a dedicated test
|
||||
Gets order book list, returns dataframe with below format per suggested by creslin
|
||||
-------------------------------------------------------------------
|
||||
b_sum b_size bids asks a_size a_sum
|
||||
|
||||
@@ -23,7 +23,7 @@ from freqtrade.data.history import get_datahandler, load_pair_history
|
||||
from freqtrade.enums import CandleType, RPCMessageType, RunMode, TradingMode
|
||||
from freqtrade.exceptions import ExchangeError, OperationalException
|
||||
from freqtrade.exchange import Exchange, timeframe_to_prev_date, timeframe_to_seconds
|
||||
from freqtrade.exchange.exchange_types import OrderBook
|
||||
from freqtrade.exchange.exchange_types import FundingRate, OrderBook
|
||||
from freqtrade.misc import append_candles_to_dataframe
|
||||
from freqtrade.rpc import RPCManager
|
||||
from freqtrade.rpc.rpc_types import RPCAnalyzedDFMsg
|
||||
@@ -498,7 +498,12 @@ class DataProvider:
|
||||
return DataFrame()
|
||||
|
||||
def trades(
|
||||
self, pair: str, timeframe: str | None = None, copy: bool = True, candle_type: str = ""
|
||||
self,
|
||||
pair: str,
|
||||
timeframe: str | None = None,
|
||||
copy: bool = True,
|
||||
candle_type: str = "",
|
||||
timerange: TimeRange | None = None,
|
||||
) -> DataFrame:
|
||||
"""
|
||||
Get candle (TRADES) data for the given pair as DataFrame
|
||||
@@ -526,7 +531,7 @@ class DataProvider:
|
||||
self._config["datadir"], data_format=self._config["dataformat_trades"]
|
||||
)
|
||||
trades_df = data_handler.trades_load(
|
||||
pair, self._config.get("trading_mode", TradingMode.SPOT)
|
||||
pair, self._config.get("trading_mode", TradingMode.SPOT), timerange=timerange
|
||||
)
|
||||
return trades_df
|
||||
|
||||
@@ -543,6 +548,7 @@ class DataProvider:
|
||||
def ticker(self, pair: str):
|
||||
"""
|
||||
Return last ticker data from exchange
|
||||
Warning: Performs a network request - so use with common sense.
|
||||
:param pair: Pair to get the data for
|
||||
:return: Ticker dict from exchange or empty dict if ticker is not available for the pair
|
||||
"""
|
||||
@@ -556,7 +562,7 @@ class DataProvider:
|
||||
def orderbook(self, pair: str, maximum: int) -> OrderBook:
|
||||
"""
|
||||
Fetch latest l2 orderbook data
|
||||
Warning: Does a network request - so use with common sense.
|
||||
Warning: Performs a network request - so use with common sense.
|
||||
:param pair: pair to get the data for
|
||||
:param maximum: Maximum number of orderbook entries to query
|
||||
:return: dict including bids/asks with a total of `maximum` entries.
|
||||
@@ -565,6 +571,23 @@ class DataProvider:
|
||||
raise OperationalException(NO_EXCHANGE_EXCEPTION)
|
||||
return self._exchange.fetch_l2_order_book(pair, maximum)
|
||||
|
||||
def funding_rate(self, pair: str) -> FundingRate:
|
||||
"""
|
||||
Return Funding rate from the exchange
|
||||
Warning: Performs a network request - so use with common sense.
|
||||
:param pair: Pair to get the data for
|
||||
:return: Funding rate dict from exchange or empty dict if funding rate is not available
|
||||
If available, the "fundingRate" field will contain the funding rate.
|
||||
"fundingTimestamp" and "fundingDatetime" will contain the next funding times.
|
||||
Actually filled fields may vary between exchanges.
|
||||
"""
|
||||
if self._exchange is None:
|
||||
raise OperationalException(NO_EXCHANGE_EXCEPTION)
|
||||
try:
|
||||
return self._exchange.fetch_funding_rate(pair)
|
||||
except ExchangeError:
|
||||
return {}
|
||||
|
||||
def send_msg(self, message: str, *, always_send: bool = False) -> None:
|
||||
"""
|
||||
Send custom RPC Notifications from your bot.
|
||||
@@ -581,3 +604,19 @@ class DataProvider:
|
||||
if always_send or message not in self.__msg_cache:
|
||||
self._msg_queue.append(message)
|
||||
self.__msg_cache[message] = True
|
||||
|
||||
def check_delisting(self, pair: str) -> datetime | None:
|
||||
"""
|
||||
Check if a pair gonna be delisted on the exchange.
|
||||
Will only return datetime if the pair is gonna be delisted.
|
||||
:param pair: Pair to check
|
||||
:return: Datetime of the pair's delisting, None otherwise
|
||||
"""
|
||||
if self._exchange is None:
|
||||
raise OperationalException(NO_EXCHANGE_EXCEPTION)
|
||||
|
||||
try:
|
||||
return self._exchange.check_delisting_time(pair)
|
||||
except ExchangeError:
|
||||
logger.warning(f"Could not fetch market data for {pair}. Assuming no delisting.")
|
||||
return None
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import logging
|
||||
|
||||
from pandas import DataFrame, read_feather, to_datetime
|
||||
from pyarrow import dataset
|
||||
|
||||
from freqtrade.configuration import TimeRange
|
||||
from freqtrade.constants import DEFAULT_DATAFRAME_COLUMNS, DEFAULT_TRADES_COLUMNS
|
||||
@@ -111,22 +112,71 @@ class FeatherDataHandler(IDataHandler):
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def _build_arrow_time_filter(self, timerange: TimeRange | None):
|
||||
"""
|
||||
Build Arrow predicate filter for timerange filtering.
|
||||
Treats 0 as unbounded (no filter on that side).
|
||||
:param timerange: TimeRange object with start/stop timestamps
|
||||
:return: Arrow filter expression or None if fully unbounded
|
||||
"""
|
||||
if not timerange:
|
||||
return None
|
||||
|
||||
# Treat 0 as unbounded
|
||||
start_set = bool(timerange.startts and timerange.startts > 0)
|
||||
stop_set = bool(timerange.stopts and timerange.stopts > 0)
|
||||
|
||||
if not (start_set or stop_set):
|
||||
return None
|
||||
|
||||
ts_field = dataset.field("timestamp")
|
||||
exprs = []
|
||||
|
||||
if start_set:
|
||||
exprs.append(ts_field >= timerange.startts)
|
||||
if stop_set:
|
||||
exprs.append(ts_field <= timerange.stopts)
|
||||
|
||||
if len(exprs) == 1:
|
||||
return exprs[0]
|
||||
else:
|
||||
return exprs[0] & exprs[1]
|
||||
|
||||
def _trades_load(
|
||||
self, pair: str, trading_mode: TradingMode, timerange: TimeRange | None = None
|
||||
) -> DataFrame:
|
||||
"""
|
||||
Load a pair from file, either .json.gz or .json
|
||||
# TODO: respect timerange ...
|
||||
:param pair: Load trades for this pair
|
||||
:param trading_mode: Trading mode to use (used to determine the filename)
|
||||
:param timerange: Timerange to load trades for - currently not implemented
|
||||
:param timerange: Timerange to load trades for - filters data to this range if provided
|
||||
:return: Dataframe containing trades
|
||||
"""
|
||||
filename = self._pair_trades_filename(self._datadir, pair, trading_mode)
|
||||
if not filename.exists():
|
||||
return DataFrame(columns=DEFAULT_TRADES_COLUMNS)
|
||||
|
||||
tradesdata = read_feather(filename)
|
||||
# Use Arrow dataset with optional timerange filtering, fallback to read_feather
|
||||
try:
|
||||
dataset_reader = dataset.dataset(filename, format="feather")
|
||||
time_filter = self._build_arrow_time_filter(timerange)
|
||||
|
||||
if time_filter is not None and timerange is not None:
|
||||
tradesdata = dataset_reader.to_table(filter=time_filter).to_pandas()
|
||||
start_desc = timerange.startts if timerange.startts > 0 else "unbounded"
|
||||
stop_desc = timerange.stopts if timerange.stopts > 0 else "unbounded"
|
||||
logger.debug(
|
||||
f"Loaded {len(tradesdata)} trades for {pair} "
|
||||
f"(filtered start={start_desc}, stop={stop_desc})"
|
||||
)
|
||||
else:
|
||||
tradesdata = dataset_reader.to_table().to_pandas()
|
||||
logger.debug(f"Loaded {len(tradesdata)} trades for {pair} (unfiltered)")
|
||||
|
||||
except (ImportError, AttributeError, ValueError) as e:
|
||||
# Fallback: load entire file
|
||||
logger.warning(f"Unable to use Arrow filtering, loading entire trades file: {e}")
|
||||
tradesdata = read_feather(filename)
|
||||
|
||||
return tradesdata
|
||||
|
||||
|
||||
@@ -6,7 +6,14 @@ from pathlib import Path
|
||||
from pandas import DataFrame, concat
|
||||
|
||||
from freqtrade.configuration import TimeRange
|
||||
from freqtrade.constants import DATETIME_PRINT_FORMAT, DL_DATA_TIMEFRAMES, DOCS_LINK, Config
|
||||
from freqtrade.constants import (
|
||||
DATETIME_PRINT_FORMAT,
|
||||
DL_DATA_TIMEFRAMES,
|
||||
DOCS_LINK,
|
||||
Config,
|
||||
ListPairsWithTimeframes,
|
||||
PairWithTimeframe,
|
||||
)
|
||||
from freqtrade.data.converter import (
|
||||
clean_ohlcv_dataframe,
|
||||
convert_trades_to_ohlcv,
|
||||
@@ -17,6 +24,7 @@ from freqtrade.data.history.datahandlers import IDataHandler, get_datahandler
|
||||
from freqtrade.enums import CandleType, TradingMode
|
||||
from freqtrade.exceptions import OperationalException
|
||||
from freqtrade.exchange import Exchange
|
||||
from freqtrade.exchange.exchange_utils import date_minus_candles
|
||||
from freqtrade.plugins.pairlist.pairlist_helpers import dynamic_expand_pairlist
|
||||
from freqtrade.util import dt_now, dt_ts, format_ms_time, format_ms_time_det
|
||||
from freqtrade.util.migrations import migrate_data
|
||||
@@ -226,6 +234,7 @@ def _download_pair_history(
|
||||
candle_type: CandleType,
|
||||
erase: bool = False,
|
||||
prepend: bool = False,
|
||||
pair_candles: DataFrame | None = None,
|
||||
) -> bool:
|
||||
"""
|
||||
Download latest candles from the exchange for the pair and timeframe passed in parameters
|
||||
@@ -238,6 +247,7 @@ def _download_pair_history(
|
||||
:param timerange: range of time to download
|
||||
:param candle_type: Any of the enum CandleType (must match trading mode!)
|
||||
:param erase: Erase existing data
|
||||
:param pair_candles: Optional with "1 call" pair candles.
|
||||
:return: bool with success state
|
||||
"""
|
||||
data_handler = get_datahandler(datadir, data_handler=data_handler)
|
||||
@@ -271,21 +281,40 @@ def _download_pair_history(
|
||||
"Current End: %s",
|
||||
f"{data.iloc[-1]['date']:{DATETIME_PRINT_FORMAT}}" if not data.empty else "None",
|
||||
)
|
||||
|
||||
# Default since_ms to 30 days if nothing is given
|
||||
new_dataframe = exchange.get_historic_ohlcv(
|
||||
pair=pair,
|
||||
timeframe=timeframe,
|
||||
since_ms=(
|
||||
since_ms
|
||||
if since_ms
|
||||
else int((datetime.now() - timedelta(days=new_pairs_days)).timestamp()) * 1000
|
||||
),
|
||||
is_new_pair=data.empty,
|
||||
candle_type=candle_type,
|
||||
until_ms=until_ms if until_ms else None,
|
||||
# used to check if the passed in pair_candles (parallel downloaded) covers since_ms.
|
||||
# If we need more data, we have to fall back to the standard method.
|
||||
pair_candles_since_ms = (
|
||||
dt_ts(pair_candles.iloc[0]["date"])
|
||||
if pair_candles is not None and len(pair_candles.index) > 0
|
||||
else 0
|
||||
)
|
||||
logger.info(f"Downloaded data for {pair} with length {len(new_dataframe)}.")
|
||||
if (
|
||||
pair_candles is None
|
||||
or len(pair_candles.index) == 0
|
||||
or data.empty
|
||||
or prepend is True
|
||||
or erase is True
|
||||
or pair_candles_since_ms > (since_ms if since_ms else 0)
|
||||
):
|
||||
new_dataframe = exchange.get_historic_ohlcv(
|
||||
pair=pair,
|
||||
timeframe=timeframe,
|
||||
since_ms=(
|
||||
since_ms
|
||||
if since_ms
|
||||
else int((datetime.now() - timedelta(days=new_pairs_days)).timestamp()) * 1000
|
||||
),
|
||||
is_new_pair=data.empty,
|
||||
candle_type=candle_type,
|
||||
until_ms=until_ms if until_ms else None,
|
||||
)
|
||||
logger.info(f"Downloaded data for {pair} with length {len(new_dataframe)}.")
|
||||
else:
|
||||
new_dataframe = pair_candles
|
||||
logger.info(
|
||||
f"Downloaded data for {pair} with length {len(new_dataframe)}. Parallel Method."
|
||||
)
|
||||
|
||||
if data.empty:
|
||||
data = new_dataframe
|
||||
else:
|
||||
@@ -330,6 +359,7 @@ def refresh_backtest_ohlcv_data(
|
||||
data_format: str | None = None,
|
||||
prepend: bool = False,
|
||||
progress_tracker: CustomProgress | None = None,
|
||||
no_parallel_download: bool = False,
|
||||
) -> list[str]:
|
||||
"""
|
||||
Refresh stored ohlcv data for backtesting and hyperopt operations.
|
||||
@@ -339,6 +369,7 @@ def refresh_backtest_ohlcv_data(
|
||||
progress_tracker = retrieve_progress_tracker(progress_tracker)
|
||||
|
||||
pairs_not_available = []
|
||||
fast_candles: dict[PairWithTimeframe, DataFrame] = {}
|
||||
data_handler = get_datahandler(datadir, data_format)
|
||||
candle_type = CandleType.get_default(trading_mode)
|
||||
with progress_tracker as progress:
|
||||
@@ -355,6 +386,32 @@ def refresh_backtest_ohlcv_data(
|
||||
logger.info(f"Skipping pair {pair}...")
|
||||
continue
|
||||
for timeframe in timeframes:
|
||||
# Get fast candles via parallel method on first loop through per timeframe
|
||||
# and candle type. Downloads all the pairs in the list and stores them.
|
||||
# Also skips if only 1 pair/timeframe combination is scheduled for download.
|
||||
if (
|
||||
not no_parallel_download
|
||||
and (len(pairs) + len(timeframes)) > 2
|
||||
and exchange.get_option("download_data_parallel_quick", True)
|
||||
and (
|
||||
((pair, timeframe, candle_type) not in fast_candles)
|
||||
and (erase is False)
|
||||
and (prepend is False)
|
||||
)
|
||||
):
|
||||
fast_candles.update(
|
||||
_download_all_pairs_history_parallel(
|
||||
exchange=exchange,
|
||||
pairs=pairs,
|
||||
timeframe=timeframe,
|
||||
candle_type=candle_type,
|
||||
timerange=timerange,
|
||||
)
|
||||
)
|
||||
|
||||
# get the already downloaded pair candles if they exist
|
||||
pair_candles = fast_candles.pop((pair, timeframe, candle_type), None)
|
||||
|
||||
progress.update(timeframe_task, description=f"Timeframe {timeframe}")
|
||||
logger.debug(f"Downloading pair {pair}, {candle_type}, interval {timeframe}.")
|
||||
_download_pair_history(
|
||||
@@ -368,6 +425,7 @@ def refresh_backtest_ohlcv_data(
|
||||
candle_type=candle_type,
|
||||
erase=erase,
|
||||
prepend=prepend,
|
||||
pair_candles=pair_candles, # optional pass of dataframe of parallel candles
|
||||
)
|
||||
progress.update(timeframe_task, advance=1)
|
||||
if trading_mode == "futures":
|
||||
@@ -404,6 +462,43 @@ def refresh_backtest_ohlcv_data(
|
||||
return pairs_not_available
|
||||
|
||||
|
||||
def _download_all_pairs_history_parallel(
|
||||
exchange: Exchange,
|
||||
pairs: list[str],
|
||||
timeframe: str,
|
||||
candle_type: CandleType,
|
||||
timerange: TimeRange | None = None,
|
||||
) -> dict[PairWithTimeframe, DataFrame]:
|
||||
"""
|
||||
Allows to use the faster parallel async download method for many coins
|
||||
but only if the data is short enough to be retrieved in one call.
|
||||
Used by freqtrade download-data subcommand.
|
||||
:return: Candle pairs with timeframes
|
||||
"""
|
||||
candles: dict[PairWithTimeframe, DataFrame] = {}
|
||||
since: int | None = None
|
||||
if timerange:
|
||||
if timerange.starttype == "date":
|
||||
since = timerange.startts * 1000
|
||||
|
||||
candle_limit = exchange.ohlcv_candle_limit(timeframe, candle_type)
|
||||
one_call_min_time_dt = dt_ts(date_minus_candles(timeframe, candle_limit))
|
||||
# check if we can get all candles in one go, if so then we can download them in parallel
|
||||
if since is None or since > one_call_min_time_dt:
|
||||
logger.info(
|
||||
f"Downloading parallel candles for {timeframe} for all pairs"
|
||||
f" since {format_ms_time(since)}"
|
||||
if since
|
||||
else "."
|
||||
)
|
||||
needed_pairs: ListPairsWithTimeframes = [
|
||||
(p, timeframe, candle_type) for p in [p for p in pairs]
|
||||
]
|
||||
candles = exchange.refresh_latest_ohlcv(needed_pairs, since_ms=since, cache=False)
|
||||
|
||||
return candles
|
||||
|
||||
|
||||
def _download_trades_history(
|
||||
exchange: Exchange,
|
||||
pair: str,
|
||||
@@ -602,6 +697,9 @@ def download_data(
|
||||
"""
|
||||
Download data function. Used from both cli and API.
|
||||
"""
|
||||
exchange.validate_trading_mode_and_margin_mode(
|
||||
config.get("trading_mode", TradingMode.SPOT), None, allow_none_margin_mode=True
|
||||
)
|
||||
timerange = TimeRange()
|
||||
if "days" in config and config["days"] is not None:
|
||||
time_since = (datetime.now() - timedelta(days=config["days"])).strftime("%Y%m%d")
|
||||
@@ -702,6 +800,7 @@ def download_data(
|
||||
trading_mode=config.get("trading_mode", "spot"),
|
||||
prepend=config.get("prepend_data", False),
|
||||
progress_tracker=progress_tracker,
|
||||
no_parallel_download=config.get("no_parallel_download", False),
|
||||
)
|
||||
finally:
|
||||
if pairs_not_available:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user