Binance Connector JS
    Preparing search index...
    Index

    Constructors

    Methods

    • Submit a withdrawal request for brokers of local entities that required travel rule.

      Weight(UID): 600

      Security Type: USER_DATA

      Notes:

      • If network not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected.
      • You can get network in networkList of a coin in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256).
      • Questionnaire is different for each local entity, please refer to the Withdraw Questionnaire Contents page.
      • If getting error like Questionnaire format not valid. or Questionnaire must not be blank, please try to verify the format of the questionnaire and use URL-encoded format.

      Parameters

      Returns Promise<RestApiResponse<BrokerWithdrawResponse>>

    • Fetch deposit history for local entities that with required travel rule information.

      Weight(IP): 1

      Security Type: USER_DATA

      Notes:

      • Please notice the default startTime and endTime to make sure that time interval is within 0-90 days.
      • If both startTime and endTime are sent, time between startTime and endTime must be less than 90 days.
      • Please, note that due to network-specific characteristics, the returned source address may be inaccurate. If multiple source addresses are found, only the first one will be returned.

      Parameters

      Returns Promise<RestApiResponse<DepositHistoryV2Response>>

    • Enable Fast Withdraw Switch (USER_DATA)

      Weight(IP): 1

      Security Type: USER_DATA

      Notes:

      • This request will enable fastwithdraw switch under your account. You need to enable "trade" option for the api key which requests this endpoint.
      • When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee.

      Parameters

      Returns Promise<RestApiResponse<void>>

    • 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.

    • User universal transfer

      Weight(UID): 900

      Security Type: USER_DATA

      Notes:

      • You need to enable Permits Universal Transfer option for the API Key that requests this endpoint.
      • fromSymbol must be sent when type is ISOLATEDMARGIN_MARGIN or ISOLATEDMARGIN_ISOLATEDMARGIN.
      • toSymbol must be sent when type is MARGIN_ISOLATEDMARGIN or ISOLATEDMARGIN_ISOLATEDMARGIN.
      • ENUM of transfer types:
      • MAIN_UMFUTURE: Spot → USDⓈ-M Futures
      • MAIN_CMFUTURE: Spot → COIN-M Futures
      • MAIN_MARGIN: Spot → Margin (cross)
      • UMFUTURE_MAIN: USDⓈ-M Futures → Spot
      • UMFUTURE_MARGIN: USDⓈ-M Futures → Margin (cross)
      • CMFUTURE_MAIN: COIN-M Futures → Spot
      • CMFUTURE_MARGIN: COIN-M Futures → Margin (cross)
      • MARGIN_MAIN: Margin (cross) → Spot
      • MARGIN_UMFUTURE: Margin (cross) → USDⓈ-M Futures
      • MARGIN_CMFUTURE: Margin (cross) → COIN-M Futures
      • ISOLATEDMARGIN_MARGIN: Isolated margin → Margin (cross)
      • MARGIN_ISOLATEDMARGIN: Margin (cross) → Isolated margin
      • ISOLATEDMARGIN_ISOLATEDMARGIN: Isolated margin → Isolated margin
      • MAIN_FUNDING: Spot → Funding
      • FUNDING_MAIN: Funding → Spot
      • FUNDING_UMFUTURE: Funding → USDⓈ-M Futures
      • UMFUTURE_FUNDING: USDⓈ-M Futures → Funding
      • MARGIN_FUNDING: Margin (cross) → Funding
      • FUNDING_MARGIN: Funding → Margin (cross)
      • FUNDING_CMFUTURE: Funding → COIN-M Futures
      • CMFUTURE_FUNDING: COIN-M Futures → Funding
      • MAIN_OPTION: Spot → Options
      • OPTION_MAIN: Options → Spot
      • UMFUTURE_OPTION: USDⓈ-M Futures → Options
      • OPTION_UMFUTURE: Options → USDⓈ-M Futures
      • MARGIN_OPTION: Margin (cross) → Options
      • OPTION_MARGIN: Options → Margin (cross)
      • FUNDING_OPTION: Funding → Options
      • OPTION_FUNDING: Options → Funding
      • MAIN_PORTFOLIO_MARGIN: Spot → Portfolio Margin
      • PORTFOLIO_MARGIN_MAIN: Portfolio Margin → Spot

      Parameters

      Returns Promise<RestApiResponse<UserUniversalTransferResponse>>

    • Submit a withdraw request

      Weight(UID): 900

      Security Type: USER_DATA

      Notes:

      • If network not send, return with default network of the coin.
      • You can get network and isDefault in networkList of a coin in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256).
      • To check if travel rule is required, by using GET /sapi/v1/localentity/questionnaire-requirements and if it returns anything other than NIL you will need update SAPI to POST /sapi/v1/localentity/withdraw/apply else you can continue POST /sapi/v1/capital/withdraw/apply. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI.
      • "For networks that do not support memo/tag, submitting a withdrawal request with a non-empty addressTag will return error -4106 TAG_NOT_SUPPORTED_FOR_NETWORK. Please omit the addressTag field for such networks. You can check whether a network requires a tag via GET /sapi/v1/capital/config/getall: If withdrawTag = true → memo/tag is required. If withdrawTag = false → memo/tag is not supported; omit addressTag."

      Parameters

      Returns Promise<RestApiResponse<WithdrawResponse>>

    • Fetch withdraw history

      Weight(UID): 18000 (10 requests per second)

      Security Type: USER_DATA

      Notes:

      • network may not be in the response for old withdraw.
      • Please notice the default startTime and endTime to make sure that time interval is within 0-90 days.
      • If both startTime and endTimeare sent, time between startTimeand endTimemust be less than 90 days.
      • If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days.
      • If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default.
      • Maximum support idList number is 45.

      Parameters

      Returns Promise<RestApiResponse<WithdrawHistoryResponse>>

    • Fetch withdraw history for local entities that required travel rule.

      Weight(IP): 1

      Security Type: USER_DATA

      Notes:

      • network may not be in the response for old withdraw.
      • Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
      • Please notice the default startTime and endTime to make sure that time interval is within 0-90 days.
      • If both startTime and endTimeare sent, time between startTimeand endTimemust be less than 90 days.
      • If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days.
      • If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default.
      • Maximum support trId,txId number is 45.
      • WithdrawOrderId only support 1.
      • If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.

      Parameters

      Returns Promise<RestApiResponse<WithdrawHistoryV2Response>>

    • Submit a withdrawal request for local entities that required travel rule.

      Weight(UID): 600

      Security Type: USER_DATA

      Notes:

      • If network not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected.
      • You can get network and isDefault in networkList of a coin in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256).
      • Questionnaire is different for each local entity, please refer to the Withdraw Questionnaire Contents page.
      • If getting error like Questionnaire format not valid. or Questionnaire must not be blank, please try to verify the format of the questionnaire and use URL-encoded format.

      Parameters

      Returns Promise<RestApiResponse<WithdrawTravelRuleResponse>>