Commit Graph

223 Commits

Author SHA1 Message Date
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
Matthias
1267374c8a Small fixes to tests 2021-10-20 19:21:38 +02:00
Sam Germain
bcbe8f229c Merge branch 'feat/short' into lev-freqtradebot 2021-10-13 19:02:57 -06:00
Sam Germain
bdad604fab Added persistence futures tests 2021-10-11 07:48:31 -06:00
Sam Germain
01a9e90057 Added futures tests to test_persistence.test_calc_profit 2021-10-11 07:03:14 -06:00
Sam Germain
ba60aad89d parameterized TradingMode in persistence 2021-09-29 22:59:09 -06:00
Sam Germain
af6afd0ac2 Revert "Replace datetime.utcnow with datetime.now(timezone.utc)"
This reverts commit c4ac876183.
2021-09-29 22:27:21 -06:00
Sam Germain
c4ac876183 Replace datetime.utcnow with datetime.now(timezone.utc) 2021-09-29 22:16:44 -06:00
Sam Germain
043bfcd5ad Fixed a lot of failing tests" 2021-09-19 20:24:22 -06:00
Sam Germain
8123579442 added trading mode to persistence tests 2021-09-16 23:47:44 -06:00
Sam Germain
e7b6f3bfd1 removed changes to test_persistence 2021-09-16 23:32:23 -06:00
Sam Germain
0ced05890a removed space between @ and pytest 2021-09-16 16:28:23 -06:00
Sam Germain
dec2f377ff Removed utils, moved get_sides to conftest 2021-09-16 16:25:02 -06:00
Sam Germain
5fcb69a0b5 Parametrized test_persistence 2021-09-15 18:29:17 -06:00
Sam Germain
695a8fc73b comment updates, formatting, TODOs 2021-09-08 03:09:39 -06:00
Sam Germain
d6d5bae2a1 New funding fee methods 2021-09-04 16:33:06 -06:00
Sam Germain
b7891485b3 Created FundingFee class and added funding_fee to LocalTrade and freqtradebot 2021-09-04 16:20:07 -06:00
Matthias
957551ea97 Merge branch 'develop' into feat/short 2021-08-24 06:25:06 +02:00
Matthias
e03784d98d Fix filled exception
closes #5404
2021-08-12 05:02:56 +00:00
Matthias
cf27968b97 Properly preserve trade's low during backtesting 2021-08-09 19:38:56 +02:00
Sam Germain
8e941e6836 Changed interest implementation 2021-08-08 17:09:17 -06:00
Sam Germain
d88e2ae603 Merge branch 'develop' into margin-db 2021-08-02 23:58:44 -06:00
Sam Germain
047df0c212 Removed leverage references 2021-08-01 03:01:47 -06:00
Sam Germain
90a61b1765 Changed tests in tests/test_persistence.py to use usdt prices 2021-07-31 20:44:49 -06:00
Matthias
c5e3348b89 Migrations for indexes should run in a seperate session
closes #5349
2021-07-31 16:36:28 +02:00
Sam Germain
bc42516f68 test_update_limit_order has both a buy and sell leverage short order 2021-07-31 01:05:37 -06:00
Sam Germain
26be620f71 Removed LocalTrade.set_is_short 2021-07-31 00:20:25 -06:00
Sam Germain
fadb0de7c7 Removed excess modes stop_loss method, removed models.is_opening_side models.is_closing_side 2021-07-31 00:12:53 -06:00
Sam Germain
3fb7f983f8 Added is_short and leverage to __repr__ 2021-07-28 12:25:56 -06:00
Sam Germain
195badeb80 Changed liquidation_price to isolated_liq 2021-07-28 12:25:56 -06:00
Sam Germain
6ad9b535a9 persistence all to one test file, use more regular values like 2.0 for persistence tests 2021-07-28 12:25:56 -06:00
Sam Germain
0bd71f87d0 made leveraged test names unique
test_adjust_stop_loss_short, test_update_market_order_shortpasses
2021-07-28 12:25:55 -06:00
Sam Germain
be3a9390fe Switched migrations.py check for stake_currency back to open_rate, because stake_currency is no longer a variable 2021-07-28 12:25:55 -06:00
Sam Germain
78708b27f2 Updated tests to new persistence 2021-07-28 12:25:55 -06:00
Matthias
e0d42d2eb7 Fix migrations, revert some parts related to amount properties 2021-07-28 12:25:55 -06:00
Sam Germain
68d3699c19 Turned amount into a computed property 2021-07-28 12:25:55 -06:00
Sam Germain
efcc2adacf About 15 margin tests pass 2021-07-28 12:25:55 -06:00
Sam Germain
d07fe1586c Set leverage and borowed to computed properties 2021-07-28 12:25:55 -06:00
Sam Germain
c24ec89dc4 Started some pytests for short and leverage
1 short test passes
2021-07-28 12:25:55 -06:00
Sam Germain
000932eed0 Adding templates for leverage/short tests
All previous pytests pass
2021-07-28 12:25:55 -06:00
kevinjulian
235c1afd09 add buy_tag on telegram 2021-07-22 01:53:15 +07:00
kevinjulian
49886874aa rename to buy_tag 2021-07-21 20:05:35 +07:00
kevinjulian
3d8b2d601d fix test persistance 2021-07-20 20:23:47 +07:00
Matthias
b41c234440 Extract Closed profit calculation to trade object 2021-07-12 06:54:06 +02:00
Matthias
b82f7a2dfd Update orders-migrations to work with new sqlalchemy syntax 2021-05-27 11:38:28 +02:00
Matthias
a01d05997e Add Trade.commit method for easy use 2021-05-27 11:38:28 +02:00
Matthias
c31cb67118 Further changes for sqlalchemy 1.4 2021-05-27 11:38:28 +02:00
Matthias
44bbc0718e CLosing bracket 2021-05-21 20:54:18 +02:00
Matthias
a7216e6279 SQLite does not know drop column 2021-05-21 20:53:38 +02:00
Matthias
41e3233bab Fix failing test 2021-05-21 20:44:11 +02:00
Matthias
6acb2eb2b6 Add average column to orders table 2021-05-21 20:35:39 +02:00
Matthias
6eb947ae09 Move static Trade functions to right class 2021-04-28 06:37:40 +02:00
Matthias
9f6f3e0862 Address ZeroDivisionExceptiond
closes #4764 closes #4617
2021-04-20 21:41:49 +02:00
Matthias
2254f65fa7 use binance intests instead of bittrex 2021-04-20 12:59:15 +02:00
Matthias
9a58a85347 Don't export "hum" date versions for trade objects.
They are not used and have a rather high performance penalty due to
using arrow.get
2021-04-13 06:17:11 +02:00
Matthias
7132aefd60 Rename Trade.session to Trade._session 2021-04-05 08:46:12 +02:00
Matthias
ea0b47a7f9 Replace test occurances of Trade.session with Trade.query.session 2021-04-05 07:38:07 +02:00
Matthias
b7702a1e9f Improve tests to work with new sqlalchemy version 2021-03-22 19:39:06 +01:00
Matthias
79d4585dad Add check to ensure close_profit_abs is filled on closed trades
Technically, this should not be possible, but #4554 shows it is.

closes #4554
2021-03-16 19:24:03 +01:00
Matthias
0320c8dc92 Improve tests for trades_proxy 2021-03-13 15:51:27 +01:00
Matthias
d1acc8092c Improve backtest performance 2021-03-13 10:17:14 +01:00
Matthias
fc256749af Add test for backtesting _enter_trade 2021-02-27 09:33:00 +01:00
Matthias
60db6ccf45 Add test for subclassing 2021-02-27 09:33:00 +01:00
Matthias
0754a7a78f total_open_trades_stake should support no-db mode 2021-02-27 09:32:59 +01:00
Matthias
c5ab3a80a5 Check if order is a dict before parsing
closes #4331
2021-02-08 19:35:22 +01:00
Matthias
c659150d9f Also print trade_duration in seconds to json 2021-01-25 19:42:34 +01:00
Matthias
3b51545d23 Add trade_duration to to_json 2021-01-24 08:58:41 +01:00
Matthias
95fd3824da Finish renamal of open_trade_price to open_value 2020-12-10 19:36:52 +01:00
Matthias
201cc67e05 Rename open_trade_price to "open_trade_value" 2020-12-10 19:21:20 +01:00
Matthias
d1dab23283 Remove deprecated api fields 2020-11-03 08:59:11 +01:00
Matthias
cf89a773da Standardize trade api outputs
there should be no difference between current_profit and close_profit
 it's always profit, and the information if it's a closed trade is available elsewhere
2020-11-03 08:58:57 +01:00
Matthias
e602ac3406 Introduce Pairlocks middleware 2020-10-27 07:06:06 +01:00
Matthias
64e680d7ee Document new api method 2020-10-20 19:30:00 +02:00
Matthias
7a9768ffa6 Add /locks Telegram endpoint 2020-10-20 19:21:13 +02:00
Matthias
7caa6cfe31 Add tests for pairlock 2020-10-20 19:21:13 +02:00
Matthias
8cdc795a44 Rename persistence.init to init_db 2020-10-16 08:15:18 +02:00
Matthias
254875e6b3 Add test for new close functionality
* Don't updates close_date if the trade was already closed
2020-09-19 08:42:15 +02:00
Matthias
dd87938a5e Fix bug causing close_date to be set again 2020-09-19 08:34:06 +02:00
Matthias
aa8832f70e Convert select_order to use ft_is_open flag 2020-09-11 07:12:10 +02:00
Matthias
3c521f55b2 Add 6th mock trade 2020-09-10 07:40:19 +02:00
Matthias
98840eef3c Add 5th mock trade 2020-09-09 07:01:43 +02:00
Matthias
68d51a9787 Don't raise OperationalException when orderid's dont' match 2020-09-06 14:33:45 +02:00
Matthias
a78d61150c Deleting must delete orders first 2020-09-06 14:28:24 +02:00
Matthias
b7662722ba Add tests for Order object parsing 2020-09-06 14:17:45 +02:00
Matthias
73182bb2dd Update migrations to populate Orders table for open orders 2020-08-14 09:52:46 +02:00
Matthias
044df880e6 Move persistence into it's own submodule 2020-08-14 09:52:46 +02:00
Matthias
9999d0ffb5 Merge branch 'develop' into fix/3579 2020-08-12 15:28:51 +02:00
Matthias
8300eb59d4 Extend create_mock_trades to create 4 trades
2 closed, and 2 open trades
2020-07-23 07:50:28 +02:00
Matthias
c826f7a707 Add amount_requested to database 2020-07-15 20:15:29 +02:00
Matthias
a3506f4d8e Merge branch 'develop' into timeframe 2020-06-15 06:35:55 +02:00
Matthias
0f373e6bb9 Update unrelated tests 2020-06-07 15:39:59 +02:00
Matthias
1a5dba9a79 Revert "Fix tests after merge"
This reverts commit edf8e39bc1.
2020-06-02 19:39:17 +02:00
hroff-1902
edf8e39bc1 Fix tests after merge 2020-06-02 17:57:45 +03:00
hroff-1902
64881a94e2
Merge branch 'develop' into timeframe 2020-06-02 15:56:34 +03:00
Matthias
af0f29e6b7 Update persistence to use timeframe 2020-06-02 10:02:36 +02:00
Matthias
950f358982 Replace occurances in test files 2020-06-01 20:47:27 +02:00
Matthias
d2b7016dff Add stop_loss_abs ... 2020-06-01 11:05:37 +02:00
Matthias
6dec508c5e Add new fields to tests 2020-06-01 10:57:29 +02:00
Matthias
97905f86be Add missing fields to to_json output of trade 2020-05-30 11:34:39 +02:00
Matthias
bbd7579aa8 Fix more tests 2020-05-24 09:07:24 +02:00
Matthias
1e76bff1bd Add sell_order_status to keep track of cancellations 2020-05-17 10:52:20 +02:00
Matthias
71c90422ba Add explicit test for fee_updated 2020-05-01 20:02:38 +02:00
Matthias
6d620ba1f6 Verify if fee for this side has been updated 2020-05-01 19:54:16 +02:00
Matthias
a2ff632647 Add update_fee method to persistence 2020-05-01 16:01:12 +02:00
Matthias
7936120afc Adapt tests to support new db fields 2020-04-30 06:58:55 +02:00
Matthias
dec1b10743 Add fee_cost and currency columns 2020-04-30 06:57:39 +02:00
Matthias
bdc85ec89b Move create_mock_tests to conftest and add test for test_trade-history 2020-04-07 19:42:16 +02:00
Ork Blutt
c1f9595086 fix broken tests 2020-04-06 15:49:24 +02:00
Matthias
2c434e9b11 Add close_proit_abs column 2020-03-22 11:16:23 +01:00
Matthias
1ffda29fd2 Adjust improts to new exception location 2019-12-30 15:02:17 +01:00
Matthias
ffd7034c00 Persist dry-run trade per default 2019-12-22 10:16:16 +01:00
Matthias
a2964afd42 Rename profit_percent to profit_ratio to be consistent 2019-12-17 08:53:30 +01:00
Matthias
cbd10309f5 Add mid-state test 2019-12-17 07:13:08 +01:00
Matthias
861a7834fc Call calc_open_price() whenever necessary 2019-12-17 07:08:36 +01:00
Matthias
307ade6251 Cache open_trade_price 2019-12-17 07:02:02 +01:00
Matthias
0b5354f13d Add required arguments to Trade method 2019-12-17 06:58:10 +01:00
Matthias
c2076d86a4 Use scoped_session as intended 2019-10-30 11:12:49 +01:00
Matthias
ab117527c9 Refactor get_best_pair to persistence 2019-10-30 11:12:49 +01:00
Matthias
f20f5cebbe Move performance-calculation to persistence 2019-10-30 11:12:49 +01:00
Matthias
3430850421 don't print in tests 2019-09-08 19:47:16 +02:00
Matthias
26d76cdb19 Adjust imports in tests to new path 2019-09-08 19:05:23 +02:00
Matthias
65a516e229 Move tests out of freqtrade module 2019-09-08 19:05:22 +02:00