Commit Graph

305 Commits

Author SHA1 Message Date
Sam Germain
f92d47a16b exchange._contracts_to_amount and exchange._amount_to_contracts safe checks 2022-01-01 13:52:06 -06:00
Sam Germain
6ab0e870c2 fixed breaking test test_amount_to_precision 2022-01-01 13:52:06 -06:00
Sam Germain
d105bb764a test__get_contract_size creates its own markets instead of using the markets from conftest 2022-01-01 13:52:06 -06:00
Sam Germain
a85566d6c3 test_exchange.test_create_order removed # assert api_mock.create_order.call_args[0][3] == 100 2022-01-01 13:52:06 -06:00
Matthias
8da596f66d Implement PR feedback 2022-01-01 13:52:01 -06:00
Sam Germain
78d1a267f0 contract-sizes tests 2022-01-01 13:50:50 -06:00
Sam Germain
d0a300a2e1 Added TODOs 2022-01-01 13:50:49 -06:00
Sam Germain
4f6203e45f Added conversions from contract size to amount for objects returned from api 2022-01-01 13:50:43 -06:00
Sam Germain
ee63f12236 Revert "Removed leverage param from get_min_pair_stake_amount"
This reverts commit 096588550ca1de5e5edf63cf7214af037d7bc93b.
2022-01-01 13:49:09 -06:00
Sam Germain
ef6ad0e6d7 Removed leverage param from get_min_pair_stake_amount 2022-01-01 13:49:09 -06:00
Matthias
ddfbe55e7c Merge branch 'develop' into feat/short 2022-01-01 19:16:49 +01:00
Sam Germain
250edae193 test__async_get_historic_ohlcv parametrized candle_type 2021-12-31 06:00:56 -06:00
Matthias
bb65621134 Simplify test, simplify "log_*" selection 2021-12-27 17:14:59 +01:00
Matthias
54858a0bbb Simplify test to only initialize and mock once. 2021-12-27 16:39:47 +01:00
cdimauro
f77b8cbb7a Reduce KuCoin logs only for 429000 error
Only KuCoin messages for 429000 error code are logged once.

Logs functions are also simplified and optimized.

test_remove_logs_for_pairs_already_in_blacklist is simplified as well.
2021-12-26 21:09:25 +01:00
cdimauro
6509c38717 Introduce new test functions to check logs
New functions log_contains, num_log_contains, num_log_has and num_log_has_re
are introduced in the conftest module to help and simplify checking:
- if logs contain a string;
- count how many messages contain a string;
- count how many messages are the given string;
- count how many messages matchs a regex.

A couple of existing tests are changed using the new functions.
2021-12-26 09:49:14 +01:00
cdimauro
fbaf46901e Reduce more KuCoin logs on retrier decorator
More logs are reduced, for KuCoin, on the retrier_async decorator:

_async_get_candle_history() returned exception
retrying _async_get_candle_history() still for
Giving up retrying: _async_get_candle_history()
Applying DDosProtection backoff delay
2021-12-26 09:06:26 +01:00
cdimauro
96fbf63d0b Reduce KuCoin logs on DDosProtection error messages
KuCoin APIs generate A LOT of error messages.
Consequently, logs are flooded with lines like:
2021-12-25 22:30:23 freqtrade.exchange.common: WARNING -
_async_get_candle_history() returned exception:
"kucoin GET https://openapi-v2.kucoin.com/api/v1/market/candles?
symbol=PDEX-USDT&type=5min&startAt=1640317818&endAt=1640467818
429 Too Many Requests {"code":"429000","msg":"Too Many Requests"}"
2021-12-25 22:30:23 freqtrade.exchange.common: WARNING -
retrying _async_get_candle_history() still for 3 times
2021-12-25 22:30:23 freqtrade.exchange.common: WARNING -
Kucoin 429 error, avoid triggering DDosProtection backoff delay.
2 tries left before giving up
2021-12-25 22:30:24 freqtrade.exchange.common: WARNING -
_async_get_candle_history() returned exception:
"kucoin GET https://openapi-v2.kucoin.com/api/v1/market/candles?
symbol=UBX-USDT&type=5min&startAt=1640317821&endAt=1640467821
429 Too Many Requests {"code":"429000","msg":"Too Many Requests"}"

Messages like:
Kucoin 429 error, avoid triggering DDosProtection backoff delay.
are logged only once for a certain period of time (default is 3600 seconds).
2021-12-25 22:32:22 +01:00
Matthias
e729fad99c Add unknown_fee_rate parameter 2021-12-11 15:26:08 +01:00
Matthias
17bd990053 Update funding_fee freqtradebot test 2021-12-11 09:49:48 +01:00
Matthias
6948414e47 Remove no longer necessary method _get_mark_price_history 2021-12-10 19:54:49 +01:00
Matthias
a87d2d62bb Remove no longer needed method get_funding_rate_history 2021-12-10 19:52:02 +01:00
Matthias
aabca85a5f Update _calculate_funding_fees to reuse existing async infrastructure 2021-12-10 19:50:58 +01:00
Matthias
1a08613498 Fix parameter sequence in mock 2021-12-04 15:13:06 +01:00
Matthias
5b779fd68b Update missing candle_type params 2021-12-03 16:44:05 +01:00
Matthias
d30aaaeaaa Tests should also use CandleType 2021-12-03 14:27:04 +01:00
Matthias
fae7167bf3 Merge branch 'feat/short' into pr/samgermain/5780 2021-12-02 20:25:30 +01:00
Matthias
fb1599d21b Merge branch 'develop' into feat/short 2021-12-02 20:20:35 +01:00
Matthias
d3ad4fb52e Don't crash dry-run if orderbook side is empty
closes #6018
2021-12-02 19:17:47 +01:00
Matthias
22cda87211 Update some tests after merge 2021-12-02 19:05:06 +01:00
Matthias
f4d0abc51a Merge branch 'feat/short' into pr/samgermain/5780 2021-12-02 07:09:37 +01:00
Matthias
67f3570bf3 Merge branch 'develop' into feat/short 2021-12-01 07:21:36 +01:00
Matthias
231b1e2f57 Improve Async error message content 2021-11-30 07:10:12 +01:00
Matthias
409a801763 Fix caching problem in refresh_ohlcv
closes #5978
2021-11-27 19:31:39 +01:00
Matthias
51e54a666c Merge branch 'feat/short' into pr/samgermain/5780 2021-11-23 19:01:07 +01:00
Matthias
db16098981 Fix Tests 2021-11-23 17:43:37 +01:00
Sam Germain
586ca3b2fa removed is_market_future from binance and ftx 2021-11-23 11:09:31 +01:00
Sam Germain
920151934a Added candle_type to a lot of methods, wrote some tests 2021-11-21 17:48:14 -06:00
Sam Germain
ee2ad8ca97 updated historic data filenames to include the candle type 2021-11-21 17:48:14 -06:00
Sam Germain
c8162479d6 Added price as param to fetch_ohlcv 2021-11-21 17:48:14 -06:00
Matthias
f40221dd9f Merge branch 'develop' into feat/short 2021-11-18 20:20:01 +01:00
Matthias
75eccea88d Improve futures detection, add ccxt-compat test 2021-11-15 19:57:36 +01:00
Matthias
4e9b83e170 Merge branch 'feat/short' into futures_pairlist 2021-11-15 19:12:36 +01:00
Matthias
60cf52aa34 Remove unused test code 2021-11-15 07:10:58 +01:00
Matthias
e7499b7c44 Improve leggibility of test 2021-11-14 19:53:08 +01:00
Sam Germain
e7fad04eb9 Merge branch 'feat/short' into funding-fee-dry-run 2021-11-14 03:15:22 -06:00
Sam Germain
3ce64dd4e9 Added test__ccxt_config for all exchanges with subclass files on freqtrade 2021-11-13 16:32:43 -06:00
Sam Germain
099bf7691e Updated bibox to combine parent _ccxt_config and minimized _ccxt_config tests 2021-11-13 16:23:59 -06:00
Sam Germain
3d86b18492 Added property _ft_has_default.ccxt_futures_name and removed subclass ccxt_config properties 2021-11-13 16:23:58 -06:00
Sam Germain
3c509a1f9b New method for combining all funding fees within a time period 2021-11-13 04:45:23 -06:00