UNPKG

kucoin-universal-sdk

Version:
127 lines (126 loc) 3.03 kB
import { IsolatedMarginPositionChangeAssetsValue } from './model_isolated_margin_position_change_assets_value'; import { WsMessage } from '../../../model/common'; import { WebSocketMessageCallback } from '../../../internal/interfaces/websocket'; import { Response } from '../../../internal/interfaces/serializable'; export declare class IsolatedMarginPositionEvent implements Response<WsMessage> { /** * Isolated margin symbol */ tag: string; /** * Position status */ status: IsolatedMarginPositionEvent.StatusEnum; /** * Status type */ statusBizType: IsolatedMarginPositionEvent.StatusBizTypeEnum; /** * Accumulated principal */ accumulatedPrincipal: string; /** * */ changeAssets: { [key: string]: IsolatedMarginPositionChangeAssetsValue; }; /** * */ timestamp: number; private constructor(); /** * common response */ commonResponse?: WsMessage; setCommonResponse(response: WsMessage): void; /** * Convert the object to a JSON string. */ toJson(): string; /** * Create an object from a JSON string. */ static fromJson(input: string): IsolatedMarginPositionEvent; /** * Create an object from Js Object. */ static fromObject(jsonObject: Object): IsolatedMarginPositionEvent; } export declare namespace IsolatedMarginPositionEvent { enum StatusEnum { /** * Debt */ DEBT, /** * debt-free */ CLEAR, /** * Borrowing */ IN_BORROW, /** * Repayment in progress */ IN_REPAY, /** * Position closing */ IN_LIQUIDATION, /** * Automatically renewing */ IN_AUTO_RENEW } enum StatusBizTypeEnum { /** * Liquidation */ FORCE_LIQUIDATION, /** * User borrow */ USER_BORROW, /** * Trade auto borrow */ TRADE_AUTO_BORROW, /** * User reply */ USER_REPAY, /** * Auto reply */ AUTO_REPAY, /** * In debt */ DEFAULT_DEBT, /** * No debt */ DEFAULT_CLEAR, /** * One click liquidation */ ONE_CLICK_LIQUIDATION, /** * B2C interest settle liquidation */ B2C_INTEREST_SETTLE_LIQUIDATION, /** * Air drop liquidation */ AIR_DROP_LIQUIDATION } } export type IsolatedMarginPositionEventCallback = (topic: string, subject: string, data: IsolatedMarginPositionEvent) => void; export declare class IsolatedMarginPositionEventCallbackWrapper implements WebSocketMessageCallback { private callback; constructor(callback: IsolatedMarginPositionEventCallback); onMessage(msg: WsMessage): void; }