diff --git a/.gitignore b/.gitignore index bc317ef..dd3f3ac 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,5 @@ bundleReport.html rawReq.ts localtest.sh localtest.ts +privaterepotracker diff --git a/package-lock.json b/package-lock.json index d1169f9..5ac3fd2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bybit-api", - "version": "3.10.13", + "version": "3.10.14", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bybit-api", - "version": "3.10.13", + "version": "3.10.14", "license": "MIT", "dependencies": { "axios": "^1.6.6", diff --git a/package.json b/package.json index ef7a8c9..dd3b5ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bybit-api", - "version": "3.10.13", + "version": "3.10.14", "description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/rest-client-v5.ts b/src/rest-client-v5.ts index 2d03149..14a27ad 100644 --- a/src/rest-client-v5.ts +++ b/src/rest-client-v5.ts @@ -1766,6 +1766,32 @@ export class RestClientV5 extends BaseRestClient { }); } + /** + * Get Historical Interest Rate + * You can query up to six months borrowing interest rate of Margin trading. + * INFO: Need authentication, the api key needs "Spot" permission. Only supports Unified account. + */ + getHistoricalInterestRate(params: { + currency: string; + vipLevel?: string; + startTime?: number; + endTime?: number; + }): Promise< + APIResponseV3WithTime<{ + list: { + timestamp: number; + currency: string; + hourlyBorrowRate: string; + vipLevel: string; + }[]; + }> + > { + return this.getPrivate( + '/v5/spot-margin-trade/interest-rate-history', + params, + ); + } + /** * Get Borrowable Coin Info */ @@ -1959,7 +1985,7 @@ export class RestClientV5 extends BaseRestClient { startTime?: number; endTime?: number; limit?: number; - }): Promise> { + }): Promise> { return this.getPrivate('/v5/ins-loan/loan-order', params); } diff --git a/src/types/response/v5-asset.ts b/src/types/response/v5-asset.ts index 9e58065..42d136e 100644 --- a/src/types/response/v5-asset.ts +++ b/src/types/response/v5-asset.ts @@ -207,6 +207,8 @@ export interface ConvertQuoteV5 { toAmount: string; expiredTime: string; requestId: string; + paramType: string; + paramValue: string; } export interface ConvertStatusV5 {