<commit_before># Ruby IG Markets Dealing Platform Gem

[![Build Status][travis-ci-badge]][travis-ci-link] [![Test Coverage][test-coverage-badge]][test-coverage-link] [![Code Climate][code-climate-badge]][code-climate-link] [![Dependencies][dependencies-badge]][dependencies-link] [![MIT License][license-badge]][license-link]

Easily access the IG Markets Dealing Platform from Ruby with this gem. Written against the official REST API
available [here](http://labs.ig.com/rest-trading-api-reference). Includes support for

* Accounts
* Activity history
* Transaction history
* Positions
* Sprint market positions
* Working orders
* Markets
* Market hierarchy
* Market searches
* Historical prices
* Watchlists
* Client sentiment

An IG Markets production or demo trading account is needed in order to use this gem.

[travis-ci-link]: http://travis-ci.org/rviney/ig_markets
[travis-ci-badge]: https://travis-ci.org/rviney/ig_markets.svg?branch=master
[test-coverage-link]: https://codeclimate.com/github/rviney/ig_markets/coverage
[test-coverage-badge]: https://codeclimate.com/github/rviney/ig_markets/badges/coverage.svg
[code-climate-link]: https://codeclimate.com/github/rviney/ig_markets
[code-climate-badge]: https://codeclimate.com/github/rviney/ig_markets/badges/gpa.svg
[dependencies-link]: https://gemnasium.com/rviney/ig_markets
[dependencies-badge]: https://gemnasium.com/rviney/ig_markets.svg
[license-link]: https://github.com/rviney/ig_markets/blob/master/LICENSE
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg

## License

Licensed under the MIT license. You must read and agree to its terms to use this software.

## Requirements

Ruby 2.0 or later.

## Installation

Add the following to your `Gemfile`

```ruby
gem 'ig_markets', git: 'https://github.com/rviney/ig_markets.git'
```
Then run

```
bundle install
```

## Usage

```ruby
ig = IGMarkets::DealingPlatform.new

# Sign in
ig.sign_in 'username', 'password', 'api_key', :demo

# Account
puts ig.accounts.inspect
puts ig.activities_in_date_range(Date.today.prev_month).inspect
puts ig.transactions_in_date_range(Date.today.prev_month).inspect

# Dealing
puts ig.positions.inspect
puts ig.sprint_market_positions.inspect
puts ig.working_orders.inspect

# Markets
puts ig.market_hierarchy.inspect
puts ig.market('UA.D.AAPL.CASH.IP').inspect
puts ig.market_search('APPL').inspect
puts ig.prices('CS.D.EURUSD.MINI.IP', :day, 10).inspect

# Watchlists
puts ig.watchlists.inspect

# Client sentiment
puts ig.client_sentiment('EURUSD').inspect
puts ig.client_sentiment_related('EURUSD').inspect

# General
puts ig.applications.inspect

# Sign out
ig.sign_out
```

## Documentation

API documentation is available [here](http://www.rubydoc.info/github/rviney/ig_markets).

## Contributors

Gem created by <NAME>. All contributions welcome.<commit_msg>Add branch to rubydoc.info link in README.md<commit_after># Ruby IG Markets Dealing Platform Gem

[![Build Status][travis-ci-badge]][travis-ci-link] [![Test Coverage][test-coverage-badge]][test-coverage-link] [![Code Climate][code-climate-badge]][code-climate-link] [![Dependencies][dependencies-badge]][dependencies-link] [![MIT License][license-badge]][license-link]

Easily access the IG Markets Dealing Platform from Ruby with this gem. Written against the official REST API
available [here](http://labs.ig.com/rest-trading-api-reference). Includes support for

* Accounts
* Activity history
* Transaction history
* Positions
* Sprint market positions
* Working orders
* Markets
* Market hierarchy
* Market searches
* Historical prices
* Watchlists
* Client sentiment

An IG Markets production or demo trading account is needed in order to use this gem.

[travis-ci-link]: http://travis-ci.org/rviney/ig_markets
[travis-ci-badge]: https://travis-ci.org/rviney/ig_markets.svg?branch=master
[test-coverage-link]: https://codeclimate.com/github/rviney/ig_markets/coverage
[test-coverage-badge]: https://codeclimate.com/github/rviney/ig_markets/badges/coverage.svg
[code-climate-link]: https://codeclimate.com/github/rviney/ig_markets
[code-climate-badge]: https://codeclimate.com/github/rviney/ig_markets/badges/gpa.svg
[dependencies-link]: https://gemnasium.com/rviney/ig_markets
[dependencies-badge]: https://gemnasium.com/rviney/ig_markets.svg
[license-link]: https://github.com/rviney/ig_markets/blob/master/LICENSE
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg

## License

Licensed under the MIT license. You must read and agree to its terms to use this software.

## Requirements

Ruby 2.0 or later.

## Installation

Add the following to your `Gemfile`

```ruby
gem 'ig_markets', git: 'https://github.com/rviney/ig_markets.git'
```
Then run

```
bundle install
```

## Usage

```ruby
ig = IGMarkets::DealingPlatform.new

# Sign in
ig.sign_in 'username', 'password', 'api_key', :demo

# Account
puts ig.accounts.inspect
puts ig.activities_in_date_range(Date.today.prev_month).inspect
puts ig.transactions_in_date_range(Date.today.prev_month).inspect

# Dealing
puts ig.positions.inspect
puts ig.sprint_market_positions.inspect
puts ig.working_orders.inspect

# Markets
puts ig.market_hierarchy.inspect
puts ig.market('UA.D.AAPL.CASH.IP').inspect
puts ig.market_search('APPL').inspect
puts ig.prices('CS.D.EURUSD.MINI.IP', :day, 10).inspect

# Watchlists
puts ig.watchlists.inspect

# Client sentiment
puts ig.client_sentiment('EURUSD').inspect
puts ig.client_sentiment_related('EURUSD').inspect

# General
puts ig.applications.inspect

# Sign out
ig.sign_out
```

## Documentation

API documentation is available [here](http://www.rubydoc.info/github/rviney/ig_markets/master).

## Contributors

Gem created by <NAME>. All contributions welcome.
{'fraction_non_alphanumeric': 0.13362521891418563, 'fraction_numerical': 0.0014010507880910684, 'mean_word_length': 5.489772727272728, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 20, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1287366', 'n_tokens_mistral': 2061, 'n_tokens_neox': 1963, 'n_words': 405}