README
TrueFX
The TrueFX API client for Node.js. For more information, please see the TrueFX.
Installation
npm install truefx
Usage
TrueFX provides a price feed of these ten pairs by default,
EUR/USD, USD/JPY, GBP/USD, EUR/GBP, USD/CHF, EUR/JPY, EUR/CHF, USD/CAD, AUD/USD, GBP/JPY
- get all:
truefx.get()
- get by the specific symbol:
truefx.get('EUR/USD')
ortruefx.get('eurusd')
- get more, separated by comma:
truefx.get('EUR/USD,USD/JPY')
ortruefx.get('eurusd,usdjpy')
const truefx = require('truefx')
truefx.get('eurusd').then((response) => {
console.log(response)
})
Results
[ { symbol: 'EUR/USD',
timestamp: '1507217077873',
bid: 1.17097,
offer: 1.17099,
low: 1.1705,
high: 1.1779,
open: 1.17615,
spread: 0.2 } ]
Authorized session can access to more minor pairs. Register.
AUD/CAD, AUD/CHF, AUD/JPY, AUD/NZD, CAD/CHF, CAD/JPY, CHF/JPY, EUR/AUD, EUR/CAD, EUR/NOK, EUR/NZD, GBP/CAD, GBP/CHF, NZD/JPY, NZD/USD, USD/NOK, USD/SEK
const truefx = require('truefx')
const session = truefx.authenticate('username', 'password')
truefx.get('audjpy', session).then((response) => {
console.log(response)
})
- Fork it ( https://github.com/tonkla/truefx.js/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- tonkla Surakarn Samkaew - creator, maintainer