Commit Graph

2093 Commits

Author SHA1 Message Date
gcarq
75de61843b fix flake8 warnings 2018-06-25 14:03:22 +00:00
creslinux
d7dfa00cb3 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-25 14:03:22 +00:00
creslinux
9aa08ec3c1 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-25 14:03:22 +00:00
creslinux
b101a2608a 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-25 14:03:17 +00:00
creslinux
cbfa9e8355 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-25 14:03:17 +00:00
creslin
6cd4414874 Update rest_client.py 2018-06-25 14:03:15 +00:00
creslinux
ec252ff774 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-25 14:03:15 +00:00
creslinux
dcbdbecae0 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-25 14:03:14 +00:00
creslinux
5fdb7612d0 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-25 14:03:10 +00:00
Samuel Husso
2bb63ba33d
Merge pull request #953 from freqtrade/release-0.17.0
Release 0.17.0
2018-06-23 16:22:51 -05:00
Samuel Husso
46a062d5fb Drafting freqtrade 0.17.0 release 2018-06-23 09:35:52 -05:00
Samuel Husso
8b7183cdbc
Merge pull request #951 from freqtrade/readme-update
README: note to open an issue before starting major feature work
2018-06-23 09:32:56 -05:00
Michael Egger
beb15532f7
Merge pull request #950 from freqtrade/fix-filenotfounderror
StrategyResolver: Don't fail if user_data isn't present
2018-06-23 16:07:52 +02:00
Michael Egger
107f3ed35b
Merge pull request #760 from arudov/feature-unlimited-stake_amount
Feature unlimited stake amount
2018-06-23 16:07:38 +02:00
Anton
f82b809fcf Merge with develop 2018-06-23 16:50:27 +03:00
Samuel Husso
9bad75f37d README: note to open an issue before starting major feature work 2018-06-23 08:36:32 -05:00
Samuel Husso
864bbc441a
Merge pull request #882 from freqtrade/feature/revamp_readme
Update the README structure
2018-06-23 08:21:56 -05:00
Michael Egger
e2df908304
Merge pull request #949 from freqtrade/pyup-scheduled-update-2018-06-23
Scheduled daily dependency update on saturday
2018-06-23 14:56:52 +02:00
gcarq
4ea5fcc661 resolver: don't fail if user_data can't be found 2018-06-23 14:42:22 +02:00
gcarq
9c66c25890 resolver: use current folder instead of script folder to find user_data 2018-06-23 14:34:36 +02:00
pyup-bot
925b9b0c19 Update ccxt from 1.14.253 to 1.14.256 2018-06-23 14:23:07 +02:00
Matthias
e25d8f9435
Merge pull request #947 from freqtrade/code-cleanup
Remove global config from persistence module
2018-06-23 14:21:42 +02:00
gcarq
0b3e4f6bcd remove dead code 2018-06-23 13:50:49 +02:00
gcarq
295dfe2652 persistence: remove obsolete global _CONF variable 2018-06-23 13:50:22 +02:00
Michael Egger
df9015a7f1
Merge pull request #942 from xmatthias/feat/buy_on_sell_first
Introduce ignore_roi_if_buy_signal parameter to avoid sell/buy scenarios
2018-06-23 13:42:03 +02:00
Janne Sinivirta
90caa09ae0
Merge pull request #944 from freqtrade/improve-strategy-handling
Improve strategy handling
2018-06-23 14:32:39 +03:00
Michael Egger
909fd39b80
Merge pull request #945 from freqtrade/update_plotly
update plotly
2018-06-23 13:15:15 +02:00
xmatthias
d23cd73ba8 update plotly 2018-06-23 13:12:36 +02:00
xmatthias
fc219b4e94 move experimental eval below stop_loss_reached to improve performance 2018-06-23 13:10:08 +02:00
gcarq
818a6b12ed tests: add dir() assertion 2018-06-23 11:57:26 +02:00
gcarq
4bd61df3a7 implement test for import_strategy 2018-06-23 11:14:31 +02:00
gcarq
c40e6a12d1 move logic from hyperopt to freqtrade.strategy 2018-06-23 11:13:49 +02:00
gcarq
3360bf4001 wrap strategies with HyperoptStrategy for module lookups with pickle 2018-06-23 10:42:33 +02:00
Michael Egger
168ed91fe1
Merge pull request #941 from freqtrade/avoid-fee-calls-backtesting
avoid calling exchange.get_fee inside loop
2018-06-23 08:17:25 +02:00
Janne Sinivirta
9a07d57ed7 fix flake8 2018-06-23 07:58:25 +03:00
xmatthias
2be7b3d9eb fix mocked bid-value to match limt_buy_order config 2018-06-22 21:24:21 +02:00
xmatthias
e2a2a0be9b extract stop_loss_reached to allow check before ignore_roi_if_buy_signal 2018-06-22 21:21:34 +02:00
Janne Sinivirta
f7e5d2c3a5 check that we set fee on backtesting init 2018-06-22 21:55:09 +03:00
xmatthias
cbfee51f32 introduce experimental variable and fix test naming 2018-06-22 20:51:21 +02:00
xmatthias
8a44dff595 don't sell if buy is still active 2018-06-22 20:23:23 +02:00
Janne Sinivirta
c73b9f5c77 avoid calling exchange.get_fee inside loop 2018-06-22 21:04:07 +03:00
Samuel Husso
c413e94f83
Merge pull request #940 from freqtrade/pyup-scheduled-update-2018-06-22
Scheduled daily dependency update on friday
2018-06-22 16:14:20 +03:00
pyup-bot
98cd8970f9 Update ccxt from 1.14.242 to 1.14.253 2018-06-22 14:24:06 +02:00
Janne Sinivirta
5fcdd3831c
Merge pull request #928 from freqtrade/feat/objectify_exchange
Objectify exchange
2018-06-22 06:36:14 +03: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
Matthias
99e3c6e526
Merge pull request #936 from freqtrade/pyup-scheduled-update-2018-06-21
Scheduled daily dependency update on thursday
2018-06-21 15:20:22 +02:00
pyup-bot
c7976f51e2 Update ccxt from 1.14.230 to 1.14.242 2018-06-21 14:24:06 +02:00
Michael Egger
2c43590268
Merge pull request #933 from freqtrade/pyup-scheduled-update-2018-06-20
Scheduled daily dependency update on wednesday
2018-06-20 14:36:44 +02:00
pyup-bot
36cfea3d0f Update pytest from 3.6.1 to 3.6.2 2018-06-20 14:23:08 +02:00
pyup-bot
a493a2ceef Update ccxt from 1.14.224 to 1.14.230 2018-06-20 14:23:06 +02:00