@qtsurfer/api-client
    Preparing search index...

    Type Alias LivePaperAccount

    One simulated account: one per quote currency the run trades, or one per instrument when the run was started with accounts: instrument.

    type LivePaperAccount = {
        currency: string;
        equity: number;
        equityAtMs?: number;
        equityKind?: "equity" | "mark";
        gaps: number;
        initialFunding: number;
        instrument?: string;
        instruments?: LivePaperInstrument[];
        kpi?: LivePaperKpi;
        openPositions: LivePaperPosition[];
        realisedPnl: number;
        totalPnl?: number;
        trades: number;
        unrealisedPnl?: number;
    }
    Index
    currency: string

    The account's quote currency; every amount below is in it.

    equity: number

    Latest recorded equity — see equityKind.

    equityAtMs?: number

    Market time of that value. Absent while the account holds its starting capital.

    equityKind?: "equity" | "mark"

    equity at a closed trade, mark at a periodic mark-to-market (includes open positions at market price).

    gaps: number

    Times open positions were lost because the run was restarted with them open.

    initialFunding: number
    instrument?: string

    With accounts: instrument, the instrument the account is: currency is then its quote and several accounts can share it. Absent for the shared account of a currency. Such an account has no instruments, since it already is one instrument: its unrealisedPnl and totalPnl are that instrument's own. Its initialFunding is its own: never add it to another account's.

    instruments?: LivePaperInstrument[]

    Only for the shared account of a currency. What the account realised per instrument: one entry for every instrument that has closed a trade or holds a position now, in instrument order. Exact for what was realised, and not how the instrument would have done on its own, since its entries depended on what the others had locked from the same account. The instruments' realisedPnl add up to the account's.

    openPositions: LivePaperPosition[]
    realisedPnl: number

    Sum of the PnL of the closed trades.

    totalPnl?: number

    realisedPnl plus unrealisedPnl. Absent when unrealisedPnl is.

    trades: number

    Closed trades.

    unrealisedPnl?: number

    What its open positions are worth over their cost as of the last mark, in the account's currency: the sum of unrealisedPnl over openPositions. 0 when it holds nothing. Absent while any of its positions has no current mark (see openPositions).