UNPKG

@binance/derivatives-trading-portfolio-margin-pro

Version:

Official Binance Derivatives Trading (COIN-M Futures) Connector - A lightweight library that provides a convenient interface to Binance's COINN-M Futures REST API, WebSocket API and WebSocket Streams.

1,671 lines (1,630 loc) 114 kB
import { RestApiResponse, ConfigurationRestAPI, WebsocketStreamsBase, WebsocketStream, ConfigurationWebsocketStreams } from '@binance/common'; export { BadRequestError, ConnectorClientError, DERIVATIVES_TRADING_PORTFOLIO_MARGIN_PRO_REST_API_PROD_URL, DERIVATIVES_TRADING_PORTFOLIO_MARGIN_PRO_WS_STREAMS_PROD_URL, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError } from '@binance/common'; /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface BnbTransferResponse */ interface BnbTransferResponse { /** * * @type {number} * @memberof BnbTransferResponse */ tranId?: number; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface ChangeAutoRepayFuturesStatusResponse */ interface ChangeAutoRepayFuturesStatusResponse { /** * * @type {string} * @memberof ChangeAutoRepayFuturesStatusResponse */ msg?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface FundAutoCollectionResponse */ interface FundAutoCollectionResponse { /** * * @type {string} * @memberof FundAutoCollectionResponse */ msg?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface FundCollectionByAssetResponse */ interface FundCollectionByAssetResponse { /** * * @type {string} * @memberof FundCollectionByAssetResponse */ msg?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface GetAutoRepayFuturesStatusResponse */ interface GetAutoRepayFuturesStatusResponse { /** * * @type {boolean} * @memberof GetAutoRepayFuturesStatusResponse */ autoRepay?: boolean; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface GetPortfolioMarginAssetLeverageResponseInner */ interface GetPortfolioMarginAssetLeverageResponseInner { /** * * @type {string} * @memberof GetPortfolioMarginAssetLeverageResponseInner */ asset?: string; /** * * @type {number} * @memberof GetPortfolioMarginAssetLeverageResponseInner */ leverage?: number; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface GetPortfolioMarginAssetLeverageResponse */ interface GetPortfolioMarginAssetLeverageResponse extends Array<GetPortfolioMarginAssetLeverageResponseInner> { } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface GetPortfolioMarginProAccountBalanceResponseInner */ interface GetPortfolioMarginProAccountBalanceResponseInner { /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ asset?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ totalWalletBalance?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ crossMarginAsset?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ crossMarginBorrowed?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ crossMarginFree?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ crossMarginInterest?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ crossMarginLocked?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ umWalletBalance?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ umUnrealizedPNL?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ cmWalletBalance?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ cmUnrealizedPNL?: string; /** * * @type {number} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ updateTime?: number; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ negativeBalance?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ optionWalletBalance?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountBalanceResponseInner */ optionEquity?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface GetPortfolioMarginProAccountBalanceResponse */ interface GetPortfolioMarginProAccountBalanceResponse extends Array<GetPortfolioMarginProAccountBalanceResponseInner> { } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface GetPortfolioMarginProAccountInfoResponse */ interface GetPortfolioMarginProAccountInfoResponse { /** * * @type {string} * @memberof GetPortfolioMarginProAccountInfoResponse */ uniMMR?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountInfoResponse */ accountEquity?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountInfoResponse */ actualEquity?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountInfoResponse */ accountMaintMargin?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountInfoResponse */ accountInitialMargin?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountInfoResponse */ totalAvailableBalance?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountInfoResponse */ accountStatus?: string; /** * * @type {string} * @memberof GetPortfolioMarginProAccountInfoResponse */ accountType?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner */ interface GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner { /** * * @type {string} * @memberof GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner */ asset?: string; /** * * @type {string} * @memberof GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner */ uniMaintainUsd?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface GetPortfolioMarginProSpanAccountInfoResponse */ interface GetPortfolioMarginProSpanAccountInfoResponse { /** * * @type {string} * @memberof GetPortfolioMarginProSpanAccountInfoResponse */ uniMMR?: string; /** * * @type {string} * @memberof GetPortfolioMarginProSpanAccountInfoResponse */ accountEquity?: string; /** * * @type {string} * @memberof GetPortfolioMarginProSpanAccountInfoResponse */ actualEquity?: string; /** * * @type {string} * @memberof GetPortfolioMarginProSpanAccountInfoResponse */ accountMaintMargin?: string; /** * * @type {Array<GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner>} * @memberof GetPortfolioMarginProSpanAccountInfoResponse */ riskUnitMMList?: Array<GetPortfolioMarginProSpanAccountInfoResponseRiskUnitMMListInner>; /** * * @type {string} * @memberof GetPortfolioMarginProSpanAccountInfoResponse */ marginMM?: string; /** * * @type {string} * @memberof GetPortfolioMarginProSpanAccountInfoResponse */ otherMM?: string; /** * * @type {string} * @memberof GetPortfolioMarginProSpanAccountInfoResponse */ accountStatus?: string; /** * * @type {string} * @memberof GetPortfolioMarginProSpanAccountInfoResponse */ accountType?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface GetTransferableEarnAssetBalanceForPortfolioMarginResponse */ interface GetTransferableEarnAssetBalanceForPortfolioMarginResponse { /** * * @type {string} * @memberof GetTransferableEarnAssetBalanceForPortfolioMarginResponse */ asset?: string; /** * * @type {string} * @memberof GetTransferableEarnAssetBalanceForPortfolioMarginResponse */ amount?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface MintBfusdForPortfolioMarginResponse */ interface MintBfusdForPortfolioMarginResponse { /** * * @type {string} * @memberof MintBfusdForPortfolioMarginResponse */ fromAsset?: string; /** * * @type {string} * @memberof MintBfusdForPortfolioMarginResponse */ targetAsset?: string; /** * * @type {number} * @memberof MintBfusdForPortfolioMarginResponse */ fromAssetQty?: number; /** * * @type {number} * @memberof MintBfusdForPortfolioMarginResponse */ targetAssetQty?: number; /** * * @type {number} * @memberof MintBfusdForPortfolioMarginResponse */ rate?: number; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface PortfolioMarginCollateralRateResponseInner */ interface PortfolioMarginCollateralRateResponseInner { /** * * @type {string} * @memberof PortfolioMarginCollateralRateResponseInner */ asset?: string; /** * * @type {string} * @memberof PortfolioMarginCollateralRateResponseInner */ collateralRate?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface PortfolioMarginCollateralRateResponse */ interface PortfolioMarginCollateralRateResponse extends Array<PortfolioMarginCollateralRateResponseInner> { } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface PortfolioMarginProBankruptcyLoanRepayResponse */ interface PortfolioMarginProBankruptcyLoanRepayResponse { /** * * @type {number} * @memberof PortfolioMarginProBankruptcyLoanRepayResponse */ tranId?: number; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner */ interface PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner { /** * * @type {string} * @memberof PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner */ tierFloor?: string; /** * * @type {string} * @memberof PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner */ tierCap?: string; /** * * @type {string} * @memberof PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner */ collateralRate?: string; /** * * @type {string} * @memberof PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner */ cum?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface PortfolioMarginProTieredCollateralRateResponseInner */ interface PortfolioMarginProTieredCollateralRateResponseInner { /** * * @type {string} * @memberof PortfolioMarginProTieredCollateralRateResponseInner */ asset?: string; /** * * @type {Array<PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner>} * @memberof PortfolioMarginProTieredCollateralRateResponseInner */ collateralInfo?: Array<PortfolioMarginProTieredCollateralRateResponseInnerCollateralInfoInner>; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface PortfolioMarginProTieredCollateralRateResponse */ interface PortfolioMarginProTieredCollateralRateResponse extends Array<PortfolioMarginProTieredCollateralRateResponseInner> { } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface QueryPortfolioMarginAssetIndexPriceResponseInner */ interface QueryPortfolioMarginAssetIndexPriceResponseInner { /** * * @type {string} * @memberof QueryPortfolioMarginAssetIndexPriceResponseInner */ asset?: string; /** * * @type {string} * @memberof QueryPortfolioMarginAssetIndexPriceResponseInner */ assetIndexPrice?: string; /** * * @type {number} * @memberof QueryPortfolioMarginAssetIndexPriceResponseInner */ time?: number; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface QueryPortfolioMarginAssetIndexPriceResponse */ interface QueryPortfolioMarginAssetIndexPriceResponse extends Array<QueryPortfolioMarginAssetIndexPriceResponseInner> { } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface QueryPortfolioMarginProBankruptcyLoanAmountResponse */ interface QueryPortfolioMarginProBankruptcyLoanAmountResponse { /** * * @type {string} * @memberof QueryPortfolioMarginProBankruptcyLoanAmountResponse */ asset?: string; /** * * @type {string} * @memberof QueryPortfolioMarginProBankruptcyLoanAmountResponse */ amount?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner */ interface QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner { /** * * @type {string} * @memberof QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner */ asset?: string; /** * * @type {string} * @memberof QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner */ amount?: string; /** * * @type {number} * @memberof QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner */ repayTime?: number; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse */ interface QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse { /** * * @type {number} * @memberof QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse */ total?: number; /** * * @type {Array<QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner>} * @memberof QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse */ rows?: Array<QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponseRowsInner>; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner */ interface QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner { /** * * @type {string} * @memberof QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner */ asset?: string; /** * * @type {string} * @memberof QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner */ interest?: string; /** * * @type {number} * @memberof QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner */ interestAccruedTime?: number; /** * * @type {string} * @memberof QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner */ interestRate?: string; /** * * @type {string} * @memberof QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner */ principal?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse */ interface QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse extends Array<QueryPortfolioMarginProNegativeBalanceInterestHistoryResponseInner> { } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface RedeemBfusdForPortfolioMarginResponse */ interface RedeemBfusdForPortfolioMarginResponse { /** * * @type {string} * @memberof RedeemBfusdForPortfolioMarginResponse */ fromAsset?: string; /** * * @type {string} * @memberof RedeemBfusdForPortfolioMarginResponse */ targetAsset?: string; /** * * @type {number} * @memberof RedeemBfusdForPortfolioMarginResponse */ fromAssetQty?: number; /** * * @type {number} * @memberof RedeemBfusdForPortfolioMarginResponse */ targetAssetQty?: number; /** * * @type {number} * @memberof RedeemBfusdForPortfolioMarginResponse */ rate?: number; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface RepayFuturesNegativeBalanceResponse */ interface RepayFuturesNegativeBalanceResponse { /** * * @type {string} * @memberof RepayFuturesNegativeBalanceResponse */ msg?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * * @export * @interface TransferLdusdtForPortfolioMarginResponse */ interface TransferLdusdtForPortfolioMarginResponse { /** * * @type {string} * @memberof TransferLdusdtForPortfolioMarginResponse */ msg?: string; } /** * Binance Derivatives Trading Portfolio Margin Pro REST API * * OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin Pro REST API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * AccountApi - interface * @interface AccountApi */ interface AccountApiInterface { /** * BNB transfer can be between Margin Account and USDM Account * * * You can only use this function 2 times per 10 minutes in a rolling manner * * Weight: 1500 * * @summary BNB transfer(USER_DATA) * @param {BnbTransferRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ bnbTransfer(requestParameters: BnbTransferRequest): Promise<RestApiResponse<BnbTransferResponse>>; /** * Change Auto-repay-futures Status * * Weight: 1500 * * @summary Change Auto-repay-futures Status(TRADE) * @param {ChangeAutoRepayFuturesStatusRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ changeAutoRepayFuturesStatus(requestParameters: ChangeAutoRepayFuturesStatusRequest): Promise<RestApiResponse<ChangeAutoRepayFuturesStatusResponse>>; /** * Transfers all assets from Futures Account to Margin account * * The BNB would not be collected from UM-PM account to the Portfolio Margin account. * You can only use this function 500 times per hour in a rolling manner. * * Weight: 1500 * * @summary Fund Auto-collection(USER_DATA) * @param {FundAutoCollectionRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ fundAutoCollection(requestParameters?: FundAutoCollectionRequest): Promise<RestApiResponse<FundAutoCollectionResponse>>; /** * Transfers specific asset from Futures Account to Margin account * * The BNB transfer is not be supported * * Weight: 60 * * @summary Fund Collection by Asset(USER_DATA) * @param {FundCollectionByAssetRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ fundCollectionByAsset(requestParameters: FundCollectionByAssetRequest): Promise<RestApiResponse<FundCollectionByAssetResponse>>; /** * Query Auto-repay-futures Status * * Weight: 30 * * @summary Get Auto-repay-futures Status(USER_DATA) * @param {GetAutoRepayFuturesStatusRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ getAutoRepayFuturesStatus(requestParameters?: GetAutoRepayFuturesStatusRequest): Promise<RestApiResponse<GetAutoRepayFuturesStatusResponse>>; /** * Query Portfolio Margin Pro account balance * * Weight: 20 * * @summary Get Portfolio Margin Pro Account Balance(USER_DATA) * @param {GetPortfolioMarginProAccountBalanceRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ getPortfolioMarginProAccountBalance(requestParameters?: GetPortfolioMarginProAccountBalanceRequest): Promise<RestApiResponse<GetPortfolioMarginProAccountBalanceResponse>>; /** * Get Portfolio Margin Pro Account Info * * Weight: 5 * * @summary Get Portfolio Margin Pro Account Info(USER_DATA) * @param {GetPortfolioMarginProAccountInfoRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ getPortfolioMarginProAccountInfo(requestParameters?: GetPortfolioMarginProAccountInfoRequest): Promise<RestApiResponse<GetPortfolioMarginProAccountInfoResponse>>; /** * Get Portfolio Margin Pro SPAN Account Info (For Portfolio Margin Pro SPAN users only) * * Weight: 5 * * @summary Get Portfolio Margin Pro SPAN Account Info(USER_DATA) * @param {GetPortfolioMarginProSpanAccountInfoRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ getPortfolioMarginProSpanAccountInfo(requestParameters?: GetPortfolioMarginProSpanAccountInfoRequest): Promise<RestApiResponse<GetPortfolioMarginProSpanAccountInfoResponse>>; /** * Get transferable earn asset balance for all types of Portfolio Margin account * * Weight: 1500 * * @summary Get Transferable Earn Asset Balance for Portfolio Margin (USER_DATA) * @param {GetTransferableEarnAssetBalanceForPortfolioMarginRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ getTransferableEarnAssetBalanceForPortfolioMargin(requestParameters: GetTransferableEarnAssetBalanceForPortfolioMarginRequest): Promise<RestApiResponse<GetTransferableEarnAssetBalanceForPortfolioMarginResponse>>; /** * Mint BFUSD for all types of Portfolio Margin account * * Weight: 1500 * * @summary Mint BFUSD for Portfolio Margin(TRADE) * @param {MintBfusdForPortfolioMarginRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ mintBfusdForPortfolioMargin(requestParameters: MintBfusdForPortfolioMarginRequest): Promise<RestApiResponse<MintBfusdForPortfolioMarginResponse>>; /** * Repay Portfolio Margin Pro Bankruptcy Loan * * Weight: 3000 * * @summary Portfolio Margin Pro Bankruptcy Loan Repay * @param {PortfolioMarginProBankruptcyLoanRepayRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ portfolioMarginProBankruptcyLoanRepay(requestParameters?: PortfolioMarginProBankruptcyLoanRepayRequest): Promise<RestApiResponse<PortfolioMarginProBankruptcyLoanRepayResponse>>; /** * Query Portfolio Margin Pro Bankruptcy Loan Amount * * If there’s no classic portfolio margin bankruptcy loan, the amount would be 0 * * Weight: 500 * * @summary Query Portfolio Margin Pro Bankruptcy Loan Amount(USER_DATA) * @param {QueryPortfolioMarginProBankruptcyLoanAmountRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ queryPortfolioMarginProBankruptcyLoanAmount(requestParameters?: QueryPortfolioMarginProBankruptcyLoanAmountRequest): Promise<RestApiResponse<QueryPortfolioMarginProBankruptcyLoanAmountResponse>>; /** * Query repay history of pmloan for portfolio margin pro. * * `startTime` and `endTime` cannot be longer than 360 days * If `startTime` and `endTime` not sent, return records of the last 30 days by default. * If `startTime`is sent and `endTime` is not sent, return records of [startTime, startTime+30d]. * If `startTime` is not sent and `endTime` is sent, return records of [endTime-30d, endTime]. * * Weight: 500 * * @summary Query Portfolio Margin Pro Bankruptcy Loan Repay History(USER_DATA) * @param {QueryPortfolioMarginProBankruptcyLoanRepayHistoryRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ queryPortfolioMarginProBankruptcyLoanRepayHistory(requestParameters?: QueryPortfolioMarginProBankruptcyLoanRepayHistoryRequest): Promise<RestApiResponse<QueryPortfolioMarginProBankruptcyLoanRepayHistoryResponse>>; /** * Query interest history of negative balance for portfolio margin. * * Weight: 50 * * @summary Query Portfolio Margin Pro Negative Balance Interest History(USER_DATA) * @param {QueryPortfolioMarginProNegativeBalanceInterestHistoryRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ queryPortfolioMarginProNegativeBalanceInterestHistory(requestParameters?: QueryPortfolioMarginProNegativeBalanceInterestHistoryRequest): Promise<RestApiResponse<QueryPortfolioMarginProNegativeBalanceInterestHistoryResponse>>; /** * Redeem BFUSD for all types of Portfolio Margin account * * Weight: 1500 * * @summary Redeem BFUSD for Portfolio Margin(TRADE) * @param {RedeemBfusdForPortfolioMarginRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ redeemBfusdForPortfolioMargin(requestParameters: RedeemBfusdForPortfolioMarginRequest): Promise<RestApiResponse<RedeemBfusdForPortfolioMarginResponse>>; /** * Repay futures Negative Balance * * Weight: 1500 * * @summary Repay futures Negative Balance(USER_DATA) * @param {RepayFuturesNegativeBalanceRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ repayFuturesNegativeBalance(requestParameters?: RepayFuturesNegativeBalanceRequest): Promise<RestApiResponse<RepayFuturesNegativeBalanceResponse>>; /** * Transfer LDUSDT as collateral for all types of Portfolio Margin account * * Weight: 1500 * * @summary Transfer LDUSDT for Portfolio Margin(TRADE) * @param {TransferLdusdtForPortfolioMarginRequest} requestParameters Request parameters. * * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError} * @memberof AccountApiInterface */ transferLdusdtForPortfolioMargin(requestParameters: TransferLdusdtForPortfolioMarginRequest): Promise<RestApiResponse<TransferLdusdtForPortfolioMarginResponse>>; } /** * Request parameters for bnbTransfer operation in AccountApi. * @interface BnbTransferRequest */ interface BnbTransferRequest { /** * * @type {number} * @memberof AccountApiBnbTransfer */ readonly amount: number; /** * "TO_UM","FROM_UM" * @type {string} * @memberof AccountApiBnbTransfer */ readonly transferSide: string; /** * * @type {number} * @memberof AccountApiBnbTransfer */ readonly recvWindow?: number; } /** * Request parameters for changeAutoRepayFuturesStatus operation in AccountApi. * @interface ChangeAutoRepayFuturesStatusRequest */ interface ChangeAutoRepayFuturesStatusRequest { /** * Default: `true`; `false` for turn off the auto-repay futures negative balance function * @type {string} * @memberof AccountApiChangeAutoRepayFuturesStatus */ readonly autoRepay: string; /** * * @type {number} * @memberof AccountApiChangeAutoRepayFuturesStatus */ readonly recvWindow?: number; } /** * Request parameters for fundAutoCollection operation in AccountApi. * @interface FundAutoCollectionRequest */ interface FundAutoCollectionRequest { /** * * @type {number} * @memberof AccountApiFundAutoCollection */ readonly recvWindow?: number; } /** * Request parameters for fundCollectionByAsset operation in AccountApi. * @interface FundCollectionByAssetRequest */ interface FundCollectionByAssetRequest { /** * `LDUSDT` only * @type {string} * @memberof AccountApiFundCollectionByAsset */ readonly asset: string; /** * * @type {number} * @memberof AccountApiFundCollectionByAsset */ readonly recvWindow?: number; } /** * Request parameters for getAutoRepayFuturesStatus operation in AccountApi. * @interface GetAutoRepayFuturesStatusRequest */ interface GetAutoRepayFuturesStatusRequest { /** * * @type {number} * @memberof AccountApiGetAutoRepayFuturesStatus */ readonly recvWindow?: number; } /** * Request parameters for getPortfolioMarginProAccountBalance operation in AccountApi. * @interface GetPortfolioMarginProAccountBalanceRequest */ interface GetPortfolioMarginProAccountBalanceRequest { /** * * @type {string} * @memberof AccountApiGetPortfolioMarginProAccountBalance */ readonly asset?: string; /** * * @type {number} * @memberof AccountApiGetPortfolioMarginProAccountBalance */ readonly recvWindow?: number; } /** * Request parameters for getPortfolioMarginProAccountInfo operation in AccountApi. * @interface GetPortfolioMarginProAccountInfoRequest */ interface GetPortfolioMarginProAccountInfoRequest { /** * * @type {number} * @memberof AccountApiGetPortfolioMarginProAccountInfo */ readonly recvWindow?: number; } /** * Request parameters for getPortfolioMarginProSpanAccountInfo operation in AccountApi. * @interface GetPortfolioMarginProSpanAccountInfoRequest */ interface GetPortfolioMarginProSpanAccountInfoRequest { /** * * @type {number} * @memberof AccountApiGetPortfolioMarginProSpanAccountInfo */ readonly recvWindow?: number; } /** * Request parameters for getTransferableEarnAssetBalanceForPortfolioMargin operation in AccountApi. * @interface GetTransferableEarnAssetBalanceForPortfolioMarginRequest */ interface GetTransferableEarnAssetBalanceForPortfolioMarginRequest { /** * `LDUSDT` only * @type {string} * @memberof AccountApiGetTransferableEarnAssetBalanceForPortfolioMargin */ readonly asset: string; /** * `EARN_TO_FUTURE` /`FUTURE_TO_EARN` * @type {string} * @memberof AccountApiGetTransferableEarnAssetBalanceForPortfolioMargin */ readonly transferType: string; /** * * @type {number} * @memberof AccountApiGetTransferableEarnAssetBalanceForPortfolioMargin */ readonly recvWindow?: number; } /** * Request parameters for mintBfusdForPortfolioMargin operation in AccountApi. * @interface MintBfusdForPortfolioMarginRequest */ interface MintBfusdForPortfolioMarginRequest { /** * `BFUSD` only * @type {string} * @memberof AccountApiMintBfusdForPortfolioMargin */ readonly fromAsset: string; /** * `USDT` `USDC` * @type {string} * @memberof AccountApiMintBfusdForPortfolioMargin */ readonly targetAsset: string; /** * * @type {number} * @memberof AccountApiMintBfusdForPortfolioMargin */ readonly amount: number; /** * * @type {number} * @memberof AccountApiMintBfusdForPortfolioMargin */ readonly recvWindow?: number; } /** * Request parameters for portfolioMarginProBankruptcyLoanRepay operation in AccountApi. * @interface PortfolioMarginProBankruptcyLoanRepayRequest */ interface PortfolioMarginProBankruptcyLoanRepayRequest { /** * SPOT or MARGIN,default SPOT * @type {string} * @memberof AccountApiPortfolioMarginProBankruptcyLoanRepay */ readonly from?: string; /** * * @type {number} * @memberof AccountApiPortfolioMarginProBankruptcyLoanRepay */ readonly recvWindow?: number; } /** * Request parameters for queryPortfolioMarginProBankruptcyLoanAmount operation in AccountApi. * @interface QueryPortfolioMarginProBankruptcyLoanAmountRequest */ interface QueryPortfolioMarginProBankruptcyLoanAmountRequest { /** * * @type {number} * @memberof AccountApiQueryPortfolioMarginProBankruptcyLoanAmount */ readonly recvWindow?: number; } /** * Request parameters for queryPortfolioMarginProBankruptcyLoanRepayHistory operation in AccountApi. * @interface QueryPortfolioMarginProBankruptcyLoanRepayHistoryRequest */ interface QueryPortfolioMarginProBankruptcyLoanRepayHistoryRequest { /** * * @type {number} * @memberof AccountApiQueryPortfolioMarginProBankruptcyLoanRepayHistory */ readonly startTime?: number; /** * * @type {number} * @memberof AccountApiQueryPortfolioMarginProBankruptcyLoanRepayHistory */ readonly endTime?: number; /** * Currently querying page. Start from 1. Default:1 * @type {number} * @memberof AccountApiQueryPortfolioMarginProBankruptcyLoanRepayHistory */ readonly current?: number; /** * Default:10 Max:100 * @type {number} * @memberof AccountApiQueryPortfolioMarginProBankruptcyLoanRepayHistory */ readonly size?: number; /** * * @type {number} * @memberof AccountApiQueryPortfolioMarginProBankruptcyLoanRepayHistory */ readonly recvWindow?: number; } /** * Request parameters for queryPortfolioMarginProNegativeBalanceInterestHistory operation in AccountApi. * @interface QueryPortfolioMarginProNegativeBalanceInterestHistoryRequest */ interface QueryPortfolioMarginProNegativeBalanceInterestHistoryRequest { /** * * @type {string} * @memberof AccountApiQueryPortfolioMarginProNegativeBalanceInterestHistory */ readonly asset?: string; /** * * @type {number} * @memberof AccountApiQueryPortfolioMarginProNegativeBalanceInterestHistory */ readonly startTime?: number; /** * * @type {number} * @memberof AccountApiQueryPortfolioMarginProNegativeBalanceInterestHistory */ readonly endTime?: number; /** * Default:10 Max:100 * @type {number} * @memberof AccountApiQueryPortfolioMarginProNegativeBalanceInterestHistory */ readonly size?: number; /** * * @type {number} * @memberof AccountApiQueryPortfolioMarginProNegativeBalanceInterestHistory */ readonly recvWindow?: number; } /** * Request parameters for redeemBfusdForPortfolioMargin operation in AccountApi. * @interface RedeemBfusdForPortfolioMarginRequest */ interface RedeemBfusdForPortfolioMarginRequest { /** * `BFUSD` only * @type {string} * @memberof AccountApiRedeemBfusdForPortfolioMargin */ readonly fromAsset: string; /** * `USDT` `USDC` * @type {string} * @memberof AccountApiRedeemBfusdForPortfolioMargin */ readonly targetAsset: string; /** * * @type {number} * @memberof AccountApiRedeemBfusdForPortfolioMargin */ readonly amount: number; /** * * @type {number} * @memberof AccountApiRedeemBfusdForPortfolioMargin */ readonly recvWindow?: number; } /** * Request parameters for repayFuturesNegativeBalance operation in AccountApi. * @interface RepayFuturesNegativeBalanceRequest */ interface RepayFuturesNegativeBalanceRequest { /** * SPOT or MARGIN,default SPOT * @type {string} * @memberof AccountApiRepayFuturesNegativeBalance */ readonly from?: string; /** * * @type {number} * @memberof AccountApiRepayFuturesNegativeBalance */ readonly recvWindow?: number; } /** * Request parameters for transferLdusdtForPortfolioMargin operation in AccountApi. * @interface TransferLdusdtForPortfolioMarginRequest */ interface TransferLdusdtForPortfolioMarginRequest { /** * `LDUSDT` only * @type {string} * @memberof AccountApiTransferLdusdtForPortfolioMargin */ readonly asset: string; /** * `EARN_TO_FUTURE` /`FUTURE_TO_EARN` * @type {string} * @memberof AccountApiTransferLdusdtForPortfolioMargin */ readonly trans