Dev Center

GSE-API: Ghana Stock Exchange API

Twitter · Facebook
Free platform to query live GSE trading information fromFree platform to query live GSE trading information from

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

PropertyTypeNullable?Description
capitalfloatYesMarket capitalization (in GHS)
companyobjectNoIssuing company (instance of company)
dpsfloatYesLast reported dividend per share
epsfloatYesLast reported earnings per share
namestringNoTicker symbol
pricefloatNoCurrent share price
sharesintegerYesTotal number of shares in issue

Equity_Live object

PropertyTypeNullable?Description
changefloatNoCurrent price change
namestringNoTicker symbol
pricefloatNoCurrent share price
volumeintegerNoCurrent number of traded shares

Company object

PropertyTypeNullable?Description
addressstringYesRegistered address of company
directorsarrayNoBoard of directors (array of director instances)
emailstringYesEmail address
facsimilestringYesFacsimile number
industrystringYesICB/GICS industry classification
namestringNoName of company
sectorstringYesICB/GICS sector classification
telephonestringYesTelephone number
websitestringYesWebsite address

Director object

PropertyTypeNullable?Description
namestringNoFull name of director
positionstringYesJob title

Comments

  1. Nikolay NikolvichNikolay Nikolvich
    Aug 4, 2023 05:52 GMT

    Hello
    How are you doing?
    Could you help me to get historical price data of GSE stocks?
    Hope to hear from you soon.
    Thanks and Regards.

  2. MantseMantse
    Mar 21, 2023 08:56 GMT

    Hi I am trying to use the GSE web for a data analysis and live connection. I will be glad if you can help me with API that is handling the daily shares and ETFs.

    Or an API URL that will connect to GSE and give me reports under this URL
    gse.com.gh/trading-and-data/

  3. KwasiKwasi
    Aug 2, 2022 22:45 GMT

    Hi Michael,

    First of all great job on this really awesome initiative. I have been able to build a full web app for the GSE based on your api. In recent times though, I am getting a 429 requests error code when I try to call data via the api : dev.kwayisi.org/...ies/{share_code}
    Is this an issue you are aware of? Is there a scheduled fix on the horizon?
    I would love to hear from you.

    Thanks Kwasi

    1. Michael KwayisiMichael Kwayisi
      Aug 3, 2022 20:19 GMT

      It should work again for now. The problem was, there are abusers who make way too many requests (as many as 600 requests per second) over a distributed infrastructure. So I installed a software that fingerprints incoming requests to block the bad actors. This was over a year ago. If you started getting 429 recently, it means either you are making too many requests (more than 60 per second) or you got lumped with those who do.

  4. JesfredJesfred
    Aug 1, 2022 17:43 GMT

    Hi Michael,

    Is there an API for Ghana secondary bond market?

    Thank you.

    1. Michael KwayisiMichael Kwayisi
      Aug 3, 2022 20:25 GMT

      Yes, there is; but not here on this site.

  5. Kwame AmoakoKwame Amoako
    Aug 19, 2021 12:27 GMT

    Hi Kwayisi,

    Are these api data from publicly available data? If yes, how can I go about make other CRUD requests to GSE data for a fintech I'm working on.

    I believe I'll need a dealer's license, however I want to know if there's a sandbox hosted by GSE for such efforts.

    Any feedback will be greatly appreciated.

    Thanks.

    1. Michael KwayisiMichael Kwayisi
      Aug 19, 2021 19:09 GMT

      I'm not aware of any publicly available API for the GSE at all (well, apart from this one); but there are data vendors who offer it as part of their packages.

  6. EmmanuelEmmanuel
    May 30, 2020 11:10 GMT

    Good day Mike, I'm working on a project which requires realtime updates of treasury rates in Ghana. Wanted to know if you have knowledge on how to fetch such info

    1. Michael KwayisiMichael Kwayisi
      May 31, 2020 20:08 GMT

      Realtime? Try Bloomberg or BoG itself. However, since the tender takes place on a weekly basis, unless you anticipate a mission critical scenario where any delay in seconds matter, I don't see why you need it in realtime.

  7. DavidDavid
    Apr 4, 2020 03:12 GMT

    Hi Kevin, first of all thanks a lot for all your efforts in making this data available to the general public. I have tried a couple of your sample requests and would like to know if there is documentation outlining usage, all request objects, etc. Please email me if this or anything related is available. For instance I would like to know if there is a way to make historical requests and a list of all possible fields that are available in this regard.

    Thanks,
    David

  8. Prince Obeng OparePrince Obeng Opare
    Jan 15, 2020 11:42 GMT

    1.
    hello ,, please how do i incorporate GSE API onto a financial website..
    2. what are the charges involved

    1. Michael KwayisiMichael Kwayisi
      Jan 15, 2020 11:58 GMT

      There are no charges involved; it's free.

  9. NanaNana
    Jul 6, 2018 10:33 GMT

    Hi, may i know how quickly the feed is updated?

    1. Michael KwayisiMichael Kwayisi
      Jul 6, 2018 12:41 GMT

      It's updated in real time but on best-effort basis.

  10. KevinKevin
    Nov 14, 2017 19:17 GMT

    Mr Kwayisi,


    I have a few questions, could you email me? I would like to schedule a meeting.

    Best,
    Koku

    1. Michael KwayisiMichael Kwayisi
      Nov 15, 2017 07:19 GMT

      Hi Kevin. I've emailed you.

NOTE: You are replying to 's comment. [Cancel]