File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/ExchangeSharp/API/Exchanges/_Base Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -405,6 +405,18 @@ public static async Task<T> CreateExchangeAPIAsync<T>() where T : ExchangeAPI
405
405
return ( T ) await InitializeAPIAsync ( typeof ( T ) ) ;
406
406
}
407
407
408
+ /// <summary>
409
+ /// Create an exchange api, by-passing any cache. Use this method for cases
410
+ /// where you need multiple instances of the same exchange, for example
411
+ /// multiple credentials.
412
+ /// </summary>
413
+ /// <returns>Created exchange api</returns>
414
+ public static async Task < IExchangeAPI > CreateExchangeAPIAsync ( string name )
415
+ {
416
+ var type = ExchangeName . GetExchangeType ( name ) ;
417
+ return await InitializeAPIAsync ( type ) ;
418
+ }
419
+
408
420
/// <summary>
409
421
/// Get a cached exchange API given an exchange name (see ExchangeName class)
410
422
/// </summary>
You can’t perform that action at this time.
0 commit comments