Answer the question
In order to leave comments, you need to log in
How to make a SHA256 api request on Binance?
api request to Binance sending HMAC SHA256
There is a code for obtaining a signature for a similar link .
Signature acquisition code
public static void CreateSignature()
{
string queryString = "timestamp=1619967111755";
string secret = "";
byte[] keyBytes = Encoding.UTF8.GetBytes(secret);
byte[] queryStringBytes = Encoding.UTF8.GetBytes(queryString);
HMACSHA256 hmacsha256 = new HMACSHA256(keyBytes);
byte[] bytes = hmacsha256.ComputeHash(queryStringBytes);
Console.WriteLine(BitConverter.ToString(bytes).Replace("-", "").ToLower());
}
{"code":-2014,"msg":"API-key format invalid."}
Answer the question
In order to leave comments, you need to log in
Well, it says right there.
API-keys are passed into the Rest API via the X-MBX-APIKEY header.
curl -H "X-MBX-APIKEY: vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A" -X POST 'https://api.binance.com/api/v3/order?symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559&signature=c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question