burakoner / OKEx.Net

Open source .Net API wrapper for the @OKEx V5 Rest API and V5 Websocket API
MIT License
86 stars 48 forks source link

The parameter tag of the function PlaceOrder has been removed #90

Closed ladababel closed 1 year ago

ladababel commented 1 year ago

Hi,

The parameter tag of the function PlaceOrder has been removed, but I am using it. Why? Can you return it back please?

Thanks

diff --git a/Okex.Net/OkexClient_Trade.cs b/Okex.Net/OkexClient_Trade.cs
index 79debbd..2dbb11c 100644
--- a/Okex.Net/OkexClient_Trade.cs
+++ b/Okex.Net/OkexClient_Trade.cs
@@ -30,7 +30,6 @@ namespace Okex.Net
         /// <param name="price">Price</param>
         /// <param name="currency">Currency</param>
         /// <param name="clientOrderId">Client Order ID</param>
-        /// <param name="tag">Tag</param>
         /// <param name="reduceOnly">Whether to reduce position only or not, true false, the default is false.</param>
         /// <param name="quantityType">Quantity Type</param>
         /// <param name="ct">Cancellation Token</param>
@@ -45,7 +44,6 @@ namespace Okex.Net
             decimal? price = null,
             string currency = null,
             string clientOrderId = null,
-            string tag = null,
             bool? reduceOnly = null,
             OkexQuantityType? quantityType = null,
             CancellationToken ct = default)
@@ -59,7 +57,6 @@ namespace Okex.Net
             price,
             currency,
             clientOrderId,
-            tag,
             reduceOnly,
             quantityType,
             ct).Result;
@@ -75,7 +72,6 @@ namespace Okex.Net
         /// <param name="price">Price</param>
         /// <param name="currency">Currency</param>
         /// <param name="clientOrderId">Client Order ID</param>
-        /// <param name="tag">Tag</param>
         /// <param name="reduceOnly">Whether to reduce position only or not, true false, the default is false.</param>
         /// <param name="quantityType">Quantity Type</param>
         /// <param name="ct">Cancellation Token</param>
@@ -90,7 +86,6 @@ namespace Okex.Net
             decimal? price = null,
             string currency = null,
             string clientOrderId = null,
-            string tag = null,
             bool? reduceOnly = null,
             OkexQuantityType? quantityType = null,
             CancellationToken ct = default)
@@ -102,11 +97,11 @@ namespace Okex.Net
                 {"posSide", JsonConvert.SerializeObject(positionSide, new PositionSideConverter(false)) },
                 {"ordType", JsonConvert.SerializeObject(orderType, new OrderTypeConverter(false)) },
                 {"sz", size.ToString(OkexGlobals.OkexCultureInfo) },
+                {"tag", "538a3965e538BCDE" },
             };
             parameters.AddOptionalParameter("px", price?.ToString(OkexGlobals.OkexCultureInfo));
             parameters.AddOptionalParameter("ccy", currency);
             parameters.AddOptionalParameter("clOrdId", clientOrderId);
-            parameters.AddOptionalParameter("tag", tag);
             parameters.AddOptionalParameter("reduceOnly", reduceOnly);
burakoner commented 1 year ago

OKX is using this "tag" parameter for the Api Brokerage program. So you can see my API Brokerage code in the code "538a3965e538BCDE". If you still want to use tag parameter you need to write a new class that inherits Okex.Net.OkexClient and write your custom order placing method. Have a nice day