Python code works with encryption password required

1 post / 0 new
VincentChan
Python code works with encryption password required

Hi,

I am trying to make the Python code from
https://github.com/ig-python/ig-markets-api-python-library work. However, it returned Exception: HTTP status code 400 {"errorCode":"error.public-api.failure.encryptio
n.required"}. From IG Labs, it advises:

A login has been attempted to the login V1 service by a client from the IG Singapore company. They need to use the v2 version as they need to send their passwords encrypyted.

Is there anyone who ever made it work or have sample code for sharing. Thanks a lot

D:\Python\ig-markets-api-python-library-master>python .\sample\stream_ig.py
Traceback (most recent call last):
File ".\sample\stream_ig.py", line 91, in
main()
File ".\sample\stream_ig.py", line 41, in main
ig_session = ig_stream_service.create_session()
File "D:\Python\Python37-32\lib\site-packages\trading_ig-0.0.6-py3.7.egg\tradi
ng_ig\stream.py", line 22, in create_session
File "D:\Python\Python37-32\lib\site-packages\trading_ig-0.0.6-py3.7.egg\tradi
ng_ig\rest.py", line 1069, in create_session
File "D:\Python\Python37-32\lib\site-packages\trading_ig-0.0.6-py3.7.egg\tradi
ng_ig\rest.py", line 221, in _req
File "D:\Python\Python37-32\lib\site-packages\trading_ig-0.0.6-py3.7.egg\tradi
ng_ig\rest.py", line 134, in req
File "D:\Python\Python37-32\lib\site-packages\trading_ig-0.0.6-py3.7.egg\tradi
ng_ig\rest.py", line 84, in _create_first
Exception: HTTP status code 400 {"errorCode":"error.public-api.failure.encryptio
n.required"}