Commit Graph

1286 Commits

Author SHA1 Message Date
misagh
af93b18475 Do not refresh candles on "process_throttle_secs" but on intervals 2018-08-03 18:10:03 +02:00
misagh
2ec2f1abce async branch updated to reflect develop branch changes 2018-08-02 16:48:21 +02:00
Janne Sinivirta
17d78b7807
Merge pull request #1115 from creslinux/candlesnottickers
renamed/refactored get_ticker_history to get_candle_history to stop confusion
2018-08-02 12:33:09 +03:00
creslin
a741f1144a missing __init__.py 2018-08-02 08:58:04 +00:00
Matthias
915160f21f Add tests for tickers-history 2018-08-01 21:44:02 +02:00
Matthias
136442245c Add todo's and dockstring 2018-07-31 21:02:04 +02:00
Matthias
31870abd25 Refactor async-refresh to it's own function 2018-07-31 20:43:32 +02:00
misagh
74fa4ddca4 CCXT rate limit config default to => true
+ adding config to config_full.json.example
2018-07-31 16:54:02 +02:00
misagh
be1298dbd2 Initializing CCXT with rate_limit parameter optional (default to false) 2018-07-31 14:19:16 +02:00
misagh
154e4569d7 Merge branch 'develop' into ccxt-async 2018-07-31 12:48:12 +02:00
misagh
c8f125dbb9 ccxt async POC 2018-07-31 12:47:32 +02:00
Matthias
5a55cd25ff
Merge branch 'develop' into sandbox2 2018-07-30 20:18:48 +02:00
creslinux
012fe94333 Recommitted as new branch with unit tests - GIT screwd me on the last PR 2018-07-30 16:49:58 +00:00
creslinux
dd71071740 Added logger.info when Sandbox is enabled. 2018-07-29 09:15:13 +00:00
creslinux
1e804c0df5 flake 8 2018-07-29 08:10:55 +00:00
creslinux
0a059662b3 Submitting with unit test for the working scenario.
Strongly recommend core team check the unit test is even targetting the
correct code in exchange/__init__.py

I have a real knowledge gap on mocker, in so far as how tests map to
what they're targeting.
2018-07-28 20:32:10 +00:00
creslinux
7efa81073a Removed ; at line end. 2018-07-27 09:10:09 +00:00
creslinux
d23b3ccc5e odd cut and paste error fixed. 2018-07-27 08:55:36 +00:00
Matthias
64f933477d
Merge pull request #1007 from freqtrade/remove-analyze
Remove Analyze
2018-07-19 10:12:36 +02:00
Janne Sinivirta
85fd4dd3ff rename analyze.py to exchange_helpers.py 2018-07-17 21:26:52 +03:00
Matthias
85c60519b0 Fix test crash 2018-07-09 22:11:12 +02:00
creslinux
5ab644dea6 flake 8 fix 2018-07-05 12:05:31 +00:00
creslinux
966668f48a Handle if ticker_interval in config.json is not supported on exchange.
Returns.

Tested positive and negative data.
The ticker list in constants.py may be obsolete now, im not sure.

 raise OperationalException(f'Invalid ticker {timeframe}, this Exchange supports {timeframes}')
freqtrade.OperationalException: Invalid ticker 14m, this Exchange supports {'1m': '1m', '3m': '3m', '5m': '5m', '15m': '15m', '30m': '30m', '1h': '1h', '2h': '2h', '4h': '4h', '6h': '6h', '8h': '8h', '12h': '12h', '1d': '1d', '3d': '3d', '1w': '1w', '1M': '1M'}
2018-07-05 11:57:59 +00:00
xmatthias
f7b46d5404 update docstring 2018-06-18 22:34:28 +02:00
xmatthias
896afe7118 convert get_name and get_id to properties 2018-06-18 22:20:50 +02:00
xmatthias
ef53134499 lowercase variables 2018-06-18 22:09:46 +02:00
xmatthias
c31519fdb2 lowercase _api object 2018-06-18 22:07:15 +02:00
xmatthias
dea26fadfe move init_ccxt to class 2018-06-17 23:38:07 +02:00
xmatthias
21edcbdc27 Refactor exchange to class 2018-06-17 23:38:07 +02:00
Samuel Husso
18e3090379 Exchange: f-strings into use 2018-06-09 08:27:39 +03:00
gcarq
a2a1a517da fix flake8 warning 2018-06-08 02:01:18 +02:00
xmatthias
4a17671f45 improve log message 2018-06-06 20:30:42 +02:00
xmatthias
a901f21bcd test ticker caching 2018-06-06 20:24:47 +02:00
xmatthias
e690003621 reinstate caching for get_ticker 2018-06-06 20:18:16 +02:00
Janne Sinivirta
20815771ab
Merge pull request #817 from gcarq/feature/gdax
Enable Backtesting with GDAX and allow trading with EUR/USD
2018-06-03 17:49:20 +03:00
Gerald Lonlas
c9e49ed7b4 Sort ticker_history
CCXT does not sort the ticker history from exchanges.
Bittrex and Binance are sorted ASC (oldest first, newest last) when
GDAX is sorted DESC (newest first, oldest last).

Because of that the get_ticker_history() fall in a very long loop
when the tickers are sorted DESC. Means it downloads more than
needed.

This commit enable exhanges like GDAX and unify the ticker_history
list across all exchanges.
2018-06-03 00:13:48 -07:00
xmatthias
3fb1dd02f1 add typehints and type: ignores 2018-05-31 22:00:46 +02:00
Matthias Voppichler
8b098859f4 Reduce verbosity of get_ticker_history 2018-05-12 20:15:59 +02:00
Anton
2bfce64e6a Fix conflicts 2018-05-04 13:38:51 +03:00
Anton
ceeb98dda9 Fix conflicts 2018-05-03 11:16:29 +03:00
Michael Egger
90a107393a
Merge pull request #622 from gcarq/fix/dl-testdata
fix download testdata
2018-05-02 22:06:43 +02:00
gcarq
a76ed88496 Merge branch 'feat/objectify-ccxt' into feature/catch-exchange-errors 2018-05-02 20:03:13 +02:00
Anton
24ab1b5be5 Fix review comments, documenation update 2018-05-01 00:27:05 +03:00
Samuel Husso
842b0c2270 Exchange: fix missing comma and typehinting per PR comments 2018-04-29 18:55:43 +03:00
Anton
82ea56c8fd Fix review comments. Add support of datetime timeganges 2018-04-28 00:16:34 +03:00
Matthias Voppichler
483415cd65 Add fee entry to DRY_ORDER dict as defined by ccxt 2018-04-25 09:03:32 +02:00
Anton
6675120324 Add time range support to download_backtest_data 2018-04-25 02:11:07 +03:00
Matthias Voppichler
9e94778fd7 simplify check for presence of list 2018-04-24 19:42:41 +02:00
gcarq
aa213a3640 cancel_order: handle InvalidOrder exception 2018-04-23 16:58:32 +02:00
gcarq
baeeaa777d get_balance: handle case if currency is not in response 2018-04-23 16:57:18 +02:00
gcarq
20af4bae7c retrier: raise initial exception instead of OperationalException 2018-04-23 16:56:35 +02:00
gcarq
bc2bd7fe1e add retrier decorator to all exchange functions except buy/sell 2018-04-22 17:28:49 +02:00
Samuel Husso
de8db9293c exchange: extract ccxt init to its own function (so that we can init ccxt from the scripts) 2018-04-22 10:57:48 +03:00
gcarq
bbe3bc4423 catch ccxt.ExchangeError and retry 2018-04-22 00:20:15 +02:00
Matthias Voppichler
a140748b5a Merge branch 'feat/objectify-ccxt' into cxxt_obj_sellfix 2018-04-21 22:39:22 +02:00
gcarq
3997b6038d let cctx handle rate limits 2018-04-21 19:11:29 +02:00
Matthias Voppichler
c7d1a767f7 add get_trades_for_order 2018-04-21 13:33:29 +02:00
enenn
94287d66a8 Flake8 fixes 2018-04-12 18:16:27 +02:00
enenn
6115fb08c0 Remove get_fee_maker/taker and add argument to get_fee instead 2018-04-12 18:16:25 +02:00
enenn
cba8745164 Update exchange validate_pairs and related tests 2018-04-12 18:16:19 +02:00
enenn
0c8ecf2b1f Add 'get_tickers' function to exchange and use it for dynamic whitelists 2018-04-12 18:07:44 +02:00
enenn
5fc8250ee4 Add 'exchange_has' function to check if exchange supports specific API call
Catch ccxt.NotSupported exception instead of checking beforehand
2018-04-12 18:07:44 +02:00
enenn
1f75636e56 [1/3] Add support for multiple exchanges with ccxt (objectified version) (#585)
* remove obsolete helper functions and make _state a public member.

* remove function assertions

* revert worker() changes

* Update pytest from 3.4.2 to 3.5.0

* Adapt exchange functions to ccxt API
Remove get_market_summaries and get_wallet_health, add exception handling

* Add NetworkException

* Change pair format in constants.py

* Add tests for exchange functions that comply with ccxt

* Remove bittrex tests

* Remove Bittrex and Interface classes

* Add retrier decorator

* Remove cache from get_ticker

* Remove unused and duplicate imports

* Add keyword arguments for get_fee

* Implement 'get_pair_detail_url'

* Change get_ticker_history format to ccxt format

* Fix exchange urls dict, don't need to initialize exchanges

* Add "Using Exchange ..." logging line
2018-04-06 10:57:08 +03:00
Gerald Lonlas
7cafd1f17e Update exchange unit tests 2018-03-30 13:52:25 -07:00
Gerald Lonlas
052404ffbd Check if the exchange is supported 2018-03-30 13:14:35 -07:00
Gerald Lonlas
96b2210c0f Change deprecated logger.warn by warning 2018-03-30 12:11:06 -07:00
Samuel Husso
1b4c1980c2 exchange: capitalize class name 2018-03-26 09:23:42 +03:00
Matthias Voppichler
016232a8e9 Revert OHLVC dataformat to ccxt format
* Also fixes backtesting - but data must be refreshed for now as no
conversation is happening yet
2018-03-25 13:32:46 +02:00
Matthias Voppichler
dbb0a6261f don't raise exceptions from get_ticker_history 2018-03-25 13:03:21 +02:00
Matthias Voppichler
ab6e32f6bb have backtest and dry-mode working
partially revert d20e3f79be - Changing the
OHLVC format should not be done at this time
2018-03-24 19:51:40 +01:00
Samuel Husso
eb4ac73b78 remove last bittrex references so that bot is runnable 2018-03-22 08:29:52 +02:00
Samuel Husso
40a0689183 exhcange now uses ccxt in dry_run, update config 2018-03-21 19:40:16 +02:00
Samuel Husso
14d16d573c Remove bittrex related interface code and tests 2018-03-21 19:31:15 +02:00
gcarq
d2aea7bdc1 optimize imports 2018-03-20 19:50:04 +01:00
Janne Sinivirta
67ad9e9351 simplify some error message statements 2018-02-24 19:19:43 +02:00
Janne Sinivirta
160af91f9a improving log messages 2018-02-24 18:58:57 +02:00
Samuel Husso
40a78970e1 flake: remove requests as we dont use it 2018-01-28 11:09:03 +02:00
Samuel Husso
8be94c4af4 remove custom timeout as the latest bittrex package version implemented it 2018-01-28 11:03:19 +02:00
Gérald LONLAS
d2371b5bac
Merge pull request #391 from jblestang/support_multiple_ticker
Support multiple tickers
2018-01-20 11:02:42 -08:00
Jean-Baptiste LE STANG
081d3932b6 Fixing bug report #406 + unit test 2018-01-20 14:44:13 +01:00
Jean-Baptiste LE STANG
42a135fbd9 fix typo in API Bittrex 2018-01-17 13:52:14 +01:00
Jean-Baptiste LE STANG
8e5de365a5 Ticker in the conf is now an enum string 2018-01-17 13:52:14 +01:00
Jean-Baptiste LE STANG
e2e2005567 Adding 30 minutes, 1 hour, 1 day tickers 2018-01-17 13:52:14 +01:00
Jean-Baptiste LE STANG
f7a44d1cec Fixing the ticker analysis with null value 2018-01-13 09:50:02 +01:00
Anton Ermak
0d0737d1f6 Resolve conflict 2018-01-11 13:36:56 +07:00
Anton Ermak
bb91fdbaf9 oops, print removed 2018-01-11 13:26:49 +07:00
Anton Ermak
11cbb9188b Set timeout for bittrex only 2018-01-11 12:24:05 +07:00
Janne Sinivirta
86db6c9084 sort imports 2018-01-11 07:08:56 +02:00
Jean-Baptiste LE STANG
4b6d855e63 fix a typo in the description of get_ticker 2018-01-07 23:26:45 +01:00
Jean-Baptiste LE STANG
7d7752efbf really fixing 2018-01-07 23:26:45 +01:00
Jean-Baptiste LE STANG
ce6f6ab9fe fixing refresh argument ... 2018-01-07 23:26:45 +01:00
Jean-Baptiste LE STANG
3a0569cfd3 force refresh is the value has never been set 2018-01-07 23:26:45 +01:00
Jean-Baptiste LE STANG
7d21015b52 get_ticker can return a cached value 2018-01-07 23:26:45 +01:00
Samuel Husso
de68209f3b Revert "Make get_signals async. This should speed up create_trade calls by at least 10x. (#223)" (#275)
This reverts commit 6768658300.
See details in #PR266
2018-01-01 19:32:58 +01:00
Michael Egger
a514b92dcf
catch MIN_TRADE_REQUIREMENT_NOT_MET as non-critical exception (#237)
* add MIN_TRADE_REQUIREMENT_NOT_MET to response validation

* implement test
2017-12-26 09:39:29 +01:00
Pan Long
6768658300 Make get_signals async. This should speed up create_trade calls by at least 10x. (#223) 2017-12-25 07:01:01 +01:00
Gerald Lonlas
d258118b0a Fix the fee calculation, backtesting, and hyperopt fee calculation and avg_profit 2017-12-20 20:18:41 -08:00
Gerald Lonlas
d613d63fdc Fix the fee calculation 2017-12-17 23:01:34 -08:00
Michael Egger
bfb3e09d1d
raise ContentDecodingError if bittrex responds with NO_API_RESPONSE (#183) 2017-12-14 20:27:04 +01:00
gcarq
788cda4925 add missing import 2017-11-20 22:26:32 +01:00
gcarq
55a69e4a45 use normal program flow to handle interrupts 2017-11-20 22:15:19 +01:00
gcarq
b16ccb9919 handle requests exception in validate_pairs 2017-11-18 22:22:45 +01:00
Janne Sinivirta
4b08e3d571 fix pylint warnings in __init__ files 2017-11-18 09:58:29 +02:00
gcarq
d86dcc4752 check if result exists in get_ticker (fixes #106) 2017-11-16 16:39:06 +01:00
gcarq
b5f58724a0 get_ticker_history: check if result is set (fixes #103) 2017-11-15 23:16:54 +01:00
gcarq
b83309b55d reduce calls_per_second to 1 2017-11-15 23:16:39 +01:00
gcarq
dd9cb008fb refresh whitelist based on wallet health (fixes #60)
Refreshs the whitelist in each iteration based on the wallet health,
disabled wallets will be removed from the whitelist automatically.
2017-11-13 21:34:47 +01:00
gcarq
81f7172c4a sanitize get_ticker_history (fixes #100) 2017-11-13 19:54:09 +01:00
gcarq
1c3c316e45 reduce calls_per_second 2017-11-11 21:29:35 +01:00
gcarq
bcd3340a80 implement get_market_summaries 2017-11-11 19:20:16 +01:00
gcarq
12ae1e111e use get_candles from python-bittrex 2017-11-11 17:14:55 +01:00
gcarq
8f817a3634 use TTLCache for get_ticker_history 2017-11-11 15:29:31 +01:00
gcarq
3126dcfcea drop sleep_time and use python-bittrex request delay 2017-11-10 23:39:49 +01:00
gcarq
0cfbb56b6c enhance and test pair validation 2017-11-09 21:47:47 +01:00
gcarq
fafbb0abfe update python-bittrex to 0.2.0 2017-11-09 00:31:53 +01:00
gcarq
ba485fe2b2 return state changes 2017-11-07 22:26:08 +01:00
gcarq
8555271102 remove unneeded header from get_ticker_history 2017-11-07 18:49:16 +01:00
gcarq
a1388ef296 add tick_interval to get_ticker_history as an optional parameter 2017-11-07 18:41:48 +01:00
Michael Egger
ae0b49f532
Merge pull request #92 from gcarq/feature/rework-dry_run-mode
rework dry_run
2017-11-06 16:54:55 +01:00
gcarq
810f2f9243 drop minimum_date from get_ticker_history 2017-11-06 00:06:59 +01:00
gcarq
60e651cb4c only return data['result'] from get_ticker_history 2017-11-05 23:47:59 +01:00
gcarq
472ce8566d enhance bittrex exception messages 2017-11-05 22:47:55 +01:00
gcarq
0a5eba64e2 do not remove order from dry_run order list 2017-11-05 16:13:20 +01:00
gcarq
b82c4444b2 apply correct typehint 2017-11-05 16:12:58 +01:00
gcarq
325f72fd91 dry_run: keep list of open orders 2017-11-05 15:21:16 +01:00
gcarq
264d71e29e fix some pylint warnings 2017-11-04 18:55:41 +01:00
gcarq
41510fdb32 add dry_run for get_balance 2017-11-02 19:00:25 +01:00
gcarq
9cb249610a adapt dry_run return values 2017-11-02 19:00:25 +01:00
gcarq
543857ddb2 set initial open_rate and amount in create_trade
This is mostly needed by dry_run
2017-11-02 19:00:25 +01:00
gcarq
9b9d0250f7 replace get_open_oders() with get_order() and add property for fee 2017-11-02 18:58:55 +01:00
gcarq
4a35676794 rename and exchange instance and mark it as private 2017-11-02 18:58:55 +01:00
gcarq
e07904d436 PEP8 linting 2017-10-31 00:36:35 +01:00
Samuel Husso
f4fe09ffbf added get_balances as a abstract method to the interface baseclass 2017-10-29 17:57:57 +02:00
Samuel Husso
dd78c62c3d added new command to return balance across all currencies 2017-10-28 08:59:43 +03:00
xsmile
d76476040a Bittrex provider
remove redundant 'name' property and pair validation call
2017-10-11 19:51:37 +02:00
xsmile
34c774c067 move exchange module content to exchange package and the interface to a new module 2017-10-07 18:07:29 +02:00