import { Contract, Position as IbkrPosition } from "@stoqey/ib";
export interface Instrument {
    symbol: string;
    exchange: string;
    type?: string;
    secType?: string;
    lastTradeDate?: string;
    lastTradeDateOrContractMonth?: string;
}
export interface TickByTickAllLast {
    date: Date;
    price: number;
    size: number;
    exchange: string;
    specialConditions: string;
    contract: Contract;
}
export interface MarketData {
    instrument?: Instrument;
    open?: number;
    high?: number;
    low?: number;
    close: number;
    volume?: number;
    date: Date;
    price?: number;
    bid?: number;
    ask?: number;
    wap?: number;
    vwap?: number;
    count?: number;
    timestamp?: number;
}
export declare enum OrderAction {
    BUY = "BUY",
    SELL = "SELL"
}
export declare enum OrderType {
    MARKET = "MARKET",
    LIMIT = "LIMIT",
    STOP = "STOP",
    STOP_LIMIT = "STOP_LIMIT"
}
export interface Position {
    id?: string;
    instrument: Instrument;
    price: number;
    lastPrice?: number;
    quantity: number;
    action: OrderAction;
    entryDate?: Date;
}
export interface Order {
    id: string;
    instrument?: Instrument;
    quantity: number;
    action: OrderAction;
    type: OrderType;
    limitPrice?: number;
    stopPrice?: number;
    status?: string;
    filled?: number;
    remaining?: number;
    avgFillPrice?: number;
    commission?: number;
    commissionCurrency?: string;
    ocaGroup?: string;
    useRth?: boolean;
    tif?: string;
    date?: Date;
}
export interface Trade {
    id: string;
    instrument?: Instrument;
    entryPrice: number;
    price: number;
    quantity: number;
    action: OrderAction;
    type: OrderType;
    date: Date;
    entryDate?: Date;
}
export declare const ibkrPositionTossPosition: (position: IbkrPosition) => Position;
