An order on the O2 Exchange.

const orders = await client.getOrders("fFUEL/fUSDC", tradeAccountId, true);
for (const order of orders) {
console.log(`${order.side} ${order.quantity} @ ${order.price}`);
}
interface Order {
    account?: Identity;
    base_decimals?: number;
    cancel?: boolean;
    close: boolean;
    desired_quantity?: DesiredQuantity;
    fill?: unknown;
    fills?: unknown[];
    history?: unknown[];
    market_id?: MarketId;
    order_id: OrderId;
    order_tx_history?: unknown[];
    order_type: OrderType;
    owner?: Identity;
    partially_filled?: boolean;
    price: bigint;
    price_fill?: bigint;
    quantity: bigint;
    quantity_fill?: bigint;
    side: Side;
    timestamp: string | number;
}

Properties

account?: Identity

The account identity that placed the order.

base_decimals?: number

Base asset decimals (for formatting).

cancel?: boolean

Whether the order has been cancelled.

close: boolean

Whether the order is closed (fully filled or cancelled).

desired_quantity?: DesiredQuantity

Originally desired quantity (underlying asset tracking).

fill?: unknown

Fill information.

fills?: unknown[]

Individual fill records.

history?: unknown[]

Order event history.

market_id?: MarketId

The market this order belongs to.

order_id: OrderId

Unique order identifier.

order_tx_history?: unknown[]

Transaction history for this order.

order_type: OrderType

Order type.

owner?: Identity

The owner identity.

partially_filled?: boolean

Whether the order has been partially filled.

price: bigint

Order price (chain integer).

price_fill?: bigint

Volume-weighted fill price.

quantity: bigint

Total quantity (chain integer).

quantity_fill?: bigint

Filled quantity (chain integer).

side: Side

Order side.

timestamp: string | number

Order creation timestamp.