import Decimal from "decimal.js"; import { Side, type OrderBookId, type PubkeyStr, type TimeInForce, type TriggerType } from "../../shared"; export * from "./client"; export * from "./wire"; export * from "./state"; export { limitSnapshotToOrder, convertSnapshotOrders, orderFromUpdate } from "./convert"; export declare enum OrderType { Limit = "limit", Trigger = "trigger" } export declare function orderTypeLabel(orderType: OrderType): string; export declare enum OrderStatus { Open = "OPEN", Matching = "MATCHING", Cancelled = "CANCELLED", Filled = "FILLED", Pending = "PENDING" } export interface LimitOrder { marketPubkey: PubkeyStr; orderbookId: OrderBookId; txSignature?: string; baseMint: PubkeyStr; quoteMint: PubkeyStr; orderHash: string; side: Side; size: string; price: string; filledSize: string; remainingSize: string; createdAt: Date; status: OrderStatus; outcomeIndex: number; } export interface TriggerOrder { triggerOrderId: string; orderHash: string; marketPubkey: PubkeyStr; orderbookId: OrderBookId; triggerPrice: string; triggerType: TriggerType; side: Side; amountIn: string; amountOut: string; timeInForce: TimeInForce; createdAt: Date; } /** * Derive the limit price from pre-scaled amounts. * * `amountIn` and `amountOut` are already human-readable decimals * (scaled by the snapshot/websocket layer), so no further decimal * conversion is needed. * * For Ask: maker gives base, receives quote -> price = quote / base * For Bid: maker gives quote, receives base -> price = quote / base */ export declare function triggerOrderLimitPrice(order: TriggerOrder): Decimal | undefined; //# sourceMappingURL=index.d.ts.map