2

I am using the Poloniex C# API available here: Poloniex C#.

I have connected to my Poloniex account via the public/private key combination

private PoloniexClient client = new PoloniexClient(Properties.Resources.PublicKey, Properties.Resources.PrivateKey);

and I have a method for getting trades info

public async void GetTrades(string curr1, string curr2)
{
   CurrencyPair cp = new CurrencyPair(curr1, curr2);
   var trades = await client.Markets.GetTradesAsync(cp);
   foreach (var x in trades)
       Console.WriteLine(x);
}

which uses the API's GetTradesAsync() method, but the output I get is

Jojatekok.PoloniexAPI.MarketTools.Trade

Jojatekok.PoloniexAPI.MarketTools.Trade

Jojatekok.PoloniexAPI.MarketTools.Trade

...

This is the first time I'm using Poloniex (and anything related to crypto-currencies, really) so I'm not sure what the actual result should look like, but I'm sure I was actually supposed to get something more meaningful. I'd appreciate any help or advice.

Community
  • 1
  • 1
Eutherpy
  • 4,471
  • 7
  • 40
  • 64

1 Answers1

5

Outputting the Trade will just show you the type. You want to output whatever properties you're interested in, e.g.

foreach (var x in trades)
   Console.WriteLine(x.AmountBase + " " + x.AmountQuote + " "+x.PricePerCoin);
Damian Green
  • 6,895
  • 2
  • 31
  • 43