Closed jjziets closed 6 years ago
I have tried 3 keys. Also tried to run this the main loop.
It sees the construct Bittrex is not called when this.httpClient = new HttpClient(); is in it. Clearly I have something set wrong in my project. My windows form is targeting DotNet 4.6.1 as that is the only one that seems to support DotNet 1.4 Standard frame work
public Bittrex(string apiKey, string apiSecret)
{
this.apiKey = apiKey;
this.apiSecret = apiSecret;
this.apiSecretBytes = encoding.GetBytes(apiSecret);
// this.httpClient = new HttpClient();
}
What do you mean it is not called? Is there an exception?
Also please keep in mind that Bittrex
has only async
methods, so
"Balance:" + BittrexAPI.GetBalance("BTC").ToString();
won't work. You have to await
the method calls, like this
"Balance:" + (await BittrexAPI.GetBalance("BTC").ToString());
If you don't want an sync method/ task you can leave the await and use .Result
Closed because of inactivity.
When i try to use your code I get an exception.
I have a forum with a button that does the following.
Any ideas what could be the problem? I have tried this from my work and home network. I thought it could be the home ISP but work network gives the same issue.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using BittrexSharp;
namespace WindowsFormsApp1 { public partial class MainForm1 : Form { public MainForm1() { InitializeComponent();
}