Capturando informações do perfil
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Link do Video: https://youtu.be/5gusSJrHcdM | |
from iqoptionapi.stable_api import IQ_Option | |
import time, json | |
from datetime import datetime | |
from dateutil import tz | |
API = IQ_Option('login', 'senha') | |
API.connect() | |
API.change_balance('PRACTICE') # PRACTICE / REAL | |
while True: | |
if API.check_connect() == False: | |
print('Erro ao se conectar') | |
API.connect() | |
else: | |
print('Conectado com sucesso') | |
break | |
time.sleep(1) | |
def perfil(): # Função para capturar informações do perfil | |
perfil = json.loads(json.dumps(API.get_profile_ansyc())) | |
return perfil | |
''' | |
name | |
first_name | |
last_name | |
city | |
nickname | |
currency | |
currency_char | |
address | |
created | |
postal_index | |
gender | |
birthdate | |
balance | |
''' | |
def timestamp_converter(x): # Função para converter timestamp | |
hora = datetime.strptime(datetime.utcfromtimestamp(x).strftime('%Y-%m-%d %H:%M:%S'), '%Y-%m-%d %H:%M:%S') | |
hora = hora.replace(tzinfo=tz.gettz('GMT')) | |
return str(hora)[:-6] | |
''' | |
Para pegar somente a quantia da sua banca utilize: banca = API.get_balance() | |
''' |
cara, muito louco seus videos. consegui fazer alguma coisa já. valeu!
ResponderExcluirgostaria da sua ajuda nao estou conseguindo conectar esta dando erro de \Python37\lib\site-packages\iqoptionapi-6.8.9.1-py3.7.egg
ResponderExcluirOPA, MUTO TOP SEUS VIDEOS E JA ESTOU ME APROFUNDANDO NESSE MUNDO ATRAVES DO Q VC ESTA PASSANDO, SÓ Q NO MOMENTO ESTOU COM UMA DUVIDA...
ResponderExcluirNÃO ESTOU CONSEGUINDO RETORNAR O NOME DO USUARIO, DA ERRO SEMPRE...NAO ESTOU SABENDO USAR A FUNÇAO....DÁ PRA ME AJUDAR?
Preciso de uma ajuda em capturar a foto do avatar via api iq Option, poderia me ajudar com a sintaxe do script em python, email de contato miroel3131@gmail.com
ResponderExcluir