Binance.GiftCard (binance v2.0.1)

Gift Card Endpoints

Summary

Functions

Link to this function

get_giftcard_buy_code_token_limit(baseToken, opts \\ [])

@spec get_giftcard_buy_code_token_limit(any(), recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Fetch Token Limit (USER_DATA)

This API is for verifying whether the Binance Code is valid or not by entering Binance Code or reference number.

Please note that if you enter the wrong binance code 5 times within an hour, you will no longer be able to verify any binance code for that hour.

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/giftcard/buyCode/token-limit

Mandatory params:

  • baseToken - The token you want to pay, example: BUSD

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_giftcard_cryptography_rsa_public_key(opts \\ [])

@spec get_giftcard_cryptography_rsa_public_key(recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Fetch RSA Public Key (USER_DATA)

This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt the card code. Please note that the RSA Public key fetched is valid only for the current day.

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/giftcard/cryptography/rsa-public-key

Mandatory params:

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_giftcard_verify(referenceNo, opts \\ [])

@spec get_giftcard_verify(any(), recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Verify a Binance Code (USER_DATA)

This API is for verifying whether the Binance Code is valid or not by entering Binance Code or reference number.

Please note that if you enter the wrong binance code 5 times within an hour, you will no longer be able to verify any binance code for that hour.

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/giftcard/verify

Mandatory params:

  • referenceNo - reference number

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_giftcard_buy_code(baseToken, faceToken, baseTokenAmount, opts \\ [])

@spec post_giftcard_buy_code(any(), any(), any(), recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Buy a Binance Code (TRADE)

This API is for redeeming the Binance Code. Once redeemed, the coins will be deposited in your funding wallet.

Please note that if you enter the wrong code 5 times within 24 hours, you will no longer be able to redeem any Binance Code that day.

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/giftcard/buyCode

Mandatory params:

  • baseToken - The token you want to pay, example: BUSD
  • faceToken - The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint.
  • baseTokenAmount - The base token asset quantity, example : 1.002

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_giftcard_create_code(token, amount, opts \\ [])

@spec post_giftcard_create_code(any(), any(), recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Create a Binance Code (USER_DATA)

This API is for creating a Binance Code. To get started with, please make sure:

  • You have a Binance account
  • You have passed kyc
  • You have a sufficient balance in your Binance funding wallet
  • You need Enable Withdrawals for the API Key which requests this endpoint.

Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/giftcard/createCode

Mandatory params:

  • token - The coin type contained in the Binance Code
  • amount - The amount of the coin

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_giftcard_redeem_code(code, opts \\ [])

@spec post_giftcard_redeem_code(any(),
  recvWindow: any(),
  externalUid: any(),
  timestamp: any()
) ::
  {:ok, any()} | {:error, any()}

Redeem a Binance Code (USER_DATA)

This API is for redeeming the Binance Code. Once redeemed, the coins will be deposited in your funding wallet.

Please note that if you enter the wrong code 5 times within 24 hours, you will no longer be able to redeem any Binance Code that day.

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/giftcard/redeemCode

Mandatory params:

  • code - Binance Code

Optional params:

  • timestamp - timestamp
  • externalUid - Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance codes on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters).
  • recvWindow - The value cannot be greater than 60000