Skip to main content

MoscowExchange ISS Queries implementation

Project description

MOEX

Version License Python Status Format Wheel Build Coverage Downloads


MOEX

A little bit complex and more powerful implementation for ISS Queries. See more in documentation

INSTALL

pip install moex

USAGE

import asyncio
import aiohttp
from moex import AIOMoex


async def main(aio_moex, engine="stock", market="shares", board="TQBR"):
    async with aiohttp.ClientSession() as session:
        await aio_moex.load(session=session, output_format=".json")

        # aio_moex.show_templates()

        for tmpl in aio_moex.find_template("/candles"):
            print(f"Template: {tmpl.id}. Path: {tmpl.path}")
            await aio_moex.show_template_doc(session, tmpl.id)

        df_sngsp = (
            await aio_moex.execute(
                session=session,
                url=aio_moex.render_url(
                    46,
                    engine=engine,
                    market=market,
                    security="SNGSP",
                    board=board
                    ),
                **{
                    "from": "2022-02-24",
                    "till": "2022-10-24",
                    "interval": "60"
                    }
                )
            ).to_df()
        df_yndx = (
            await aio_moex.execute(
                session=session,
                url=aio_moex.render_url(
                    155,
                    engine=engine,
                    market=market,
                    security="YNDX"
                    ),
                till="2022-01-01"
                )
            ).to_df()

        for df in (df_sngsp, df_yndx):
            print(df)     


aio_moex = AIOMoex()
loop = asyncio.get_event_loop()
loop.run_until_complete(main(aio_moex))

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moex-0.0.1.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

moex-0.0.1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file moex-0.0.1.tar.gz.

File metadata

  • Download URL: moex-0.0.1.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for moex-0.0.1.tar.gz
Algorithm Hash digest
SHA256 60cc3f9254d5f4cc536f8ebf7f086f065136b95070523f360233c8f933ef698e
MD5 b858e8b893103860c73968e9ebce45c9
BLAKE2b-256 00e3b5b480852ddf76516377629460a8d823fd37218ca6236012eed3289822c5

See more details on using hashes here.

File details

Details for the file moex-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: moex-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for moex-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2392c43b3b851ab07e55fba8d0b6ccd3f66892c38d4361b075157cc12a6b51ab
MD5 3a326d0837cdf56e71fb59d9ea097dbc
BLAKE2b-256 35e79c831c93d016acc1a126e9ff10254405dd721eba518bbdd2d9809560d9d7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page