Binance Connector JS
    Preparing search index...
    Index

    Constructors

    Methods

      • This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create a fixed-value BTC gift card and pay with 100 USDT plus 1 USDT fee. This gift card can keep the value fixed at 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption. Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee would be deducted from your funding wallet.

      To get started with, please make sure: You have a Binance account You have passed KYB You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet You need Enable Withdrawals for the API Key which requests this endpoint.

      Weight: 1

      Parameters

      Returns Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>

    • This API is for redeeming a Binance Gift Card Once redeemed, the coins will be deposited in your funding wallet.

      Parameter code can be sent in two formats: Plaintext Encrypted

      Sending code in Encrypted format provides more security than sending it as a plaintext. To send card code in encrypted format the following steps must be followed: Fetch RSA public key from api stated below. Use the below algorithm to encrypt the card code using the RSA public key fetched above: RSA/ECB/OAEPWithSHA-256AndMGF1Padding A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:*

      Weight: 1

      Parameters

      Returns Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>

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

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

        Query 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.).

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

        Query parameters for the request.

      Returns Promise<RestApiResponse<T>>

      A promise resolving to the response data object.