Signature for this request is not valid for Withdraw API with addressTag as stringified object.

{ AuthenticationError: binance {“code”:-1022,“msg”:“Signature for this request is not valid.”}
If i try to pass addressTag as stringified Object in the Withdraw API i’m receiving AuthenticationError. Is there a way to pass addressTag as stringified object to binance withdraw API?
if i pass addressTag as string API is working as intended.

Could you provide a sample url of the request sent, along with it’s signature assuming the API Secret is “apisecret”?

Please omit any sensitive information.

The API we are calling is https://api.binance.com/sapi/v1/capital/withdraw/apply

url: 'https://api.binance.com/sapi/v1/capital/withdraw/apply',
  method: 'POST',
  body: 'timestamp=1643280443096&recvWindow=5000&coin=HIVE&address=gateiodeposit&amount=0.03&addressTag=%7B%22method%22%3A%22buy%22%2C%22symbol%22%3A%22DEC%22%2C%22to%22%3A%22neophyte_925613%22%7D&network=HIVE&withdrawOrderId=a24c1fc2-464e-44a5-9f88-c68b04efe2fc&signature=35d6a32829599da1d05f8942c14c6c1e424322548450af2d53002b9fce925971'

bodyObject =
{ coin: ‘HIVE’,
address: ‘gateiodeposit’,
amount: 0.03,
addressTag: ‘{“method”:“buy”,“symbol”:“DEC”,“to”:“neophyte_925613”}’,
network: ‘HIVE’,
withdrawOrderId: ‘a24c1fc2-464e-44a5-9f88-c68b04efe2fc’,
recvWindow: 5000,
timestamp: 1643280443096 }

signature=35d6a32829599da1d05f8942c14c6c1e424322548450af2d53002b9fce925971'

The signature generated is using the url encoded version of the query string. Please generate the signature using the original data and try again

Query string: timestamp=1643280443096&recvWindow=5000&coin=HIVE&address=gateiodeposit&amount=0.03&addressTag={"method":"buy","symbol":"DEC","to":"neophyte_925613"}&network=HIVE&withdrawOrderId=a24c1fc2-464e-44a5-9f88-c68b04efe2fc

Signature: 90f6c36aa10855bb039d4618b3c02bf531473332f14e617819b5c590fb8af05f
1 Like