Socket
Socket
Sign inDemoInstall

fxcm

Package Overview
Dependencies
27
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fxcm

A client to programmatically trade with FXCM REST API


Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

fxcm

Minimalist Node.js client for programmatically trading with FXCM REST API

Installation

npm install --save fxcm

Import

ES6 Import:

import FXCM from 'fxcm'

CommonJS:

const FXCM = require('fxcm')

Usage

const config = {
  token: "PASTE_YOUR_FXCM_TOKEN_HERE",
  isDemo: true
}

const fxcm = new FXCM(config)

// Get 30min historical candle data for USD/CAD. Max 50 data points (live/current candle is removed by default)
fxcm.historical({ pair: 'USD/CAD', timeframe = 'm30', datapoints = 50 })
  .then((data) => {
    console.log(JSON.stringify(data))
  })

// Get current market data for your subscribed symbols (subscription list can be edited at tradingstation.fxcm.com)
fxcm.markets()
  .then((data) => {
    console.log(JSON.stringify(data))
    fxcm.logout()
  })

Keywords

FAQs

Last updated on 02 Apr 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc