A broker surface of place, modify and cancel plus order and position subscriptions. Nothing in the library takes or implements it: the trading layer never calls one.

Removed in 3.0.0. Implement OrderFeed from openalgo-charts/trade (since 1.0.0), which OrderEngine writes through and OpenAlgoTradeFeed implements, and hand the book to the chart with chart.trading.syncState.

interface TradeFeed {
    cancelOrder(orderId: string): Promise<void>;
    modifyOrder(orderId: string, patch: Partial<PlaceOrder>): Promise<void>;
    placeOrder(o: PlaceOrder): Promise<{ orderId: string }>;
    subscribeOrders(cb: (orders: unknown[]) => void): UnsubscribeFn;
    subscribePositions(cb: (positions: unknown[]) => void): UnsubscribeFn;
}

Methods

  • Parameters

    • orderId: string

    Returns Promise<void>