escwdev / oanda-node-api Goto Github PK
View Code? Open in Web Editor NEWA NodeJS Promise based API wrapper for Oanda trading platform
A NodeJS Promise based API wrapper for Oanda trading platform
Hi there,
Thanks for all your work on this package! It's the best one out there by far.
As I was integrating the transactions end point, I think I found a bug.
In this endpoint: https://github.com/escwdev/oanda-node-api/blob/master/lib/endpoints/transactions.js
I think this line:
let url = this.accountURL +
/transactions/idrange + formatQuery(options)
Should be:
let url = this.accountURL +
/transactions/idrange + this.formatQuery(options)
as I get an error that formatQuery is not defined otherwise. That said, once I correct that, I'm now getting this error. Any ideas?
(node:19345) UnhandledPromiseRejectionWarning: Error: Request failed with status code 400
at createError (/Users/ep/Documents/ft/Node/Vertical/node_modules/oanda-node-api/node_modules/axios/lib/core/createError.js:16:15)
at settle (/Users/ep/Documents/ft/Node/Vertical/node_modules/oanda-node-api/node_modules/axios/lib/core/settle.js:18:12)
at IncomingMessage.handleStreamEnd (/Users/ep/Documents/Forextrader/Node/Vertical/node_modules/oanda-node-api/node_modules/axios/lib/adapters/http.js:191:11)
at IncomingMessage.emit (events.js:228:7)
at endReadableNT (_stream_readable.js:1185:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
(node:19345) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:19345) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Is the NPM package behind? Theres some changes in the last commit that Im not seeing.
Should I just download the actual repo instead?
Hi,
I was able to connect with real account but can't connect with practice one.
Is this config correct?
const config = {
env: 'https://api-fxpractice.oanda.com/v3/accounts/',
auth: 'Bearer xxxxxxxx',
accountID: xxx-xxx-1234567-xxx,
dateFormat: 'UNIX' // or 'RFC3339'
}
Cause it gives me this error:
{ errorMessage: 'Insufficient authorization to perform request.' }
Hi @escwdev
is it just me or is the npmjs version a bit older then the code here?
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.