@binance/crypto-loan 8.1.1 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +153 -1
- package/dist/index.d.ts +153 -1
- package/dist/index.js +61 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +61 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { BadRequestError, CRYPTO_LOAN_REST_API_PROD_URL, CRYPTO_LOAN_REST_API_PR
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@binance/crypto-loan";
|
|
6
|
-
var version = "
|
|
6
|
+
var version = "9.0.0";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/rest-api/modules/flexible-rate-api.ts
|
|
@@ -157,6 +157,27 @@ const FlexibleRateApiAxiosParamCreator = function(configuration) {
|
|
|
157
157
|
timeUnit: _timeUnit
|
|
158
158
|
};
|
|
159
159
|
},
|
|
160
|
+
getFlexibleLoanInterestRateHistory: async (coin, recvWindow, startTime, endTime, current, limit) => {
|
|
161
|
+
assertParamExists("getFlexibleLoanInterestRateHistory", "coin", coin);
|
|
162
|
+
assertParamExists("getFlexibleLoanInterestRateHistory", "recvWindow", recvWindow);
|
|
163
|
+
const localVarQueryParameter = {};
|
|
164
|
+
const localVarBodyParameter = {};
|
|
165
|
+
if (coin !== void 0 && coin !== null) localVarQueryParameter["coin"] = coin;
|
|
166
|
+
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
167
|
+
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
168
|
+
if (current !== void 0 && current !== null) localVarQueryParameter["current"] = current;
|
|
169
|
+
if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
|
|
170
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
171
|
+
let _timeUnit;
|
|
172
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
173
|
+
return {
|
|
174
|
+
endpoint: "/sapi/v2/loan/interestRateHistory",
|
|
175
|
+
method: "GET",
|
|
176
|
+
queryParams: localVarQueryParameter,
|
|
177
|
+
bodyParams: localVarBodyParameter,
|
|
178
|
+
timeUnit: _timeUnit
|
|
179
|
+
};
|
|
180
|
+
},
|
|
160
181
|
getFlexibleLoanLiquidationHistory: async (loanCoin, collateralCoin, startTime, endTime, current, limit, recvWindow) => {
|
|
161
182
|
const localVarQueryParameter = {};
|
|
162
183
|
const localVarBodyParameter = {};
|
|
@@ -370,6 +391,26 @@ var FlexibleRateApi = class {
|
|
|
370
391
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
371
392
|
}
|
|
372
393
|
/**
|
|
394
|
+
* Check Flexible Loan interest rate history
|
|
395
|
+
*
|
|
396
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned
|
|
397
|
+
* The max interval between startTime and endTime is 90 days.
|
|
398
|
+
* Time based on UTC+0.
|
|
399
|
+
*
|
|
400
|
+
* Weight: 400
|
|
401
|
+
*
|
|
402
|
+
* @summary Get Flexible Loan Interest Rate History (USER_DATA)
|
|
403
|
+
* @param {GetFlexibleLoanInterestRateHistoryRequest} requestParameters Request parameters.
|
|
404
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanInterestRateHistoryResponse>>}
|
|
405
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
406
|
+
* @memberof FlexibleRateApi
|
|
407
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Interest-Rate-History Binance API Documentation}
|
|
408
|
+
*/
|
|
409
|
+
async getFlexibleLoanInterestRateHistory(requestParameters) {
|
|
410
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFlexibleLoanInterestRateHistory(requestParameters?.coin, requestParameters?.recvWindow, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.current, requestParameters?.limit);
|
|
411
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
373
414
|
*
|
|
374
415
|
* Weight: 400
|
|
375
416
|
*
|
|
@@ -827,6 +868,25 @@ var RestAPI = class {
|
|
|
827
868
|
return this.flexibleRateApi.getFlexibleLoanCollateralAssetsData(requestParameters);
|
|
828
869
|
}
|
|
829
870
|
/**
|
|
871
|
+
* Check Flexible Loan interest rate history
|
|
872
|
+
*
|
|
873
|
+
* If startTime and endTime are not sent, the recent 90-day data will be returned
|
|
874
|
+
* The max interval between startTime and endTime is 90 days.
|
|
875
|
+
* Time based on UTC+0.
|
|
876
|
+
*
|
|
877
|
+
* Weight: 400
|
|
878
|
+
*
|
|
879
|
+
* @summary Get Flexible Loan Interest Rate History (USER_DATA)
|
|
880
|
+
* @param {GetFlexibleLoanInterestRateHistoryRequest} requestParameters Request parameters.
|
|
881
|
+
*
|
|
882
|
+
* @returns {Promise<RestApiResponse<GetFlexibleLoanInterestRateHistoryResponse>>}
|
|
883
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
884
|
+
* @see {@link https://developers.binance.com/docs/crypto_loan/flexible-rate/market-data/Get-Flexible-Loan-Interest-Rate-History Binance API Documentation}
|
|
885
|
+
*/
|
|
886
|
+
getFlexibleLoanInterestRateHistory(requestParameters) {
|
|
887
|
+
return this.flexibleRateApi.getFlexibleLoanInterestRateHistory(requestParameters);
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
830
890
|
*
|
|
831
891
|
* Weight: 400
|
|
832
892
|
*
|