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.
Method signature
public function getCompanyDetails ( $companyName )
Retrieves comprehensive details about a specific company, including contact information, market capitalization, and listing information.
Parameters
The ticker symbol of the company (e.g., “BOBU”, “DFCU”)
Return value
Returns a JSON-encoded string containing detailed company information.
The ticker symbol of the company
URL to the company’s logo image
International Securities Identification Number (ISIN) of the company
Date when the company was listed on the exchange
Total number of shares issued by the company
Market capitalization of the company
Physical address of the company
Response example
{
"companyName" : "BOBU" ,
"logoURL" : "https://www.use.or.ug/sites/default/files/logo.png" ,
"isin" : "UG0001000123" ,
"listingDate" : "January 15, 2020" ,
"sharesIssued" : "1,000,000,000" ,
"marketCap" : "UGX 1,250,000,000,000" ,
"address" : "1234 Kampala Road, Kampala, Uganda" ,
"phone" : "+256 123 456 789" ,
"email" : "info@example.com" ,
"website" : "https://www.example.com"
}
Usage example
Basic usage
Parse and use data
Multiple companies
<? php
$portfolioManager = new PortfolioManager ();
// Get details for Bank of Baroda Uganda
$companyDetails = $portfolioManager -> getCompanyDetails ( 'BOBU' );
// Output the JSON result
echo $companyDetails ;
?>
How it works
Build company URL
Constructs the URL using the format https://www.use.or.ug/listed/{companyName}
Scrape company page
Loads and parses the HTML content from the company’s profile page
Extract details
Uses CSS selectors to extract specific company information from various div elements
Format response
Compiles all extracted data into an associative array and converts it to JSON
Return JSON
Returns the JSON-encoded company details with memory cleanup
Notes
The company name parameter should be the ticker symbol, not the full company name
Data is scraped in real-time from the USE website
Memory is explicitly cleared after parsing to optimize performance
The method relies on specific HTML structure and CSS classes from the USE website