forked from QuantBox/QuantBox_XAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIXApi.cs
62 lines (53 loc) · 2.1 KB
/
IXApi.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace QuantBox.XAPI.Interface
{
public interface IXApi
{
DelegateOnConnectionStatus OnConnectionStatus { get; set; }
DelegateOnRtnError OnRtnError { get; set; }
void Connect();
void Disconnect();
ApiType GetApiType { get;}
string GetApiName { get;}
string GetApiVersion { get;}
}
public interface IXMarketData
{
DelegateOnRtnDepthMarketData OnRtnDepthMarketData { get; set; }
void Subscribe(string szInstrument, string szExchange);
void Unsubscribe(string szInstrument, string szExchange);
}
public interface IXInstrument
{
DelegateOnRspQryInstrument OnRspQryInstrument { get; set; }
void ReqQryInstrument(string szInstrument, string szExchange);
}
public interface IXTrade
{
DelegateOnRspQryTradingAccount OnRspQryTradingAccount { get; set; }
DelegateOnRspQryInvestorPosition OnRspQryInvestorPosition { get; set; }
DelegateOnRspQrySettlementInfo OnRspQrySettlementInfo { get; set; }
DelegateOnRtnOrder OnRtnOrder { get; set; }
DelegateOnRtnTrade OnRtnTrade { get; set; }
DelegateOnRtnQuote OnRtnQuote { get; set; }
void ReqQryTradingAccount();
void ReqQryInvestorPosition(string szInstrument, string szExchange);
void ReqQrySettlementInfo(string szTradingDay);
void SendOrder(int OrderRef, ref OrderField[] orders, out string[] OrderRefs);
void CancelOrder(string[] szId,out string[] errs);
string SendQuote(int QuoteRef, ref QuoteField quote);
int CancelQuote(string szId);
}
public interface IXHistoricalData
{
DelegateOnRspQryHistoricalTicks OnRspQryHistoricalTicks { get; set; }
DelegateOnRspQryHistoricalBars OnRspQryHistoricalBars { get; set; }
int ReqQryHistoricalTicks(ref HistoricalDataRequestField request);
int ReqQryHistoricalBars(ref HistoricalDataRequestField request);
}
}