Open shahzadakram opened 6 years ago
1.what your api version? 2.can you login iqoption on website?
yes i can login at website and i just downloaded latest Version .
thanks
i just tried with
from iqoptionapi.api import IQOptionAPI
and its login and when i tried with
from iqoptionapi.stable_api import IQ_Option
and got error that i placed above.
thanks for your response
Print your version
when i tried this code 👍
from iqoptionapi.stable_api import IQ_Option import time print("login...") import logging logging.basicConfig(level=logging.DEBUG,format='%(asctime)s %(message)s') I_want_money=IQ_Option("email","password") print(I_want_money.version) print("loged in")
got this error
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information.
=============== RESTART: C:\Users\e9les\Desktop\iqapi\login.py =============== login... 2018-11-07 22:50:58,369 https://auth.iqoption.com/api/v1.0/login 2018-11-07 22:50:58,369 Starting new HTTPS connection (1): auth.iqoption.com:443 2018-11-07 22:51:00,292 https://auth.iqoption.com:443 "POST /api/v1.0/login HTTP/1.1" 200 52 2018-11-07 22:51:00,307 <Response [200]> 2018-11-07 22:51:00,307 {"data":{"ssid":"5027dd7cabffd92e2eb375569d258a4c"}} 2018-11-07 22:51:00,307 {'Server': 'nginx', 'Date': 'Wed, 07 Nov 2018 17:50:59 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '52', 'Connection': 'keep-alive', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Headers': 'Accept, Accept-Language, Content-Type, YourOwnHeader', 'Access-Control-Allow-Methods': 'POST, GET, OPTIONS, PUT, DELETE', 'Access-Control-Allow-Origin': '*', 'Set-Cookie': 'ssid=5027dd7cabffd92e2eb375569d258a4c; Path=/; Domain=.iqoption.com; Max-Age=2592000; Secure, ssid=5027dd7cabffd92e2eb375569d258a4c; Path=/; Domain=iq-option.com; Max-Age=2592000; Secure, ssid=5027dd7cabffd92e2eb375569d258a4c; Path=/; Domain=iqoption.com; Max-Age=2592000; Secure, ssid=5027dd7cabffd92e2eb375569d258a4c; Path=/; Domain=iqoption.com; Max-Age=2592000; Secure, ssid=5027dd7cabffd92e2eb375569d258a4c; Path=/; Domain=qoption.co; Max-Age=2592000; Secure, ssid=5027dd7cabffd92e2eb375569d258a4c; Path=/; Domain=iqoption.com; Max-Age=2592000; Secure', 'Strict-Transport-Security': 'max-age=15555600', 'X-Content-Type-Options': 'nosniff'} 2018-11-07 22:51:00,323 <RequestsCookieJar[<Cookie ssid=5027dd7cabffd92e2eb375569d258a4c for .iqoption.com/>]> 2018-11-07 22:51:00,323 error connect() fail 2018-11-07 22:51:01,330 https://auth.iqoption.com/api/v1.0/login 2018-11-07 22:51:01,330 Starting new HTTPS connection (1): auth.iqoption.com:443
it gave me same error on printing version infact don't allow to call me anything.
thanks for your response appreciate your help.
I_want_money=IQ_Option("email","password")`
print(I_want_money.__version__)
same :(
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information.
=============== RESTART: C:\Users\e9les\Desktop\iqapi\login.py =============== ERROR:root:error connect() fail DEBUG:iqoptionapi.api:https://auth.iqoption.com/api/v1.0/login DEBUG:iqoptionapi.api:<Response [200]> DEBUG:iqoptionapi.api:{"data":{"ssid":"85e9c938dda4be62930214808cedc8ea"}} DEBUG:iqoptionapi.api:{'Server': 'nginx', 'Date': 'Wed, 07 Nov 2018 17:59:05 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '52', 'Connection': 'keep-alive', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Headers': 'Accept, Accept-Language, Content-Type, YourOwnHeader', 'Access-Control-Allow-Methods': 'POST, GET, OPTIONS, PUT, DELETE', 'Access-Control-Allow-Origin': '*', 'Set-Cookie': 'ssid=85e9c938dda4be62930214808cedc8ea; Path=/; Domain=.iqoption.com; Max-Age=2592000; Secure, ssid=85e9c938dda4be62930214808cedc8ea; Path=/; Domain=iq-option.com; Max-Age=2592000; Secure, ssid=85e9c938dda4be62930214808cedc8ea; Path=/; Domain=iqoption.com; Max-Age=2592000; Secure, ssid=85e9c938dda4be62930214808cedc8ea; Path=/; Domain=iqoption.com; Max-Age=2592000; Secure, ssid=85e9c938dda4be62930214808cedc8ea; Path=/; Domain=qoption.co; Max-Age=2592000; Secure, ssid=85e9c938dda4be62930214808cedc8ea; Path=/; Domain=iqoption.com; Max-Age=2592000; Secure', 'Strict-Transport-Security': 'max-age=15555600', 'X-Content-Type-Options': 'nosniff'} DEBUG:iqoptionapi.api:<RequestsCookieJar[<Cookie ssid=85e9c938dda4be62930214808cedc8ea for .iqoption.com/>]> ERROR:root:error connect() fail
I think Problem is with the login function if i printed anything before this it works fine and after making object it doesn't print for me .
thanks
i just tried this code
from iqoptionapi.stable_api import IQ_Option I_want_money=IQ_Option("***","*") print(I_want_money.version)
ok give me your download file
import websocket
print(websocket.__version__)
try this check
@shahzadakram i test success on linux and win10-64bit
C:\Users\e9les>pip install websocket Requirement already satisfied: websocket in c:\users\e9les\appdata\local\programs\python\python37\lib\site-packages (0.2.1) Requirement already satisfied: gevent in c:\users\e9les\appdata\local\programs\python\python37\lib\site-packages (from websocket) (1.3.7) Requirement already satisfied: greenlet in c:\users\e9les\appdata\local\programs\python\python37\lib\site-packages (from websocket) (0.4.15) Requirement already satisfied: cffi>=1.11.5; sys_platform == "win32" and platform_python_implementation == "CPython" in c:\users\e9les\appdata\local\programs\python\python37\lib\site-packages (from gevent->websocket) (1.11.5) Requirement already satisfied: pycparser in c:\users\e9les\appdata\local\programs\python\python37\lib\site-packages (from cffi>=1.11.5; sys_platform == "win32" and platform_python_implementation == "CPython"->gevent->websocket) (2.19) You are using pip version 10.0.1, however version 18.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
and websocket print came out 👍
import websocket print(websocket.version)
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information.
=============== RESTART: C:\Users\e9les\Desktop\iqapi\login.py =============== 0.2.1
but when i tried the code that i have sent you in zip 👍
same error :(
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information.
=============== RESTART: C:\Users\e9les\Desktop\iqapi\login.py =============== ERROR:root:error connect() fail DEBUG:iqoptionapi.api:https://auth.iqoption.com/api/v1.0/login DEBUG:iqoptionapi.api:<Response [200]> DEBUG:iqoptionapi.api:{"data":{"ssid":"572c6767a7f7df69633f5c4bd1b2bb48"}} DEBUG:iqoptionapi.api:{'Server': 'nginx', 'Date': 'Wed, 07 Nov 2018 18:46:58 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '52', 'Connection': 'keep-alive', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Headers': 'Accept, Accept-Language, Content-Type, YourOwnHeader', 'Access-Control-Allow-Methods': 'POST, GET, OPTIONS, PUT, DELETE', 'Access-Control-Allow-Origin': '*', 'Set-Cookie': 'ssid=572c6767a7f7df69633f5c4bd1b2bb48; Path=/; Domain=.iqoption.com; Max-Age=2592000; Secure, ssid=572c6767a7f7df69633f5c4bd1b2bb48; Path=/; Domain=iq-option.com; Max-Age=2592000; Secure, ssid=572c6767a7f7df69633f5c4bd1b2bb48; Path=/; Domain=iqoption.com; Max-Age=2592000; Secure, ssid=572c6767a7f7df69633f5c4bd1b2bb48; Path=/; Domain=iqoption.com; Max-Age=2592000; Secure, ssid=572c6767a7f7df69633f5c4bd1b2bb48; Path=/; Domain=qoption.co; Max-Age=2592000; Secure, ssid=572c6767a7f7df69633f5c4bd1b2bb48; Path=/; Domain=iqoption.com; Max-Age=2592000; Secure', 'Strict-Transport-Security': 'max-age=15555600', 'X-Content-Type-Options': 'nosniff'} DEBUG:iqoptionapi.api:<RequestsCookieJar[<Cookie ssid=572c6767a7f7df69633f5c4bd1b2bb48 for .iqoption.com/>]> ERROR:root:error connect() fail
!! i find the bug~~~ that is websocket version problem try this to fix that
pip3 install websocket==0.47
Microsoft Windows [Version 10.0.16299.726] (c) 2017 Microsoft Corporation. All rights reserved.
C:\Users\e9les>pip3 install websocket==0.47 Collecting websocket==0.47 Could not find a version that satisfies the requirement websocket==0.47 (from versions: 0.2.1) No matching distribution found for websocket==0.47 You are using pip version 10.0.1, however version 18.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\e9les>
when i tried this command and it gave me error
pip3 install websocket==0.47
error is Collecting websocket==0.47 Could not find a version that satisfies the requirement websocket==0.47 (from versions: 0.2.1) No matching distribution found for websocket==0.47 You are using pip version 10.0.1, however version 18.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\e9les>pip3 install websocket==0.47 Collecting websocket==0.47 Could not find a version that satisfies the requirement websocket==0.47 (from versions: 0.2.1) No matching distribution found for websocket==0.47
thanks alot it worked now
command for websocket update is - pip install websocket-client==0.47.0
thanks alot
ya~~~
@JafferWilson
Can it fix your problem?
hello @Lu-Yi-Hsun
can you please let me know how can i call a python file in MT4 (Metatrader 4) . if you have any idea and done this before ?
Thanks in Advance.
using Shell Command line etc .
@shahzadakram to interface python with MT4 you have to use the ZeroMQ framework http://zeromq.org/
Hello ,
please check this what can be error here ,
root@vultr:~# pip3 install -U git+git://github.com/Lu-Yi-Hsun/iqoptionapi
Collecting git+git://github.com/Lu-Yi-Hsun/iqoptionapi
Cloning git://github.com/Lu-Yi-Hsun/iqoptionapi to /tmp/pip-3p1m_ad6-build
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-3p1m_ad6-build/ root@vultr:~#
thanks in advance
it can be install same like ?
https://github.com/rg3/youtube-dl/blob/master/README.md#installation
on cent os server via command line(shell) ?
thanks
@shahzadakram This is not the repository issue. It is more like the python issue.
You do not have setuptools library.
See the statement of your log:
ModuleNotFoundError: No module named 'setuptools'
Try installing it through pip3 install setuptools
. If this didn't work then please try something else by searching. This section is more specific to the Repository based issues and not Python.
If you you thing you can also take help from other forums.
Please close this issue if it is resolved.
thx @JafferWilson
i tried above command and it work's now ...
now when i tried login
I_want_money=IQ_Option("@gmail.com","")
2019-01-28 22:25:15,111 https://auth.iqoption.com/api/v1.0/login 2019-01-28 22:25:15,113 Starting new HTTPS connection (1): auth.iqoption.com:443 2019-01-28 22:25:16,268 https://auth.iqoption.com:443 "POST /api/v1.0/login HTTP /1.1" 200 52 2019-01-28 22:25:16,271 <Response [200]> 2019-01-28 22:25:16,271 {"data":{"ssid":"f33e799d0d15ee541ecad70050f2376f"}} 2019-01-28 22:25:16,271 {'Content-Length': '52', 'X-Content-Type-Options': 'nosn iff', 'Set-Cookie': 'ssid=f33e799d0d15ee541ecad70050f2376f; Path=/; Domain=iqopt ion.com; Max-Age=2592000; Secure', 'Strict-Transport-Security': 'max-age=1555560 0', 'Vary': 'Origin', 'X-Tracing-Key': 'f127376b-c408-4005-a3a3-c60831dcb3d8', ' Server': 'nginx', 'Connection': 'keep-alive', 'Date': 'Mon, 28 Jan 2019 22:25:16 GMT', 'Content-Type': 'application/json; charset=utf-8'} 2019-01-28 22:25:16,272 <<class 'requests.cookies.RequestsCookieJar'>[<Cookie ss id=f33e799d0d15ee541ecad70050f2376f for .iqoption.com/>]> 2019-01-28 22:25:16,762 [Errno 2] No such file or directory 2019-01-28 22:25:16,775 Websocket connection closed. 2019-01-28 22:25:17,777 https://auth.iqoption.com/api/v1.0/login 2019-01-28 22:25:17,779 Starting new HTTPS connection (1): auth.iqoption.com:443 2019-01-28 22:25:19,598 https://auth.iqoption.com:443 "POST /api/v1.0/login HTTP /1.1" 200 52 2019-01-28 22:25:19,601 <Response [200]> 2019-01-28 22:25:19,601 {"data":{"ssid":"64ee6ed4980ccfdbadd844393a951c35"}} 2019-01-28 22:25:19,601 {'Content-Length': '52', 'X-Content-Type-Options': 'nosn iff', 'Set-Cookie': 'ssid=64ee6ed4980ccfdbadd844393a951c35; Path=/; Domain=iqopt ion.com; Max-Age=2592000; Secure', 'Strict-Transport-Security': 'max-age=1555560 0', 'Vary': 'Origin', 'X-Tracing-Key': 'a2b28fde-f333-405a-8c4a-669892c2c4cb', ' Server': 'nginx', 'Connection': 'keep-alive', 'Date': 'Mon, 28 Jan 2019 22:25:18 GMT', 'Content-Type': 'application/json; charset=utf-8'} 2019-01-28 22:25:19,601 <<class 'requests.cookies.RequestsCookieJar'>[<Cookie ss id=64ee6ed4980ccfdbadd844393a951c35 for .iqoption.com/>]> 2019-01-28 22:25:20,194 [Errno 2] No such file or directory 2019-01-28 22:25:20,195 Websocket connection closed. 2019-01-28 22:25:21,197 https://auth.iqoption.com/api/v1.0/login 2019-01-28 22:25:21,198 Starting new HTTPS connection (1): auth.iqoption.com:443 2019-01-28 22:25:22,275 https://auth.iqoption.com:443 "POST /api/v1.0/login HTTP /1.1" 200 52 2019-01-28 22:25:22,276 <Response [200]> 2019-01-28 22:25:22,276 {"data":{"ssid":"8e2ac9fa3d2a0454616ffd9a6bf5675f"}} 2019-01-28 22:25:22,276 {'Content-Length': '52', 'X-Content-Type-Options': 'nosn iff', 'Set-Cookie': 'ssid=8e2ac9fa3d2a0454616ffd9a6bf5675f; Path=/; Domain=iqopt ion.com; Max-Age=2592000; Secure', 'Strict-Transport-Security': 'max-age=1555560 0', 'Vary': 'Origin', 'X-Tracing-Key': '6b0002a0-1cf6-4284-98b1-31d4bb69742b', ' Server': 'nginx', 'Connection': 'keep-alive', 'Date': 'Mon, 28 Jan 2019 22:25:22 GMT', 'Content-Type': 'application/json; charset=utf-8'} 2019-01-28 22:25:22,276 <<class 'requests.cookies.RequestsCookieJar'>[<Cookie ss id=8e2ac9fa3d2a0454616ffd9a6bf5675f for .iqoption.com/>]> 2019-01-28 22:25:23,037 [Errno 2] No such file or directory 2019-01-28 22:25:23,037 Websocket connection closed. 2019-01-28 22:25:24,039 https://auth.iqoption.com/api/v1.0/login 2019-01-28 22:25:24,040 Starting new HTTPS connection (1): auth.iqoption.com:443 2019-01-28 22:25:25,069 https://auth.iqoption.com:443 "POST /api/v1.0/login HTTP /1.1" 200 52 2019-01-28 22:25:25,070 <Response [200]> 2019-01-28 22:25:25,070 {"data":{"ssid":"e99804634ac5600c2cb74787a4010b1c"}} 2019-01-28 22:25:25,070 {'Content-Length': '52', 'X-Content-Type-Options': 'nosn iff', 'Set-Cookie': 'ssid=e99804634ac5600c2cb74787a4010b1c; Path=/; Domain=iqopt ion.com; Max-Age=2592000; Secure', 'Strict-Transport-Security': 'max-age=1555560 0', 'Vary': 'Origin', 'X-Tracing-Key': 'adb0ffc7-72e4-4ba1-afa2-f2099b7dda0d', ' Server': 'nginx', 'Connection': 'keep-alive', 'Date': 'Mon, 28 Jan 2019 22:25:24 GMT', 'Content-Type': 'application/json; charset=utf-8'} 2019-01-28 22:25:25,071 <<class 'requests.cookies.RequestsCookieJar'>[<Cookie ss id=e99804634ac5600c2cb74787a4010b1c for .iqoption.com/>]> 2019-01-28 22:25:25,429 [Errno 2] No such file or directory 2019-01-28 22:25:25,430 Websocket connection closed. 2019-01-28 22:25:26,431 https://auth.iqoption.com/api/v1.0/login 2019-01-28 22:25:26,432 Starting new HTTPS connection (1): auth.iqoption.com:443 2019-01-28 22:25:27,441 https://auth.iqoption.com:443 "POST /api/v1.0/login HTTP /1.1" 200 52 2019-01-28 22:25:27,442 <Response [200]> 2019-01-28 22:25:27,442 {"data":{"ssid":"46ef2e6c9d2c4e74cc59b9195007f6a5"}} 2019-01-28 22:25:27,442 {'Content-Length': '52', 'X-Content-Type-Options': 'nosn iff', 'Set-Cookie': 'ssid=46ef2e6c9d2c4e74cc59b9195007f6a5; Path=/; Domain=iqopt ion.com; Max-Age=2592000; Secure', 'Strict-Transport-Security': 'max-age=1555560 0', 'Vary': 'Origin', 'X-Tracing-Key': '0d93a8e3-a023-4d3a-9fb3-2538ce3d2872', ' Server': 'nginx', 'Connection': 'keep-alive', 'Date': 'Mon, 28 Jan 2019 22:25:27 GMT', 'Content-Type': 'application/json; charset=utf-8'} 2019-01-28 22:25:27,442 <<class 'requests.cookies.RequestsCookieJar'>[<Cookie ss id=46ef2e6c9d2c4e74cc59b9195007f6a5 for .iqoption.com/>]> 2019-01-28 22:25:27,947 [Errno 2] No such file or directory 2019-01-28 22:25:27,948 Websocket connection closed. 2019-01-28 22:25:28,949 error reconnect() too many time please look log file [root@vultr ~]#
at cent os putty i got above error... can you please help me in this ?
thanks
beside this i am using this command .
from iqoptionapi.stable_api import IQ_Option
print(IQ_Option.version) 3.6
and it works.
@shahzadakram so can you work now?
i am not able to login and get detail etc.... but can check all this same above issue.
@shahzadakram i think the bug is 2019-01-28 22:25:27,947 [Errno 2] No such file or directory
the bug is ...
import websocket print(websocket.version) 0.54.0
and python Python 2.7.5 (default, Oct 30 2018, 23:45:53)
i am on cent os VPS ... and install all things but i think the bug is python version and webscoket version.
i was really in need to configure now but i think i can't it work on local at windows i was trying to test it live on cent os server 👎
can you help me in this ?
Thanks in advance.
yes ok
should i provide you vps detail ? to check this issue ?
anyways thanks for helping and encouraging to focus on error.
connect your cent os?
yes
yihsun1992@gmail.com skype? email?
please check gmail
@Lu-Yi-Hsun have you got email ?
Thanks for helping
yes i am try to find problem
okay
@Lu-Yi-Hsun have you got any thing?
@shahzadakram sorry wait for long time ,i was block by install python3 and pip3
for now your server can work iqoptionapi on python3 i think that is "Python 2.7.5 problem"
I just tried login and its not working as it should can anyone please help me in this regard what is wrong i am doing
here is code 👍
from iqoptionapi.stable_api import IQ_Option import time print("login...") import logging logging.basicConfig(level=logging.DEBUG,format='%(asctime)s %(message)s') I_want_money=IQ_Option("email here","Password here")
and here is error that i am getting. thanks in advance
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information.