예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="base_name">The type of trading base-currency of which information you want to query for.</param>
        /// <param name="quote_name">The type of trading quote-currency of which information you want to query for.</param>
        /// <param name="timeframe">time frame interval (optional): default "1d"</param>
        /// <param name="since">return committed data since given time (milli-seconds) (optional): default 0</param>
        /// <param name="limits">maximum number of items (optional): default 20</param>
        /// <param name="args">Add additional attributes for each exchange</param>
        /// <returns></returns>
        public virtual async Task <MyOrders> FetchMyOrders(string base_name, string quote_name, string timeframe = "1d", long since = 0, int limits = 20, Dictionary <string, object> args = null)
        {
            var _result = new MyOrders(base_name, quote_name);

            var _currency_id = await publicApi.LoadCurrencyId(base_name);

            if (_currency_id.success == true)
            {
                tradeClient.ExchangeInfo.ApiCallWait(TradeType.Private);

                var _timeframe = tradeClient.ExchangeInfo.GetTimeframe(timeframe);
                var _timestamp = tradeClient.ExchangeInfo.GetTimestamp(timeframe);

                _result.result = new List <IMyOrderItem>();

                _result.SetFailure("not supported yet", ErrorCode.NotSupported);
                _result.supported = false;
            }
            else
            {
                _result.SetResult(_currency_id);
            }

            return(await Task.FromResult(_result));
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="args">Add additional attributes for each exchange</param>
        /// <returns></returns>
        public virtual async Task <MyOrders> CancelAllOrders(Dictionary <string, object> args = null)
        {
            var _result = new MyOrders();

            var _markets = await publicApi.LoadMarkets();

            if (_markets.success == true)
            {
                tradeClient.ExchangeInfo.ApiCallWait(TradeType.Private);

                _result.result = new List <IMyOrderItem>();

                _result.SetFailure("not supported yet", ErrorCode.NotSupported);
                _result.supported = false;
            }
            else
            {
                _result.SetResult(_markets);
            }

            return(await Task.FromResult(_result));
        }
예제 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="base_name">The type of trading base-currency of which information you want to query for.</param>
        /// <param name="quote_name">The type of trading quote-currency of which information you want to query for.</param>
        /// <param name="order_ids"></param>
        /// <param name="args">Add additional attributes for each exchange</param>
        /// <returns></returns>
        public virtual async Task <MyOrders> CancelOrders(string base_name, string quote_name, string[] order_ids, Dictionary <string, object> args = null)
        {
            var _result = new MyOrders(base_name, quote_name);

            var _currency_id = await publicApi.LoadCurrencyId(base_name);

            if (_currency_id.success == true)
            {
                tradeClient.ExchangeInfo.ApiCallWait(TradeType.Private);

                _result.result = new List <IMyOrderItem>();

                _result.SetFailure("not supported yet", ErrorCode.NotSupported);
                _result.supported = false;
            }
            else
            {
                _result.SetResult(_currency_id);
            }

            return(await Task.FromResult(_result));
        }