Skip to main content

A Python Wrapper Class for the RESTful API as provided by FXCM Forex Capital Markets Ltd.

Project description

FXCM provides a RESTful API to interact with its trading platform. Among others, it allows the retrieval of historical data as well as of streaming data. In addition, it allows to place different types of orders and to read out account information. The overall goal is to allow the implementation automated, algortithmic trading programs. is a Python wrapper package for that API.

# To get started with the the API and the package, a demo account with FXCM is sufficient. You can open such an account under

# Installation happens via pip install on the command line.

pip install fxcmpy

# To connect to the API, you need an API token that you can create or revoke from within your (demo) account in the Trading Station

In an interactive context, you can use e.g. a variable called TOKEN to reference your unique API token.


Connecting to the server, then boils down to the following line of code.

con = fxcmpy.fxcmpy(access_token=TOKEN, log_level=’error’, log_file=’log.txt’, server=’demo’)

The detailed documentation of the API is found under:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fxcmpy-1.3.2.tar.gz (61.2 kB view hashes)

Uploaded source

Built Distribution

fxcmpy-1.3.2-py3-none-any.whl (28.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page