GithubHelp home page GithubHelp logo

oanda-node-api's People

Contributors

brudi07 avatar dbvcode avatar dependabot[bot] avatar escwdev avatar jinzakkk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

oanda-node-api's Issues

Transactions endpoint bug?

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.

Insufficient authorization to perform request

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.' }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.