Class LiquidityPoolSingle

An interface for liquidity pools within the synths platform.

Hierarchy

  • LiquidityPoolSingle

Implements

Constructors

Properties

adapter: TradeAdapter
id: string
onUpdate?: (() => void)

Type declaration

    • (): void
    • Returns void

pairStates: Record<string, undefined | PairState> = {}
pairTradeability: Record<string, undefined | boolean> = {}
pairTradeabilityListeners: LpPairTradeabilityListener[] = []
priceFeed: TradeLpPriceFeed
tradePairs: TradePair[]
underlyingToken: TokenInfo

Methods

  • Parameters

    Returns Promise<{
        accountId: number;
        accountUser: string;
        createdTimestampUnixMillis: number;
        expiryTimestampUnixMillis: number;
        id: string;
        kind: (({ kind: "market"; }) | ({ kind: "limit"; args: { limitPrice: BigNumber; }; }) | ({ kind: "stopMarket"; args: { triggerPrice: BigNumber; stopLoss?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }) | ({ kind: "stopLimit"; args: { triggerPrice: BigNumber; limitPrice: BigNumber; }; }) | ({ kind: "limitTrigger"; args: { triggerPrice: BigNumber; takeProfit?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }) | ({ kind: string; })) & (undefined | ({ kind: "market"; }) | ({ kind: "limit"; args: { limitPrice: BigNumber; }; }) | ({ kind: "stopMarket"; args: { triggerPrice: BigNumber; stopLoss?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }) | ({ kind: "stopLimit"; args: { triggerPrice: BigNumber; limitPrice: BigNumber; }; }) | ({ kind: "limitTrigger"; args: { triggerPrice: BigNumber; takeProfit?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }) | ({ kind: string; }));
        lpId: string;
        nonce: string;
        pair: Pair;
        signature: string;
        size: { amount: BigNumber; unit: "lpc" | "lot"; };
        status: (({ status: "open"; content: { status: "placed"; } | { status: "triggered"; content: { triggerPrice: BigNumber; timestampUnixMillis: number; }; }; }) | ({ status: "filled"; content: { price: BigNumber; timestampUnixMillis: number; settlementStatus: { status: "queued"; } | { status: "beforeTx"; } | { status: "indexing"; } | { status: "settled"; content: { ...; }; }; }; }) | ({ status: "cancelled"; content: { timestampUnixMillis: number; reason: string; userCancellation?: { address: string; nonce: string; signature: { v: number; r: string; s: string; }; } | null | undefined; }; })) & (undefined | ({ status: "open"; content: { status: "placed"; } | { status: "triggered"; content: { triggerPrice: BigNumber; timestampUnixMillis: number; }; }; }) | ({ status: "filled"; content: { price: BigNumber; timestampUnixMillis: number; settlementStatus: { status: "queued"; } | { status: "beforeTx"; } | { status: "indexing"; } | { status: "settled"; content: { ...; }; }; }; }) | ({ status: "cancelled"; content: { timestampUnixMillis: number; reason: string; userCancellation?: { address: string; nonce: string; signature: { v: number; r: string; s: string; }; } | null | undefined; }; }));
    }>

  • Parameters

    Returns Promise<{
        accountId: number;
        accountUser: string;
        createdTimestampUnixMillis: number;
        expiryTimestampUnixMillis: number;
        id: string;
        kind: (({ kind: "market"; }) | ({ kind: "limit"; args: { limitPrice: BigNumber; }; }) | ({ kind: "stopMarket"; args: { triggerPrice: BigNumber; stopLoss?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }) | ({ kind: "stopLimit"; args: { triggerPrice: BigNumber; limitPrice: BigNumber; }; }) | ({ kind: "limitTrigger"; args: { triggerPrice: BigNumber; takeProfit?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }) | ({ kind: string; })) & (undefined | ({ kind: "market"; }) | ({ kind: "limit"; args: { limitPrice: BigNumber; }; }) | ({ kind: "stopMarket"; args: { triggerPrice: BigNumber; stopLoss?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }) | ({ kind: "stopLimit"; args: { triggerPrice: BigNumber; limitPrice: BigNumber; }; }) | ({ kind: "limitTrigger"; args: { triggerPrice: BigNumber; takeProfit?: { kind: "position"; } | { id: string; kind: "order"; } | null | undefined; }; }) | ({ kind: string; }));
        lpId: string;
        nonce: string;
        pair: Pair;
        signature: string;
        size: { amount: BigNumber; unit: "lpc" | "lot"; };
        status: (({ status: "open"; content: { status: "placed"; } | { status: "triggered"; content: { triggerPrice: BigNumber; timestampUnixMillis: number; }; }; }) | ({ status: "filled"; content: { price: BigNumber; timestampUnixMillis: number; settlementStatus: { status: "queued"; } | { status: "beforeTx"; } | { status: "indexing"; } | { status: "settled"; content: { ...; }; }; }; }) | ({ status: "cancelled"; content: { timestampUnixMillis: number; reason: string; userCancellation?: { address: string; nonce: string; signature: { v: number; r: string; s: string; }; } | null | undefined; }; })) & (undefined | ({ status: "open"; content: { status: "placed"; } | { status: "triggered"; content: { triggerPrice: BigNumber; timestampUnixMillis: number; }; }; }) | ({ status: "filled"; content: { price: BigNumber; timestampUnixMillis: number; settlementStatus: { status: "queued"; } | { status: "beforeTx"; } | { status: "indexing"; } | { status: "settled"; content: { ...; }; }; }; }) | ({ status: "cancelled"; content: { timestampUnixMillis: number; reason: string; userCancellation?: { address: string; nonce: string; signature: { v: number; r: string; s: string; }; } | null | undefined; }; }));
    }[]>

Generated using TypeDoc