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,360 points
1,297 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,740 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,740 points
631 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
2,414 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,740 points
865 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,790 points
1,791 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,317 views
+1 vote
1 answer

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

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,450 points
1,226 views
+1 vote
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,740 points
1,512 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
1,632 views