From b28e14cb3a493c680e2f1612d4bf72812b97522d Mon Sep 17 00:00:00 2001 From: CryptoCompiler <72892531+peepopoggers@users.noreply.github.com> Date: Fri, 22 Jan 2021 09:30:36 +0000 Subject: [PATCH] Market Data Shared Endpoints Added --- src/shared-endpoints.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/shared-endpoints.ts b/src/shared-endpoints.ts index 5a07ce5..99e68ac 100644 --- a/src/shared-endpoints.ts +++ b/src/shared-endpoints.ts @@ -4,8 +4,29 @@ import RequestWrapper from './util/requestWrapper'; export default class SharedEndpoints { protected requestWrapper: RequestWrapper; // XXX Is there a way to say that Base has to provide this? - + //------------Market Data Endpoints------------> + + getOrderBook(params: { + symbol: string; + }): GenericAPIResponse { + return this.requestWrapper.get('v2/public/orderBook/L2', params); + } + + /** + * @deprecated use getTickers() instead + */ + getLatestInformation(params?: { + symbol?: string; + }): GenericAPIResponse { + return this.getTickers(params); + } + + getTickers(params?: { + symbol?: string; + }): GenericAPIResponse { + return this.requestWrapper.get('v2/public/tickers', params); + } //------------Wallet Data Endpoints------------>