Skip to main content

AfriMarkets

Documentation: Français | English | Yorùbá

AfriMarkets est un package Python open source qui fournit une interface simple pour les marchés financiers africains. Le projet est actuellement en alpha (0.1.0) et inclut la registry des marchés ainsi que le support initial de la BRVM.

Les connecteurs pour récupérer les tickers et les historiques de prix sont encore en développement.

Le projet veut rendre les marchés africains plus accessibles aux développeurs, chercheurs, fintechs et investisseurs. Il peut faciliter la création d'outils de suivi, d'analyse et de recherche adaptés aux réalités régionales.

Français

Installation

Python 3.12 ou une version plus récente est nécessaire.

git clone https://github.com/XGEOSOFT-CORPORATION/AfriMarkets-python.git
cd AfriMarkets-python
python -m venv .venv
source .venv/bin/activate  # Windows : .venv\Scripts\activate
python -m pip install -e .

Utilisation

from afrimarkets import BRVM

market = BRVM()
data = market.get_data(
	["BOAB"],
	start="2020-01-01",
	end="2026-01-31",
	structure="column",
)
print(data)

Lorsque la connexion Internet est stable, BRVM() récupère automatiquement les tickers du marché à l'initialisation. Pour les récupérer ou les actualiser à nouveau dans l'instance locale :

tickers = market.get_tickers()
print(market.tickers)

On peut aussi consulter les marchés disponibles :

from afrimarkets.markets import available_markets, get_market

print(available_markets())       # ['BRVM']
market = get_market("BRVM")
print(market.code)               # BRVM

Pour créer un actif :

from afrimarkets.assets import Share

share = Share(symbol="BOAB", name="Entreprise exemple")
print(share.info())

get_tickers() actualise les tickers chargés localement par l'instance. Une connexion stable est nécessaire pour récupérer les données en ligne. AfriMarkets ne fournit pas de conseil en investissement et ne garantit pas l'exactitude des données.

Les contributions sont les bienvenues pour ajouter des marchés, améliorer les connecteurs, renforcer les tests et développer les outils d'analyse. Chaque contribution aide à étendre la puissance et l'utilité du package en Afrique.

English

AfriMarkets is an open-source Python package providing a simple interface for African financial markets. It is currently alpha (0.1.0) and includes a market registry and initial BRVM support.

Ticker and historical-price connectors are still under development.

Installation

Python 3.12 or later is required.

git clone https://github.com/XGEOSOFT-CORPORATION/AfriMarkets-python.git
cd AfriMarkets-python
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
python -m pip install -e .

Usage

from afrimarkets import BRVM

market = BRVM()
data = market.get_data(
	["BOAB"],
	start="2020-01-01",
	end="2026-01-31",
	structure="column",
)
print(data)

With a stable Internet connection, BRVM() automatically retrieves the market tickers during initialization. To retrieve and refresh them again in the local instance:

tickers = market.get_tickers()
print(market.tickers)

Available markets can also be listed:

from afrimarkets.markets import available_markets, get_market

print(available_markets())       # ['BRVM']
market = get_market("BRVM")
print(market.code)               # BRVM

An asset can be created directly:

from afrimarkets.assets import Share

share = Share(symbol="BOAB", name="Example company")
print(share.info())

get_tickers() refreshes the tickers loaded locally by the instance. A stable connection is required to retrieve online data. AfriMarkets does not provide investment advice or guarantee data accuracy.

Contributors are welcome to add markets, improve connectors, strengthen tests and develop analysis tools. Every contribution helps expand the package's power and usefulness across Africa.

Yorùbá

AfriMarkets jẹ́ package Python open source tí ó ń pèsè ọ̀nà rọrùn fún lílo data ọjà ìṣúná Áfíríkà. Ó wà ní ipò alpha (0.1.0), ó sì ní market registry àti ìbẹ̀rẹ̀ support fún BRVM.

Àwọn connector fún tickers àti data ìtàn kò tíì parí.

Fifi sori ẹrọ

Python 3.12 tàbí tuntun ju bẹ́ẹ̀ lọ ni a nílò.

git clone https://github.com/XGEOSOFT-CORPORATION/AfriMarkets-python.git
cd AfriMarkets-python
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
python -m pip install -e .

Lílò

from afrimarkets import BRVM

market = BRVM()
data = market.get_data(
	["BOAB"],
	start="2020-01-01",
	end="2026-01-31",
	structure="column",
)
print(data)

Nígbà tí ìbáṣepọ̀ Internet bá dúró ṣinṣin, BRVM() máa ń gba àwọn ticker ọjà wọlé láìsí ìgbésẹ̀ míì nígbà ìbẹ̀rẹ̀. A lè tún gba wọn, kí a sì tún wọn ṣe nínú instance local, pẹ̀lú:

tickers = market.get_tickers()
print(market.tickers)

A tún lè wo àwọn ọjà tó wà:

from afrimarkets.markets import available_markets, get_market

print(available_markets())       # ['BRVM']
market = get_market("BRVM")
print(market.code)               # BRVM

Láti dá asset sílẹ̀:

from afrimarkets.assets import Share

share = Share(symbol="BOAB", name="Àpẹẹrẹ ilé-iṣẹ́")
print(share.info())

get_tickers() máa ń tún àwọn ticker tí instance náà kó sílẹ̀ ṣe. Internet tó duro ṣinṣin ṣe pàtàkì fún gbigba data online. AfriMarkets kì í ṣe ìmọ̀ràn fún investment, kò sì ṣe ìdánilójú pé data máa péye.

Àwọn contributor káàbọ̀ láti fi ọjà tuntun, connector, tests àti irinṣẹ́ ìtúpalẹ̀ kún un. Gbogbo contribution máa ń ran package náà lọ́wọ́ láti lágbára sí i àti láti wúlò fún Áfíríkà.

AfriMarkets est distribué sous licence MIT. Consultez le fichier LICENSE.

Metadata

Release files for afrimarkets 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for afrimarkets 0.1.0
File Size Uploaded Provenance Actions
afrimarkets-0.1.0.tar.gz 12.3 kB Without provenance Details for afrimarkets-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for afrimarkets 0.1.0
File Interpreter ABI Platform Actions
afrimarkets-0.1.0-py3-none-any.whl Python 3 none any Details for afrimarkets-0.1.0-py3-none-any.whl

Total release size: 25.0 kB

Release files / afrimarkets-0.1.0.tar.gz

Download URL afrimarkets-0.1.0.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bb8ff27fc0e0749c555797c07cd713dcdf5b537ffa4fd7418cd1e0701d2e82f5
BLAKE2b-256 checksum
How to use checksums
21a07e1e1e5153d1e883c1b8ce93576bb64ae88ecff156aee5ea40e1850e87dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / afrimarkets-0.1.0-py3-none-any.whl

Download URL afrimarkets-0.1.0-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ab8d3fff8722cb11ea0d1a5abd11aa69a1d26d19880dee73981f20d31e8a7ec
BLAKE2b-256 checksum
How to use checksums
98d466ce8e339bdce49192790ff9a1321b7f80c244f96a90fe98d06bf2ca75b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for afrimarkets 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page