burakoner / BtcTurk.Net

Open source .Net API wrapper for the BtcTurk web API and websockets API
MIT License
24 stars 9 forks source link

cancel order hata #28

Closed emrecg closed 1 year ago

emrecg commented 1 year ago

NO_ORDER_MATCHES_YOUR_REQUEST hatası alıyorum

odurmus06 commented 1 year ago

NO_ORDER_MATCHES_YOUR_REQUEST hatası alıyorum

çözdünüz mü hocam

odurmus06 commented 1 year ago

NO_ORDER_MATCHES_YOUR_REQUEST hatası alıyorum

        var apiKey = "";
        var apiSecret = "";
        var nonce = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeMilliseconds();
        string message = apiKey + nonce;
        using (HMACSHA256 hmac = new HMACSHA256(Convert.FromBase64String(apiSecret)))
        {
            byte[] signatureBytes = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
            string X_Signature = Convert.ToBase64String(signatureBytes);

            HttpClient client = new HttpClient();

            client.DefaultRequestHeaders.Add("X-PCK", apiKey);
            client.DefaultRequestHeaders.Add("X-Stamp", nonce.ToString());
            client.DefaultRequestHeaders.Add("X-Signature", X_Signature);

            HttpResponseMessage response = await client.DeleteAsync("https://api.btcturk.com/api/v1/order?id=12015259708");

            string contentString = await response.Content.ReadAsStringAsync();
        }

yukarıdaki kod ile cancel order yapabilirsiniz hocam

burakoner commented 1 year ago

Version 2.6.2 ile çözülmüş olması lazım.