public RequestNewOrder(long gid, long cid, string symbol, EnmBfxOrderType type, decimal amount, decimal price)
 {
     Gid    = gid;
     Cid    = cid;
     Symbol = symbol;
     Type   = type;
     Amount = amount;
     Price  = price;
 }
Esempio n. 2
0
        public static string GetOrderTypeString(EnmBfxOrderType type)
        {
            switch (type)
            {
            case EnmBfxOrderType.Market:
                return("MARKET");

            case EnmBfxOrderType.ExchangeMarket:
                return("EXCHANGE MARKET");

            case EnmBfxOrderType.Limit:
                return("LIMIT");

            case EnmBfxOrderType.ExchangeLimit:
                return("EXCHANGE LIMIT");

            case EnmBfxOrderType.TrailingStop:
                return("TRAILING STOP");

            case EnmBfxOrderType.ExchangeTrailingStop:
                return("EXCHANGE TRAILING STOP");

            case EnmBfxOrderType.Stop:
                return("STOP");

            case EnmBfxOrderType.ExchangeStop:
                return("EXCHANGE STOP");

            case EnmBfxOrderType.StopLimit:
                return("STOP LIMIT");

            case EnmBfxOrderType.ExchangeStopLimit:
                return("EXCHANGE STOP LIMIT");

            case EnmBfxOrderType.Fok:
                return("FOK");

            case EnmBfxOrderType.ExchangeFok:
                return("EXCHANGE FOK");
            }
            throw new ApplicationException("Not supported order type");
        }