Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

OrderRemoved

Event payload for eventType == "order_removed".

Definition

class OrderRemoved(TypedDict):
    order_id: OrderId
    pair_id: PairId
    user: Addr
    reason: ReasonForOrderRemoval
    client_order_id: ClientOrderId | None

Fields

order_idOrderId.

pair_idPairId.

userAddr.

reasonReasonForOrderRemoval. Why the order left the book: filled, canceled, liquidated, etc.

client_order_idClientOrderId | None. The client id this order was submitted with, if any.

Construction

from typing import cast
 
from dango.utils.types import OrderRemoved, PerpsEvent
 
event: PerpsEvent = ...
if event["eventType"] == "order_removed":
    payload = cast(OrderRemoved, event["data"])
    print(payload["reason"], payload["order_id"])

See also