You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.5 KiB
45 lines
1.5 KiB
using Binance.TradeRobot.Model.Base;
|
|
using SDKAdapter.Model;
|
|
using System;
|
|
|
|
namespace SDKAdapter.WebSockets.Order.SpotOrder
|
|
{
|
|
public class SpotOrderWebSocketClient
|
|
{
|
|
protected long AccountId { get; private set; }
|
|
protected string ApiKey { get; private set; }
|
|
protected string Secret { get; private set; }
|
|
protected NLog.ILogger logger { get; private set; }
|
|
protected bool IsConnected { get; set; }
|
|
protected Enums.BusinessType BusinessType { get; private set; }
|
|
|
|
public Action<SpotOrderTradePublishInfo> OnOrderUpdated { get; private set; }
|
|
|
|
|
|
public static SpotOrderWebSocketClient Create(Enums.BusinessType businessType, Enums.Exchange exchange, long accountId, string apiKey, string secret, NLog.ILogger logger, Action<SpotOrderTradePublishInfo> onOrderUpdated)
|
|
{
|
|
if (exchange == Enums.Exchange.Binance)
|
|
return new BinanceSpotOrderWebSocketClient(businessType, accountId, apiKey, secret, logger);
|
|
return null;
|
|
}
|
|
|
|
public SpotOrderWebSocketClient(Enums.BusinessType businessType, long accountId, string apiKey, string secret, NLog.ILogger logger)
|
|
{
|
|
this.BusinessType = businessType;
|
|
this.AccountId = accountId;
|
|
this.ApiKey = apiKey;
|
|
this.Secret = secret;
|
|
this.logger = logger;
|
|
}
|
|
|
|
public virtual void Start(string symbol = "")
|
|
{
|
|
|
|
}
|
|
|
|
public virtual void Stop(string symbol = "")
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|
|
|