示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="symbol">market name</param>
 /// <param name="side">buy or sell</param>
 /// <param name="price"></param>
 /// <param name="type">limit or market</param>
 /// <param name="size"></param>
 /// <param name="reduceOnly">should only reduce position amount</param>
 /// <param name="ioc">immediate or cancel</param>
 /// <param name="postOnly">will be only maker</param>
 /// <param name="clientId">optional clients order id</param>
 public FtxBasePlaceOrderRequest(string symbol, FtxOrderSide side, FtxOrderType type, decimal size, bool reduceOnly = false, string clientId = null)
 {
     Symbol     = symbol ?? throw new ArgumentNullException(nameof(symbol));
     Side       = side;
     Type       = type;
     Size       = size;
     ReduceOnly = reduceOnly;
     ClientId   = clientId;
 }
示例#2
0
 public FtxPlaceSimpleOrderRequest(string symbol,
                                   FtxOrderSide side,
                                   FtxOrderType type,
                                   decimal size,
                                   decimal?price   = null,
                                   bool reduceOnly = false,
                                   bool ioc        = false,
                                   bool postOnly   = false,
                                   string clientId = null)
     : base(symbol, side, type, size, reduceOnly, clientId)
 {
     if (type == FtxOrderType.Stop || type == FtxOrderType.TakeProfit || type == FtxOrderType.TrailingStop)
     {
         throw new Exception("Simple order can be only Limit or Market");
     }
     Ioc      = ioc;
     PostOnly = postOnly;
     Price    = price;
 }