Code Monkey home page Code Monkey logo

nepse-api's Introduction

Overview

This repository contains Nepse stocks data scrapped daily from Official Nepse Site and saved as JSON files; which can be accessed via API calls.

API endpoints

  • /data/info : Brief info on APIs
  • /data/companies: Listed companies on Nepse
  • /data/date/{{YYYY-MM-DD}}: Daily stocks data by date
  • /data/date/latest: Latest data by date
  • /data/company/{{company-code}}: Daily data by company code

Examples

{
    "Name": "Nepse daily data API",
    "lastUpdatedAt": "2022-02-25 13:11:21"
}
{
    "NMBD2085": {
        "name": "10 % NMB DEBENTURE 2085",
        "cat": "Corporate Debenture"
    },
    "HBLD83": {
        "name": "10% Himalayan Bank Debenture 2083",
        "cat": "Corporate Debenture"
    },
    "LBLD86": {
        "name": "10% Laxmi Bank Debenture 2086",
        "cat": "Corporate Debenture"
    },
    "NBLD82": {
        "name": "10% Nabil Debenture 2082",
        "cat": "Corporate Debenture"
    }
}
{
    "metadata": {
        "totalAmt": 4293864192,
        "totalQty": 8490689,
        "totalTrans": 65011
    },
    "data": [
        {
            "company": {
                "code": "NBLD82",
                "name": "10% Nabil Debenture 2082",
                "cat": "Corporate Debenture"
            },
            "price": {
                "max": 932.2,
                "min": 932.2,
                "close": 932.2,
                "prevClose": 950.6,
                "diff": -18.4
            },
            "numTrans": 1,
            "tradedShares": 25,
            "amount": 23305
        }
    ]
}

How does it work

Nepse operates Sunday to Thursday, from 11:00 AM - 3:00 PM. Each day last 7 days' data is scraped at 10:00 AM, 3:05 PM, and 12:00(midnight). Since Nepse's server crashes frequently, scraping last 7 days' data till today, multiple times a day, seems good approach.

Todos

  • Split large JSON files into smaller chunks for lighter API response
  • Improve landing page

Nepse-api is used by

  • Samaya: friendly personal dashboard on browser's new tab

Contribution

We are open to any kind of suggestions and improvements. Please feel free to contribute by any means possible ๐Ÿ˜€

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.