Beispiel #1
0
while key != 27:
	if (key >= ord('1')) and (key <= ord('9')):
		variant = 0
		selectedTrades = None
		for trades in curSite.seqs:
			if 'resultAmount' in trades['options'] and trades['options']['resultAmount'] > config.startAmount:
				variant += 1
				if variant == (key - ord('0')):
					selectedTrades = trades['trades']

		
		if selectedTrades <> None:
			print('\nStart amount: {0} {1}'.format(config.startAmount, config.startCurrency))
			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: