Poloniex C# API - get trades

0 votes

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

Sep 25, 2018 in Blockchain by slayer
• 29,260 points
241 views

1 answer to this question.

0 votes

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);
answered Sep 25, 2018 by digger
• 26,660 points

Related Questions In Blockchain

0 votes
1 answer

How to get property of non object in Coinbase API

First, your sendMoney() call is stored into ...READ MORE

answered Aug 31, 2018 in Blockchain by digger
• 26,660 points
69 views
0 votes
2 answers

Check Bitcoin Balance with mybitx api https GET url

You can use the PHP Requests library for an ...READ MORE

answered Sep 17, 2018 in Blockchain by Lalit
333 views
0 votes
1 answer

How to get iota balance via api url?

Either run your own node (thus, the localhost reference ...READ MORE

answered Sep 12, 2018 in Blockchain by digger
• 26,660 points
142 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,810 points
205 views
0 votes
1 answer
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by Aryya
• 7,350 points
124 views
0 votes
1 answer

Coinbase API: Get transaction fees

The Coinbase "fee" is the difference between ...READ MORE

answered Aug 23, 2018 in Blockchain by digger
• 26,660 points
177 views
0 votes
2 answers

Laravel 5.4 to get data form API response

Input::get('var_name') READ MORE

answered Feb 14, 2019 in Blockchain by anonymous
362 views