Dev CenterΞ

GSE-API: Ghana Stock Exchange API

Twitter · Facebook
A free, reliable, and consistent API to query real-time trading information from the Ghana Stock Exchange. The platform provides in-depth market data and analysis, and authentic company information.Free 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 single, 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 quickly and in timely fashion. Additionally, to save bandwidth footprint 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

PropertyTypeNullableDescription
capitalfloatYesMarket capitalization (in GHS).
companyobjectNoIssuing company. (Instance of company.)
dpsfloatYesDividend per share.
epsfloatYesEarnings per share.
namestringNoTicker symbol.
pricefloatNoShare price.
sharesintegerYesTotal issued shares.

Equity_Live object

PropertyTypeNullableDescription
changefloatNoPrice change.
namestringNoTicker symbol.
pricefloatNoShare price.
volumeintegerNoVolume of shares traded.

Company object

PropertyTypeNullableDescription
addressstringYesPostal 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

PropertyTypeNullableDescription
namestringNoFull name.
positionstringYesJob title.

Comments (13)

  1. Ben AliBen Ali
    Mar 25, 2017 06:34 GMT

    I tried to request your api but couldn't. It says "XMLHttpRequest cannot load dev.kwayisi.org/... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access". Can you please help me out?

    1. Michael KwayisiMichael Kwayisi
      Mar 26, 2017 03:48 GMT

      Sorry, I had mistakenly turned off cross-origin requests; it should work now. However, you were having that issue because you were accessing the API from the client side (i.e., the browser) which is not ideal. It'll be better if you could request and cache the response on the backend and fetch the data from there instead so that just in case my API servers go down, your app would still work. Plus, it would take a bit of load off mine :)

    2. Ali BernardAli Bernard
      Apr 11, 2017 03:23 GMT

      Thanks very much. Its working now.

  2. Joe DjamasiJoe Djamasi
    Aug 28, 2014 05:02 GMT

    Great stuff. Keep up the good work. I consistently use this API to check on the prices of my shares. Absolutely much better than the other official sites.

    1. Michael KwayisiMichael Kwayisi
      Aug 28, 2014 08:44 GMT

      Thanks for your encouraging comment - albeit a bit flattering. I look forward to learning more about the IT niche you hope to create in Ghana. In the meantime, keep on 'bringing tranquility to stormy situations' and holding up all other things - "with a smile" :)

  3. Jon IngersollJon Ingersoll
    Nov 20, 2015 18:34 GMT

    Is it possible to get the GSE-CI Ghana Stock Exchange Composite Index via this feed? I haven't been able to figure out how to get that value to return.

    1. Michael KwayisiMichael Kwayisi
      Nov 20, 2015 20:28 GMT

      Although it's undocumented, you can get a snapshot of the current value of the GSE Composite Index by requesting for the API resource at /index.

  4. Brian PaintsilBrian Paintsil
    May 17, 2016 05:42 GMT

    Great job Michael. Your API has helped my team to build a simple stock app. Keep up the good.

    1. Michael KwayisiMichael Kwayisi
      May 17, 2016 11:42 GMT

      Cool to know you're building stuff with it. Keep up as well :)

  5. Frank OdoomFrank Odoom
    Jan 26, 2017 09:57 GMT

    Great work, i am working on an app i might use your api kindly inbox me your social contacts so we can be in touch i will definitely reference you if i do so.

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