Commit Graph

1158 Commits

Author SHA1 Message Date
gcarq
814894da7b fix flake8 warnings 2018-06-22 02:55:27 +02:00
gcarq
089f633c06 Merge branch 'flask_rest' of https://github.com/creslinux/freqtrade into feature/flask-rest 2018-06-22 02:43:10 +02:00
xmatthias
7f927b4d7a Squashed commit of the following:
commit 435f299bcf
Author: Gert Wohlgemuth <berlinguyinca@gmail.com>
Date:   Wed Jun 20 01:57:28 2018 -0700

    improve readability of outdated history code
2018-06-21 20:47:53 +02:00
Janne Sinivirta
c608f1e21e
Merge pull request #923 from freqtrade/fix_test_hyperopt
fix hyperopt test when no config.json exists
2018-06-17 16:07:57 +03:00
Michael Egger
5ce2071279
Merge pull request #925 from freqtrade/increase_test_cov_configuration
increase test-coverate for configuration
2018-06-17 13:19:16 +02:00
xmatthias
972736f0ab increase test-coverate for configureation 2018-06-16 20:55:35 +02:00
xmatthias
7564f7e526 fix hyperopt test when no config.json exists 2018-06-16 13:49:03 +02:00
xmatthias
fa00157d12 Fix fiat_convert missing mockups 2018-06-16 13:42:25 +02:00
Matthias
a5511e2e30
Merge pull request #894 from freqtrade/feature/force_close_backtest
Display open trades after backtest period
2018-06-16 12:49:08 +02:00
Janne Sinivirta
0c85febe76 remove all mongodb related code 2018-06-16 09:09:28 +03:00
Janne Sinivirta
c1f8f641e6 remove use of hyperopt_conf.py 2018-06-16 09:09:28 +03:00
creslinux
05226f6def Moved from decorators to app.add_url_rule
This has the benefit of creating a label which may be helpful if later
refactoring.

This change misses the main thrust of requests from both Gcarq and Shusso to
better layout the code

Im running into a challenge with 'self' not being available, or able to be
passed in either to decorators or view_func

This may simply be how I've instantiated an RPC in the wuperwrap or im within a thread
 - my very limited exposure to programming is at play! After moving code around
 lots of ways to no success and google not being helpful im committing for further feeback
2018-06-15 09:14:17 +00:00
creslinux
7f46411966 Merge remote-tracking branch 'origin/flask_rest' into flask_rest 2018-06-14 20:21:42 +00:00
creslinux
40db83c24c Added json validation of formats to check IPv4
refactored files and calls to be api_server
worked down satisfying review comments of last commit
2018-06-14 20:19:15 +00:00
Michael Egger
f21ef07910
Merge branch 'develop' into flask_rest 2018-06-14 18:10:04 +02:00
creslinux
7caf8a46d4 Updated
Stop and start calls added
Along with refactoring to base line and use decorators.
Also modules loaded optionally if enabled in config or not
binds to ip / port set from config.json with warning if not localhost

TODO:
 - use argparse in client, and generally clean client up
 - create unit test
 - documentation
 - extend to other RCP commands, after feedback
2018-06-14 15:44:52 +00:00
creslinux
9bbc186b16 Updated
Stop and start calls added
Along with refactoring to base line and use decorators.
Also modules loaded optionally if enabled in config or not
binds to ip / port set from config.json with warning if not localhost

TODO:
 - use argparse in client, and generally clean client up
 - create unit test
 - documentation
 - extend to other RCP commands, after feedback
2018-06-14 15:44:12 +00:00
creslinux
c2742f0b01 Merge remote-tracking branch 'origin/flask_rest' into flask_rest 2018-06-14 15:41:32 +00:00
creslinux
fb60f684f7 Updated
Stop and start calls added
Along with refactoring to base line and use decorators.
Also modules loaded optionally if enabled in config or not
binds to ip / port set from config.json with warning if not localhost

TODO:
 - use argparse in client, and generally clean client up
 - create unit test
 - documentation
 - extend to other RCP commands, after feedback
2018-06-14 15:38:26 +00:00
creslin
faf0a4973d
Update rest_client.py 2018-06-13 22:41:43 +00:00
creslinux
6bb1ad288e Implemented local restful flask service and provided cmdline client
Added only the "Daily" call so far, submitting for early review/feedback

Called as example "./rest_client.py daily 3"

This depends on listed as requirements.
Flask==1.0.2
flask-jsonpify==1.5.0 (will do later)
flask-restful==0.3.6
TODO: make loading optional, cleanly unload on close
      unit tests, take feedback, tidy output,
      add other Telegram functions, onwards

local rest server is enabled/disabled from within config.json. E.g

     "localrest": {
        "enabled": true
    },

The server is enabled from within existing rpc manager
and makes use of the existing superclass (RPC)

Through making use of the existing hard work done in rpc.py
It *should be easy to add the other Telegram calls into local_rpc_server.py

The server is wrapped in a thread to be non-blocking
The server and client accept serialised calls or not, used in daily to return json
The client can be used from command line or in a python client script

As example, from cmdline for last 3 days Daily

DannyMBP:rpc creslin$ ./rest_client.py daily 3
[
    [
        "2018-06-13",
        "0.00000000 USDT",
        "0.000 USD",
        "0 trade"
    ],
    [
        "2018-06-12",
        "0.00000000 USDT",
        "0.000 USD",
        "0 trade"
    ],
    [
        "2018-06-11",
        "0.00000000 USDT",
        "0.000 USD",
        "0 trade"
    ]
]
2018-06-13 22:26:21 +00:00
creslinux
e5e64a7035 Implemented local restful flask service and provided cmdline client
Added only the "Daily" call so far, submitting for early review/feedback

Called as example "./rest_client.py daily 3"

This depends on listed as requirements.
Flask==1.0.2
flask-jsonpify==1.5.0 (will do later)
flask-restful==0.3.6
TODO: make loading optional, cleanly unload on close
      unit tests, take feedback, tidy output,
      add other Telegram functions, onwards

local rest server is enabled/disabled from within config.json. E.g

     "localrest": {
        "enabled": true
    },

The server is enabled from within existing rpc manager
and makes use of the existing superclass (RPC)

Through making use of the existing hard work done in rpc.py
It *should be easy to add the other Telegram calls into local_rpc_server.py

The server is wrapped in a thread to be non-blocking
The server and client accept serialised calls or not, used in daily to return json
The client can be used from command line or in a python client script

As example, from cmdline for last 3 days Daily

DannyMBP:rpc creslin$ ./rest_client.py daily 3
[
    [
        "2018-06-13",
        "0.00000000 USDT",
        "0.000 USD",
        "0 trade"
    ],
    [
        "2018-06-12",
        "0.00000000 USDT",
        "0.000 USD",
        "0 trade"
    ],
    [
        "2018-06-11",
        "0.00000000 USDT",
        "0.000 USD",
        "0 trade"
    ]
]
2018-06-13 22:18:49 +00:00
xmatthias
c0289ad844 use list comprehension to build list 2018-06-13 19:53:12 +02:00
xmatthias
e600be4f56 Reduce force-sell verbosity 2018-06-13 19:44:00 +02:00
gcarq
d684ff5715 drop zlma implementation 2018-06-13 16:20:13 +02:00
ran
6edb25f5c2 fixed heikenashi calculation 2018-06-13 16:17:42 +02:00
ran
e6e5c5daf0 added zlma 2018-06-13 16:16:02 +02:00
ran
61f92b7460 bugfix 2018-06-13 16:13:36 +02:00
gcarq
46080f5168 define _rpc_reload_conf as private method 2018-06-13 15:29:27 +02:00
gcarq
e14c9e2090 fix potential cleanup issue 2018-06-13 12:21:54 +02:00
gcarq
83eb7a0a9d adjust logging a bit and add some comments 2018-06-13 12:21:54 +02:00
gcarq
6c1bb7983b rpc: make freqtrade a private variable 2018-06-13 12:21:54 +02:00
gcarq
34e10a145c remove Telegram.is_enabled() because RPCManager manages lifecycles 2018-06-13 12:21:54 +02:00
gcarq
3787dad212 don't import python-telegram-bot at runtime if disabled in config 2018-06-13 12:21:54 +02:00
gcarq
4048859912 rpc: remove tuple return madness 2018-06-13 12:21:54 +02:00
gcarq
cddb062db5 save rpc instances only in registered_modules, add some abstract methods 2018-06-13 12:21:54 +02:00
xmatthias
6357812743 fix backtest report able 2018-06-13 06:57:49 +02:00
xmatthias
0f117d480e improve backtesting-tests
* assert length of result specifically
* add assert for "open_at_end"
2018-06-13 06:42:24 +02:00
xmatthias
8d8e6dcffc Add test for extracted backtest_results test 2018-06-13 06:31:42 +02:00
xmatthias
e3ced7c15e extract export from backtest function 2018-06-12 22:29:30 +02:00
xmatthias
bfde33c945 Use timestamp() instead of strftime
this will avoid a bug shifting epoch time by 1 hour:
https://stackoverflow.com/questions/11743019/convert-python-datetime-to-epoch-with-strftime
2018-06-12 21:12:55 +02:00
Michael Egger
59a4dffc56
Merge pull request #901 from freqtrade/fix/backtest_abort_no_data
Check if no backtest data is found and fail gracefully
2018-06-12 02:54:58 +02:00
xmatthias
a0f735d4f2 reduce test-noise 2018-06-11 21:02:24 +02:00
xmatthias
335d1fbbbc Check if no backtest data is found and fail gracefully 2018-06-11 19:50:43 +02:00
Janne Sinivirta
c46e50864b
Merge pull request #886 from freqtrade/feature/reload-conf
Reload bot config without restarting
2018-06-11 10:47:00 +03:00
xmatthias
12e455cbf5 add buy/sell index to backtest result 2018-06-10 20:52:42 +02:00
xmatthias
a9f3744f1b fix backtest test 2018-06-10 19:46:52 +02:00
xmatthias
9cc087c788 update hyperopt tests to support new structure 2018-06-10 13:56:23 +02:00
xmatthias
4710210cff fix hyperopt to use new backtesting result tuple 2018-06-10 13:56:10 +02:00
xmatthias
27ee8f7360 make flake happy 2018-06-10 13:55:48 +02:00