n1nj4z33 / iqoptionapi

IQ Option API 4.x (Python 2.7) The project is obsolete and is not supported because of problems with access to IQ Options in Russia
119 stars 539 forks source link

How to get Profile Information from https://iqoption.com/api/getprofile? #96

Closed lreiner closed 6 years ago

lreiner commented 6 years ago

Is there any function in the api to return the whole object you obtain from this api call?

lreiner commented 6 years ago

I only found this in iqoptionapi/objects/profile.py

"""Module for IQ Option Profile websocket object."""

from iqoptionapi.ws.objects.base import Base

class Profile(Base):
    """Class for IQ Option Profile websocket object."""

    def __init__(self):
        super(Profile, self).__init__()
        self.__name = "profile"
        self.__skey = None
        self.__balance = None

    @property
    def skey(self):
        """Property to get skey value.

        :returns: The skey value.
        """
        return self.__skey

    @skey.setter
    def skey(self, skey):
        """Method to set skey value."""
        self.__skey = skey

    @property
    def balance(self):
        """Property to get balance value.

        :returns: The balance value.
        """
        return self.__balance

    @balance.setter
    def balance(self, balance):
        """Method to set balance value."""
        self.__balance = balance

As you can see there is only balance which gets returned? But how to add a function which returns full JSON Object?

Lu-Yi-Hsun commented 6 years ago

Try my fork version