Closed mrmacdmacd closed 6 years ago
to elaborate a bit: have used .result effectively for the get market history:
private static string GetRecentTrades() { var trades = bittrex.GetMarketHistory(strCurrencyPair);
int i = 1;
foreach (BittrexSharp.Domain.Trade tick in trades.Result)
this gives me the 200 recent trades to work with...
and that method has not worked for this one. have tried the below as well (having read the error below about not getting anything to work), but it is throwing a similar error with a null enumerable
private static async void MarketThreadRunAsync() { Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
bool RunMarket = true;
while (RunMarket == true)
{
// var marketsum = bittrex.GetMarketSummaries();
var marketsum = await bittrex.GetMarketSummaries();
^^^^^error is thrown here with this code^^^^^
int i = 1;
foreach (BittrexSharp.Domain.MarketSummary MS in marketsum)
Thank you for the hint.
In my tests GetMarketSummaries
threw an exception and did not return null.
Not sure why it works differently for me than for you.
Regardless, the internal method (convertParameterListToString
) caused the exception.
I fixed that now. Can you test the latest code and give me feedback if it worked for you please?
yeah the problem was around the no paramters being passed...
i did this last night and it worked (it's probably uglier than my sister (sorry... (at least i can use nested brackets)))
var completeUri = "";
if (parameters.Count > 0)
{
var parameterString = convertParameterListToString(parameters);
completeUri = uri + "?" + parameterString;
}
else
{ completeUri = uri; }
i'll have a look at your solution when i get a chance to breathe... thanks for what you have done so far, i would never have got there on my own!
I think the title says it all... Says that it has timed out, but seems to do this really quickly. I imagine this would take a little while to return.
I have gotten GetMarkethistory to work, and am Implementing similarly.
Thanks