- Preparing search index...
- The search index is not available
handle-sdk
Interface TradeLiquidityPool
Properties
Optional
onUpdate
onUpdate?: (() => void)
Methods
getLpTokenPrice
- getLpTokenPrice(): Promise<BigNumber>
-
Returns Promise<BigNumber>
getPairState
- getPairState(pair): PairState
-
Returns PairState
getPrice
- getPrice(pair, size?): Readonly<MarketPrice>
-
Parameters
-
pair: Pair
-
Optional
size: BigNumber
Optional
getTradePrice
- getTradePrice(args): BigNumber
-
Returns BigNumber
listenToLpPairTradeability
- listenToLpPairTradeability(listener): void
-
Returns void
placeOrder
- placeOrder(args): 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; }; }));
}>
-
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; }; }));
}>
placeOrders
- placeOrders(args): 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; }; }));
}[]>
-
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; }; }));
}[]>
subscribeToMarketPrice
- subscribeToMarketPrice(args): number
-
Returns number
unsubscribeFromMarketPrice
- unsubscribeFromMarketPrice(id): void
-
Returns void
An interface for liquidity pools within the synths platform.