GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - dvigal/moex: Unofficial ISS MOEX API on Python

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
moex
moex
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
README.md
README.md
 
 
__main__.py
__main__.py
 
 
setup.py
setup.py
 
 

Repository files navigation

PyMOEX

Unofficial ISS MOEX API on Python

Installation

Run the following to instal PyMOEX

git clone https://github.com/dvigal/moex.git
pip install .

Dependencies

PyMOEX API runs on Python 3. You'll also need pip.

PyMOEX depends on the following Python packages:

Pandas A powerful data analysis / manipulation library for Python.

Usage examples

from moex import MOEX
moex = MOEX()
data = moex.history_engines_stock_totals_securities(date_start='2018-01-01', date_end='2018-08-16', secid=['SBER'])
data[["SYSTIME", "SECID", "OPEN", "CLOSE", "LOW", "HIGH", "VOLUME"]]

output

sber = data
sber = sber.set_index(DatetimeIndex(sber['DATE']))
sber["VOLUME"] = sber["VOLUME"].apply(float) / 1000000
sber["CLOSE"] = sber["CLOSE"].apply(float)
sber["OPEN"] = sber["OPEN"].apply(float)
sber["LOW"] = sber["LOW"].apply(float)
sber_weekly = sber[["DATE", "CLOSE", "OPEN", "HIGH", "LOW", "VOLUME"]].groupby(Grouper(freq='W', level=0)).agg({"CLOSE" : "max", "OPEN" : "min", "HIGH" : "first", "LOW" : "first", "VOLUME" : "mean"})
sber_weekly["CLOSE"].apply(float).plot(figsize=(16,4), title="Weekly", grid=True, legend=True)
sber_weekly["OPEN"].apply(float).plot(figsize=(16,4), title="Weekly", grid=True, legend=True)
sber_weekly["HIGH"].apply(float).plot(figsize=(16,4), title="Weekly", grid=True, legend=True)
sber_weekly["LOW"].apply(float).plot(figsize=(16,4), title="Weekly", grid=True, legend=True)
sber_weekly["VOLUME"].apply(float).plot(figsize=(16,4), title="Weekly", grid=True, legend=True)

output

About

Unofficial ISS MOEX API on Python

Topics

financemoexpython

Resources

Readme
GPL-3.0 license
Activity

Stars

30 stars

Watchers

3 watching

Forks

13 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.