GithubHelp home page GithubHelp logo

mhshajib / bd-stock-exchange-update-php Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simongomes/bd-stock-exchange-update-php

0.0 0.0 0.0 9 KB

A PHP library to fetch updates from Bangladesh share market, including Dhaka and Chittagong Stock Exchange (DSE & CSE).

License: MIT License

PHP 100.00%

bd-stock-exchange-update-php's Introduction

Dhaka & Chittagong Stock Exchange Update (DSE & CSE)

A PHP library to fetch updates from Bangladesh share market, including Dhaka and Chittagong Stock Exchange (DSE & CSE).

DSE, CSE

Installation

composer require simongomes/bd-stock-exchange-update

or, add the following into your composer.json file

"require": {
        "simongomes/bd-stock-exchange-update": "^1.0"
}

Usages

<?php
    require __DIR__ . '/vendor/autoload.php';
    use Simon\BDShareMarket;
    
    $BDShareMarket = new BDShareMarket();
    print_r($BDShareMarket->getDSEData());
  • Manual installation

Download the latest release.

Latest Version

Usages

  • Include the library
<?php
    require __DIR__ . '/lib/autoload.php';  
    use Simon\BDShareMarket;
  • Create an object and call the necessary methods
To fetch the updated from DSE use following
$BDShareMarket = new BDShareMarket();

// this will print the DSE data
print_r($BDShareMarket->getDSEData());

Output

Array
(
    [0] => Array
        (
            [company] => 1JANATAMF
            [ltp] => 6.1
            [high] => 6.1
            [low] => 6.1
            [closep] => 6.1
            [ycp] => 6.2
            [change] => -0.1
            [trade] => 28
            [value] => 0.25
            [volume] => 40,942
        )

    [1] => Array
        (
            [company] => 1STPRIMFMF
            [ltp] => 11.4
            [high] => 11.4
            [low] => 11.2
            [closep] => 11.4
            [ycp] => 11.2
            [change] => 0.2
            [trade] => 107
            [value] => 1.973
            [volume] => 174,194
        )

    [2] => Array
        (
            [company] => AAMRANET
            [ltp] => 91.2
            [high] => 92
            [low] => 85.3
            [closep] => 91
            [ycp] => 84.2
            [change] => 7
            [trade] => 3,011
            [value] => 144.176
            [volume] => 1,616,666
        )
        ...

To fetch the updated for specific company from DSE use following
// To print DSE data for specific company replace COMPANY_NAME
print_r($BDShareMarket->getDSECompanyData('COMPANY_NAME'));
    

To fetch the updated from CSE use following
print_r($BDShareMarket->getCSEData());

To fetch the updated for specific company from CSE use following
// To print CSE data for specific company replace COMPANY_NAME
print_r($BDShareMarket->getCSECompanyData('COMPANY_NAME'));

Courtesy & Contributions

Thanks goes to Khyrul Alam for the inspiration. A similar JavaScript library will be found here - DSE-CSE-Market-Update JS Library

License

License

Copyright (c) 2018, Simon Gomes

bd-stock-exchange-update-php's People

Contributors

simongomes avatar simonwebable avatar

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.