Async Client Guide#
AsyncNSEClient provides an asynchronous interface for downloading filing documents and taxonomy files directly from exchange portals.
Basic Usage#
import asyncio
from nse_xbrl_parser import AsyncNSEClient
async def main():
async with AsyncNSEClient() as client:
# Download and parse an XBRL file directly from a URL
url = "https://nsearchives.nseindia.com/corporate/xbrl/sample_filing.xml"
try:
instance = await client.parse_url(url)
print("Parsed:", instance.get_fact_value("NameOfTheCompany"))
except Exception as e:
print("Download or parse error:", e)
asyncio.run(main())