moexapi 1.7.8__tar.gz → 1.7.9__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.8 → moexapi-1.7.9}/PKG-INFO +1 -1
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi/tickers.py +29 -10
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi.egg-info/PKG-INFO +1 -1
- {moexapi-1.7.8 → moexapi-1.7.9}/pyproject.toml +1 -1
- {moexapi-1.7.8 → moexapi-1.7.9}/LICENSE +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/README.md +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi/__init__.py +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi/bonds.py +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi/candles.py +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi/changeover.py +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi/dividends.py +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi/exchange.py +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi/history.py +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi/markets.py +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi/splits.py +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi/utils.py +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi.egg-info/SOURCES.txt +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi.egg-info/dependency_links.txt +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi.egg-info/requires.txt +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/moexapi.egg-info/top_level.txt +0 -0
- {moexapi-1.7.8 → moexapi-1.7.9}/setup.cfg +0 -0
|
@@ -131,16 +131,35 @@ class TickerBoardInfo:
|
|
|
131
131
|
)
|
|
132
132
|
if result:
|
|
133
133
|
result.boards.extend(board for board, currency in boards if currency == result.currency)
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
134
|
+
response = utils.json_api_call(f"https://iss.moex.com/iss/securities/{secid}.json")
|
|
135
|
+
board_lines = utils.prepare_dict(response, "boards")
|
|
136
|
+
if result is None:
|
|
137
|
+
primary_lines = [
|
|
138
|
+
line for line in board_lines
|
|
139
|
+
if line[BOARDID.lower()] == primary_board
|
|
140
|
+
]
|
|
141
|
+
if not primary_lines:
|
|
142
|
+
return None
|
|
143
|
+
currency = _sur_to_rub(primary_lines[0].get(CURRENCY.lower()))
|
|
144
|
+
result = cls(
|
|
145
|
+
boards=[primary_board],
|
|
146
|
+
currency=currency,
|
|
147
|
+
raw_price=None,
|
|
148
|
+
price=None,
|
|
149
|
+
price_in_rub=None,
|
|
150
|
+
accumulated_coupon=0,
|
|
151
|
+
listlevel=None,
|
|
152
|
+
value=None,
|
|
153
|
+
)
|
|
154
|
+
for line in board_lines:
|
|
155
|
+
board = line[BOARDID.lower()]
|
|
156
|
+
if (
|
|
157
|
+
board not in result.boards
|
|
158
|
+
and line["engine"] in market.engines
|
|
159
|
+
and line["market"] in market.markets
|
|
160
|
+
and _sur_to_rub(line.get(CURRENCY.lower())) == result.currency
|
|
161
|
+
):
|
|
162
|
+
result.boards.append(board)
|
|
144
163
|
return result
|
|
145
164
|
|
|
146
165
|
|
|
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
|
|
File without changes
|
|
File without changes
|