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.

Overview

The PortfolioManager class provides methods to interact with the Uganda Securities Exchange (USE) API. It enables you to retrieve market data, company information, stock prices, and exchange rates.

Class structure

class PortfolioManager
{
    public function __construct()
    public function getAllPortfolioCompanies()
    public function getCompanyDetails($companyName)
    public function getPortfolioCompanyData($companyName)
    public function getExchangeRateDetails()
}

Constructor

public function __construct()
Initializes a new instance of the PortfolioManager class. No parameters are required.

Example

$portfolioManager = new PortfolioManager();

Available methods

Get all companies

Retrieve all listed companies from the Uganda Securities Exchange

Get company details

Get detailed information about a specific company

Get company data

Retrieve historical stock price data for a company

Get exchange rate

Get current UGX exchange rate information

Quick example

<?php

include 'PortfolioManager.php';

// Initialize the manager
$portfolioManager = new PortfolioManager();

// Get all listed companies
$allCompanies = $portfolioManager->getAllPortfolioCompanies();
print_r($allCompanies);

// Get details for a specific company
$companyDetails = $portfolioManager->getCompanyDetails('BOBU');
print_r($companyDetails);

// Get historical data for a company
$companyData = $portfolioManager->getPortfolioCompanyData('BOBU');
print_r($companyData);

// Get exchange rate information
$exchangeRates = $portfolioManager->getExchangeRateDetails();
print_r($exchangeRates);

?>