项目作者: sdclarkelab

项目描述 :
Jamaica Stock Exchange (jamstockex/ JSE) API.
高级语言: JavaScript
项目地址: git://github.com/sdclarkelab/jamstockex-api.git
创建时间: 2020-06-09T00:47:32Z
项目社区:https://github.com/sdclarkelab/jamstockex-api

开源协议:

下载


StockWatchJa: JamStockEx API v2

The StockWatchJa: JamStockEx API v2 serves up stock details info as JSON at this URL. The data is pulled from StockWatchJa: JamStockEx Scraper.

Response Preview

  1. {
  2. "stocks": [
  3. {
  4. "id": "5f4efd8b77435e97079e95bb",
  5. "lastUpdatedDate": "1995-06-22T18:31:18.362Z",
  6. "instrumentName": "SOME STOCK NAME",
  7. "symbol": "SYMBOL",
  8. "currency": "JMD",
  9. "sector": "TOURISM",
  10. "type": "ORDINARY",
  11. "website": null,
  12. "isListed": true,
  13. "market": "Main Market",
  14. "corporateActionUrl": "https://www.jamstockex.com/market-data/listed-companies/corporate-actions/SYMBOL/latest",
  15. "dividends": [],
  16. "tradeInfo": {
  17. "volumeTraded": 955,
  18. "dollarChange": 0,
  19. "marketPrice": 0.3,
  20. "percentageChange": 0,
  21. "lastUpdatedDate": "1995-06-22T18:31:18.345Z"
  22. }
  23. },
  24. .....
  25. ],
  26. "results": 10,
  27. "total": 245,
  28. }

API Documentation

Click here to view the API documentation.

Requirements

Tool Version Source
NodeJs 10.16.2 (includes npm 6.9.0) Nodejs v10.x Releases
Heroku - Getting Started on Heroku with Python
Windows OS 10 -

Heroku Setup

Installation

  1. Install GIT
  2. Install Heroku
  3. Login using the following command
    shell script heroku login

Prepare Heroku to recieve source code

Create environment file file

Create “.env” in application root folder

  1. DB="<MongoDB-node-2.2.12-connection-string>"
  2. PORT=5000

Create Heroku project in Heroku

```shell script
heroku create jamstockex-api

  1. ### Set Environment Variables
  2. ```shell script
  3. heroku config:set DB="<MongoDB-node-2.2.12-connection-string>"
  4. heroku config:set PORT=5000

Deploy

```shell script
git push heroku your_local_branch_name:master

  1. Validate that the application is live
  2. ```shell script
  3. heroku ps:scale web=1

Test locally with heroku

shell script heroku local web