kucoin-universal-sdk
Version:
Official KuCoin Universal SDK.
88 lines (87 loc) • 2 kB
TypeScript
/**
* RestRateLimit represents the rate limiting information for a REST API.
*/
export interface RestRateLimit {
/**
* Total resource pool quota
*/
limit: number;
/**
* Resource pool remaining quota
*/
remaining: number;
/**
* Resource pool quota reset countdown (milliseconds)
*/
reset: number;
}
/**
* RestResponse represents a generic response from the REST API.
*/
export declare class RestResponse {
/**
* Optional rate limit information
*/
rateLimit?: RestRateLimit;
/**
* Response code
*/
code?: string;
/**
* Response data (typed)
*/
data?: any;
/**
* Optional response message
*/
msg?: string;
static fromJson(json: string): RestResponse;
checkRestResponseError(): void;
}
export declare class RestError extends Error {
private response;
private err?;
constructor(response: RestResponse | null, err?: Error | undefined);
toString(): string;
getError(): Error | undefined;
getCommonResponse(): RestResponse | null;
}
/**
* WsMessage represents a message between the WebSocket client and server.
*/
export declare class WsMessage {
/**
* A unique identifier for the message
*/
id: string;
/**
* The type of the message (e.g., WelcomeMessage)
*/
type?: string;
/**
* Sequence number to track the order of messages
*/
sn?: number;
/**
* The topic or channel the message is associated with
*/
topic: string;
/**
* The subject of the message, providing additional context
*/
subject: string;
/**
* Indicates if the message belongs to a private channel
*/
privateChannel?: boolean;
/**
* Specifies whether the message is a response
*/
response?: boolean;
/**
* Raw JSON payload containing additional message data
*/
data: any;
constructor();
static fromJson(json: string): WsMessage;
}