1.3.1 • Published 5 years ago

@terryx/oanda-rest v1.3.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Overview

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

Getting started

Requires NodeJS >= v10

$ 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 = {})

1.4.1

4 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

6 years ago

1.0.0

6 years ago