コード例 #1
0
ファイル: Okex.cs プロジェクト: leeleonis/movemoney
        /// <summary>
        ///  交易所賣出
        /// </summary>
        /// <param name="highestBid">(賣價)最高資訊</param>
        /// <param name="MinQuantity">數量</param>
        /// <returns></returns>
        internal ExchangeApiData PlaceOrderBid(ExchangeData highestBid, decimal MinQuantity)
        {
            StockRestApi postRequest1 = new StockRestApi(urlApi, highestBid.APIKey, highestBid.Secret);
            var          orderResult  = ReturnData(postRequest1.trade(highestBid.ExchangeType, "sell", highestBid.Bid.ToString(), MinQuantity.ToString()));

            return(new ExchangeApiData {
                Stace = orderResult.result, Msg = orderResult.Msg
            });
        }
コード例 #2
0
ファイル: Okex.cs プロジェクト: leeleonis/movemoney
        /// <summary>
        /// 交易所買進
        /// </summary>
        /// <param name="lowestAsk">(買價)最低資訊</param>
        /// <param name="MinQuantity">數量</param>
        /// <returns></returns>
        internal ExchangeApiData PlaceOrderAsk(ExchangeData lowestAsk, decimal MinQuantity)
        {
            StockRestApi postRequest1 = new StockRestApi(urlApi, lowestAsk.APIKey, lowestAsk.Secret);
            var          orderResult  = ReturnData(postRequest1.trade(lowestAsk.ExchangeType, "buy", lowestAsk.Ask.ToString(), MinQuantity.ToString()));

            return(new ExchangeApiData {
                Stace = orderResult.result, Msg = orderResult.Msg
            });
        }