Esempio n. 1
0
        public TransactionOrder AddOrder(
            string pair,
            Kraken.OrderKind type,
            Kraken.OrderType ordertype,
            decimal volume,
            decimal?price,
            decimal?price2,
            string leverage            = "none",
            Kraken.OrderFlags[] oflags = null,
            string starttm             = null,
            string expiretm            = null,
            string userref             = null,
            bool validate = false,
            Dictionary <string, string> close = null
            )
        {
            string flags = null;

            if (!oflags.IsNullOrEmpty())
            {
                foreach (var f in oflags)
                {
                    flags += f.GetEnumDescription() + ",";
                }

                flags = flags.RemoveLast(1);
            }


            return(this.AddOrder(pair, type.GetEnumDescription(), ordertype.GetEnumDescription(), volume, price, price2, leverage, flags, starttm, expiretm, userref, validate, close));
        }
Esempio n. 2
0
 public TransactionOrder AddMarketOrder(
     string pair,
     Kraken.OrderKind type,
     decimal volume,
     string leverage            = "none",
     Kraken.OrderFlags[] oflags = null
     )
 {
     return(this.AddOrder(pair, type, Kraken.OrderType.Market, volume, null, null, leverage, oflags));
 }