TCL / Binance spot API / Verify a Binance Code (USER_DATA)
Back to Collection Items
load ./chilkat.dll
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set http [new_CkHttp]
set queryParams [new_CkJsonObject]
CkJsonObject_UpdateString $queryParams "referenceNo" ""
CkJsonObject_UpdateString $queryParams "timestamp" "{{timestamp}}"
CkJsonObject_UpdateString $queryParams "signature" "{{signature}}"
CkHttp_SetRequestHeader $http "Content-Type" "application/json"
CkHttp_SetRequestHeader $http "X-MBX-APIKEY" "{{binance-api-key}}"
# resp is a CkHttpResponse
set resp [CkHttp_QuickRequestParams $http "GET" "https://domain.com/sapi/v1/giftcard/verify" $queryParams]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
puts [CkHttp_lastErrorText $http]
delete_CkHttp $http
delete_CkJsonObject $queryParams
exit
}
puts [CkHttpResponse_get_StatusCode $resp]
puts [CkHttpResponse_bodyStr $resp]
delete_CkHttpResponse $resp
delete_CkHttp $http
delete_CkJsonObject $queryParams
Curl Command
curl -G -d "referenceNo="
-d "timestamp=%7B%7Btimestamp%7D%7D"
-d "signature=%7B%7Bsignature%7D%7D"
-H "Content-Type: application/json"
-H "X-MBX-APIKEY: {{binance-api-key}}"
https://domain.com/sapi/v1/giftcard/verify
Postman Collection Item JSON
{
"name": "Verify a Binance Code (USER_DATA)",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "X-MBX-APIKEY",
"value": "{{binance-api-key}}",
"type": "text"
}
],
"url": {
"raw": "{{url}}/sapi/v1/giftcard/verify?referenceNo=×tamp={{timestamp}}&signature={{signature}}",
"host": [
"{{url}}"
],
"path": [
"sapi",
"v1",
"giftcard",
"verify"
],
"query": [
{
"key": "referenceNo",
"value": "",
"description": "reference number"
},
{
"key": "recvWindow",
"value": "5000",
"description": "The value cannot be greater than 60000",
"disabled": true
},
{
"key": "timestamp",
"value": "{{timestamp}}",
"description": "UTC timestamp in ms"
},
{
"key": "signature",
"value": "{{signature}}",
"description": "Signature"
}
]
},
"description": "This API is for verifying whether the Binance Code is valid or not by entering Binance Code or reference number.\n\nPlease 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.\n\nWeight(IP): 1"
},
"response": [
]
}