Binance Connector JS
    Preparing search index...
    Index

    Constructors

    Methods

    • Generic function to send a request.

      Type Parameters

      • T

      Parameters

      • endpoint: string

        The API endpoint to call.

      • method: "GET" | "POST" | "DELETE" | "PUT" | "PATCH"

        HTTP method to use (GET, POST, DELETE, etc.).

      • queryParams: Record<string, unknown> = {}

        Query parameters for the request.

      • bodyParams: Record<string, unknown> = {}

        Body parameters for the request.

      Returns Promise<RestApiResponse<T>>

      A promise resolving to the response data object.

    • Generic function to send a signed request.

      Type Parameters

      • T

      Parameters

      • endpoint: string

        The API endpoint to call.

      • method: "GET" | "POST" | "DELETE" | "PUT" | "PATCH"

        HTTP method to use (GET, POST, DELETE, etc.).

      • queryParams: Record<string, unknown> = {}

        Query parameters for the request.

      • bodyParams: Record<string, unknown> = {}

        Body parameters for the request.

      Returns Promise<RestApiResponse<T>>

      A promise resolving to the response data object.

    • VIP loan is available for VIP users only.

      Weight(UID): 6000

      Security Type: TRADE

      Notes:

      • loanAccountId refers to the loan receiving account.
      • Only master account applications are supported.
      • loanAccountId and collateralAccountId must be under the same master account.
      • loanTerm is mandatory if the user chooses a fixed rate (isFlexibleRate = FALSE).
      • Every coin in collateralCoin is pledged from every account in collateralAccountId.
      • To pledge a Simple Earn Flexible position, add <ASSET>-Earn (e.g. USDT-Earn) to collateralCoin together with its Spot asset (e.g. USDT,USDT-Earn). Sending <ASSET>-Earn without its Spot asset returns -10213.
      • Rate limit: 1 request per 2 seconds per account.

      Parameters

      Returns Promise<RestApiResponse<VipLoanBorrowResponse>>

    • Submit a fixed rate borrow request by matching market supply orders.

      Weight(UID): 6000

      Security Type: TRADE

      Notes:

      • Rate limit: 2 requests per second per account.
      • When multiple supplyRequest entries are provided, all requestId values must correspond to the same borrowCoin and loanTerm (validated by collateral facade).
      • Every coin in collateralCoin is pledged from every account in collateralAccountId.
      • To pledge a Simple Earn Flexible position, add <ASSET>-Earn (e.g. BNB-Earn) to collateralCoin together with its Spot asset (e.g. BNB,BNB-Earn). Sending <ASSET>-Earn without its Spot asset returns -10213.

      Parameters

      Returns Promise<RestApiResponse<VipLoanFixedRateBorrowResponse>>