GSE-API: Ghana Stock Exchange API
The Ghana Stock Exchange API (GSE-API) is a web-based application programming interface aimed at providing real-time Ghana Stock Exchange market data for websites and other computer applications. The API is designed for individual developers who wish to integrate and use the Ghana Stock Exchange market data inside their own custom-developed applications. The API's stock data coverage includes daily end-of-day prices for all current symbols on the Ghana Stock Exchange, share dividends, earnings per share, shares outstanding, market capitalization, company profile, and more. All of this data is available via a uniform, easy-to-use API platform.
GSE-API is fast, reliable, and very secure. It can be used to implement a live stream of market data on a website, build a stock monitoring mobile app, or a daily end-of-day market summary service via SMS. All requested data are delivered to the API client via redundant, load-balanced servers in order to answer requests as quickly as possible. Additionally, to save bandwidth for API requests, all responses are efficiently compressed and sent to the client without sacrificing performance or introducing unwarranted network latency. Finally, use of GSE-API is completely free and unencumbered for everyone; no registration is required—and so it will ever remain.
The GSE-API's request endpoint is this page, https://dev.kwayisi.org/apis/gse
. Currently, the response data is available only in JSON and JSONP formats. However, support for XML and other data formats is being considered. When launching a request, you may append a prettify
query string parameter to the URL to get the response in a human readable layout. (For example, https://dev.kwayisi.org/apis/gse/live?prettify
.) Below are the available API resources:
GET /live
This API resource returns an array of equity_live objects, representing the real-time trading data for each symbol listed on the Ghana Stock Exchange.
Example request:
https://dev.kwayisi.org/apis/gse/live
Example response:
[
{
"change": 1.59,
"name": "ABC",
"price": 10.52,
"volume": 230
},
{
"change": -0.05,
"name": "DEF",
"price": 1.06,
"volume": 1040
},
{
"change": 0.01,
"name": "GHI",
"price": 37.17,
"volume": 542
}
]
GET /live/{symbol}
This API resource returns an equity_live object, representing the real-time trading data for {symbol} on the Ghana Stock Exchange. If the specified ticker symbol is not found, an HTTP 404 status response is triggered.
Example request:
https://dev.kwayisi.org/apis/gse/live/abc
Example response:
{
"change": 1.59,
"name": "ABC",
"price": 10.52,
"volume": 230
}
GET /equities
This API resource returns an array of equity_live objects without the "change" and "volume" properties, representing a summary of each equity listed on the Ghana Stock Exchange. The value of the "price" property is indicative of the share price as at close of the last trading activity.
Example request:
https://dev.kwayisi.org/apis/gse/equities
Example response:
[
{
"name": "ABC",
"price": 10.52
},
{
"name": "DEF",
"price": 1.06
},
{
"name": "GHI",
"price": 37.17
}
]
GET /equities/{symbol}
This API resource returns an equity object, representing in-depth market and company data for {symbol} on the Ghana Stock Exchange. If the specified ticker symbol is not found, an HTTP 404 status response is triggered.
Example request:
https://dev.kwayisi.org/apis/gse/equities/abc
Example response:
{
"capital": 383980,
"company": {
"address": "P. O. Box 123, Accra",
"directors": [
{
"name": "Kofi Abanga",
"position": "Chairman"
},
{
"name": "Ama Nantwie",
"position": null
}
],
"email": "abc@example.com",
"facsimile": "+233 (302) 123 456",
"industry": "Mining",
"name": "ABC Company Ltd.",
"sector": "Basic Materials",
"telephone": "+233 (302) 123 789",
"website": "www.example.com"
},
"dps": 0.07,
"eps": 0.14,
"name": "ABC",
"price": 10.52,
"shares": 36500
}
Equity object
Property | Type | Nullable? | Description |
---|---|---|---|
capital | float | Yes | Market capitalization (in GHS) |
company | object | No | Issuing company (instance of company) |
dps | float | Yes | Last reported dividend per share |
eps | float | Yes | Last reported earnings per share |
name | string | No | Ticker symbol |
price | float | No | Current share price |
shares | integer | Yes | Total number of shares in issue |
Equity_Live object
Property | Type | Nullable? | Description |
---|---|---|---|
change | float | No | Current price change |
name | string | No | Ticker symbol |
price | float | No | Current share price |
volume | integer | No | Current number of traded shares |
Company object
Property | Type | Nullable? | Description |
---|---|---|---|
address | string | Yes | Registered address of company |
directors | array | No | Board of directors (array of director instances) |
string | Yes | Email address | |
facsimile | string | Yes | Facsimile number |
industry | string | Yes | ICB/GICS industry classification |
name | string | No | Name of company |
sector | string | Yes | ICB/GICS sector classification |
telephone | string | Yes | Telephone number |
website | string | Yes | Website address |
Director object
Property | Type | Nullable? | Description |
---|---|---|---|
name | string | No | Full name of director |
position | string | Yes | Job title |