Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fxcm

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fxcm

A client to programmatically trade with FXCM REST API

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 02 Apr 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc