Skip to content

@nht-pandats/sdk / @nht-pandats/sdk/clients / @nht-pandats/sdk/clients/socket.io

Namespace: @nht-pandats/sdk/clients/socket.io

@nht-pandats/sdk/clients.@nht-pandats/sdk/clients/socket.io

Description

A strongly typed & opinionated client for interacting with the PandaTS socket.io API

Remarks

Most of this is based on reverse engineering the code found in https://nfp.pandats.com/panda-fx/main.b984aec0aed20c8f.js.

Namespaces

Enumerations

Classes

Interfaces

Type Aliases

BaseResponse

Ƭ BaseResponse: Record<string, unknown>

Defined in

src/clients/socket.io/index.ts:34


CurrentOrCloseingPrice

Ƭ CurrentOrCloseingPrice: number

A number represnting the current or closing price of a symbol.

Defined in

src/clients/socket.io/index.ts:108


HighPrice

Ƭ HighPrice: number

A number represnting the highest price of a symbol.

Defined in

src/clients/socket.io/index.ts:98


LowPrice

Ƭ LowPrice: number

A number represnting the lowest price of a symbol.

Defined in

src/clients/socket.io/index.ts:103


OpeningPrice

Ƭ OpeningPrice: number

A number represnting the opening price of a symbol.

Defined in

src/clients/socket.io/index.ts:93


PandaApiResponse

Ƭ PandaApiResponse<T>: { status: 0 | 1 ; code?: SocketClientErrorCode ; reqId?: string ; serverTime?: number } & { [K in keyof T]: T[K] }

Represents the response object returned by the PandaTS API.

Type parameters

NameTypeDescription
Textends BaseResponse = BaseResponseThe type of the response object.

Defined in

src/clients/socket.io/index.ts:42


Quote

Ƭ Quote: [SymbolId, OpeningPrice, HighPrice, LowPrice, CurrentOrCloseingPrice, TimeStamp, VolumeWeightedAveragePrice]

Represents a quote received from the server.

Defined in

src/clients/socket.io/index.ts:131


SymbolId

Ƭ SymbolId: number

A number represnting the ID of a symbol.

Defined in

src/clients/socket.io/index.ts:88


TimeStamp

Ƭ TimeStamp: DateTime

A DateTime object represnting the timestamp of a quote.

Defined in

src/clients/socket.io/index.ts:113


VolumeWeightedAveragePrice

Ƭ VolumeWeightedAveragePrice: number

A number represnting the volume-weighted average price of a symbol.

Defined in

src/clients/socket.io/index.ts:118