The First Unofficial PNGX API, Ever
NUKU-API (formerly PNGX-API) is a RESTFul API that retrieves, stores and processes stock data directly from PNGX. It was formerly part of CrisBot, now a standalone API.
The API retrieve, store, and process financial data directly from 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 |
We continuously make NUKU-API the only place where all users can obtain the necessary financial data. If you have any questions or ideas about improvement,ย contact us.
API endpoints are prefixed with http[s]://api.pngx-api.com.pg
.
WebSocket endpoints are prefixed with ws[s]://ws.pngx-api.com.pg
. Websocket is only available from >= v2
v1.0.0
Base URL:
GET /api/v1
v2.0.0
Base URL:
GET /api/v2
WS /ws/v2
Parameters are ampersand(&) separated
?symbol=BSP&interval=5min
symbol:exchange_name
?BSP:PNGX
d
Error Codes | Status | Meaning |
---|---|---|
300 | Multiple Choices | ย |
400 | Bad Request | ย |
500 | Internal Server Error | ย |
GET /api/v2/health
Update an existing pet by Id
` GET /api`
Request
curl -i -H 'Accept: application/json' https://example.com/api
Params
Parameter | Type | Description | ย | ย |
---|---|---|---|---|
<!โ | apiKey |
string |
Required. Your API key | โ> |
<!โ | seasonId |
string |
Required.League Id e.g Premier League | โ> |
<!โ | dateFrom |
string |
Required. | โ> |
<!โ | dateTo |
string |
Required. | โ> |
Response ``` HTTP/1.1 200 OK Date: Sat, 02 Oct 2021 03:25:07 GMT Status: 200 OK Connection: close Content-Type: application/json Content-Length: 85
{"symbols":["BSP","CCP","CGA","COY","CPL","KAM","KSL","NCM","NGP","NIU","OSH","S
ST"]} ```
Update an existing pet by Id
GET /api/v1/stocks
Request
curl -i -H 'Accept: application/json' https://example.com/api/v1/stocks
Params
Parameter | Type | Description | ย |
---|---|---|---|
<!โ | apiKey |
string |
Required. Your API key |
seasonId |
string |
Required.League Id e.g Premier League | ย |
dateFrom |
string |
Required. | ย |
dateTo |
string |
Required. | โ> |
Response
HTTP/1.1 200 OK
Date: Sat, 02 Oct 2021 03:25:07 GMT
Status: 200 OK
Connection: close
Content-Type: application/json
Content-Length: 85
{"symbols":["BSP","CCP","CGA","COY","CPL","KAM","KSL","NCM","NGP","NIU","OSH","S
ST"]}
Update an existing pet by Id
GET /api/v1/historicals/:symbol
Request
curl -i -H 'Accept: application/json' https://example.com/api/v1/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
Content-Type: application/json
Content-Length: 85
{"symbol": "BSP", "historical": [{}]}
GET /api/v1/historicals/:symbol
Request
curl -i -H 'Accept: application/json' https://example.com/api/v1/historicals/HIL
Response
HTTP/1.1 200 OK
Date: Sat, 02 Oct 2021 03:25:07[^1] GMT
Status: 200 OK
Connection: close
Content-Type: application/json
Content-Length: 85
{"status":404,"reason":"Not found"}
Get news
GET /api/v2/news
Request
curl -i -H 'Accept: application/json' https://example.com/api/v2/news
Response
HTTP/1.1 200 OK
Date: Sat, 02 Oct 2021 03:25:07[^1] GMT
Status: 200 OK
Connection: close
Content-Type: application/json
Content-Length: 85
[{}]
/events?topics=tickers:BSP
{
event:topic,
data:message
}
{
'Authorization': 'abc',
'X-Access-Token': 'abc',
'X-Channel': 'events',
'X-Topics': 'tickers:*',
'X-API-Version': 'v1'
}
You can create webhooks to subscribe to specific events that occur on NUKU-API.
Register your callback function via the API to be notified the stock market events.
To register a webhook, send a POST request to Register Webhook Callback with a JSON body containing your webhook URL, the event type you want to be notified about, and an optional workflow ID.
For example:
{
"eventTypes": [""],
"endpointUrl": "<https://www.example.com/api/callback>",
}
curl --request POST \
--url https://api.nuku-api.com.pg/api/webhook \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"endpointUrl": "<https://your_website.com/webhook>",
"eventTypes": ["workflowRun.completed"]
}
'
You will receive a response with the details of your registered webhook:
{
"status": "success",
"data": {
"id": "<id of webhook>",
"endpointUrl": "<https://mywebsite.com/webhook>",
"eventTypes": ["workflowRun.completed"]
}
}
You can view the details of a webhook endpoint via the API.
curl --request GET \
--url https://api.nuku-api.com.pg/api/webhook/webhook_id \
--header 'accept: application/json'
To view a webhook, send a GET request to https://api.nuku-api.com.pg/api/webhook/
You will receive a response with the details of the webhook.
{
"status": "success",
"data": {
"id": "<webhook_id>",
"url": "<https://mywebsite.com/webhook>",
"eventType": "workflowRun.completed"
}
}
curl --request GET \
--url 'https://api.nuku-api.com.pg/api/webhook?size=10&page=0' \
--header 'accept: application/json'
To view all webhooks registered for your workspace, send a GET request to https://api.nuku-api.com.pg/api/webhook.
You will receive a response with the details for all webhooks.
{
"total": 2,
"data":
[
{
"id": "<webhook_id>",
"url": "<https://mywebsite.com/webhook>",
"eventType": "workflowRun.completed",
"workflowId": "<workflow_id>"
},
{
"id": "<webhook_id>",
"url": "<https://mywebsite.com/webhook>",
"eventType": "workflowRun.started",
"workflowId": null
},
{
"_id": "680c958aa4fd958428e03da6",
"url": "http://localhost:5000/api/webhook",
"headers": {
"x-cs-signature": "abc",
"x-cs-timestamp": 1745712000000,
"x-webhook-token": "abc"
},
"events": [
"subscribe"
],
"secret": "secr3t",
"isActive": true,
"description": "hello",
"createdAt": "2025-04-26T08:12:58.977Z"
},
]
}
You can remove a webhook endpoint via the API.
To remove a webhook, send a DELETE request to https://api.nuku-api.com.pg/api/webhook/
curl --request DELETE \
--url https://api.nuku-api.com.pg/api/webhook/webhook_id \
--header 'accept: application/json'
You will receive a response with the details for all webhooks.
{
"success": true
}
LOG_DESTINATION = ./logs.txt
LOG_LEVEL = 'error'
The entire application is written in JavaScript and runs on NodeJS environment.
Nuku uses a number of open source projects to work properly:
And of course NUKU-API itself is open source with a public repository on GitHub.
Want to contribute? Great!
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.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Make sure you read Contributing Guide before making your contributions.
TOAST UI products are open source, so you can create a pull request(PR) after you fix issues. Run npm scripts and develop yourself with the following process.
Fork master
branch into your personal repository.
Clone it to local computer. Install node modules.
Before starting development, you should check to have any errors.
git clone https://github.com/{your-personal-repo}/[[repo name]].git
cd [[repo name]]
npm install
Letโs start development!
Before PR, check to test lastly and then check any errors. If it has no error, commit and then push it!
For more information on PRโs step, please see links of Contributing section.
Have a bug or a feature request? Please open a new issue.
Using npm:
$ npm install @nuku/client-js
To build the minified javascript files for schedule, run npm install
to install dependencies and then:
$ make build
To run the tests for schedule, run npm install
to install dependencies and then:
$ make test
Releases will be numbered with the following format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
For more information on SemVer, please visit http://semver.org/.
The original author of NUKU-API is Christian Augustyn
Wonder how NUKU-API has been changing for years CHANGELOG
This software is licensed under the MIT License ยฉ Christian Augustyn.
Free Software, Hell Yeah!
ยฉ 2023, Christian Augustyn.