Skip to main content

gcapi-python

Python package for Gain Capital API used for trading on Forex.com

PyPI version

Table of Contents

Getting Started

Installation

pip install gcapi-python

Usage

After installing, import into your project

from gcapi import GCapiClient

Initialize with Forex.com credentials and app key.

api = GCapiClient(username='usr', password='***', appkey='***', proxies=None)

Endpoints

Account Information

api.get_account_info(get=None)

Margin Information

api.get_margin_info(get=None)

Market Information

api.get_market_info(market_name,get=None)

Pricing

api.get_prices(market_id=None, num_ticks=None, from_ts=None, to_ts=None, price_type=None)
api.get_ohlc(market_id=None, num_ticks=None, interval="HOUR", span=1, from_ts=None, to_ts=None)

Trading

api.trade_order(quantity, offer_price, direction, trading_acc_id=None, market_id=None, market_name=None, stop_loss=None, 
                take_profit=None, trigger_price=None)

List Open Positions

api.list_open_positions(trading_acc_id=None)

Examples

Click here to see examples

Contact

Please contact Kyu Mok (Ricky) Kim if you have any questions, suggestions, or feedback.

Website: rickykim.net

Metadata

Release files for gcapi-python 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gcapi-python 0.0.9
File Size Uploaded Provenance
gcapi-python-0.0.9.tar.gz 12.9 kB Without provenance Details

Release files / gcapi-python-0.0.9.tar.gz

Download URL gcapi-python-0.0.9.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0ce03b22da097b1d7a354a56b736b08df4d55d86b0536156eefc894eb53b9154
BLAKE2b-256 checksum
How to use checksums
bad5f1b30cc83b5328082cc6aa7c922d249036353ca195f32f329301c1451e58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

Security for gcapi-python 0.0.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page