40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace WebSocket.Interfaces
|
|
{
|
|
public delegate void UpdateData(int exchangeId, string exchangeName, Dictionary<string, IMarketOHLCVData> data);
|
|
|
|
public interface IMarketOHLCVData
|
|
{
|
|
string PairSymbol { get; set; }
|
|
decimal OpenPrice { get; set; }
|
|
decimal HighPrice { get; set; }
|
|
decimal LowPrice { get; set; }
|
|
decimal ClosePrice { get; set; }
|
|
decimal Volume { get; set; }
|
|
DateTime TimeStamp { get; set; }
|
|
}
|
|
|
|
public interface IWebSocket
|
|
{
|
|
void Create(string url);
|
|
void Sign(Func<IWebSocketForClient, IWebClient> fabric);
|
|
Task Connect();
|
|
Task Connect(string[] pairs);
|
|
Task Close();
|
|
}
|
|
public interface IWebSocketForClient {
|
|
//UpdateData updateData { get; set; }
|
|
//int ExchangeId { get; set; }
|
|
void DataChanged(string exchangeName, Dictionary<string, IMarketOHLCVData> data);
|
|
void Send(string message);
|
|
void Ping();
|
|
void Pong();
|
|
void Close();
|
|
}
|
|
|
|
}
|