Simplify schema and error handling
This commit is contained in:
@@ -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 = {"": ""}
|
||||
|
||||
@@ -153,7 +153,7 @@ def parse_side(x):
|
||||
return "unknown"
|
||||
|
||||
|
||||
OpenPositions_schema = {
|
||||
OpenPositionsSchema = {
|
||||
"itemlist": (
|
||||
"positions",
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user