feat(): Added endpoint, updated types
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,4 +25,5 @@ bundleReport.html
|
||||
rawReq.ts
|
||||
localtest.sh
|
||||
localtest.ts
|
||||
privaterepotracker
|
||||
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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<APIResponseV3WithTime<{ marginToken: any[] }>> {
|
||||
}): Promise<APIResponseV3WithTime<{ loanInfo: any[] }>> {
|
||||
return this.getPrivate('/v5/ins-loan/loan-order', params);
|
||||
}
|
||||
|
||||
|
||||
@@ -207,6 +207,8 @@ export interface ConvertQuoteV5 {
|
||||
toAmount: string;
|
||||
expiredTime: string;
|
||||
requestId: string;
|
||||
paramType: string;
|
||||
paramValue: string;
|
||||
}
|
||||
|
||||
export interface ConvertStatusV5 {
|
||||
|
||||
Reference in New Issue
Block a user