This guide demonstrates the basic usage of the Uganda Securities Exchange API library, showing you how to instantiate the class and make simple method calls.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jessebyarugaba/Unofficial-Uganda-Securities-Exhange-API/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Create an instance
Instantiate the PortfolioManager class:
The constructor doesn’t require any parameters. The library will handle all API connections automatically.
Complete example
Here’s a complete working example that demonstrates basic instantiation and usage:Expected output
ThegetAllPortfolioCompanies() method returns JSON data with all listed companies on the Uganda Securities Exchange:
Available methods
The PortfolioManager class provides four main methods:| Method | Description |
|---|---|
getAllPortfolioCompanies() | Returns all companies listed on the exchange |
getCompanyDetails($companyName) | Returns detailed information about a specific company |
getPortfolioCompanyData($companyName) | Returns historical market data for a company |
getExchangeRateDetails() | Returns current UGX exchange rate information |
Next steps
Company lookup
Learn how to retrieve detailed information about specific companies
Market data
Explore how to work with historical market data and exchange rates