Simplify schema and error handling

This commit is contained in:
2022-11-04 07:20:55 +00:00
parent 04a87c1da6
commit b36791d56b
8 changed files with 181 additions and 128 deletions

View File

@@ -97,7 +97,7 @@ class GetAllPositions(BaseModel):
]
}
get_all_positions_schema = {
GetAllPositionsSchema = {
"itemlist": (
"itemlist",
[
@@ -113,6 +113,7 @@ get_all_positions_schema = {
)
}
# get_account
class GetAccount(BaseModel):
id: str
@@ -151,4 +152,4 @@ class GetAccount(BaseModel):
balance_asof: str
get_account_schema = {"": ""}
GetAccountSchema = {"": ""}

View File

@@ -153,7 +153,7 @@ def parse_side(x):
return "unknown"
OpenPositions_schema = {
OpenPositionsSchema = {
"itemlist": (
"positions",
[