Share Market data scraping from Dhaka stock exchange and Chittogong stock exchange website.
check out demo: https://khyrulalam.github.io/DSE-CSE-Market-Update/.
This package can be installed with:
- download the latest release.
Put the required stylesheet at the top of your markup:
<link rel="stylesheet" href="/dist/kakkuStyle.css" />
Or
<link rel="stylesheet" href="/dist/kakkuStyle.min.css" />
Put the script at the bottom:
<script src="/dist/kakku.js"></script>
Or
<script src="/dist/kakku.min.js"></script>
It's a promiss base function
so you can call the function
then wait for response
you data.
//DSE market update
kakkuGetDSE().then(res=>{
console.log(res);
})
//CSE market Update
kakkuGetCSE().then(res=>{
console.log(res)
})
If you want the total stock update table use this function
//DSE total table
kakkuGetDSEAll().then(res=>{
console.log(res)
})
//CSE total table
kakkuGetCSEAll().then(res=>{
console.log(res)
})
you can use default style template
<div class="dse"></div>
<div class="cse"></div>
kakkuGetDSE().then(res=>{
TemplateDSE({
data : res,
domEl : '.dse',
})
})
kakkuGetCSE().then(res=>{
TemplateCSE({
data : res,
domEl : '.cse',
bg : '#115852',
scrolldelay : 8
})
})
NOTE: You can change CROSS ORIGIN URL and make request from your server
. Make a php file foo.php
and copy the code below in your foo.php
file. Now change in kakku.js
and kakku.min.js
from const CROSSURL = 'https://peaceful-mountain-17529.herokuapp.com/'
to const CROSSURL = 'foo.php';
<?php
if(!empty($_GET['url'])){
$url = $_GET['url'];
print file_get_contents($url);
}else{
echo 'Something wrong with url';
}
The code and the documentation are released under the MIT License.