@ex-master/zb
Advanced tools
Comparing version 0.2.3 to 0.2.4
import { Dashboard } from '@ex-master/core'; | ||
import { Dict } from 'tslang'; | ||
import { ZBDepthEntry, ZBOrderType, ZBRestAPIRequestMethodType, ZBTradeType } from './types'; | ||
export declare type ZBRestAPIGetMarketsResponseData = Dict<{ | ||
amountScale: number; | ||
priceScale: number; | ||
}>; | ||
export interface ZBRestAPIGetDepthParams { | ||
@@ -40,2 +45,3 @@ market: string; | ||
constructor({ baseURL, proxies }?: ZBRestAPIOptions); | ||
getMarkets(): Promise<any>; | ||
getDepth(params: ZBRestAPIGetDepthParams): Promise<ZBRestAPIGetDepthResponseData>; | ||
@@ -42,0 +48,0 @@ getTrades(params: ZBRestAPIGetTradesParams): Promise<ZBRestAPIGetTradesResponseData>; |
@@ -40,2 +40,7 @@ "use strict"; | ||
} | ||
getMarkets() { | ||
return this.request('GET', '/data/v1/markets', undefined, { | ||
retryLimit: 1, | ||
}); | ||
} | ||
getDepth(params) { | ||
@@ -42,0 +47,0 @@ return this.request('GET', '/data/v1/depth', params, { |
{ | ||
"name": "@ex-master/zb", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"main": "bld/library/index.js", | ||
@@ -29,3 +29,3 @@ "types": "bld/library/index.d.ts", | ||
}, | ||
"gitHead": "79696b57a669ebc8c88ebc0f160cfb1c213894ed" | ||
"gitHead": "875258993c2aef16beb5b94f5fbada5ac7bc7cd3" | ||
} |
@@ -46,2 +46,7 @@ import {Agent as HttpAgent} from 'http'; | ||
export type ZBRestAPIGetMarketsResponseData = Dict<{ | ||
amountScale: number; | ||
priceScale: number; | ||
}>; | ||
export interface ZBRestAPIGetDepthParams { | ||
@@ -111,2 +116,13 @@ market: string; | ||
getMarkets(): Promise<any> { | ||
return this.request<ZBRestAPIGetMarketsResponseData>( | ||
'GET', | ||
'/data/v1/markets', | ||
undefined, | ||
{ | ||
retryLimit: 1, | ||
}, | ||
); | ||
} | ||
getDepth( | ||
@@ -113,0 +129,0 @@ params: ZBRestAPIGetDepthParams, |
Sorry, the diff of this file is not supported yet
21501
448