moexapi 1.7.13__tar.gz → 1.7.14__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.13 → moexapi-1.7.14}/PKG-INFO +1 -1
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi/bonds.py +6 -2
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi.egg-info/PKG-INFO +1 -1
- {moexapi-1.7.13 → moexapi-1.7.14}/pyproject.toml +1 -1
- {moexapi-1.7.13 → moexapi-1.7.14}/LICENSE +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/README.md +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi/__init__.py +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi/candles.py +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi/changeover.py +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi/dividends.py +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi/exchange.py +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi/history.py +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi/markets.py +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi/splits.py +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi/tickers.py +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi/utils.py +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi.egg-info/SOURCES.txt +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi.egg-info/dependency_links.txt +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi.egg-info/requires.txt +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/moexapi.egg-info/top_level.txt +0 -0
- {moexapi-1.7.13 → moexapi-1.7.14}/setup.cfg +0 -0
|
@@ -39,7 +39,8 @@ class Coupon:
|
|
|
39
39
|
@dataclasses.dataclass
|
|
40
40
|
class Offer:
|
|
41
41
|
date: datetime.date
|
|
42
|
-
value: float
|
|
42
|
+
value: T.Optional[float]
|
|
43
|
+
type: str = ""
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
@dataclasses.dataclass(init=True)
|
|
@@ -124,7 +125,10 @@ class Bond:
|
|
|
124
125
|
continue
|
|
125
126
|
date = datetime.date.fromisoformat(offer_date)
|
|
126
127
|
end_date = _max(end_date, date)
|
|
127
|
-
|
|
128
|
+
value = line.get("value")
|
|
129
|
+
if value is None and line.get("price") is not None and line.get("facevalue") is not None:
|
|
130
|
+
value = float(line["facevalue"]) * float(line["price"]) / 100
|
|
131
|
+
item = Offer(date=date, value=value, type=line.get("offertype") or "")
|
|
128
132
|
if item not in self.offers:
|
|
129
133
|
self.offers.append(item)
|
|
130
134
|
if end_date == start_date:
|
|
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
|