NseTools - 获取公司的书籍关闭开始日期
在本文中,我们将了解如何使用 nsetools 获取给定公司的截止日期。 Nsetools是一个用于从印度国家证券交易所收集实时数据的库。股票报价是在交易所报价的股票价格。特定股票的基本报价提供信息,例如其买入价和卖出价、最后交易价格和交易量。账簿关闭是公司不会处理股东名册调整或转让股份请求的时间段。公司通常会使用截止过户日期来确定截止日期,以确定哪些记录在案的投资者将在该期间获得股息支付。
Steps to get the Stock Quote
1. Import the Nse from nsetools
2. Create a Nse object
3. From the Nse object get the stock quote with the help of get_quote method with the NSE Stock code of the company
4. Get the book closure start date from the quote with the help of ‘bcStartDate’ key
5. Print the book closure start value
下面是实现
Python3
# importing nse from nse tools
from nsetools import Nse
# creating a Nse object
nse = Nse()
# nse stock code for wipro
code = "wipro"
# getting stock quote
quote = nse.get_quote(code)
# getting book closure start date
value = quote['bcStartDate']
# printing book closure start date
print("Book closure Start date : " + str(value))
Python3
# importing nse from nse tools
from nsetools import Nse
# creating a Nse object
nse = Nse()
# nse stock code for sbi
code = "sbin"
# getting stock quote
quote = nse.get_quote(code)
# getting book closure start date
value = quote['bcStartDate']
# printing book closure start date
print("Book closure Start date : " + str(value))
输出 :
Book closure Start date : 10-JUL-20
另一个例子
Python3
# importing nse from nse tools
from nsetools import Nse
# creating a Nse object
nse = Nse()
# nse stock code for sbi
code = "sbin"
# getting stock quote
quote = nse.get_quote(code)
# getting book closure start date
value = quote['bcStartDate']
# printing book closure start date
print("Book closure Start date : " + str(value))
输出 :
Book closure Start date : 19-JUN-18