Exemplo n.º 1
0
def entrar(editEmail, editSenha):
    #print(editSenha.get())
    API = IQ_Option(editEmail, editSenha)
    API.connect()
    API.change_balance("PRACTICE")
    #API.set_max_reconnect(5)

    while True:
        if API.check_connect() == False:
            print("Erro ao Conectar")
            API.reconnect()
        else:
            print("Conectado com sucesso!")
            tela_operacional(editEmail, editSenha)
            break
        time.sleep(5)
Exemplo n.º 2
0
from datetime import datetime
from dateutil import tz
import threading

#Developed By @Euller#

arquivo = configparser.RawConfigParser()
arquivo.read('config.txt')
API = IQ_Option(arquivo.get('GERAL', 'email'), arquivo.get('GERAL', 'senha'))
API.set_max_reconnect(5)
API.change_balance('PRACTICE')  # PRACTICE / REAL

while True:
    if API.check_connect() == False:
        print('Erro ao se conectar')
        API.reconnect()
    else:
        print('Conectado com sucesso')
        break

    time.sleep(1)


def perfil():
    perfil = json.loads(json.dumps(API.get_profile()))
    return perfil['result']


x = perfil()
print(x['first_name'])
print(x['city'])