This will stop the running app gracefully - processing current api calls
then shutting the werkzueg (run) listening server.
Have also called this from the cleanup placeholder.
I'm not sure this is what is intended by cleanup def.
By which I mean there may be a thread left running with no app within -
not sure how to check this just yet.
tidied excessive logging.
This will stop the running app gracefully - processing current api calls
then shutting the werkzueg (run) listening server.
Have also called this from the cleanup placeholder.
I'm not sure this is what is intended by cleanup def.
By which I mean there may be a thread left running with no app within -
not sure how to check this just yet.
tidied excessive logging.
and into their own
Added 404 handling
Split registration of URLs that use rpc.rpc and others into
own def. Seems logical to be able to register separately for later use.
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
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
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
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
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"
]
]
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"
]
]
- 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
Currently forcesell only cancels an open limit buy order and doesn't sell the filled amount.
After this change, forcesell will also update trade's amount to filled amount and sell the filled amount.