Commit Graph

338 Commits

Author SHA1 Message Date
Sam Germain
f58b92bb86 exchange.create_order removed default for leverage 2022-02-03 17:48:08 -06:00
Sam Germain
09f0e7149f test__fetch_and_calculate_funding_fees_datetime_called # TODO-lev: test for longs 2022-02-02 12:42:13 -06:00
Sam Germain
30519aa3be Changed name Collateral -> MarginMode, collateral -> margin_mode, and _supported_trading_mode_margin_pairs -> _supported_trading_margin_pairs 2022-02-01 13:05:40 -06:00
Matthias
7dd50f78cf Small finetuning improving a comment 2022-02-01 06:37:13 +01:00
Sam Germain
9de63412c1 exchange.get_liquidation_price arguments are not optional 2022-01-31 14:00:52 -06:00
Sam Germain
43db4c34d1 added okex back to unsupported exchanges 2022-01-31 12:18:30 -06:00
Sam Germain
b8f4cebce7 exchange.liquidation_price methods combined, dry_run check on exchange for liquidation price 2022-01-31 12:18:25 -06:00
Sam Germain
143c37d36f cleaned up liquidation price methods 2022-01-31 12:17:07 -06:00
Sam Germain
ede9012fcc removed TODO-levs about okex liquidation price 2022-01-31 12:17:07 -06:00
Sam Germain
0c13e387fe moved liquidation_price method to exchange classes 2022-01-31 12:16:43 -06:00
Sam Germain
1f1ac8ce9d test_get_liquidation_price/test_get_maintenance_ratio_and_amt_binance/fill_leverage_brackets/test_validate_trading_mode_and_collateral TODO comments 2022-01-31 12:16:43 -06:00
Sam Germain
c2f9201512 Added get_liquidation_price check 2022-01-31 12:16:43 -06:00
Sam Germain
0c8205ab3b replace single quote docstrings with double quote docstrings 2022-01-31 12:16:43 -06:00
Sam Germain
ba5fc21d84 added isolated futures to supported modes for binance,gateio 2022-01-31 12:15:54 -06:00
Sam Germain
ba02605d77 Isolated liq branch passes all tests and has the general structure that it is supposed to, but is patchy, and doesnt get the correct maintenance amt and maintenance margin rate yet 2022-01-31 12:15:54 -06:00
Sam Germain
779b82b5b4 fixed test_get_min_pair_stake_amount by adding amount.min/max and cost.min/max to all markets 2022-01-31 03:02:17 -06:00
Matthias
fdea4fcb1b Remove some todo's 2022-01-28 15:52:12 +01:00
Matthias
bf0b95b3d8 Improve backtest tests 2022-01-22 19:46:11 +01:00
Matthias
a0c0c4dcbe Update funding_fee formula to correctly calculate fees for long trades 2022-01-22 19:46:10 +01:00
Matthias
82c90c0049 Extract funding and mark mergin to separate method 2022-01-22 19:45:46 +01:00
Matthias
84c6d92d4c calculate_funding_fees is actually a public exchange interface (used in backtesting). 2022-01-22 19:45:46 +01:00
Matthias
a340d73edc Update funding_fee calculation test 2022-01-22 19:44:20 +01:00
Matthias
ef3a1ea8f2 Split funding fee calculation from Download 2022-01-22 19:44:20 +01:00
Matthias
f090dcc597 Merge branch 'develop' into feat/short 2022-01-22 17:56:01 +01:00
Matthias
6684bff963 Dry-run orders should have filled set correctly 2022-01-15 15:25:16 +01:00
Matthias
173524ea5b
Merge pull request #6170 from freqtrade/contract_workaround
contractSize is a string coming from ccxt
2022-01-06 16:25:19 +01:00
Matthias
431fcdd76f contractSize is a string comming from ccxt 2022-01-06 13:53:27 +01:00
Matthias
7c3babc86c Fix failing ftx test 2022-01-06 13:40:12 +01:00
Matthias
7f88f9bf27 Revert unintended double-call of amount conversion 2022-01-02 13:11:29 +01:00
Sam Germain
67a5739501 fixed test_get_trades_for_order for contracts 2022-01-01 15:39:16 -06:00
Sam Germain
3d4a5eab81 fixed flake8 error 2022-01-01 13:52:06 -06:00
Sam Germain
48567a1301 fixe broken test_get_min_pair_stake_amount 2022-01-01 13:52:06 -06:00
Sam Germain
230dd15ee7 fixed test_amount_to_precision 2022-01-01 13:52:06 -06:00
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