Beispiel #1
0
			for action in selectedTrades:
				print(curSite.formatTrade(action))
			
			print('\nPress ' + Fore.YELLOW + 'number' + Fore.RESET + ' to select trading sequence.')
			print('Press ' + Fore.YELLOW + 'E' + Fore.RESET + ' to execute trading sequence.')
			print('Press ' + Fore.YELLOW + 'R' + Fore.RESET + ' to reload trade depth.')
			print('Press ' + Fore.YELLOW + 'ESC' + Fore.RESET + ' to exit.')
	
	if (key == ord('r')) or (key == ord('R')):
		selectedTrades = None
		#print('')
		if not curSite.waitingDepths(config.startAmount, config.startCurrency):
			quit()
	
	if (key == ord('e')) or (key == ord('E') or cont):
		print('')
		if not selectedTrades is None:
			#if curSite.executeSequence(selectedTrades, config.startAmount, config.startCurrency, cont):
			if curSite.executeSequenceParallel(selectedTrades, config.startAmount, config.startCurrency, cont):
				print('Trading sequence complete ' + Fore.GREEN + 'successfully' + Fore.RESET + '.')
				curSite.unlinkTrades()
				quit()
			else:
				print('Trading sequence  ' + Fore.RED + 'failed' + Fore.RESET + '.')
				print('Error: ' + Fore.RED + curSite.getLastErrorMessage() + Fore.RESET)
		else:
			print(Fore.RED + 'Select trading sequence' + Fore.RESET + ' please!')
	
	cont = False
	key = ord(getch())