定制 shahariaazam/bd-stock-exchange 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shahariaazam/bd-stock-exchange

Composer 安装命令:

composer require shahariaazam/bd-stock-exchange

包简介

Bangladeshi stock exchange (share market) stock price data fetch with PHP. Get Dhaka Stock Exchange (DSE) and Chittagong Stock Exchange (CSE) stock price data

README 文档

README

Code Checks Build Code Coverage Code Rating Code Intellegence

Dhaka Stock Exchange & Chittagong Stock Exchange Pricing Data Library in PHP

Bangladesh Stock Exchange

This PHP library provides a simple way to get and parse the stock price for Dhaka Stock Exchange & Chittagong Stock Exchange in real time directly from the official website.

Installation

Install this library via composer by running the following command

composer require shahariaazam/bd-stock-exchange

Note: This library has been upgraded from it's old (legacy) code and made it as a standard library. if you still want to use legacy (OLD) codes, you can find that in old-legacy-codes branch.

Or you can download OLD codes as zip. Click here to download old codes.

Usage

After installing you can simply get the latest Dhaka Stock Exchange price data

Get Bangladeshi Stock Exchange Share Price

<?php

use ShahariaAzam\BDStockExchange\StockExchange\ChittagongStockExchange;
use ShahariaAzam\BDStockExchange\StockExchange\DhakaStockExchange;
use ShahariaAzam\BDStockExchange\StockPrice;

require "vendor/autoload.php";

$dse = new DhakaStockExchange();    // For Dhaka Stock Exchange
// $cse = new ChittagongStockExchange();    // For Chittagong Stock Exchange

$stock = new StockPrice();
$stock->setStockExchange($dse);
var_dump($stock->getPricing());     // Return PricingEntity[]
var_dump($stock->toArray());        // Return as array

And you are done. You will get the following output. Array of PricingEntity

array(350) {
  [0] =>
  class ShahariaAzam\BDStockExchange\PricingEntity#20 (6) {
    private $company =>
    string(9) "1JANATAMF"
    private $lastTradeValue =>
    double(4.1)
    private $changeInAmount =>
    double(0)
    private $changeInPercentage =>
    double(0)
    private $highPrice =>
    NULL
    private $lowPrice =>
    NULL
  }

Docker Image

You can also use Docker. To use Docker, you can find the image on Docker Hub or you can build Docker image from this repo.

To get the latest Bangladeshi Stock Market price via Docker, run the following command -

docker run -it --rm shaharia/bd-stock-price:latest php bin/stock dse --json
dse = Dhaka Stock Exchange
cse = Chittagong Stock Exchange
--json = Display in a JSON format
--line = Display as new line for each stock

If you want to build your own Docker image, run -

docker build . --tag IMAGE:TAG

Contribution

This is a helpful PHP library for programmers who want to get the latest Bangladesh stock exchange market data in their PHP application.

I always welcome any people who want to contribute to this library if it helps. You can contribute by doing -

To see all the contributors, please click here

License

MIT

Connect with me

Social: LinkedIn | Twitter | Facebook

Website: blog.shaharia.com | shaharia.com

shahariaazam/bd-stock-exchange 适用场景与选型建议

shahariaazam/bd-stock-exchange 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 89 次下载、GitHub Stars 达 32, 最近一次更新时间为 2018 年 07 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 shahariaazam/bd-stock-exchange 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 shahariaazam/bd-stock-exchange 我们能提供哪些服务?
定制开发 / 二次开发

基于 shahariaazam/bd-stock-exchange 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 89
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 32
  • 点击次数: 11
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 32
  • Watchers: 4
  • Forks: 20
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-07-08