Skip to content

Commit

Permalink
Fix mandatory fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoelho93 committed May 5, 2024
1 parent 2bde031 commit 9194134
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "python-trading212"
version = "2.0.2"
version = "2.0.3"
description = "An unofficial client for the official Trading212 API"
authors = ["José Coelho <16445494+jcoelho93@users.noreply.github.com>"]
readme = "README.md"
Expand Down
29 changes: 17 additions & 12 deletions trading212/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,21 @@ class Exchange(BaseModel):


class Instrument(BaseModel):
addedOn: str
currencyCode: str
isin: str
maxOpenQuantity: float
minTradeQuantity: float
name: str
shortname: str
ticker: str
type: str
workingScheduleId: int
name: Optional[str] = None
type: Optional[str] = None
isin: Optional[str] = None
addedOn: Optional[str] = None
shortname: Optional[str] = None
result: Optional[Result] = None
currencyCode: Optional[str] = None
currentShare: Optional[float] = None
issues: Optional[List[Issue]] = None
ownedQuantity: Optional[float] = None
expectedShare: Optional[float] = None
workingScheduleId: Optional[int] = None
maxOpenQuantity: Optional[float] = None
minTradeQuantity: Optional[float] = None


class DividendDetails(BaseModel):
Expand Down Expand Up @@ -159,12 +164,12 @@ class Issue(BaseModel):
class Settings(BaseModel):
creationDate: str
dividendCashAction: str
endDate: str
endDate: Optional[str] = None
goal: int
icon: Optional[Icon]
id: int
initialInvestment: int
instrumentShares: Dict[str, float]
initialInvestment: Optional[float] = None
instrumentShares: Optional[Dict[str, float]] = None
name: str
pubicUrl: str

Expand Down

0 comments on commit 9194134

Please sign in to comment.