moex 0.0.1

Creator: bradpython12

Last updated:

Add to Cart

Description:

moex 0.0.1

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))

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.