币安量化交易
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.

46 lines
1.6 KiB

using Binance.TradeRobot.Model.Base;
using SDKAdapter.Model;
using System;
namespace SDKAdapter.WebSockets.Order.Spot
{
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, onOrderUpdated);
return null;
}
public SpotOrderWebSocketClient(Enums.BusinessType businessType, long accountId, string apiKey, string secret, NLog.ILogger logger, Action<SpotOrderTradePublishInfo> onOrderUpdated)
{
this.BusinessType = businessType;
this.AccountId = accountId;
this.ApiKey = apiKey;
this.Secret = secret;
this.logger = logger;
this.OnOrderUpdated = onOrderUpdated;
}
public virtual void Start(string symbol = "")
{
}
public virtual void Stop(string symbol = "")
{
}
}
}