Skip to main content

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

companyName
string
required
The ticker symbol of the company (e.g., “BOBU”, “DFCU”)

Return value

Returns a JSON-encoded string containing detailed company information.

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

<?php

$portfolioManager = new PortfolioManager();

// Get details for Bank of Baroda Uganda
$companyDetails = $portfolioManager->getCompanyDetails('BOBU');

// Output the JSON result
echo $companyDetails;

?>

How it works

1

Build company URL

Constructs the URL using the format https://www.use.or.ug/listed/{companyName}
2

Scrape company page

Loads and parses the HTML content from the company’s profile page
3

Extract details

Uses CSS selectors to extract specific company information from various div elements
4

Format response

Compiles all extracted data into an associative array and converts it to JSON
5

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