gfiocco / node-ig-api Goto Github PK
View Code? Open in Web Editor NEWThe first exhaustive Node.js IG REST Trading & Streaming API
License: MIT License
The first exhaustive Node.js IG REST Trading & Streaming API
License: MIT License
Is there a reason why we can't create MARKET orders?
Order creation failed: Error: type has to be LIMIT or STOP
Hi,
I got subscribeToLightstreamer() to work but I don't understand how this function returns datas.
Only things I can see it's a console.log() but I can't manipulate it.
ig.connectToLightstreamer();
const res = ig.subscribeToLightstreamer(subscriptionMode, items, fields, 0.5);
console.error('res', res) // undefined
Any idea ?
Thank you for your time !
[Error:
value required in setHeader("X-IG-API-KEY", value).]
Hi @gfiocco , many thanks for such a wonderful package. I say it is the only one that actually works. I need to change the output of Lightstreamer instead of getting a log to sending it to a port. I changed the subscribeToLightstreamer()
function in index.js as follows to get a json output
Do you have any suggestion how to modify it to listen to port rather than writing it in a file?
Hello,
I have this code :
ig.histPrc("CS.D.EURUSD.CFD.IP", "MINUTE", "2019-04-12T08:00:00", "2019-04-14T19:00:00")
.then(function(res, err){
if(!err){
fs.writeFileSync("data.json", JSON.stringify(res));
}
else {
console.log(err)
}
})
Even though I have the correct date format (taken from the documentation), I can't get the data from the date range I'm looking for, I just get the 10 most recent data points.
How can I have the data for a specific date range?
Thanks in advance.
Hi @gfiocco,
Another problem I am facing is that when I use the line below:
ig.histPrc('CS.D.EURGBP.TODAY.IP', 'DAY', '2019-07-07T00:39:00', '2020-07-07T00:40:00').then(r => console.log(util.inspect(r, false, null))).catch(e => console.log(e));
I only get 10 time points rather than for the requested period. I don't think limitation is the problem because when I use IG companion I can get the data but when I run it from NodeJS it only gives 10 data points.
Hi @gfiocco ,
I am facing a problem that I did not have it before. I have followed step by step on how to input my security detail and log in. And I have logged successfully before but today when I tried to log in it came with the error below:
errorCode: 'error.security.client-token-missing'
Any suggestion what might have gone wrong?
Many thanks
I am trying to log in but it does not recognise my credentials, below is the message I receive:
I am not sure, for the key I use the key provided by IG, for identifier I tried both my live account id and an id that I specifically set for my demo account. Similarly I tried both passwords and still I am not able to connect.
Hello,
I don't know if this is an issue with your app, an error with the rest API or my mistake, but I have this error :
Subscription failure: 21 message: Invalid group
My code is :
var list_epics = '{"CS.D.EURUSD.CFD.IP","CS.D.USDJPY.CFD.IP","IX.D.DAX.IFMM.IP"}'
var resp = ig.subscribeToLightstreamer("MERGE", list_epics, ["BID","OFFER"], 100)
What is the issue?
Thanks in advance for the help.
Hi,
What the point to get a token expiration after 12h ?
Thanks for any informations !
Cheers
The lib node-ig-api have the subscriber :
lsClient.subscribe(subscription);
Where is the unsubscribe ?
Thank you ! ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.