diff --git a/src/linear-client.ts b/src/linear-client.ts index 4ef2566..59f7f52 100644 --- a/src/linear-client.ts +++ b/src/linear-client.ts @@ -48,20 +48,8 @@ export class LinearClient extends SharedEndpoints { return this.requestWrapper.get('public/linear/kline', params); } - /** - * @deprecated use getTrades() instead - */ - getPublicTradingRecords(params: { - symbol: string; - from?: number; - limit?: number; - }): GenericAPIResponse { - return this.getTrades(params); - } - getTrades(params: { symbol: string; - //from?: number; limit?: number; }): GenericAPIResponse { return this.requestWrapper.get('public/linear/recent-trading-records', params); @@ -104,10 +92,6 @@ export class LinearClient extends SharedEndpoints { * * Account Data Endpoints * - */ - - /** - * Active orders */ placeActiveOrder(params: { @@ -136,7 +120,6 @@ export class LinearClient extends SharedEndpoints { page?: number; limit?: number; order_status?: string; - }): GenericAPIResponse { return this.requestWrapper.get('private/linear/order/list', params); } @@ -344,7 +327,15 @@ export class LinearClient extends SharedEndpoints { getRiskLimitList(params: { symbol: string; }): GenericAPIResponse { - return this.requestWrapper.get('public/linear/risk-limit'); + return this.requestWrapper.get('public/linear/risk-limit', params); + } + + setRiskLimit(params: { + symbol: string; + side: string; + risk_id: string; + }): GenericAPIResponse { + return this.requestWrapper.get('private/linear/position/set-risk', params); } /** @@ -354,13 +345,12 @@ export class LinearClient extends SharedEndpoints { getPredictedFundingFee(params: { symbol: string; }): GenericAPIResponse { - return this.requestWrapper.get('private/linear/funding/predicted-funding'); + return this.requestWrapper.get('private/linear/funding/predicted-funding', params); } getLastFundingFee(params: { symbol: string; }): GenericAPIResponse { - return this.requestWrapper.get('private/linear/funding/prev-funding'); + return this.requestWrapper.get('private/linear/funding/prev-funding', params); } - } diff --git a/src/shared-endpoints.ts b/src/shared-endpoints.ts index 0f868a0..1f3a9b2 100644 --- a/src/shared-endpoints.ts +++ b/src/shared-endpoints.ts @@ -37,6 +37,12 @@ export default class SharedEndpoints { return this.requestWrapper.get('v2/public/liq-records', params); } + /** + * + * Market Data : Advanced + * + */ + getOpenInterest(params: { symbol: string; period: string;