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

moex_iss_client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moex_iss_client

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Moscow Exchange ISS Client

This Ruby gem provides a convinient way to get non-real-time securities history from MOEX ISS without authentication.

NOT USED for real-time updating of securities quotes and for algorithmic trading.

  • Getting started
  • Usage
  • Changelog

Getting started

To install gem, add this line to your application's Gemfile:

gem 'moex_iss_client'

Then install as follows:

$ bundle install

Or install it directly using gem:

$ gem install moex_iss_client

Usage

Create an instance of MoexIssClient::Client:

client = MoexIssClient::Client.new

To get security history from ISS, call #history on client and provide security ID:

history = client.history('MOEX')

Method #history provides some options for ISS request:

:market # default value: 'shares'

# To search for security history in shares market (could be omitted)
history = client.history('MOEX', market: 'shares')

# To search for security history in bonds market
history = client.history('SU24021RMFS6', market: 'bonds')
:from # default value: 6 days ago, format: 'YYYY-MM-DD'

history = client.history('MOEX', from: '2023-03-01')
:till # default value: today, format: 'YYYY-MM-DD'

history = client.history('MOEX', till: '2023-03-15')

As we get security history, we should provide it to MoexIssClient::Security instance:

security = MoexIssClient::Security.new(history)

Now we can execute some usefull information from history:

# Get last close price

security.last_price #> "112.89"

# Get shortname

security.shortname #> "МосБиржа"

# Get security ID

security.sec_id #> "MOEX"

# Get any existing attribute from data sample

security.attribute('tradedate') #> "2023-03-17"

FAQs

Package last updated on 19 Mar 2023

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