From efe70445ed13228425278e6f57fb17d4156c12f4 Mon Sep 17 00:00:00 2001 From: Artem Kurianov Date: Fri, 14 May 2021 13:08:58 +0000 Subject: [PATCH] iexchange client improvements --- .../ExchangeInterfaces/ICommonTrade.cs | 4 +++ .../ExchangeInterfaces/IExchangeClient.cs | 27 +++++++++++++++++++ .../ExchangeInterfaces/IOrder.cs | 2 +- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/CryptoExchange.Net/ExchangeInterfaces/ICommonTrade.cs b/CryptoExchange.Net/ExchangeInterfaces/ICommonTrade.cs index b1a424fc..78afea0c 100644 --- a/CryptoExchange.Net/ExchangeInterfaces/ICommonTrade.cs +++ b/CryptoExchange.Net/ExchangeInterfaces/ICommonTrade.cs @@ -29,5 +29,9 @@ namespace CryptoExchange.Net.ExchangeInterfaces /// The asset fee was paid in /// public string? CommonFeeAsset { get; } + /// + /// Trade time + /// + DateTime CommonTradeTime { get; } } } diff --git a/CryptoExchange.Net/ExchangeInterfaces/IExchangeClient.cs b/CryptoExchange.Net/ExchangeInterfaces/IExchangeClient.cs index 041f4ead..395676d1 100644 --- a/CryptoExchange.Net/ExchangeInterfaces/IExchangeClient.cs +++ b/CryptoExchange.Net/ExchangeInterfaces/IExchangeClient.cs @@ -10,6 +10,15 @@ namespace CryptoExchange.Net.ExchangeInterfaces /// public interface IExchangeClient { + /// + /// Should be triggered on order placing + /// + event Action OnOrderPlaced; + /// + /// Should be triggered on order cancelling + /// + event Action OnOrderCanceled; + /// /// Get the symbol name based on a base and quote asset /// @@ -146,5 +155,23 @@ namespace CryptoExchange.Net.ExchangeInterfaces /// Sell } + /// + /// Common order status + /// + public enum OrderStatus + { + /// + /// placed and not fully filled order + /// + Active, + /// + /// cancelled order + /// + Canceled, + /// + /// filled order + /// + Filled + } } } diff --git a/CryptoExchange.Net/ExchangeInterfaces/IOrder.cs b/CryptoExchange.Net/ExchangeInterfaces/IOrder.cs index cd93a5ff..1e6bc57d 100644 --- a/CryptoExchange.Net/ExchangeInterfaces/IOrder.cs +++ b/CryptoExchange.Net/ExchangeInterfaces/IOrder.cs @@ -24,7 +24,7 @@ namespace CryptoExchange.Net.ExchangeInterfaces /// /// Status of the order /// - public string CommonStatus { get; } + public IExchangeClient.OrderStatus CommonStatus { get; } /// /// Whether the order is active ///