Socket
Socket
Sign inDemoInstall

ig-trading-api

Package Overview
Dependencies
12
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ig-trading-api

IG Trading API for Node.js, written in TypeScript.


Version published
Maintainers
1
Created

Changelog

Source

0.5.0 (2021-02-03)

Chores
  • deps-dev:
    • bump @typescript-eslint/parser from 4.14.0 to 4.14.1 (#62) (ee1fb5a3)
    • bump typedoc from 0.20.18 to 0.20.20 (#65) (8e57c68f)
    • bump eslint from 7.18.0 to 7.19.0 (#61) (fd5e7425)
    • bump @typescript-eslint/eslint-plugin (#63) (dc187d28)
    • bump nock from 13.0.6 to 13.0.7 (#64) (9ee6df6a)
    • bump typedoc-plugin-markdown from 3.4.3 to 3.4.5 (#66) (2fe0a2f9)
New Features
Refactors
Tests
  • Add 100% code coverage for Lightstreamer API (a72c87aa)

Readme

Source

IG Trading API

Language Details Code Coverage License Package Version Dependency Updates

Unofficial IG Trading API for Node.js, written in TypeScript and covered by tests.

Features

  • Typed. Source code is 100% TypeScript. No need to install external typings.
  • Tested. Code coverage is 100%. No surprises when using ig-trading-api.
  • Maintained. Automated security updates. No threats from outdated dependencies.
  • Documented. Get started with the generated documentation.

Installation

npm

npm install ig-trading-api

Yarn

yarn add ig-trading-api

Setup

You can set the API gateway, when initializing the API client. Use APIClient.URL_DEMO (demo-api.ig.com) for demo accounts and APIClient.URL_LIVE (api.ig.com) for live account access.

JavaScript / Node.js

const {APIClient} = require('ig-trading-api');
const client = new APIClient(APIClient.URL_LIVE, 'your-api-key');

TypeScript

import {APIClient} from 'ig-trading-api';
const client = new APIClient(APIClient.URL_LIVE, 'your-api-key');

Usage

Login

const session = await client.rest.login.createSession('your-username', 'your-password');
console.info(`Your client ID is "${session.clientId}".`);

Documentation

IG instrument identifier (epic)

Breakdown for "IX.D.DOW.DAILY.IP":

SymbolDescriptionExample
IXHours of trading"Index Out of Hours"
DTradability"D" when tradeable
DOWUnderlying market"Dow Jones"
DAILYIndicator for processing method"Daily" funded bet
IPAsset type"Intellectual Property"

Development Setup

You can get up and running in just a few simple steps:

  1. Run yarn (to install or update third-party dependencies)
  2. Have a lock at the .env.defaults file and make a copy (including your own credentials) with the name .env in the root directory of this repository (read more about dotenv files)
  3. Run yarn demo:login to test your credentials

Maintainers

Benny Neugebauer on Stack Exchange

Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

License

This project is MIT licensed.

⭐️ Show your support ⭐️

Please leave a star if you find this project useful.

Keywords

FAQs

Last updated on 03 Feb 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