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.

INSTALL

pip install moex

USAGE

import asyncio
from moex import AsyncMoex, Moex

# ASYNC

async def main():

    client = AsyncMoex()

    async with client:

        # client.show_templates()

        template_id = 409
        for tmpl in client.find_template("/candles"):
            print(f"Template: {tmpl.id}. Path: {tmpl.path}")
            await client.show_template_doc(tmpl.id)
            template_id = tmpl.id    

        for stock in ("SNGSP", "YDEX"):
            url = client.render_url(template_id, engine="stock", market="shares", security=stock, board="TQBR")
            params = {"from": "2026-06-20", "till": "2026-06-26", "interval": "60"}
            result = await client.execute(url=url, **params)
            df = result.to_df()
            print(df)


try:
    loop = asyncio.get_event_loop()
except RuntimeError as e:
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)

loop.run_until_complete(main())


# SYNC

def main():

    client = Moex()

    with client:

        for stock in ("SNGSP", "YDEX"):
            url = client.render_url(409, engine="stock", market="shares", security=stock, board="TQBR")
            params = {"from": "2026-06-20", "till": "2026-06-26", "interval": "60"}
            result = client.execute(url=url, **params)
            df = result.to_df()
            print(df)


main()

Project details


Download files

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

Source Distribution

moex-2.0.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moex-2.0.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moex-2.0.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for moex-2.0.0.tar.gz
Algorithm Hash digest
SHA256 d72fe0bbc02ef32187055d04c8b360a07af2884f72767cb85b4505c6b942b739
MD5 74b39a5e0c923b1f7dd3ba5e470c3140
BLAKE2b-256 12c5e9645685d396c434a9b4edf8de544c698b6546dcc6e26bfd71d983c22813

See more details on using hashes here.

File details

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

File metadata

  • Download URL: moex-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for moex-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ed18497de25feb96096137e04b95b0bb7626afaa37dd9e80aa90e1ef977d4ca
MD5 da039c86b233ce83b9b6a95ee3e4c434
BLAKE2b-256 b8d51a4dbac1137d4a079a0df7591cad89dd002c1ae723d1eaa677b11d398bae

See more details on using hashes here.

Supported by

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