Bitcoin Forum
May 10, 2024, 03:28:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Local / Трейдеры / Проблемы с выводом YoBit on: August 16, 2017, 09:04:12 PM
Всем привет!

Попытался вчера вывести немного битков с Yobit - транзакция зависла и до сих пор висит неподтвержденной. Транзакция: 5ef5f16c16ef473d0e1082f575e86552d429b52b349cfd7fe0bf90af8a54d1e6. Кто-нибудь сталкавался с подобной проблемой?
2  Economy / Exchanges / Problems with Yobit BTC withdrawals on: August 16, 2017, 08:46:50 PM
Hi all!

I tried to withdraw some BTC from YoBit exchange 1 day ago, but my transaction still unconfirmed. Transaction: 5ef5f16c16ef473d0e1082f575e86552d429b52b349cfd7fe0bf90af8a54d1e6. Did anyone have problems like this?
3  Economy / Exchanges / Yobit tapi on: August 06, 2017, 10:37:56 AM
I am trying to write simple application for myself and when i try to call getInfo method i always get a error into the response. Key, sign, method or nonce is incorrect. I found a number of examples but i still can't find mistake in my code. Could anyone help me with it? My code:

    const string key = "072BCC223A1ADBE86854A4B4A9468EAB";
    const string secret = "4c962093fb943d418afb8fae14841c6b";
    const string tapi = "https://yobit.net/tapi";

    public void GetInfo() {
        int nonce = 1;

        string parameters = $"method=getInfo&nonce=1";

        string address = $"{tapi}?{parameters}";

        var keyByte = Encoding.UTF8.GetBytes(secret);

        string sign1 = string.Empty;
        byte[] inputBytes = Encoding.UTF8.GetBytes(parameters);
        using (var hmac = new HMACSHA512(keyByte))
        {
            byte[] hashValue = hmac.ComputeHash(inputBytes);

            StringBuilder hex1 = new StringBuilder(hashValue.Length * 2);
            foreach (byte b in hashValue)
            {
                hex1.AppendFormat("{0:x2}", b);
            }
            sign1 =  hex1.ToString();
        }

        WebRequest webRequest = (HttpWebRequest)System.Net.WebRequest.Create(address);
        if (webRequest != null)
        {
            webRequest.Method = "POST";
            webRequest.Timeout = 20000;
            webRequest.ContentType = "application/x-www-form-urlencoded";
            webRequest.Headers.Add("Key", key);
            webRequest.Headers.Add("Sign", sign1);

            using (System.IO.Stream s = webRequest.GetResponse().GetResponseStream())
            {
                using (System.IO.StreamReader sr = new System.IO.StreamReader(s))
                {
                    var jsonResponse = sr.ReadToEnd();
                    Console.WriteLine(String.Format("Response: {0}", jsonResponse));
                }
            }
        }


        Log(nonce.ToString());
    }
KeyAPI - InfoOnly, I specially hardcode nonce as 1 because i think that it will be easier to find a problem.
4  Local / Кодеры / Вопрос по API Yobit on: August 06, 2017, 10:28:24 AM
Добрый день. Подскажите, пожалуйста, возможно кто-то встречался с такой проблемой. Пытаюсь для себя написать на C# простое приложение и пры поппытке вызвать метод getInfo всегда получаю ошибку. Пишет, что ключ, подпись, метод или nonce неверный. Нашел несколько примеров, проверил все, что мог. Ошибки не вижу. Может кто-нибудь знает в чем тут может быть дело? Вот код:

        const string key = "072BCC223A1ADBE86854A4B4A9468EAB";
        const string secret = "4c962093fb943d418afb8fae14841c6b";
        const string tapi = "https://yobit.net/tapi";

        public void GetInfo() {
            int nonce = 1;

            string parameters = $"method=getInfo&nonce=1";

            string address = $"{tapi}?{parameters}";

            var keyByte = Encoding.UTF8.GetBytes(secret);

            string sign1 = string.Empty;
            byte[] inputBytes = Encoding.UTF8.GetBytes(parameters);
            using (var hmac = new HMACSHA512(keyByte))
            {
                byte[] hashValue = hmac.ComputeHash(inputBytes);

                StringBuilder hex1 = new StringBuilder(hashValue.Length * 2);
                foreach (byte b in hashValue)
                {
                    hex1.AppendFormat("{0:x2}", b);
                }
                sign1 =  hex1.ToString();
            }

            WebRequest webRequest = (HttpWebRequest)System.Net.WebRequest.Create(address);
            if (webRequest != null)
            {
                webRequest.Method = "POST";
                webRequest.Timeout = 20000;
                webRequest.ContentType = "application/x-www-form-urlencoded";
                webRequest.Headers.Add("Key", key);
                webRequest.Headers.Add("Sign", sign1);

                using (System.IO.Stream s = webRequest.GetResponse().GetResponseStream())
                {
                    using (System.IO.StreamReader sr = new System.IO.StreamReader(s))
                    {
                        var jsonResponse = sr.ReadToEnd();
                        Console.WriteLine(String.Format("Response: {0}", jsonResponse));
                    }
                }
            }


            Log(nonce.ToString());
        }


Ключ - InfoOnly, nonce специально захардкодил на 1 для простоты. Буду очень признателен за любую помощь
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!