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
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
history = client.history('MOEX', market: 'shares')
history = client.history('SU24021RMFS6', market: 'bonds')
:from
history = client.history('MOEX', from: '2023-03-01')
:till
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:
security.last_price
security.shortname
security.sec_id
security.attribute('tradedate')