@terryx/oanda-rest

1.3.1 • Public • Published

Overview

Oanda Rest is a api wrapper for oanda rest-v20 with got serving as underlying HTTP requests library

Getting started

Requires NodeJS >= v4

$ npm install @terryx/oanda-rest

Usage

const OandaRest = require('@terryx/oanda-rest')
const api = OandaRest({
  accountID: 'OANDA_ACCOUNT_ID',
  endpoint: 'https://api-fxpractice.oanda.com',
  apiKey: 'API_KEY'
})

api.accounts().then(res => {
  // account details
  console.log(res.account)
})

API

api.accounts()

api.accountsSummary()

api.accountsInstruments()

api.createOrder(OrderRequest)

api.cancelOrder(OrderID)

api.instrumentsCandles = (InstrumentName, additionalParams = {})

api.instrumentsPrice = (additionalParams = {})

Readme

Keywords

Package Sidebar

Install

npm i @terryx/oanda-rest

Weekly Downloads

4

Version

1.3.1

License

MIT

Unpacked Size

68.3 kB

Total Files

16

Last publish

Collaborators

  • terryx