lusid-sdk 2.1.320__py3-none-any.whl → 2.1.347__py3-none-any.whl
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.
- lusid/__init__.py +10 -0
- lusid/api/entities_api.py +172 -0
- lusid/api/funds_api.py +212 -0
- lusid/api/order_management_api.py +160 -0
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +10 -0
- lusid/models/data_type.py +8 -8
- lusid/models/data_type_entity.py +131 -0
- lusid/models/fund_configuration.py +6 -6
- lusid/models/fund_configuration_request.py +6 -6
- lusid/models/journal_entry_line.py +5 -3
- lusid/models/order_update_request.py +116 -0
- lusid/models/paged_resource_list_of_valuation_point_overview.py +113 -0
- lusid/models/posting_module_rule.py +7 -32
- lusid/models/quote_access_metadata_rule_id.py +2 -2
- lusid/models/quote_series_id.py +2 -2
- lusid/models/scrip_dividend_event.py +17 -3
- lusid/models/share_class_details.py +5 -3
- lusid/models/stock_split_event.py +18 -4
- lusid/models/update_orders_response.py +153 -0
- lusid/models/valuation_point_overview.py +125 -0
- {lusid_sdk-2.1.320.dist-info → lusid_sdk-2.1.347.dist-info}/METADATA +9 -1
- {lusid_sdk-2.1.320.dist-info → lusid_sdk-2.1.347.dist-info}/RECORD +24 -19
- {lusid_sdk-2.1.320.dist-info → lusid_sdk-2.1.347.dist-info}/WHEEL +0 -0
@@ -0,0 +1,116 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, Optional, Union
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt
|
23
|
+
from lusid.models.currency_and_amount import CurrencyAndAmount
|
24
|
+
from lusid.models.perpetual_property import PerpetualProperty
|
25
|
+
from lusid.models.resource_id import ResourceId
|
26
|
+
|
27
|
+
class OrderUpdateRequest(BaseModel):
|
28
|
+
"""
|
29
|
+
A request to create or update a Order. # noqa: E501
|
30
|
+
"""
|
31
|
+
id: ResourceId = Field(...)
|
32
|
+
quantity: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="The quantity of given instrument ordered.")
|
33
|
+
portfolio_id: Optional[ResourceId] = Field(None, alias="portfolioId")
|
34
|
+
properties: Optional[Dict[str, PerpetualProperty]] = Field(None, description="Client-defined properties associated with this order.")
|
35
|
+
price: Optional[CurrencyAndAmount] = None
|
36
|
+
limit_price: Optional[CurrencyAndAmount] = Field(None, alias="limitPrice")
|
37
|
+
stop_price: Optional[CurrencyAndAmount] = Field(None, alias="stopPrice")
|
38
|
+
__properties = ["id", "quantity", "portfolioId", "properties", "price", "limitPrice", "stopPrice"]
|
39
|
+
|
40
|
+
class Config:
|
41
|
+
"""Pydantic configuration"""
|
42
|
+
allow_population_by_field_name = True
|
43
|
+
validate_assignment = True
|
44
|
+
|
45
|
+
def to_str(self) -> str:
|
46
|
+
"""Returns the string representation of the model using alias"""
|
47
|
+
return pprint.pformat(self.dict(by_alias=True))
|
48
|
+
|
49
|
+
def to_json(self) -> str:
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
51
|
+
return json.dumps(self.to_dict())
|
52
|
+
|
53
|
+
@classmethod
|
54
|
+
def from_json(cls, json_str: str) -> OrderUpdateRequest:
|
55
|
+
"""Create an instance of OrderUpdateRequest from a JSON string"""
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
57
|
+
|
58
|
+
def to_dict(self):
|
59
|
+
"""Returns the dictionary representation of the model using alias"""
|
60
|
+
_dict = self.dict(by_alias=True,
|
61
|
+
exclude={
|
62
|
+
},
|
63
|
+
exclude_none=True)
|
64
|
+
# override the default output from pydantic by calling `to_dict()` of id
|
65
|
+
if self.id:
|
66
|
+
_dict['id'] = self.id.to_dict()
|
67
|
+
# override the default output from pydantic by calling `to_dict()` of portfolio_id
|
68
|
+
if self.portfolio_id:
|
69
|
+
_dict['portfolioId'] = self.portfolio_id.to_dict()
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of each value in properties (dict)
|
71
|
+
_field_dict = {}
|
72
|
+
if self.properties:
|
73
|
+
for _key in self.properties:
|
74
|
+
if self.properties[_key]:
|
75
|
+
_field_dict[_key] = self.properties[_key].to_dict()
|
76
|
+
_dict['properties'] = _field_dict
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of price
|
78
|
+
if self.price:
|
79
|
+
_dict['price'] = self.price.to_dict()
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of limit_price
|
81
|
+
if self.limit_price:
|
82
|
+
_dict['limitPrice'] = self.limit_price.to_dict()
|
83
|
+
# override the default output from pydantic by calling `to_dict()` of stop_price
|
84
|
+
if self.stop_price:
|
85
|
+
_dict['stopPrice'] = self.stop_price.to_dict()
|
86
|
+
# set to None if properties (nullable) is None
|
87
|
+
# and __fields_set__ contains the field
|
88
|
+
if self.properties is None and "properties" in self.__fields_set__:
|
89
|
+
_dict['properties'] = None
|
90
|
+
|
91
|
+
return _dict
|
92
|
+
|
93
|
+
@classmethod
|
94
|
+
def from_dict(cls, obj: dict) -> OrderUpdateRequest:
|
95
|
+
"""Create an instance of OrderUpdateRequest from a dict"""
|
96
|
+
if obj is None:
|
97
|
+
return None
|
98
|
+
|
99
|
+
if not isinstance(obj, dict):
|
100
|
+
return OrderUpdateRequest.parse_obj(obj)
|
101
|
+
|
102
|
+
_obj = OrderUpdateRequest.parse_obj({
|
103
|
+
"id": ResourceId.from_dict(obj.get("id")) if obj.get("id") is not None else None,
|
104
|
+
"quantity": obj.get("quantity"),
|
105
|
+
"portfolio_id": ResourceId.from_dict(obj.get("portfolioId")) if obj.get("portfolioId") is not None else None,
|
106
|
+
"properties": dict(
|
107
|
+
(_k, PerpetualProperty.from_dict(_v))
|
108
|
+
for _k, _v in obj.get("properties").items()
|
109
|
+
)
|
110
|
+
if obj.get("properties") is not None
|
111
|
+
else None,
|
112
|
+
"price": CurrencyAndAmount.from_dict(obj.get("price")) if obj.get("price") is not None else None,
|
113
|
+
"limit_price": CurrencyAndAmount.from_dict(obj.get("limitPrice")) if obj.get("limitPrice") is not None else None,
|
114
|
+
"stop_price": CurrencyAndAmount.from_dict(obj.get("stopPrice")) if obj.get("stopPrice") is not None else None
|
115
|
+
})
|
116
|
+
return _obj
|
@@ -0,0 +1,113 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
23
|
+
from lusid.models.link import Link
|
24
|
+
from lusid.models.valuation_point_overview import ValuationPointOverview
|
25
|
+
|
26
|
+
class PagedResourceListOfValuationPointOverview(BaseModel):
|
27
|
+
"""
|
28
|
+
PagedResourceListOfValuationPointOverview
|
29
|
+
"""
|
30
|
+
next_page: Optional[StrictStr] = Field(None, alias="nextPage")
|
31
|
+
previous_page: Optional[StrictStr] = Field(None, alias="previousPage")
|
32
|
+
values: conlist(ValuationPointOverview) = Field(...)
|
33
|
+
href: Optional[StrictStr] = None
|
34
|
+
links: Optional[conlist(Link)] = None
|
35
|
+
__properties = ["nextPage", "previousPage", "values", "href", "links"]
|
36
|
+
|
37
|
+
class Config:
|
38
|
+
"""Pydantic configuration"""
|
39
|
+
allow_population_by_field_name = True
|
40
|
+
validate_assignment = True
|
41
|
+
|
42
|
+
def to_str(self) -> str:
|
43
|
+
"""Returns the string representation of the model using alias"""
|
44
|
+
return pprint.pformat(self.dict(by_alias=True))
|
45
|
+
|
46
|
+
def to_json(self) -> str:
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
48
|
+
return json.dumps(self.to_dict())
|
49
|
+
|
50
|
+
@classmethod
|
51
|
+
def from_json(cls, json_str: str) -> PagedResourceListOfValuationPointOverview:
|
52
|
+
"""Create an instance of PagedResourceListOfValuationPointOverview from a JSON string"""
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
54
|
+
|
55
|
+
def to_dict(self):
|
56
|
+
"""Returns the dictionary representation of the model using alias"""
|
57
|
+
_dict = self.dict(by_alias=True,
|
58
|
+
exclude={
|
59
|
+
},
|
60
|
+
exclude_none=True)
|
61
|
+
# override the default output from pydantic by calling `to_dict()` of each item in values (list)
|
62
|
+
_items = []
|
63
|
+
if self.values:
|
64
|
+
for _item in self.values:
|
65
|
+
if _item:
|
66
|
+
_items.append(_item.to_dict())
|
67
|
+
_dict['values'] = _items
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
69
|
+
_items = []
|
70
|
+
if self.links:
|
71
|
+
for _item in self.links:
|
72
|
+
if _item:
|
73
|
+
_items.append(_item.to_dict())
|
74
|
+
_dict['links'] = _items
|
75
|
+
# set to None if next_page (nullable) is None
|
76
|
+
# and __fields_set__ contains the field
|
77
|
+
if self.next_page is None and "next_page" in self.__fields_set__:
|
78
|
+
_dict['nextPage'] = None
|
79
|
+
|
80
|
+
# set to None if previous_page (nullable) is None
|
81
|
+
# and __fields_set__ contains the field
|
82
|
+
if self.previous_page is None and "previous_page" in self.__fields_set__:
|
83
|
+
_dict['previousPage'] = None
|
84
|
+
|
85
|
+
# set to None if href (nullable) is None
|
86
|
+
# and __fields_set__ contains the field
|
87
|
+
if self.href is None and "href" in self.__fields_set__:
|
88
|
+
_dict['href'] = None
|
89
|
+
|
90
|
+
# set to None if links (nullable) is None
|
91
|
+
# and __fields_set__ contains the field
|
92
|
+
if self.links is None and "links" in self.__fields_set__:
|
93
|
+
_dict['links'] = None
|
94
|
+
|
95
|
+
return _dict
|
96
|
+
|
97
|
+
@classmethod
|
98
|
+
def from_dict(cls, obj: dict) -> PagedResourceListOfValuationPointOverview:
|
99
|
+
"""Create an instance of PagedResourceListOfValuationPointOverview from a dict"""
|
100
|
+
if obj is None:
|
101
|
+
return None
|
102
|
+
|
103
|
+
if not isinstance(obj, dict):
|
104
|
+
return PagedResourceListOfValuationPointOverview.parse_obj(obj)
|
105
|
+
|
106
|
+
_obj = PagedResourceListOfValuationPointOverview.parse_obj({
|
107
|
+
"next_page": obj.get("nextPage"),
|
108
|
+
"previous_page": obj.get("previousPage"),
|
109
|
+
"values": [ValuationPointOverview.from_dict(_item) for _item in obj.get("values")] if obj.get("values") is not None else None,
|
110
|
+
"href": obj.get("href"),
|
111
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
112
|
+
})
|
113
|
+
return _obj
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
|
21
|
-
from typing import Any, Dict
|
21
|
+
from typing import Any, Dict
|
22
22
|
from pydantic.v1 import BaseModel, Field, constr, validator
|
23
23
|
|
24
24
|
class PostingModuleRule(BaseModel):
|
@@ -26,10 +26,9 @@ class PostingModuleRule(BaseModel):
|
|
26
26
|
A Posting rule # noqa: E501
|
27
27
|
"""
|
28
28
|
rule_id: constr(strict=True, max_length=64, min_length=1) = Field(..., alias="ruleId", description="The identifier for the Posting Rule.")
|
29
|
-
|
29
|
+
general_ledger_account_code: constr(strict=True, max_length=512, min_length=1) = Field(..., alias="generalLedgerAccountCode", description="The general ledger account to post the Activity credit or debit to.")
|
30
30
|
rule_filter: constr(strict=True, max_length=16384, min_length=1) = Field(..., alias="ruleFilter", description="The filter syntax for the Posting Rule. See https://support.lusid.com/knowledgebase/article/KA-02140 for more information on filter syntax.")
|
31
|
-
|
32
|
-
__properties = ["ruleId", "account", "ruleFilter", "generalLedgerAccountCode"]
|
31
|
+
__properties = ["ruleId", "generalLedgerAccountCode", "ruleFilter"]
|
33
32
|
|
34
33
|
@validator('rule_id')
|
35
34
|
def rule_id_validate_regular_expression(cls, value):
|
@@ -38,12 +37,9 @@ class PostingModuleRule(BaseModel):
|
|
38
37
|
raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9\-_]+$/")
|
39
38
|
return value
|
40
39
|
|
41
|
-
@validator('
|
42
|
-
def
|
40
|
+
@validator('general_ledger_account_code')
|
41
|
+
def general_ledger_account_code_validate_regular_expression(cls, value):
|
43
42
|
"""Validates the regular expression"""
|
44
|
-
if value is None:
|
45
|
-
return value
|
46
|
-
|
47
43
|
if not re.match(r"^[\s\S]*$", value):
|
48
44
|
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
49
45
|
return value
|
@@ -55,16 +51,6 @@ class PostingModuleRule(BaseModel):
|
|
55
51
|
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
56
52
|
return value
|
57
53
|
|
58
|
-
@validator('general_ledger_account_code')
|
59
|
-
def general_ledger_account_code_validate_regular_expression(cls, value):
|
60
|
-
"""Validates the regular expression"""
|
61
|
-
if value is None:
|
62
|
-
return value
|
63
|
-
|
64
|
-
if not re.match(r"^[\s\S]*$", value):
|
65
|
-
raise ValueError(r"must validate the regular expression /^[\s\S]*$/")
|
66
|
-
return value
|
67
|
-
|
68
54
|
class Config:
|
69
55
|
"""Pydantic configuration"""
|
70
56
|
allow_population_by_field_name = True
|
@@ -89,16 +75,6 @@ class PostingModuleRule(BaseModel):
|
|
89
75
|
exclude={
|
90
76
|
},
|
91
77
|
exclude_none=True)
|
92
|
-
# set to None if account (nullable) is None
|
93
|
-
# and __fields_set__ contains the field
|
94
|
-
if self.account is None and "account" in self.__fields_set__:
|
95
|
-
_dict['account'] = None
|
96
|
-
|
97
|
-
# set to None if general_ledger_account_code (nullable) is None
|
98
|
-
# and __fields_set__ contains the field
|
99
|
-
if self.general_ledger_account_code is None and "general_ledger_account_code" in self.__fields_set__:
|
100
|
-
_dict['generalLedgerAccountCode'] = None
|
101
|
-
|
102
78
|
return _dict
|
103
79
|
|
104
80
|
@classmethod
|
@@ -112,8 +88,7 @@ class PostingModuleRule(BaseModel):
|
|
112
88
|
|
113
89
|
_obj = PostingModuleRule.parse_obj({
|
114
90
|
"rule_id": obj.get("ruleId"),
|
115
|
-
"
|
116
|
-
"rule_filter": obj.get("ruleFilter")
|
117
|
-
"general_ledger_account_code": obj.get("generalLedgerAccountCode")
|
91
|
+
"general_ledger_account_code": obj.get("generalLedgerAccountCode"),
|
92
|
+
"rule_filter": obj.get("ruleFilter")
|
118
93
|
})
|
119
94
|
return _obj
|
@@ -25,12 +25,12 @@ class QuoteAccessMetadataRuleId(BaseModel):
|
|
25
25
|
"""
|
26
26
|
An identifier that uniquely identifies a set of Quote access control metadata. # noqa: E501
|
27
27
|
"""
|
28
|
-
provider: Optional[constr(strict=True, max_length=100, min_length=0)] = Field(None, description="The platform or vendor that provided the quote. The available values are: Client, DataScope, Lusid, Edi, TraderMade, FactSet, SIX, Bloomberg, Rimes, ICE")
|
28
|
+
provider: Optional[constr(strict=True, max_length=100, min_length=0)] = Field(None, description="The platform or vendor that provided the quote. The available values are: Client, DataScope, Lusid, Edi, TraderMade, FactSet, SIX, Bloomberg, Rimes, ICE, LSEG")
|
29
29
|
price_source: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, alias="priceSource", description="The source or originator of the quote, e.g. a bank or financial institution.")
|
30
30
|
instrument_id: Optional[constr(strict=True, max_length=256, min_length=0)] = Field(None, alias="instrumentId", description="The value of the instrument identifier that uniquely identifies the instrument that the quote is for, e.g. 'BBG00JX0P539'.")
|
31
31
|
instrument_id_type: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="instrumentIdType", description="The type of instrument identifier used to uniquely identify the instrument that the quote is for, e.g. 'Figi'.")
|
32
32
|
quote_type: Optional[constr(strict=True, max_length=50, min_length=0)] = Field(None, alias="quoteType", description="The type of the quote. This allows for quotes other than prices e.g. rates or spreads to be used.")
|
33
|
-
field: Optional[constr(strict=True, max_length=2048, min_length=0)] = Field(None, description="The field of the quote e.g. bid, mid, ask etc. This should be consistent across a time series of quotes. The allowed values depend on the provider according to the following rules: Client : *Any value is accepted*; DataScope : 'bid', 'mid', 'ask'; Lusid : *Any value is accepted*; Edi : 'bid', 'mid', 'ask', 'open', 'close', 'last'; TraderMade : 'bid', 'mid', 'ask', 'open', 'close', 'high', 'low'; FactSet : 'bid', 'mid', 'ask', 'open', 'close'; SIX : 'bid', 'mid', 'ask', 'open', 'close', 'last', 'referencePrice', 'highPrice', 'lowPrice', 'maxRedemptionPrice', 'maxSubscriptionPrice', 'openPrice', 'bestBidPrice', 'lastBidPrice', 'bestAskPrice', 'lastAskPrice'; Bloomberg : 'bid', 'mid', 'ask', 'open', 'close', 'last'; Rimes : 'bid', 'mid', 'ask', 'open', 'close', 'last'; ICE : 'ask', 'bid'")
|
33
|
+
field: Optional[constr(strict=True, max_length=2048, min_length=0)] = Field(None, description="The field of the quote e.g. bid, mid, ask etc. This should be consistent across a time series of quotes. The allowed values depend on the provider according to the following rules: Client : *Any value is accepted*; DataScope : 'bid', 'mid', 'ask'; Lusid : *Any value is accepted*; Edi : 'bid', 'mid', 'ask', 'open', 'close', 'last'; TraderMade : 'bid', 'mid', 'ask', 'open', 'close', 'high', 'low'; FactSet : 'bid', 'mid', 'ask', 'open', 'close'; SIX : 'bid', 'mid', 'ask', 'open', 'close', 'last', 'referencePrice', 'highPrice', 'lowPrice', 'maxRedemptionPrice', 'maxSubscriptionPrice', 'openPrice', 'bestBidPrice', 'lastBidPrice', 'bestAskPrice', 'lastAskPrice', 'finalSettlementOptions', 'finalSettlementFutures'; Bloomberg : 'bid', 'mid', 'ask', 'open', 'close', 'last'; Rimes : 'bid', 'mid', 'ask', 'open', 'close', 'last'; ICE : 'ask', 'bid'; LSEG : 'ASK', 'BID', 'MID_PRICE'")
|
34
34
|
__properties = ["provider", "priceSource", "instrumentId", "instrumentIdType", "quoteType", "field"]
|
35
35
|
|
36
36
|
@validator('instrument_id_type')
|
lusid/models/quote_series_id.py
CHANGED
@@ -25,12 +25,12 @@ class QuoteSeriesId(BaseModel):
|
|
25
25
|
"""
|
26
26
|
The time invariant unique identifier of the quote. Combined with the effective datetime of the quote this uniquely identifies the quote. This can be thought of as a unique identifier for a time series of quotes. # noqa: E501
|
27
27
|
"""
|
28
|
-
provider: constr(strict=True, min_length=1) = Field(..., description="The platform or vendor that provided the quote. The available values are: Client, DataScope, Lusid, Edi, TraderMade, FactSet, SIX, Bloomberg, Rimes, ICE")
|
28
|
+
provider: constr(strict=True, min_length=1) = Field(..., description="The platform or vendor that provided the quote. The available values are: Client, DataScope, Lusid, Edi, TraderMade, FactSet, SIX, Bloomberg, Rimes, ICE, LSEG")
|
29
29
|
price_source: Optional[StrictStr] = Field(None, alias="priceSource", description="The source or originator of the quote, e.g. a bank or financial institution.")
|
30
30
|
instrument_id: constr(strict=True, min_length=1) = Field(..., alias="instrumentId", description="The value of the instrument identifier that uniquely identifies the instrument that the quote is for, e.g. 'BBG00JX0P539'.")
|
31
31
|
instrument_id_type: StrictStr = Field(..., alias="instrumentIdType", description="The type of instrument identifier used to uniquely identify the instrument that the quote is for, e.g. 'Figi'. The available values are: LusidInstrumentId, Figi, RIC, QuotePermId, Isin, CurrencyPair, ClientInternal, Sedol, Cusip")
|
32
32
|
quote_type: StrictStr = Field(..., alias="quoteType", description="The type of the quote. This allows for quotes other than prices e.g. rates or spreads to be used. The available values are: Price, Spread, Rate, LogNormalVol, NormalVol, ParSpread, IsdaSpread, Upfront, Index, Ratio, Delta, PoolFactor, InflationAssumption, DirtyPrice, PrincipalWriteOff, InterestDeferred, InterestShortfall")
|
33
|
-
field: constr(strict=True, min_length=1) = Field(..., description="The field of the quote e.g. bid, mid, ask etc. This should be consistent across a time series of quotes. The allowed values depend on the provider according to the following rules: Client : *Any value is accepted*; DataScope : 'bid', 'mid', 'ask'; Lusid : *Any value is accepted*; Edi : 'bid', 'mid', 'ask', 'open', 'close', 'last'; TraderMade : 'bid', 'mid', 'ask', 'open', 'close', 'high', 'low'; FactSet : 'bid', 'mid', 'ask', 'open', 'close'; SIX : 'bid', 'mid', 'ask', 'open', 'close', 'last', 'referencePrice', 'highPrice', 'lowPrice', 'maxRedemptionPrice', 'maxSubscriptionPrice', 'openPrice', 'bestBidPrice', 'lastBidPrice', 'bestAskPrice', 'lastAskPrice'; Bloomberg : 'bid', 'mid', 'ask', 'open', 'close', 'last'; Rimes : 'bid', 'mid', 'ask', 'open', 'close', 'last'; ICE : 'ask', 'bid'")
|
33
|
+
field: constr(strict=True, min_length=1) = Field(..., description="The field of the quote e.g. bid, mid, ask etc. This should be consistent across a time series of quotes. The allowed values depend on the provider according to the following rules: Client : *Any value is accepted*; DataScope : 'bid', 'mid', 'ask'; Lusid : *Any value is accepted*; Edi : 'bid', 'mid', 'ask', 'open', 'close', 'last'; TraderMade : 'bid', 'mid', 'ask', 'open', 'close', 'high', 'low'; FactSet : 'bid', 'mid', 'ask', 'open', 'close'; SIX : 'bid', 'mid', 'ask', 'open', 'close', 'last', 'referencePrice', 'highPrice', 'lowPrice', 'maxRedemptionPrice', 'maxSubscriptionPrice', 'openPrice', 'bestBidPrice', 'lastBidPrice', 'bestAskPrice', 'lastAskPrice', 'finalSettlementOptions', 'finalSettlementFutures'; Bloomberg : 'bid', 'mid', 'ask', 'open', 'close', 'last'; Rimes : 'bid', 'mid', 'ask', 'open', 'close', 'last'; ICE : 'ask', 'bid'; LSEG : 'ASK', 'BID', 'MID_PRICE'")
|
34
34
|
__properties = ["provider", "priceSource", "instrumentId", "instrumentIdType", "quoteType", "field"]
|
35
35
|
|
36
36
|
@validator('instrument_id_type')
|
@@ -18,8 +18,8 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from datetime import datetime
|
21
|
-
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import Field, StrictStr, validator
|
21
|
+
from typing import Any, Dict, Optional, Union
|
22
|
+
from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, validator
|
23
23
|
from lusid.models.instrument_event import InstrumentEvent
|
24
24
|
from lusid.models.units_ratio import UnitsRatio
|
25
25
|
|
@@ -31,10 +31,12 @@ class ScripDividendEvent(InstrumentEvent):
|
|
31
31
|
ex_date: datetime = Field(..., alias="exDate", description="The first business day on which the dividend is not owed to the buying party. Typically this is T-1 from the RecordDate.")
|
32
32
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to participate in the tender.")
|
33
33
|
payment_date: datetime = Field(..., alias="paymentDate", description="The date the company pays out dividends to shareholders.")
|
34
|
+
fractional_units_cash_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="fractionalUnitsCashPrice", description="The cash price per unit paid in lieu when fractional units can not be distributed.")
|
35
|
+
fractional_units_cash_currency: Optional[StrictStr] = Field(None, alias="fractionalUnitsCashCurrency", description="The currency of the cash paid in lieu of fractional units.")
|
34
36
|
units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
|
35
37
|
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
36
38
|
additional_properties: Dict[str, Any] = {}
|
37
|
-
__properties = ["instrumentEventType", "announcementDate", "exDate", "recordDate", "paymentDate", "unitsRatio"]
|
39
|
+
__properties = ["instrumentEventType", "announcementDate", "exDate", "recordDate", "paymentDate", "fractionalUnitsCashPrice", "fractionalUnitsCashCurrency", "unitsRatio"]
|
38
40
|
|
39
41
|
@validator('instrument_event_type')
|
40
42
|
def instrument_event_type_validate_enum(cls, value):
|
@@ -86,6 +88,16 @@ class ScripDividendEvent(InstrumentEvent):
|
|
86
88
|
if self.record_date is None and "record_date" in self.__fields_set__:
|
87
89
|
_dict['recordDate'] = None
|
88
90
|
|
91
|
+
# set to None if fractional_units_cash_price (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.fractional_units_cash_price is None and "fractional_units_cash_price" in self.__fields_set__:
|
94
|
+
_dict['fractionalUnitsCashPrice'] = None
|
95
|
+
|
96
|
+
# set to None if fractional_units_cash_currency (nullable) is None
|
97
|
+
# and __fields_set__ contains the field
|
98
|
+
if self.fractional_units_cash_currency is None and "fractional_units_cash_currency" in self.__fields_set__:
|
99
|
+
_dict['fractionalUnitsCashCurrency'] = None
|
100
|
+
|
89
101
|
return _dict
|
90
102
|
|
91
103
|
@classmethod
|
@@ -103,6 +115,8 @@ class ScripDividendEvent(InstrumentEvent):
|
|
103
115
|
"ex_date": obj.get("exDate"),
|
104
116
|
"record_date": obj.get("recordDate"),
|
105
117
|
"payment_date": obj.get("paymentDate"),
|
118
|
+
"fractional_units_cash_price": obj.get("fractionalUnitsCashPrice"),
|
119
|
+
"fractional_units_cash_currency": obj.get("fractionalUnitsCashCurrency"),
|
106
120
|
"units_ratio": UnitsRatio.from_dict(obj.get("unitsRatio")) if obj.get("unitsRatio") is not None else None
|
107
121
|
})
|
108
122
|
# store additional fields in additional_properties
|
@@ -19,7 +19,7 @@ import json
|
|
19
19
|
|
20
20
|
|
21
21
|
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import BaseModel, Field, StrictStr, constr, validator
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, constr, validator
|
23
23
|
|
24
24
|
class ShareClassDetails(BaseModel):
|
25
25
|
"""
|
@@ -28,7 +28,8 @@ class ShareClassDetails(BaseModel):
|
|
28
28
|
lusid_instrument_id: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="lusidInstrumentId", description="LUSID's internal unique instrument identifier, resolved from the share class' instrument identifiers")
|
29
29
|
instrument_scope: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(None, alias="instrumentScope", description="The scope in which the share class instrument lies.")
|
30
30
|
dom_currency: Optional[StrictStr] = Field(None, alias="domCurrency", description="The domestic currency of the share class instrument")
|
31
|
-
|
31
|
+
instrument_active: Optional[StrictBool] = Field(None, alias="instrumentActive", description="If the instrument of the share class is active.")
|
32
|
+
__properties = ["lusidInstrumentId", "instrumentScope", "domCurrency", "instrumentActive"]
|
32
33
|
|
33
34
|
@validator('lusid_instrument_id')
|
34
35
|
def lusid_instrument_id_validate_regular_expression(cls, value):
|
@@ -103,6 +104,7 @@ class ShareClassDetails(BaseModel):
|
|
103
104
|
_obj = ShareClassDetails.parse_obj({
|
104
105
|
"lusid_instrument_id": obj.get("lusidInstrumentId"),
|
105
106
|
"instrument_scope": obj.get("instrumentScope"),
|
106
|
-
"dom_currency": obj.get("domCurrency")
|
107
|
+
"dom_currency": obj.get("domCurrency"),
|
108
|
+
"instrument_active": obj.get("instrumentActive")
|
107
109
|
})
|
108
110
|
return _obj
|
@@ -18,8 +18,8 @@ import re # noqa: F401
|
|
18
18
|
import json
|
19
19
|
|
20
20
|
from datetime import datetime
|
21
|
-
from typing import Any, Dict, Optional
|
22
|
-
from pydantic.v1 import Field, StrictStr, validator
|
21
|
+
from typing import Any, Dict, Optional, Union
|
22
|
+
from pydantic.v1 import Field, StrictFloat, StrictInt, StrictStr, validator
|
23
23
|
from lusid.models.instrument_event import InstrumentEvent
|
24
24
|
from lusid.models.units_ratio import UnitsRatio
|
25
25
|
|
@@ -32,9 +32,11 @@ class StockSplitEvent(InstrumentEvent):
|
|
32
32
|
units_ratio: UnitsRatio = Field(..., alias="unitsRatio")
|
33
33
|
record_date: Optional[datetime] = Field(None, alias="recordDate", description="Date you have to be the holder of record in order to receive the additional shares.")
|
34
34
|
announcement_date: Optional[datetime] = Field(None, alias="announcementDate", description="Date the stock split was announced.")
|
35
|
+
fractional_units_cash_price: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="fractionalUnitsCashPrice", description="The cash price per unit paid in lieu when fractional units can not be distributed.")
|
36
|
+
fractional_units_cash_currency: Optional[StrictStr] = Field(None, alias="fractionalUnitsCashCurrency", description="The currency of the cash paid in lieu of fractional units.")
|
35
37
|
instrument_event_type: StrictStr = Field(..., alias="instrumentEventType", description="The Type of Event. The available values are: TransitionEvent, InformationalEvent, OpenEvent, CloseEvent, StockSplitEvent, BondDefaultEvent, CashDividendEvent, AmortisationEvent, CashFlowEvent, ExerciseEvent, ResetEvent, TriggerEvent, RawVendorEvent, InformationalErrorEvent, BondCouponEvent, DividendReinvestmentEvent, AccumulationEvent, BondPrincipalEvent, DividendOptionEvent, MaturityEvent, FxForwardSettlementEvent, ExpiryEvent, ScripDividendEvent, StockDividendEvent, ReverseStockSplitEvent, CapitalDistributionEvent, SpinOffEvent, MergerEvent, FutureExpiryEvent")
|
36
38
|
additional_properties: Dict[str, Any] = {}
|
37
|
-
__properties = ["instrumentEventType", "paymentDate", "exDate", "unitsRatio", "recordDate", "announcementDate"]
|
39
|
+
__properties = ["instrumentEventType", "paymentDate", "exDate", "unitsRatio", "recordDate", "announcementDate", "fractionalUnitsCashPrice", "fractionalUnitsCashCurrency"]
|
38
40
|
|
39
41
|
@validator('instrument_event_type')
|
40
42
|
def instrument_event_type_validate_enum(cls, value):
|
@@ -86,6 +88,16 @@ class StockSplitEvent(InstrumentEvent):
|
|
86
88
|
if self.announcement_date is None and "announcement_date" in self.__fields_set__:
|
87
89
|
_dict['announcementDate'] = None
|
88
90
|
|
91
|
+
# set to None if fractional_units_cash_price (nullable) is None
|
92
|
+
# and __fields_set__ contains the field
|
93
|
+
if self.fractional_units_cash_price is None and "fractional_units_cash_price" in self.__fields_set__:
|
94
|
+
_dict['fractionalUnitsCashPrice'] = None
|
95
|
+
|
96
|
+
# set to None if fractional_units_cash_currency (nullable) is None
|
97
|
+
# and __fields_set__ contains the field
|
98
|
+
if self.fractional_units_cash_currency is None and "fractional_units_cash_currency" in self.__fields_set__:
|
99
|
+
_dict['fractionalUnitsCashCurrency'] = None
|
100
|
+
|
89
101
|
return _dict
|
90
102
|
|
91
103
|
@classmethod
|
@@ -103,7 +115,9 @@ class StockSplitEvent(InstrumentEvent):
|
|
103
115
|
"ex_date": obj.get("exDate"),
|
104
116
|
"units_ratio": UnitsRatio.from_dict(obj.get("unitsRatio")) if obj.get("unitsRatio") is not None else None,
|
105
117
|
"record_date": obj.get("recordDate"),
|
106
|
-
"announcement_date": obj.get("announcementDate")
|
118
|
+
"announcement_date": obj.get("announcementDate"),
|
119
|
+
"fractional_units_cash_price": obj.get("fractionalUnitsCashPrice"),
|
120
|
+
"fractional_units_cash_currency": obj.get("fractionalUnitsCashCurrency")
|
107
121
|
})
|
108
122
|
# store additional fields in additional_properties
|
109
123
|
for _key in obj.keys():
|
@@ -0,0 +1,153 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import BaseModel, Field, StrictStr, conlist
|
23
|
+
from lusid.models.error_detail import ErrorDetail
|
24
|
+
from lusid.models.link import Link
|
25
|
+
from lusid.models.order import Order
|
26
|
+
from lusid.models.response_meta_data import ResponseMetaData
|
27
|
+
|
28
|
+
class UpdateOrdersResponse(BaseModel):
|
29
|
+
"""
|
30
|
+
UpdateOrdersResponse
|
31
|
+
"""
|
32
|
+
href: Optional[StrictStr] = Field(None, description="The specific Uniform Resource Identifier (URI) for this resource at the requested effective and asAt datetime.")
|
33
|
+
values: Optional[Dict[str, Order]] = Field(None, description="The orders which have been successfully updated.")
|
34
|
+
failed: Optional[Dict[str, ErrorDetail]] = Field(None, description="The orders that could not be updated, along with a reason for their failure.")
|
35
|
+
metadata: Optional[Dict[str, conlist(ResponseMetaData)]] = Field(None, description="Meta data associated with the update event.")
|
36
|
+
links: Optional[conlist(Link)] = None
|
37
|
+
__properties = ["href", "values", "failed", "metadata", "links"]
|
38
|
+
|
39
|
+
class Config:
|
40
|
+
"""Pydantic configuration"""
|
41
|
+
allow_population_by_field_name = True
|
42
|
+
validate_assignment = True
|
43
|
+
|
44
|
+
def to_str(self) -> str:
|
45
|
+
"""Returns the string representation of the model using alias"""
|
46
|
+
return pprint.pformat(self.dict(by_alias=True))
|
47
|
+
|
48
|
+
def to_json(self) -> str:
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
50
|
+
return json.dumps(self.to_dict())
|
51
|
+
|
52
|
+
@classmethod
|
53
|
+
def from_json(cls, json_str: str) -> UpdateOrdersResponse:
|
54
|
+
"""Create an instance of UpdateOrdersResponse from a JSON string"""
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
56
|
+
|
57
|
+
def to_dict(self):
|
58
|
+
"""Returns the dictionary representation of the model using alias"""
|
59
|
+
_dict = self.dict(by_alias=True,
|
60
|
+
exclude={
|
61
|
+
},
|
62
|
+
exclude_none=True)
|
63
|
+
# override the default output from pydantic by calling `to_dict()` of each value in values (dict)
|
64
|
+
_field_dict = {}
|
65
|
+
if self.values:
|
66
|
+
for _key in self.values:
|
67
|
+
if self.values[_key]:
|
68
|
+
_field_dict[_key] = self.values[_key].to_dict()
|
69
|
+
_dict['values'] = _field_dict
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of each value in failed (dict)
|
71
|
+
_field_dict = {}
|
72
|
+
if self.failed:
|
73
|
+
for _key in self.failed:
|
74
|
+
if self.failed[_key]:
|
75
|
+
_field_dict[_key] = self.failed[_key].to_dict()
|
76
|
+
_dict['failed'] = _field_dict
|
77
|
+
# override the default output from pydantic by calling `to_dict()` of each value in metadata (dict of array)
|
78
|
+
_field_dict_of_array = {}
|
79
|
+
if self.metadata:
|
80
|
+
for _key in self.metadata:
|
81
|
+
if self.metadata[_key]:
|
82
|
+
_field_dict_of_array[_key] = [
|
83
|
+
_item.to_dict() for _item in self.metadata[_key]
|
84
|
+
]
|
85
|
+
_dict['metadata'] = _field_dict_of_array
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
87
|
+
_items = []
|
88
|
+
if self.links:
|
89
|
+
for _item in self.links:
|
90
|
+
if _item:
|
91
|
+
_items.append(_item.to_dict())
|
92
|
+
_dict['links'] = _items
|
93
|
+
# set to None if href (nullable) is None
|
94
|
+
# and __fields_set__ contains the field
|
95
|
+
if self.href is None and "href" in self.__fields_set__:
|
96
|
+
_dict['href'] = None
|
97
|
+
|
98
|
+
# set to None if values (nullable) is None
|
99
|
+
# and __fields_set__ contains the field
|
100
|
+
if self.values is None and "values" in self.__fields_set__:
|
101
|
+
_dict['values'] = None
|
102
|
+
|
103
|
+
# set to None if failed (nullable) is None
|
104
|
+
# and __fields_set__ contains the field
|
105
|
+
if self.failed is None and "failed" in self.__fields_set__:
|
106
|
+
_dict['failed'] = None
|
107
|
+
|
108
|
+
# set to None if metadata (nullable) is None
|
109
|
+
# and __fields_set__ contains the field
|
110
|
+
if self.metadata is None and "metadata" in self.__fields_set__:
|
111
|
+
_dict['metadata'] = None
|
112
|
+
|
113
|
+
# set to None if links (nullable) is None
|
114
|
+
# and __fields_set__ contains the field
|
115
|
+
if self.links is None and "links" in self.__fields_set__:
|
116
|
+
_dict['links'] = None
|
117
|
+
|
118
|
+
return _dict
|
119
|
+
|
120
|
+
@classmethod
|
121
|
+
def from_dict(cls, obj: dict) -> UpdateOrdersResponse:
|
122
|
+
"""Create an instance of UpdateOrdersResponse from a dict"""
|
123
|
+
if obj is None:
|
124
|
+
return None
|
125
|
+
|
126
|
+
if not isinstance(obj, dict):
|
127
|
+
return UpdateOrdersResponse.parse_obj(obj)
|
128
|
+
|
129
|
+
_obj = UpdateOrdersResponse.parse_obj({
|
130
|
+
"href": obj.get("href"),
|
131
|
+
"values": dict(
|
132
|
+
(_k, Order.from_dict(_v))
|
133
|
+
for _k, _v in obj.get("values").items()
|
134
|
+
)
|
135
|
+
if obj.get("values") is not None
|
136
|
+
else None,
|
137
|
+
"failed": dict(
|
138
|
+
(_k, ErrorDetail.from_dict(_v))
|
139
|
+
for _k, _v in obj.get("failed").items()
|
140
|
+
)
|
141
|
+
if obj.get("failed") is not None
|
142
|
+
else None,
|
143
|
+
"metadata": dict(
|
144
|
+
(_k,
|
145
|
+
[ResponseMetaData.from_dict(_item) for _item in _v]
|
146
|
+
if _v is not None
|
147
|
+
else None
|
148
|
+
)
|
149
|
+
for _k, _v in obj.get("metadata").items()
|
150
|
+
),
|
151
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
152
|
+
})
|
153
|
+
return _obj
|