tflanagan / node-e-trade Goto Github PK
View Code? Open in Web Editor NEWA promise, JSON-based library for interacting with the E-Trade API
License: Other
A promise, JSON-based library for interacting with the E-Trade API
License: Other
First off, awesome library, has been immensely helpful, thank you!
To get specific lots, it looks like etrade provides them, accessible through returned URLs in the responses:
E.g.
{ lotsDetails: 'https://api.etrade.com/v1/accounts/<some id>/portfolio/<some id>.json' }
What would be the easiest way to sign this URL and execute it using this library?
And/or know of getting the lots for specific executed orders an easier way? I've been through the order, instrument and transaction details, but never found any info on lots.
Thanks!
Hello, the current axios version suffers "high" vulnerability IN1-JS-AXIOS-6144788 (flagged by AWS inspector), details here.
Can we upgrade axios to the latest version? The vulnerability is resolved in 1.6.4 and beyond.
TSError: ⨯ Unable to compile TypeScript:
etradeApiTest.ts(152,9): error TS2740: Type 'CancelOrderResponse' is missing the following properties from type 'Account[]': length, pop, push, concat, and 28 more.
at createTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:843:12)
at reportTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:847:19)
at getOutput (/usr/local/lib/node_modules/ts-node/src/index.ts:1057:36)
at Object.compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1411:41)
at transformSource (/usr/local/lib/node_modules/ts-node/src/esm.ts:400:37)
at /usr/local/lib/node_modules/ts-node/src/esm.ts:278:53
at async addShortCircuitFlag (/usr/local/lib/node_modules/ts-node/src/esm.ts:409:15)
at async nextLoad (node:internal/modules/esm/loader:163:22)
at async ESMLoader.load (node:internal/modules/esm/loader:602:20)
at async ESMLoader.moduleProvider (node:internal/modules/esm/loader:458:11) {
diagnosticCodes: [ 2740 ]
}
this works:
let results = await eTrade.listAccounts();
console.log(results[2]);
// console.log(results[2].accountIdKey);
const _accountIdKey = results[2].accountIdKey
The E*Trade API returns ""
when there is an empty portfolio. A quick fix for this would be to change the return statement to return an empty {} when the API returns.
https://github.com/tflanagan/node-e-trade/blob/master/src/e-trade-api.ts#L653
I run an async function that calls this command, so the fact that the error isn't propagating up is challenging to work with.
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.