Skip to content

Tradomate Orders

Tradomate Orders are the objects that define the orders that your bot will place.

This object is returned whenever a new order is placed. It contains information about the order, such as the order id, the symbol, the quantity, etc.

Structure

class TradomateOrder:
"""
A tradomate order.
"""
symbol: str
quantity: Optional[float]
amount: Optional[float]
order_type: OrderType
order_side: OrderSide
status: OrderStatus
placed_time: Optional[int]
filled_time: Optional[int]
filled_price: Optional[float]
filled_quantity: Optional[float]
rejected_time: Optional[int]
reason_of_failure: Optional[ReasonOfOrderFailure]
comment: Optional[str]
commission: Optional[float]
tags: Dict[str, str] = {}

Properties

PropertyTypeDescription
symbolstrSymbol of the order
quantityOptional[float]Quantity of the order
amountOptional[float]Amount of the order
order_typeOrderTypeType of the order
order_sideOrderSideSide of the order
statusOrderStatusStatus of the order
placed_timeOptional[int]Time when the order was placed
filled_timeOptional[int]Time when the order was filled
filled_priceOptional[float]Price at which the order was filled
filled_quantityOptional[float]Quantity of the order that was filled
rejected_timeOptional[int]Time when the order was rejected
reason_of_failureReasonOfOrderFailureReason of failure of the order
commentOptional[str]Comment of the order
commissionOptional[float]Commission of the order
tagsDict[str, str]Tags of the order

Methods

None

Usage

You would normally get the order when calling the querying functions or when placing an order.

You can pass the order object as is directly to most functions that require an order object.