alienbrett / PyAlly

Ally Invest API Module for Python3
https://alienbrett.github.io/PyAlly/
MIT License
57 stars 28 forks source link

Invalid JSON Format #34

Closed eyesuk closed 4 years ago

eyesuk commented 4 years ago

Hello Everyone, Hope everyone is doing good and everyone is healthy. I ran into an issue relating to the JSON response format. According to the API documentation here the JSON response is expected in double quotes versus a single. I ran into this issue when I was trying to parse for error messages in another application. A find and replace fixed the issue for me before handling, but I wanted to come here and mentioned it.

{'response': {'@id': 'bfc6dcdf-e6dd-48e1-9ce3-231e0c6b15ef', 'elapsedtime': '0', 'estcommission': '0', 'marginrequirement': '0', 'netamt': '0', 'principal': '0', 'secfee': '0', 'error': 'You are placing a stop order on the wrong side of the market by either (1) purchasing at a price below the current ask price or (2) selling at a price above the current bid price.'}

As always thanks for your help.