Orders

Limit Orders

Limit order class.

class pymicrostructure.orders.limit.LimitOrder(trader_id: int, volume: int, price: int)[source]

Bases: Order

Represents a limit order.

A limit order is an order to buy or sell a security at a specific price or better.

Attributes:

trader_idint

The ID of the trader submitting the order.

volumeint

The volume of the order.

priceint

The price at which the order is submitted.

Market Orders

Market order class.

class pymicrostructure.orders.market.MarketOrder(trader_id: int, volume)[source]

Bases: Order

Represents a market order.

A market order is an order to buy or sell a security at the best available price.

Attributes:

trader_idint

The ID of the trader submitting the order.

volumeint

The volume of the order.

pricefloat

The price at which the order is submitted - infinity for buy orders and negative infinity for sell orders.

Methods:

__repr__()

Return a string representation of the order.