Jump to content

JohnRC

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

1 Neutral

About JohnRC

  • Rank
    New Contributor
  1. Having had some difficulty in getting this code to work I am now switching to developing a separate set of wrappers, as I need to interface to both the Dealing and Streaming APIs. So I don't need the answer to this question for now. If anyone is interested in my analysis of the issues, happy to share.
  2. It seems that the example code given is wrong. Firstly, the parameter IG_DEMO for the call to IG is not defined in the actual ig.js code, so the system attempts to login to the live account even when the IG_DEMO is set to true; Secondly, the URLs for the IG live and demo accounts are hard-coded, even though this is deprecated in the IG coding guidelines. Still testing....
  3. I am new to IG API so I may be making an elementary mistake. I want to use the IG API interface into a Node-js application. I have tested my login and api key with the Streaming Companion and the API Companion and they work fine. I have downloaded the Schopenhauer wrapper from GitHub and am trying out the example code given on the GitHub page, which is: I tried the code verbatim with my login details and API key but this threw the error "await is invalid outside an async function", so I wrapped that code into a function declared as async with a call to the function like this: Now it seems to run but throws this error: So now I am unable to move forward. Any ideas would be much appreciated.
×