UNPKG

client-aftermath-ts-sdk

Version:
58 lines 2.58 kB
import { Caller } from "../../general/utils/caller"; import { ApiPerpetualsCreateAccountBody, PerpetualsMarketId, ApiPerpetualsAccountsBody, PerpetualsOrderSide, CoinType, PerpetualsOrderId, FilledTakerOrderEvent, PerpetualsOrderPrice, Timestamp, ApiPerpetualsHistoricalMarketDataResponse, PerpetualsAccountCap, IFixed, CallerConfig } from "../../types"; import { PerpetualsMarket } from "./perpetualsMarket"; import { PerpetualsAccount } from "./perpetualsAccount"; import { PerpetualsOrderUtils } from "./utils"; export declare class Perpetuals extends Caller { static readonly OrderUtils: typeof PerpetualsOrderUtils; constructor(config?: CallerConfig); getAllMarkets(inputs: { collateralCoinType: CoinType; }): Promise<PerpetualsMarket[]>; getMarket(inputs: { marketId: PerpetualsMarketId; collateralCoinType: CoinType; }): Promise<PerpetualsMarket>; getMarkets(inputs: { marketIds: PerpetualsMarketId[]; collateralCoinType: CoinType; }): Promise<PerpetualsMarket[]>; getAccount(inputs: { accountCap: PerpetualsAccountCap; }): Promise<PerpetualsAccount>; getUserAccountCaps(inputs: ApiPerpetualsAccountsBody & { collateralCoinType: CoinType; }): Promise<PerpetualsAccountCap[]>; getMarketHistoricalData(inputs: { collateralCoinType: CoinType; marketId: PerpetualsMarketId; fromTimestamp: Timestamp; toTimestamp: Timestamp; intervalMs: number; }): Promise<ApiPerpetualsHistoricalMarketDataResponse>; getCreateAccountTx(inputs: ApiPerpetualsCreateAccountBody): Promise<import("@mysten/sui/transactions").Transaction>; static positionSide(inputs: { baseAssetAmount: IFixed; }): PerpetualsOrderSide; static orderPrice(inputs: { orderEvent: FilledTakerOrderEvent; }): number; static priceToOrderPrice: (inputs: { price: number; lotSize: number | bigint; tickSize: number | bigint; }) => PerpetualsOrderPrice; static orderPriceToPrice: (inputs: { orderPrice: PerpetualsOrderPrice; lotSize: number | bigint; tickSize: number | bigint; }) => number; static lotOrTickSizeToNumber(lotOrTickSize: bigint): number; static lotOrTickSizeToBigInt(lotOrTickSize: number): bigint; static orderIdToSide: (orderId: PerpetualsOrderId) => PerpetualsOrderSide; static calcEntryPrice(inputs: { baseAssetAmount: IFixed; quoteAssetNotionalAmount: IFixed; }): number; } //# sourceMappingURL=perpetuals.d.ts.map