diff --git a/package.json b/package.json index 9204cda..87916b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bybit-api", - "version": "3.3.0", + "version": "3.3.1", "description": "Complete & robust node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & integration tests.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/contract-client.ts b/src/contract-client.ts index 6844b1c..59146d7 100644 --- a/src/contract-client.ts +++ b/src/contract-client.ts @@ -293,7 +293,7 @@ export class ContractClient extends BaseRestClient { /** Get the information of open interest limit. */ getOpenInterestLimitInfo(symbol: string): Promise> { - return this.getPrivate('/contract/v3/private/position/closed-pnl', { + return this.getPrivate('/contract/v3/private/position/limit-info', { symbol, }); } diff --git a/src/util/BaseRestClient.ts b/src/util/BaseRestClient.ts index a83d687..9c18473 100644 --- a/src/util/BaseRestClient.ts +++ b/src/util/BaseRestClient.ts @@ -216,9 +216,11 @@ export default abstract class BaseRestClient { options.headers['X-BAPI-RECV-WINDOW'] = signResult.recvWindow; if (method === 'GET') { + // const serialisedParams = signResult.serializedParams; return { ...options, params: signResult.originalParams, + // url: url + (serialisedParams ? '?' + serialisedParams : ''), }; } @@ -359,6 +361,7 @@ export default abstract class BaseRestClient { const paramsStr = timestamp + key + recvWindow + signRequestParams; res.sign = await signMessage(paramsStr, this.secret); + res.serializedParams = signRequestParams; // console.log('sign req: ', paramsStr); return res;