Skip to content

Class: SpotClientV3 ​

REST API client for newer Spot V3 APIs.

Deprecated ​

WARNING These endpoints are being switched off gradually and are expected to be completely turned off by the end of 2024. They may stop working at any point before then. Please update your code as soon as possible to use the V5 APIs instead.

Extends ​

  • default

Constructors ​

Constructor ​

ts
new SpotClientV3(restOptions?: RestClientOptions, networkOptions?: AxiosRequestConfig): SpotClientV3;

Create an instance of the REST client. Pass API credentials in the object in the first parameter.

Parameters ​

ParameterTypeDescription
restOptions?RestClientOptionsoptions to configure REST API connectivity
networkOptions?AxiosRequestConfigHTTP networking options for axios

Returns ​

SpotClientV3

Inherited from ​

BaseRestClient.constructor

Methods ​

deletePrivate() ​

ts
deletePrivate(
   endpoint: string, 
   params?: any, 
   callOptions?: RestCallOptions
): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?any
callOptions?RestCallOptions

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.deletePrivate


fetchServerTime() ​

ts
fetchServerTime(): Promise<number>;

Function that calls exchange API to query & resolve server time, used by time sync, disabled by default.

Note: this should always return server time in seconds

Returns ​

Promise<number>

Overrides ​

BaseRestClient.fetchServerTime


fetchTimeOffset() ​

ts
fetchTimeOffset(): Promise<number>;

Estimate drift based on client<->server latency

Returns ​

Promise<number>

Inherited from ​

BaseRestClient.fetchTimeOffset


get() ​

ts
get(
   endpoint: string, 
   params?: any, 
   callOptions?: RestCallOptions
): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?any
callOptions?RestCallOptions

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.get


getClientType() ​

ts
getClientType(): "v5";

Defines the client type (affecting how requests & signatures behave)

Returns ​

"v5"

Overrides ​

BaseRestClient.getClientType


getMergedOrderBook() ​

ts
getMergedOrderBook(
   symbol: string, 
   scale?: number, 
   limit?: number
): Promise<APIResponseV3<any, {
}>>;

Get merged orderbook for symbol

This is the only known pre-V5 endpoint to still be online.

Parameters ​

ParameterType
symbolstring
scale?number
limit?number

Returns ​

Promise<APIResponseV3<any, { }>>


getPrivate() ​

ts
getPrivate(
   endpoint: string, 
   params?: any, 
   callOptions?: RestCallOptions
): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?any
callOptions?RestCallOptions

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.getPrivate


getServerTime() ​

ts
getServerTime(): Promise<{
  time_now: string;
}>;

API Data Endpoints

Returns ​

Promise<{ time_now: string; }>


post() ​

ts
post(
   endpoint: string, 
   params?: any, 
   callOptions?: RestCallOptions
): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?any
callOptions?RestCallOptions

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.post


postPrivate() ​

ts
postPrivate(
   endpoint: string, 
   params?: any, 
   callOptions?: RestCallOptions
): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?any
callOptions?RestCallOptions

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.postPrivate


postPrivateFile() ​

ts
postPrivateFile(
   endpoint: string, 
   params?: FileUploadRequestParams, 
   callOptions?: RestCallOptions
): Promise<any>;

Parameters ​

ParameterType
endpointstring
params?FileUploadRequestParams
callOptions?RestCallOptions

Returns ​

Promise<any>

Inherited from ​

BaseRestClient.postPrivateFile

Built by Siebly. Open source SDKs for exchange APIs.