moexapi 1.7.4__tar.gz → 1.7.6__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.
- {moexapi-1.7.4 → moexapi-1.7.6}/PKG-INFO +1 -1
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi/dividends.py +4 -1
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi/markets.py +17 -2
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi/tickers.py +2 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi.egg-info/PKG-INFO +1 -1
- {moexapi-1.7.4 → moexapi-1.7.6}/pyproject.toml +1 -1
- {moexapi-1.7.4 → moexapi-1.7.6}/LICENSE +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/README.md +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi/__init__.py +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi/bonds.py +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi/candles.py +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi/changeover.py +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi/exchange.py +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi/history.py +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi/splits.py +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi/utils.py +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi.egg-info/SOURCES.txt +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi.egg-info/dependency_links.txt +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi.egg-info/requires.txt +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/moexapi.egg-info/top_level.txt +0 -0
- {moexapi-1.7.4 → moexapi-1.7.6}/setup.cfg +0 -0
|
@@ -17,7 +17,10 @@ Dividends = list[Dividend]
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
def _get_dividends_for_one_ticker(ticker: tickers.Ticker):
|
|
20
|
-
|
|
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(
|
|
106
|
-
|
|
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
|
|
|
@@ -3,6 +3,7 @@ import typing as T
|
|
|
3
3
|
import collections
|
|
4
4
|
import dataclasses
|
|
5
5
|
import datetime
|
|
6
|
+
import functools
|
|
6
7
|
|
|
7
8
|
from . import exchange
|
|
8
9
|
from . import markets
|
|
@@ -279,6 +280,7 @@ class Ticker:
|
|
|
279
280
|
return tickers[0]
|
|
280
281
|
|
|
281
282
|
|
|
283
|
+
@functools.lru_cache(maxsize=None)
|
|
282
284
|
def _parse_tickers(market: markets.Market = markets.Markets.ALL) -> list[Listing]:
|
|
283
285
|
tickers: dict[str, Listing] = {}
|
|
284
286
|
for child_market in market.childs():
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|