示例#1
0
 public static List <AvailableBrokerInfo> GetAvailableBrokers(string userName)
 {
     return(new List <AvailableBrokerInfo>
     {
         PoloniexBroker.BrokerInfo(userName),
         LmaxLiveBroker.BrokerInfo(userName),
         LmaxDemoBroker.BrokerInfo(userName),
         SimulatedExchangeBroker.BrokerInfo(userName),
         SimulatedMarginBroker.BrokerInfo(userName)
     });
 }
示例#2
0
        public static string CreateSimulatedAccount(string userName, CreateSimulatedBrokerAccountInfo account)
        {
            switch (account.BrokerName)
            {
            case PoloniexBroker.BrokerName:
            case LmaxLiveBroker.BrokerName:
            case LmaxDemoBroker.BrokerName:
                return($"{account.BrokerName} broker doesn't support create account");

            case SimulatedMarginBroker.BrokerName:
                return(SimulatedMarginBroker.CreateSimulatedAccount(userName, account));

            case SimulatedExchangeBroker.BrokerName:
                return(SimulatedExchangeBroker.CreateSimulatedAccount(userName, account));

            default:
                return($"No available broker {account.BrokerName}");
            }
        }