Commit Graph

1120 Commits

Author SHA1 Message Date
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
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
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
a9f3744f1b fix backtest test 2018-06-10 19:46:52 +02:00
Janne Sinivirta
8db3dfa8c6
Merge pull request #880 from freqtrade/fix/636
Fixes issue 636
2018-06-09 08:59:12 +03:00
Samuel Husso
38c32f0e10 flake8 fix 2018-06-09 08:40:32 +03:00
Samuel Husso
62b4efb881 freqtradebot: fstrings in use 2018-06-09 08:27:39 +03:00
Samuel Husso
b5c200f6c4 Fiat_converter: fstrings into use 2018-06-09 08:27:39 +03:00
Samuel Husso
18e3090379 Exchange: f-strings into use 2018-06-09 08:27:39 +03:00
Samuel Husso
1e1be6bc3f arguments,configuration: fstring in use 2018-06-09 08:24:45 +03:00
gcarq
61da7f63b2 Merge branch 'develop' of freqtrade into feature/reload-conf 2018-06-09 04:30:23 +02:00
gcarq
0b5d21f32a implement bot reconfiguration and expose it to telegram 2018-06-09 04:29:48 +02:00
gcarq
74db82d759 main: don't touch freqbot state in cleanup()
cleanup() should be only called after the main loop has been exited.
At that point the state shouldn't be modified.
2018-06-09 01:19:42 +02:00
gcarq
5851cc70a7 Merge branch 'develop' of freqtrade into fix/636 2018-06-09 00:37:46 +02:00
Michael Egger
faeda0e70c
Merge pull request #878 from freqtrade/fix_timeframe_issue
fix windows-specific init issue with named tuple
2018-06-08 22:44:06 +02:00
Michael Egger
73c5f0ec90
Merge pull request #872 from freqtrade/feature/improve-error-handling
improve error handling
2018-06-08 22:43:37 +02:00
Michael Egger
66f6e71e7e
Merge pull request #827 from freqtrade/fix/pylint_and_coverage
Increase code coverage and improve Pylint
2018-06-08 22:32:04 +02:00
creslinux
efbeabf141 Added Local RPC client
- added only "Daily" call so far, submitting for early review/feedback

This depends on zerorpc as a requirement.
simple examples here:
http://www.zerorpc.io/

Installed with pip3 install zerorpc

localRCP is enabled/disabled from within config.json
e.g
    "localrpc": {
        "enabled": true
       },

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

Though making use of the existing hardwork done in rpc.py
It *should be easy to add the other Telegram calls into local_rpy_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 script

As example, from cmdline for last 3 days Daily

/Users/creslin/PycharmProjects/freqtrade_new/.env/bin/zerorpc tcp://127.0.0.1:4242 daily 3
connecting to "tcp://127.0.0.1:4242"
False
('[\n'
 '    [\n'
 '        "2018-06-08",\n'
 '        "0.00000000 BTC",\n'
 '        "0.000 USDT",\n'
 '        "0 trade"\n'
 '    ],\n'
 '    [\n'
 '        "2018-06-07",\n'
 '        "0.00000000 BTC",\n'
 '        "0.000 USDT",\n'
 '        "0 trade"\n'
 '    ],\n'
 '    [\n'
 '        "2018-06-06",\n'
 '        "0.00000000 BTC",\n'
 '        "0.000 USDT",\n'
 '        "0 trade"\n'
 '    ]\n'
 ']')

Programitcally this would be:
import zerorpc

c = zerorpc.Client()
c.connect("tcp://127.0.0.1:4242")

for item in c.daily(3):
    print item
2018-06-08 18:35:01 +00:00
xmatthias
8effc5f929 fix windows-specific init issue with named tuple 2018-06-08 19:46:07 +02:00
Samuel Husso
980172a55a
Merge pull request #865 from freqtrade/partial_candle_removal
Partial candle removal
2018-06-08 18:10:21 +03:00
Gerald Lonlas
5ca84acb6d Fix Flake8 2018-06-07 23:12:03 -07:00
Gerald Lonlas
50852136ef Increase FreqtradeBot.get_real_amount() coverage 2018-06-07 22:13:50 -07:00
Gerald Lonlas
20082f52a2 Increase code coverage for FreqtradeBot.process_maybe_execute_sell() 2018-06-07 22:13:50 -07:00
Gerald Lonlas
5ec3eb76eb Cover a edge case of CryptoToFiatConverter::_find_price() 2018-06-07 22:13:50 -07:00
Gerald Lonlas
dfbc94c05b Add missing test for CryptoToFiatConverter::convert_amount() 2018-06-07 22:13:50 -07:00
Gerald Lonlas
81ce7d720d Add missing unit test for Arguments::testdata_dl_options() 2018-06-07 22:13:50 -07:00
Gerald Lonlas
1db0f2bd55 Increase pylint to 10 for freqtrade/arguments.py 2018-06-07 22:13:50 -07:00
gcarq
10e12ec1b9 fix flake8 warning 2018-06-08 02:37:12 +02:00
gcarq
61b2373dd1 flush db connection after forcesell 2018-06-08 02:35:10 +02:00