У меня этот код работает правильно в течение дня, но по любой причине программа должна нажать ENTER для продолжения вывода на консоль. Я использую import schedule as sc
. В tycoon
функция печати crypto
, date
и price
.
cryptos = ['BTC-USDT','ETH-USDT']
logoutput.set_log()
for crypto in cryptos:
sc.every(1).minutes.do(tycoon, crypto)
while True:
try:
sc.run_pending()
except requests.RequestException as err:
print ("OOps: Something Else",err)
except requests.HTTPError as errh:
print ("Http Error:",errh)
except requests.ConnectionError as errc:
print ("Error Connecting:",errc)
except requests.Timeout as errt:
print ("Timeout Error:",errt)
LOGGING FILE
...
INFO:schedule:Running job Every 1 minute do tycoon('BTC-USDT') (last run: 2020-03-16 13:27:08, next run: 2020-03-16 13:28:08)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): openapi-v2.kucoin.com:443
DEBUG:urllib3.connectionpool:https://openapi-v2.kucoin.com:443 "GET /api/v1/market/candles?type=15min&symbol=BTC-USDT&startAt=1584350888&endAt=1584376088 HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): openapi-v2.kucoin.com:443
DEBUG:urllib3.connectionpool:https://openapi-v2.kucoin.com:443 "GET /api/v1/market/candles?type=5min&symbol=BTC-USDT&startAt=1584375788&endAt=1584376088 HTTP/1.1" 200 None
INFO:schedule:Running job Every 1 minute do tycoon('ETH-USDT') (last run: 2020-03-16 13:27:55, next run: 2020-03-16 13:28:55)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): openapi-v2.kucoin.com:443
DEBUG:urllib3.connectionpool:https://openapi-v2.kucoin.com:443 "GET /api/v1/market/candles?type=15min&symbol=ETH-USDT&startAt=1584350935&endAt=1584376135 HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): openapi-v2.kucoin.com:443
DEBUG:urllib3.connectionpool:https://openapi-v2.kucoin.com:443 "GET /api/v1/market/candles?type=5min&symbol=ETH-USDT&startAt=1584375835&endAt=1584376135 HTTP/1.1" 200 None
INFO:schedule:Running job Every 1 minute do tycoon('BTC-USDT') (last run: 2020-03-16 13:28:08, next run: 2020-03-16 13:29:08)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): openapi-v2.kucoin.com:443
DEBUG:urllib3.connectionpool:https://openapi-v2.kucoin.com:443 "GET /api/v1/market/candles?type=15min&symbol=BTC-USDT&startAt=1584356588&endAt=1584381788 HTTP/1.1" 200 None
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:schedule:Running job Every 1 minute do tycoon('ETH-USDT') (last run: 2020-03-16 15:03:08, next run: 2020-03-16 15:04:08)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): openapi-v2.kucoin.com:443
DEBUG:urllib3.connectionpool:https://openapi-v2.kucoin.com:443 "GET /api/v1/market/candles?type=15min&symbol=ETH-USDT&startAt=1584356648&endAt=1584381848 HTTP/1.1" 200 None
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:matplotlib.category:Using categorical units to plot a list of strings that are all parsable as floats or dates. If these strings should be plotted as numbers, cast to the appropriate data type before plotting.
INFO:schedule:Running job Every 1 minute do tycoon('BTC-USDT') (last run: 2020-03-16 15:03:20, next run: 2020-03-16 15:04:20)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): openapi-v2.kucoin.com:443
DEBUG:urllib3.connectionpool:https://openapi-v2.kucoin.com:443 "GET /api/v1/market/candles?type=15min&symbol=BTC-USDT&startAt=1584356660&endAt=1584381860 HTTP/1.1" 200 None
INFO:schedule:Running job Every 1 minute do tycoon('ETH-USDT') (last run: 2020-03-16 15:04:19, next run: 2020-03-16 15:05:19)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): openapi-v2.kucoin.com:443
CONSOLE OUTPUT
...
VENDER BTC-USDT
2020-03-16 13:25:04
Precio:4987.3
VENDER ETH-USDT
2020-03-16 13:25:52
Precio:111.36
VENDER BTC-USDT
2020-03-16 13:26:06
Precio:5006.0
VENDER ETH-USDT
2020-03-16 13:26:53
Precio:112.35
VENDER BTC-USDT
2020-03-16 13:27:07
Precio:5041.5
VENDER ETH-USDT
2020-03-16 13:27:54
Precio:112.62
VENDER BTC-USDT
2020-03-16 13:28:08
Precio:5035.9
VENDER ETH-USDT
**2020-03-16 13:28:55** Here pressed ENTER for continue
Precio:112.34
MANTENER BTC-USDT
2020-03-16 15:03:08
Precio:5044.7
MANTENER ETH-USDT
2020-03-16 15:04:08
Precio:112.31
Можно ли как-нибудь помешать мне нажать ENTER для продолжения?
Как узнать, что программа работает правильно?