orders_by_user
All resting limit orders for one user, keyed by chain OrderId.
Returns only orders that have not been fully filled or cancelled; the count
matches the user's open_order_count and the sum of reserved_margin
across these orders equals user_state.reserved_margin.
Signature
def orders_by_user(self, user: Addr) -> dict[OrderId, dict[str, Any]]Example
from dango.info import Info
from dango.utils.constants import MAINNET_API_URL
from dango.utils.types import Addr
info = Info(MAINNET_API_URL, skip_ws=True)
orders = info.orders_by_user(Addr("0x..."))
for oid, order in orders.items():
print(oid, order["pair_id"], order["size"], order["limit_price"])Parameters
user — Addr. The user's account address.
Returns
dict[OrderId, dict[str, Any]] — map of order id to order details. The value shape matches QueryOrdersByUserResponseItem — cast to that TypedDict for typed access.
See also
order— fetch one order by idcancel_order— cancel byOrderId