Skip to content

API for retrieving near real-time data and historical data for companies listed on PNGX.com.pg

License

Notifications You must be signed in to change notification settings

chrisaugu/pngx-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PNGX-API Logo

PNGX-API

The First Unofficial PNGX-API, Ever

PNGX Restful API. Formerly part of CrisBot, now a standalone API.

GitHub last commit GitHub repo size GitHub forks Github Repo stars GitHub watchers GitHub contributors

๐Ÿ“‹ Table of Contents


๐Ÿ“œ Description

API endpoint that exposes stock quotes from PNGX.com.pg.

Companies listed on PNGX

Symbol Company
BSP BSP Financial Group Limited
CCP Credit Corporation (PNG) Ltd
CGA PNG Air Limited
COY Coppermoly Limited
CPL CPL Group
KAM Kina Asset Management Limited
KSL Kina Securities Limited
NEM Newmont Corporation
NGP NGIP Agmark Limited
NIU Niuminco Group Limited
SST Steamships Trading Company Limited
STO Santos Limited

โœจFeatures

  • Historical data
  • Current listed stock info
  • Near-realtime updates
  • RESTful API format

๐Ÿ“ฑ Screenshots

---

๐Ÿ”— API Reference

v1.0.0

Base URLs:

GET 

Get ticker symbols

Update an existing pet by Id

GET /api

Request

    curl -i -H 'Accept: application/json' https://example.com/api

Params

Parameter Type Description

Response

    HTTP/1.1 200 OK
    Date: Sat, 02 Oct 2021 03:25:07 GMT
    Status: 200 OK
    Connection: close
    X-Powered-By: Express
    Content-Type: application/json
    Content-Length: 85

    {"symbols":["BSP","CCP","CGA","COY","CPL","KAM","KSL","NCM","NGP","NIU","OSH","S
    ST"]}

Get latest stocks data

Update an existing pet by Id

GET /api/stocks

Request

    curl -i -H 'Accept: application/json' https://example.com/api/stocks

Params

Parameter Type Description

Response

    HTTP/1.1 200 OK
    Date: Sat, 02 Oct 2021 03:25:07 GMT
    Status: 200 OK
    Connection: close
    X-Powered-By: Express
    Content-Type: application/json
    Content-Length: 85

    {"symbols":["BSP","CCP","CGA","COY","CPL","KAM","KSL","NCM","NGP","NIU","OSH","S
    ST"]}

Get a historical stock data

Update an existing pet by Id

GET /api/historicals/:symbol

Request

curl -i -H 'Accept: application/json' https://example.com/api/historicals/BSP

Params

Name Location Type Required Description
symbol param string yes ticker symbol of the prefered stock

Query Params

Name Location Type Required Description
date query date no none
start query date no none
end query date no none
field query array no none
start body integer no none

Response

    HTTP/1.1 200 OK
    Date: Sat, 02 Oct 2021 03:25:07 GMT
    Status: 200 OK
    Connection: close
    X-Powered-By: Express
    Content-Type: application/json
    Content-Length: 85
    
    {"symbol": "BSP", "historical": [{}]}

Get a non-existent Quote

Update an existing pet by Id

GET /api/historicals/:symbol

Request

curl -i -H 'Accept: application/json' https://example.com/api/historicals/HIL

Response

    HTTP/1.1 200 OK
    Date: Sat, 02 Oct 2021 03:25:07[^1] GMT
    Status: 200 OK
    Connection: close
    X-Powered-By: Express
    Content-Type: application/json
    Content-Length: 85

    {"status":404,"reason":"Not found"}

๐Ÿ› ๏ธ Tech & Tools

The entire application is written in JavaScript and run on NodeJS environment.

Dependencies

Nuku uses a number of open source projects to work properly:

  • [Moment.js] - Moment.js to manipulate date
  • [Date-fn] - to manipulate date
  • MongoDB - MongoDB to store stock info
  • [node-cron] - Node-cron to to schedule the tasks
  • markdown-it - Markdown parser done right. Fast and easy to extend.
  • Twitter Bootstrap - great UI boilerplate for modern web apps
  • node.js - evented I/O for the backend
  • Express - fast node.js network app framework @tjholowaychuk
  • Gulp - the streaming build system
  • Breakdance - HTML to Markdown converter
  • jQuery - duh
  • Express
  • CORS
  • BodyParser
  • Mongoose
  • MongoDB
  • NodeCron
  • Path
  • Request
  • fs

And of course PNGX-API itself is open source with a public repository on GitHub.

๐Ÿ‘ฉโ€๐Ÿ’ป Contributing

Want to contribute? Great!

PNGX-API uses Gulp for fast developing. Make a change in your file and instantaneously see your updates!

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contributing Guide

List of all contributors

๐Ÿง‘ Author Info

The original author of PNGX-API is Christian Augustyn

๐Ÿงพ ChangeLog

History

๐Ÿ“ License

Licensed under the MIT License.

Free Software, Hell Yeah!

ยฉ Copyright

ยฉ 2023, Christian Augustyn.

About

API for retrieving near real-time data and historical data for companies listed on PNGX.com.pg

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published