@@ -31,14 +31,27 @@ namespace ExchangeSharp
31
31
/// <summary>
32
32
/// Base interface for all API implementations
33
33
/// </summary>
34
- public interface IBaseAPI : INamed
35
- {
36
- #region Properties
34
+ public interface IBaseAPI : IAPIRequestHandler , INamed
35
+ {
36
+ #region Properties
37
+ // BaseUrl is in IAPIRequestHandler
37
38
38
- /// <summary>
39
- /// Optional public API key
40
- /// </summary>
41
- SecureString ? PublicApiKey { get ; set ; }
39
+ /// <summary>
40
+ /// Base URL for the API for web sockets
41
+ /// </summary>
42
+ string BaseUrlWebSocket { get ; set ; }
43
+
44
+ /// <summary>
45
+ /// Base URL for the private API for web sockets
46
+ /// </summary>
47
+ string BaseUrlPrivateWebSocket { get ; set ; }
48
+
49
+ // Name is in INamed
50
+
51
+ /// <summary>
52
+ /// Optional public API key
53
+ /// </summary>
54
+ SecureString ? PublicApiKey { get ; set ; }
42
55
43
56
/// <summary>
44
57
/// Optional private API key
@@ -51,10 +64,9 @@ public interface IBaseAPI : INamed
51
64
/// </summary>
52
65
System . Security . SecureString ? Passphrase { get ; set ; }
53
66
54
- /// <summary>
55
- /// Request timeout
56
- /// </summary>
57
- TimeSpan RequestTimeout { get ; set ; }
67
+ // RateLimit is in IAPIRequestHandler
68
+
69
+ // RequestTimeout is in IAPIRequestHandler
58
70
59
71
/// <summary>
60
72
/// Request window - most services do not use this, but Binance API is an example of one that does
@@ -66,25 +78,43 @@ public interface IBaseAPI : INamed
66
78
/// </summary>
67
79
NonceStyle NonceStyle { get ; }
68
80
69
- /// <summary>
70
- /// Cache policy - defaults to no cache, don't change unless you have specific needs
71
- /// </summary>
72
- System . Net . Cache . RequestCachePolicy RequestCachePolicy { get ; set ; }
81
+ /// <summary>
82
+ /// The nonce end point for pulling down a server timestamp - override OnGetNonceOffset if you need custom handling
83
+ /// </summary>
84
+ string ? NonceEndPoint { get ; }
73
85
74
- /// <summary>
75
- /// Cache policy for api methods (method name, cache time)
76
- /// </summary>
77
- Dictionary < string , TimeSpan > MethodCachePolicy { get ; }
86
+ /// <summary>
87
+ /// The field in the json returned by the nonce end point to parse out - override OnGetNonceOffset if you need custom handling
88
+ /// </summary>
89
+ string ? NonceEndPointField { get ; }
78
90
79
- #endregion Properties
91
+ /// <summary>
92
+ /// The type of value in the nonce end point field - override OnGetNonceOffset if you need custom handling.
93
+ /// Supported values are Iso8601 and UnixMilliseconds.
94
+ /// </summary>
95
+ NonceStyle NonceEndPointStyle { get ; }
80
96
81
- #region Methods
97
+ // RequestCachePolicy is in IAPIRequestHandler
82
98
83
- /// <summary>
84
- /// Load API keys from an encrypted file - keys will stay encrypted in memory
85
- /// </summary>
86
- /// <param name="encryptedFile">Encrypted file to load keys from</param>
87
- void LoadAPIKeys ( string encryptedFile ) ;
99
+ /// <summary>
100
+ /// Cache policy for api methods (method name, cache time)
101
+ /// </summary>
102
+ Dictionary < string , TimeSpan > MethodCachePolicy { get ; }
103
+
104
+ /// <summary>
105
+ /// Get or set the current cache. Defaults to MemoryCache.
106
+ /// </summary>
107
+ ICache Cache { get ; set ; }
108
+
109
+ #endregion Properties
110
+
111
+ #region Methods
112
+
113
+ /// <summary>
114
+ /// Load API keys from an encrypted file - keys will stay encrypted in memory
115
+ /// </summary>
116
+ /// <param name="encryptedFile">Encrypted file to load keys from</param>
117
+ void LoadAPIKeys ( string encryptedFile ) ;
88
118
89
119
/// <summary>
90
120
/// Load API keys from unsecure strings
0 commit comments