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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moexapi
3
- Version: 1.7.13
3
+ Version: 1.7.14
4
4
  Summary: Python API for MOEX ISS
5
5
  Author-email: Aliaksei Rak <kventinel@gmail.com>
6
6
  License: MIT License
@@ -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
- item = Offer(date=date, value=line["value"])
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moexapi
3
- Version: 1.7.13
3
+ Version: 1.7.14
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.13"
7
+ version = "1.7.14"
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
File without changes