Commit Graph

613 Commits

Author SHA1 Message Date
Matthias
d3d17f9f8b Only allow min-stake adjustments of up to 30%
fix #5856
2021-11-10 06:57:22 +01:00
Sam Germain
6c8501dadc Removed docstring indents 2021-11-09 01:00:57 -06:00
Matthias
2bfec7d549 Add small test-case confirming trade object copy 2021-11-08 20:14:32 +01:00
Sam Germain
7122cb2fe9 updated test_get_funding_fees to test for funding fees at beginning of trade also 2021-11-08 01:58:23 -06:00
Sam Germain
252e45ebf2 Merge branch 'feat/short' into funding-fee-dry-run 2021-11-06 22:46:00 -06:00
Sam Germain
8bfcf4ee09 Fixed breaking exchange tests from _get_funding_fee_dates, and commented out kraken get_funding_fees tests 2021-11-06 22:05:38 -06:00
Sam Germain
b88482b2e9 Fixed millisecond timestamp issue errors with funding fees 2021-11-06 21:45:35 -06:00
Sam Germain
48b34c8fd0 Fixed issues with funding-fee being miscalculated on trade objects in freqtradebot 2021-11-06 21:03:18 -06:00
Sam Germain
f795288d90 Fixed timestamp/datetime issues for mark price, funding rate and _get_funding_fee_dates 2021-11-06 20:48:03 -06:00
Sam Germain
6e912c1053 Updated _get_funding_fee method names, added kraken._get_funding_fee 2021-11-06 17:39:21 -06:00
Matthias
ebc38159b8 Merge branch 'develop' into feat/short 2021-11-06 15:24:52 +01:00
Matthias
f7dc47b1c8 Add test for exit_timeout_count 2021-11-06 13:10:41 +01:00
Sam Germain
cb97c6f388 Updated time to utc in test_update_funding_fees, some funding rate key errors because a timestamp is likely not in utc 2021-11-06 05:56:58 -06:00
Sam Germain
fd63fa7dda Updated test_update_funding_fees to compile fine but the assertion is incorrect 2021-11-06 05:42:41 -06:00
Rokas Kupstys
98b475a00b Use lambdas instead of a static number of side-effects. 2021-11-06 10:23:46 +02:00
Matthias
ae3b53014d Add failing test for OKEX failure
part of #5842
2021-11-05 19:44:02 +01:00
Sam Germain
8a4236198f Added test_update_funding_fees in freqtradebot, test currently fails 2021-11-03 22:52:37 -06:00
Matthias
6b90b4a144 Test "get-signal" 2021-10-31 10:53:30 +01:00
Matthias
1267374c8a Small fixes to tests 2021-10-20 19:21:38 +02:00
Matthias
028e5de935 Remove space after @ decorator in tests 2021-10-20 16:53:24 +02:00
Sam Germain
57d7009fd9 Added trading mode and collateral to constants.py 2021-10-18 01:21:41 -06:00
Matthias
ad2c88b991 Reduce test-code duplication by importing functions 2021-10-17 17:00:25 +02:00
Matthias
e8f98e473d Fix a few more tests 2021-10-17 11:08:54 +02:00
Matthias
198f3c5238 Merge branch 'feat/short' into pr/samgermain/5567 2021-10-17 10:41:03 +02:00
Matthias
69fdb8edfa Merge branch 'develop' into feat/short 2021-10-17 10:40:08 +02:00
Matthias
abd5c4f278 Convert additional test to USDT 2021-10-17 10:39:53 +02:00
Matthias
41b5e5627b Update stoploss test 2021-10-17 09:54:38 +02:00
Matthias
e19d95b63e Fix stoploss test 2021-10-17 09:00:10 +02:00
Sam Germain
962f63a19a fixed failing test_execute_trade_exit_custom_exit_price 2021-10-14 05:28:08 -06:00
Sam Germain
5fbe76cd7e isolated conditionals in interface stoploss method 2021-10-14 05:10:28 -06:00
Sam Germain
0afd76c183 Fixed failing test_execute_trade_exit_market_order 2021-10-14 04:45:48 -06:00
Sam Germain
2dc402fbf7 Fixed failing test_handle_trade 2021-10-14 04:05:50 -06:00
Sam Germain
b0ce9612f8 Fixed sell_profit_only failing 2021-10-14 03:52:29 -06:00
Sam Germain
bcbe8f229c Merge branch 'feat/short' into lev-freqtradebot 2021-10-13 19:02:57 -06:00
Matthias
2c6290a100 Small updates to prevent random test failures 2021-10-13 07:04:21 +02:00
Sam Germain
0fcc7eca62 Added more tests to test_update_funding_fees 2021-10-12 20:28:46 -06:00
Sam Germain
86cbd0039f Fixed bugs 2021-10-12 02:24:35 -06:00
Rokas Kupstys
437fadc258 Fix profitable trade registering as a loss due to fees. 2021-10-12 10:49:07 +03:00
Matthias
952d83ad24 Reenable additional test 2021-10-11 20:36:08 +02:00
Matthias
70000b5843 Use scheduler as Object, not the automatic Singleton 2021-10-11 20:28:23 +02:00
Sam Germain
2e7adb99da Fixed some breaking tests 2021-10-11 08:52:11 -06:00
Sam Germain
855b26f846 Parametrized more time machine tests in test_update_funding_fees 2021-10-11 01:31:21 -06:00
Sam Germain
3b962433fb Switched shcedule to perform every 15 minutes 2021-10-10 02:55:04 -06:00
Sam Germain
81cf4653a9 Fixed failing test_process_trade_creation, test_order_book_depth_of_market, test_handle_stoploss_on_exchange_trailing 2021-10-09 17:35:57 -06:00
Sam Germain
9513650ffe Fixed failing test_handle_stoploss_on_exchange_trailing 2021-10-09 16:20:25 -06:00
Sam Germain
9a6ffff5eb Added cost to limit_sell_order_usdt_open, fixing some tests 2021-10-09 15:50:18 -06:00
Sam Germain
85e86ec09d Fixed failing test_check_handle_timedout_buy_usercustom 2021-10-09 15:14:33 -06:00
Sam Germain
4fc4007975 Fixed failing test_check_handle_timedout_buy 2021-10-09 14:57:10 -06:00
Sam Germain
d7e6b842ba Fixed failing tests test_cancel_all_open_orders, test_order_book_ask_strategy, test_order_book_depth_of_market, test_disable_ignore_roi_if_buy_signal 2021-10-09 14:12:17 -06:00
Sam Germain
057b048f31 Started added timezone offset stuff 2021-10-09 12:27:40 -06:00
Sam Germain
795d51b68c Switched scheduler to get funding fees every hour for any exchange 2021-10-09 11:27:26 -06:00
Sam Germain
7f7f377a90 updated a test, put in TODO-lev 2021-10-07 05:03:38 -06:00
Sam Germain
e367f84b06 Added more update_funding_fee tests, set exchange of default conf 2021-10-07 04:20:53 -06:00
Matthias
a4a5c1aad0 Fix scheduling test (a little bit) 2021-10-06 07:08:28 +02:00
Sam Germain
362c29c315 Added patch_get_signal(freqtrade, enter_long=False, enter_short=True, exit_short=True) a bunch 2021-10-05 03:15:28 -06:00
Sam Germain
d8ba3d8cde Added trade.is_short = is_short a lot 2021-10-05 02:16:17 -06:00
Sam Germain
c72aac4356 Added trade.is_short = is_short a lot 2021-10-05 02:13:29 -06:00
Sam Germain
29e582c6d9 Fixed time format for schedule and update_funding_fees conf is mocked better 2021-10-05 01:42:46 -06:00
Sam Germain
928c4edace removed side from execute_trade_exit 2021-10-03 23:22:51 -06:00
Sam Germain
9046caa27c fixed test_update_trade_state_sell 2021-10-03 23:13:34 -06:00
Matthias
6e1e1e00c2 Fix mock going into nirvana 2021-10-04 06:59:08 +02:00
Sam Germain
2a2b759419 patch_get_signal test updates 2021-10-03 17:41:01 -06:00
Sam Germain
d75934ce92 'is_short' -> is_short: test_freqtradebot 2021-10-03 04:44:39 -06:00
Sam Germain
56ff0a95a7 Merge branch 'feat/short' into lev-freqtradebot 2021-10-03 02:26:41 -06:00
Sam Germain
70db228f24 Merge branch 'feat/short' into funding-fee 2021-10-03 02:15:54 -06:00
Sam Germain
d3f7207fe6 Merge branch 'develop' into feat/short 2021-10-03 02:12:25 -06:00
Sam Germain
09ef0781a1 switching limit_buy_order_usdt and limit_sell_order_usdt to limit_order(enter_side[is_short]) and limit_order(exit_side[is_short]) 2021-10-03 01:52:58 -06:00
Matthias
9e77a739fa Change usdt stake_amount to 60$ 2021-10-03 09:22:50 +02:00
Sam Germain
57d66cc0f7 Merge branch 'test-freqtradebot-usdt' into lev-freqtradebot 2021-10-02 20:51:50 -06:00
Sam Germain
058c7b3e99 Fixed odd test_execute_entry where the filled coins were higher than the amount 2021-10-02 20:43:32 -06:00
Sam Germain
908dee961d Changed test values in test_sell_profit_only to usdt like values 2021-10-02 20:37:05 -06:00
Sam Germain
93679db7c4 Removed ... TODOs 2021-10-02 20:33:46 -06:00
Sam Germain
057a187231 Removed uneccessary TODOs 2021-10-02 20:32:51 -06:00
Sam Germain
3823ca4162 Merge branch 'test-freqtradebot-usdt' into lev-freqtradebot 2021-10-02 20:26:52 -06:00
Matthias
022839b728 remove unnecessary test 2021-10-02 13:17:10 +02:00
Matthias
e5e1e49f53 Remove some unused test parameters 2021-10-02 13:01:33 +02:00
Sam Germain
87ff65d31e Fixed failing test_handle_protections 2021-10-02 04:06:22 -06:00
Sam Germain
72388d3376 tried to solve test_update_funding_fees: 2021-10-02 03:52:00 -06:00
Sam Germain
b3656ddfc9 Merge branch 'feat/short' into lev-freqtradebot 2021-10-02 03:36:32 -06:00
Sam Germain
e8b4cf6eaa Merge branch 'develop' into feat/short 2021-10-02 03:15:12 -06:00
Sam Germain
6f8e66117b flake8 isort 2021-10-02 01:44:30 -06:00
Sam Germain
107fa911a5 Fixed test_tsl_on_exchange_compatible_with_edge 2021-10-02 01:44:30 -06:00
Rokas Kupstys
8961370269 Fix failing test due to not updated expected values. 2021-10-02 01:44:30 -06:00
Sam Germain
43339f1660 A lot of the usdt freqtradebot tests pass now 2021-10-02 01:44:30 -06:00
Sam Germain
ba5d78f005 swapped default_conf for default_conf_usdt and ticker for ticker_usdt 2021-10-02 01:44:30 -06:00
Sam Germain
7eebb6bb2d updated test_create_trade to use default_conf_usdt 2021-10-02 01:44:30 -06:00
Sam Germain
755cc9cda1 Updated test_check_available_stake_amount to use default_conf_usdt 2021-10-02 01:44:30 -06:00
Sam Germain
d0e0d0ee01 Removed init_persistence_usdt 2021-10-02 01:44:30 -06:00
Sam Germain
5ce09c7519 updated test_reupdate_enter_order_fees to usdt 2021-10-02 01:44:30 -06:00
Sam Germain
ffa9a3ac7d changed default_conf_usdt stake_amount to 10 2021-10-02 01:44:30 -06:00
Sam Germain
6fdcf8cd73 created default_conf_usdt and init_persistence_usdt so that these tests pass: test_handle_stoploss_on_exchange_trailing, test_handle_stoploss_on_exchange_custom_stop, test_update_trade_state_withorderdict 2021-10-02 01:44:30 -06:00
Sam Germain
d1e3d48075 changed test_update_trade_state_withorderdict to usdt 2021-10-02 01:44:30 -06:00
Sam Germain
8d7f75c4de Fixed a bunch of freqtradebot tests 2021-10-02 01:44:30 -06:00
Sam Germain
dadd134200 changes some tests to use usdt values 2021-10-02 01:44:30 -06:00
Matthias
5f23af5802 Rename update_open_trades to clarify it's only called at startup 2021-09-30 07:24:16 +02:00
Sam Germain
6e86bdb820 Added test_update_funding_fees 2021-09-29 23:11:01 -06:00
Sam Germain
ba60aad89d parameterized TradingMode in persistence 2021-09-29 22:59:09 -06:00
Matthias
ec445776e9
Merge pull request #5601 from ferrants/parameterize-tests
parameterize some tests
2021-09-26 19:07:47 +02:00
Matthias
f4f204d849 Update test to use cost dict 2021-09-24 20:17:38 +02:00
Matthias
fcca637107
Merge pull request #5599 from freqtrade/notify_trigger_prot
Notify trigger protections
2021-09-23 07:17:26 +02:00
matt ferrante
2bf49445b7 add parameterized names 2021-09-22 16:11:27 -06:00
matt ferrante
30cc69c880 set all to eth for multi test 2021-09-22 11:28:42 -06:00
matt ferrante
8cfb6ddd51 fix long line 2021-09-22 10:48:13 -06:00
matt ferrante
f768bdea50 cleanup based on feedback 2021-09-22 10:32:30 -06:00
Sam Germain
553c868d7f combined test_order_book_depth_of_market and test_order_book_depth_of_market_high_delta 2021-09-21 16:40:24 -06:00
matt ferrante
277828bf0e parameterize some tests 2021-09-21 07:56:16 -06:00
Matthias
fd23ab3d64 improve formatting, add tests 2021-09-20 19:50:56 +02:00
Sam Germain
043bfcd5ad Fixed a lot of failing tests" 2021-09-19 20:24:22 -06:00
Sam Germain
d7c7448632 merged lev-freqtradebot with lev-strat 2021-09-19 19:06:43 -06:00
Sam Germain
778f0d9d0a Merged feat/short into lev-strat 2021-09-19 17:44:12 -06:00
Sam Germain
cee4ed541b parametrized test_update_trade_state_withorderdict 2021-09-18 19:46:46 -06:00
Sam Germain
ec9dbc550e parametrized test_create_trade_minimal_amount 2021-09-18 19:19:53 -06:00
Sam Germain
518a59ad41 parametrized test_edge_overrides_stoploss 2021-09-18 03:20:00 -06:00
Sam Germain
42a2fdc1c5 parametrized test_order_dict 2021-09-18 03:01:08 -06:00
Sam Germain
216f75bbb9 parametrized test_sell_profit_only , test__safe_exit_amount, test_order_book_bid_strategy1 2021-09-18 02:53:34 -06:00
Matthias
4d558879e9 Merge branch 'feat/short' into pr/samgermain/5378 2021-09-17 19:33:35 +02:00
Sam Germain
2e8d00e877 temp commit message 2021-09-17 01:15:21 -06:00
Sam Germain
4c91126c49 some short freqtradebot parametrized tests 2021-09-16 03:23:45 -06:00
Sam Germain
d604757056 Added is_short to conf tests 2021-09-14 21:10:38 -06:00
Sam Germain
5f6384a961 Added tests to freqtradebot 2021-09-14 17:18:57 -06:00
Sam Germain
49acfc887f merged with lev-exchange 2021-09-13 00:00:22 -06:00
Sam Germain
2aaf60205e Merge branch 'feat/short' into lev-exchange 2021-09-12 23:41:34 -06:00
Sam Germain
694460c8e0 merged with feat/short 2021-09-10 23:16:12 -06:00
Sam Germain
cb155764eb Short side options in freqtradebot 2021-09-10 11:47:27 -06:00
Sam Germain
83bd674ba7 Added side to execute_trade_exit 2021-09-10 03:25:54 -06:00
Sam Germain
d582ccd2e6 merged with lev-exchange 2021-09-10 03:05:13 -06:00
Sam Germain
6486b904b5 merged with feat/short 2021-09-10 02:57:17 -06:00
Sam Germain
063861ada3 Added todos for short stoploss 2021-09-09 15:47:49 -06:00
Sam Germain
3a4d247b64 Changed stoploss side on some tests 2021-09-09 15:47:49 -06:00
Sam Germain
f4e26a616f Exchange stoploss function takes side 2021-09-09 15:47:49 -06:00
Sam Germain
1f38088d7b Merged with develop 2021-09-09 13:56:46 -06:00
Sam Germain
e1a749a91e removed unnecessary caplog 2021-09-09 13:19:43 -06:00
Matthias
5844f5a7fa
Merge pull request #5546 from samgermain/clear-caplog-freqtradebot
freqtradebot-tests-caplog-clears
2021-09-09 21:18:54 +02:00
Sam Germain
366247dff3 removed caplog.clears at end of functions in test_freqtradebot 2021-09-09 02:17:41 -06:00
Sam Germain
1379ec7402 Updated log messages for freqtradebot 2021-09-08 03:04:01 -06:00
Sam Germain
b2f289e404 Fixed freqtradebot failing tests 2021-09-08 02:16:25 -06:00
Sam Germain
362dc20406 notify_buy -> notify_enter, notify_sell -> notify_exit 2021-09-08 02:06:01 -06:00
Sam Germain
e0092a85e9 handle_cancel_buy/sell -> handle_cancel_enter/exit 2021-09-08 02:04:20 -06:00
Sam Germain
be93c75e44 reupdate_buy_order_fees -> reupdate_enter_order_fees 2021-09-08 02:03:40 -06:00
Sam Germain
aac05029e1 safe_sell_amount -> safe_exit_amount 2021-09-08 02:03:24 -06:00
Sam Germain
53006db2b7 Updated log messages for freqtradebot 2021-09-08 01:48:22 -06:00
Sam Germain
786dcb50eb safe_sell_amount -> safe_exit_amount 2021-09-08 01:20:52 -06:00
Sam Germain
8ad53e99ce reupdate_buy_order_fees -> reupdate_enter_order_fees 2021-09-08 01:14:16 -06:00
Sam Germain
88a5a30a50 handle_cancel_buy/sell -> handle_cancel_enter/exit 2021-09-08 00:53:09 -06:00
Sam Germain
8f38d6276f notify_buy -> notify_enter, notify_sell -> notify_exit 2021-09-08 00:45:55 -06:00
Sam Germain
e13b0414d8 Merge branch 'lev-strat' into lev-freqtradebot 2021-09-08 00:00:53 -06:00
Sam Germain
dc83e04f9b Merge branch 'feat/short' into lev-exchange 2021-09-07 22:13:20 -06:00
Sam Germain
ff790e8fd3 merged with caplog-clear-freqtradebot 2021-09-07 22:12:49 -06:00
Sam Germain
79ca6135a2 added caplog clears to freqtradebot tests 2021-09-07 21:53:38 -06:00
Sam Germain
7eab855476 Merge branch 'feat/short' into lev-exchange 2021-09-04 20:15:36 -06:00
Matthias
ca44d2e092 Merge branch 'feat/short' into pr/samgermain/5378 2021-09-04 19:54:34 +02:00
Matthias
5184cc7749 Merge branch 'develop' into feat/short 2021-09-02 07:03:14 +02:00
Matthias
c4be52d1c3 rename execute_sell to execute_trade_exit 2021-08-26 06:53:42 +02:00
Matthias
63844d39f6 Rename execute_buy to execute_entry 2021-08-26 06:48:26 +02:00
Matthias
b61735937c Replace Patch_get_signal with proper calls 2021-08-25 21:05:55 +02:00
Matthias
f4242106d9 Merge branch 'develop' into feat/short 2021-08-24 20:53:21 +02:00
Matthias
60b476611c Simplify a number of tests by relying on default arguments 2021-08-24 20:51:59 +02:00
Matthias
957551ea97 Merge branch 'develop' into feat/short 2021-08-24 06:25:06 +02:00
Sam Germain
e5b2b64a3f Changed stoploss side on some tests 2021-08-22 23:36:36 -06:00
Matthias
9951f51079 Update test to ensure direction of movement is correct 2021-08-18 20:24:19 +02:00
axel
2fb9f6e2f4 rename custom price max distance option in config, update formula and test associated 2021-08-18 05:07:37 -04:00
axel
faff40577a fix test_execute_buy In case of custom entry price 2021-08-16 15:33:05 -04:00
axel
3ea4b2ba00 add custom_price_max_distance_percent security to get_valid_price, update tests 2021-08-16 15:18:57 -04:00
axel
20cc60bfde update get_valid_price function and test cases to handle inputs with try catch 2021-08-13 11:06:15 -04:00
axel
dbf7f34ecb add unit test to function get_valid_price 2021-08-12 15:30:49 -04:00
axel
ae11be3970 manage None or string value returned by custom_entry_price and add unit test for those cases 2021-08-12 14:47:01 -04:00
Sam Germain
2c0077abc7 Exchange stoploss function takes side 2021-08-08 23:24:03 -06:00
axel
0aeebc9d53 add test for custom exit price 2021-08-05 17:57:45 -04:00
axel
2cf781f3dd add freqtradebot execute_buy test in custom entry price case 2021-08-04 18:32:39 -04:00
axel
bc3e6deb1c remove specific test for buy with custom entry 2021-08-03 17:09:52 -04:00
axel
b3dafb378e remove use_custom_entry_price as a config option 2021-08-03 16:54:28 -04:00
axel
00939b63f2 flake 8 fixes 2021-08-03 16:25:18 -04:00
axel
f11f5d17e9 add feature custom entry price for live 2021-08-03 15:57:23 -04:00
Sam Germain
d88e2ae603 Merge branch 'develop' into margin-db 2021-08-02 23:58:44 -06:00
Matthias
d8d8261f1b
Merge pull request #5318 from samgermain/combined_exchange_buy_sell
combined exchange.buy and exchange.sell
2021-08-02 20:11:09 +02:00
Sam Germain
25c527ee67 combined exchange.buy and exchange.sell, Adding dummy mock to create_order in tests in test_freqtradebot 2021-07-28 14:55:06 -06:00
Sam Germain
3fb7f983f8 Added is_short and leverage to __repr__ 2021-07-28 12:25:56 -06:00
kevinjulian
ba0fa1120a revert rename naming 2021-07-23 18:39:18 +07:00
kevinjulian
235c1afd09 add buy_tag on telegram 2021-07-22 01:53:15 +07:00
kevinjulian
66a7070170 run linter 2021-07-20 23:56:03 +07:00
Kevin Julian
edf9c08f06
Merge branch 'develop' into feat/kevinjulian/add-buy-signal-name 2021-07-20 19:19:46 +07:00
kevinjulian
ed30c023cd fix some testcase 2021-07-20 19:08:14 +07:00
kevinjulian
ec526b3f96 fix testcase 2021-07-20 16:22:04 +07:00
kevinjulian
7d04005218 add test and migration 2021-07-20 16:14:48 +07:00
Sam Germain
7c27525bd8 Merge get_buy_rate and get_sell_rate 2021-07-17 22:51:20 -06:00
Matthias
7ea0a74c53 Default to proposed stake 2021-07-11 14:11:41 +02:00
Rokas Kupstys
0e4466ca1e Implement strategy-controlled stake sizes. Expose self.wallet to a strategy. 2021-07-11 12:38:58 +03:00
Matthias
0235868c66 Update tests for new config structure 2021-06-26 16:39:01 +02:00
Matthias
59a33d0fa9 Add test for ask_orderbook validation 2021-06-25 20:52:34 +02:00
Matthias
8c542e4028 Update tests for removed order_book_max option 2021-06-25 20:45:53 +02:00
Matthias
40545e62af
Merge pull request #5082 from freqtrade/dry_run_order
Dry run order filling
2021-06-25 18:26:01 +02:00
Matthias
d4dfdf04fc Move RPCMessageType to enums 2021-06-09 20:23:17 +02:00
Matthias
9c34304cb9 Move state enums to enums package 2021-06-08 21:20:35 +02:00
Matthias
89b9915c12 Update imports for SellType in tests 2021-06-08 21:07:16 +02:00
Matthias
c389d44e9a Improve filling logic 2021-06-05 15:22:52 +02:00
Matthias
1e988c97ad Update dry-run order handling to use realistic fill prices
closes #3389
2021-06-05 09:09:39 +02:00
Matthias
387f3bbc5d Adjust missed tests 2021-06-02 11:43:47 +02:00
Matthias
bd1984386e Move get_sell_rate to exchange class 2021-06-02 11:41:13 +02:00
Matthias
12916243ec Move get_buy_rate to exchange class 2021-06-02 11:30:19 +02:00
Matthias
4e94d3d3e5 Add test for too small buy check 2021-05-21 19:49:36 +02:00