moexapi 1.7.4__tar.gz → 1.7.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moexapi
3
- Version: 1.7.4
3
+ Version: 1.7.5
4
4
  Summary: Python API for MOEX ISS
5
5
  Author-email: Aliaksei Rak <kventinel@gmail.com>
6
6
  License: MIT License
@@ -17,7 +17,10 @@ Dividends = list[Dividend]
17
17
 
18
18
 
19
19
  def _get_dividends_for_one_ticker(ticker: tickers.Ticker):
20
- resp = utils.json_api_call(f"https://iss.moex.com/iss/securities/{ticker.secid}/dividends.json")['dividends']
20
+ response = utils.json_api_call(f"https://iss.moex.com/iss/securities/{ticker.secid}/dividends.json")
21
+ resp = response.get('dividends')
22
+ if resp is None:
23
+ return []
21
24
  columns = resp['columns']
22
25
  data = resp['data']
23
26
  dividends: Dividends = []
@@ -102,8 +102,23 @@ _EQUITY = Market("equity", parent=_STOCK, markets={"shares"})
102
102
  _SHARES = Market("shares", parent=_EQUITY, security_types={"common_share", "preferred_share", "depositary_receipt"})
103
103
  _ETFS = Market("etfs", parent=_EQUITY, security_types={"exchange_ppif"})
104
104
  _BONDS = Market("bonds", parent=_STOCK, markets={"bonds"})
105
- _FEDERAL_BONDS = Market("federal bonds", parent=_BONDS, boards={"TQOB"})
106
- _COMPANY_BONDS = Market("company bonds", parent=_BONDS, boards={"TQCB"})
105
+ _FEDERAL_BONDS = Market(
106
+ "federal bonds",
107
+ parent=_BONDS,
108
+ security_types={"cb_bond", "euro_bond", "ofz_bond"},
109
+ )
110
+ _COMPANY_BONDS = Market(
111
+ "company bonds",
112
+ parent=_BONDS,
113
+ security_types={
114
+ "corporate_bond",
115
+ "exchange_bond",
116
+ "ifi_bond",
117
+ "municipal_bond",
118
+ "state_bond",
119
+ "subfederal_bond",
120
+ },
121
+ )
107
122
  _INDEX = Market("index", parent=_STOCK, markets={"index"})
108
123
  _CURRENCY = Market("currency", parent=_ALL, engines={"currency"}, markets={"selt"}, boards={"CETS"})
109
124
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moexapi
3
- Version: 1.7.4
3
+ Version: 1.7.5
4
4
  Summary: Python API for MOEX ISS
5
5
  Author-email: Aliaksei Rak <kventinel@gmail.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "moexapi"
7
- version = "1.7.4"
7
+ version = "1.7.5"
8
8
  description = "Python API for MOEX ISS"
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Aliaksei Rak", email = "kventinel@gmail.com" }]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes