Answer the question
In order to leave comments, you need to log in
How to log in to YouBit in a C# application?
I'm trying to do it like this:
public string url = "https://yobit.net/tapi/", apiKey= "ключ", sign= "секретный ключ";
private object tapi;
public byte[] art;
public string youbitMoney()
{
// byte[] b = new HMACSHA512(null).ComputeHash(Encoding.UTF8.GetBytes(sign));
// var key = Encoding.UTF8.GetBytes(sign);
art = Encoding.UTF8.GetBytes(sign);
HMACSHA512 ds = new HMACSHA512(art);
var req = new HttpRequest();
req.AddHeader("Key", apiKey);
req.AddHeader("Sign", ds.ToString());
var urlParams = new RequestParams();
urlParams["nonce"] = "1";
string send = req.Post(url, urlParams).ToString();
var money = JObject.Parse(send);
JToken mk = money["usdt_btc"];
return send;
}
{"success":0,"error":"invalid key, sign, method or nonce"}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question