edit io_types

This commit is contained in:
mtrshirazi21 2026-05-24 21:18:57 +03:30
parent 9cfd36a891
commit 8a5f3142ef

View File

@ -9,6 +9,7 @@ from typing import (
Dict,
Optional,
TypedDict,
Literal,
)
# ========================================|======================================== #
@ -734,7 +735,6 @@ class Instruments(TypedDict):
# +--------------------------------------------------------------------------------------+ #
class BestLimitItem(TypedDict):
"""
Represents the best limit order information at a given price level for a financial instrument.
@ -766,39 +766,6 @@ class BestLimitItem(TypedDict):
sell_quantity: int
sell_price: int
class BestLimit(TypedDict):
"""
Represents the aggregated best limit orders for multiple instruments.
The structure is a nested dictionary where the first key is typically a symbol
identifier (ISIN or symbolName) and the second key represents the order level or priority.
Attributes:
items (Dict[str, Dict[str, BestLimitItem]]): Nested dictionary of BestLimitItem objects.
- Outer key: Instrument identifier (e.g., ISIN or symbolName)
- Inner key: Price level or order priority
- Value: BestLimitItem for that level
Example:
>>> best_limit: BestLimit = {
... "ETF001": {
... "1": {
... "buy_order_count": 5,
... "buy_quantity": 1000,
... "buy_price": 12000,
... "sell_order_count": 3,
... "sell_quantity": 800,
... "sell_price": 12100
... }
... }
... }
>>> best_limit["ETF001"]["1"]["sell_quantity"]
800
"""
items: Dict[str, Dict[str, BestLimitItem]]
class BestLimitResponse(TypedDict):
"""
Response structure for best limit orders from a REST API call.
@ -810,7 +777,18 @@ class BestLimitResponse(TypedDict):
Example:
>>> response: BestLimitResponse = {
... "Data": best_limit,
... "Data": {
... "ETF001": {
... "1": {
... "buy_order_count": 5,
... "buy_quantity": 1000,
... "buy_price": 12000,
... "sell_order_count": 3,
... "sell_quantity": 800,
... "sell_price": 12100
... },
... },
... },
... "Status": {
... "State": True,
... "ServerTimeStamp": 1700350200.0,
@ -825,7 +803,13 @@ class BestLimitResponse(TypedDict):
>>> response["Status"]["State"]
True
"""
Data: BestLimit
Data: Dict[
str,
Dict[
Literal['1','2','3','4','5','6',],
BestLimitItem
]
]
Status: Status
@ -1728,7 +1712,8 @@ class OverviewResponse:
True
"""
Data : Dict[
str,Optional[
str,
Optional[
Union[
OverviewSecuritiesAndFunds,
OverviewTreasuryBonds,