Example #1
0
 /// <summary>Checks whether the API token used for the client is valid.</summary>
 public bool IsApiTokenValid()
 {
     if (ApiToken.Length != 32)
     {
         return(false);
     }
     return(!RestWebClient.GetRaw("account/bitcoindepositaddress").IsErrorThrown);
 }
Example #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         RestWebClient.Dispose();
         RestWebClient = null;
     }
 }
Example #3
0
        /// <summary>Creates a new instance of 1Broker API .NET's client service.</summary>
        /// <param name="apiToken">Your secret API token.</param>
        public OneBrokerClient(string apiToken)
        {
            ApiToken      = apiToken;
            RestWebClient = new RestWebClient(apiToken, Proxy);

            Account   = new ClientTools.Account(RestWebClient);
            Orders    = new ClientTools.Orders(RestWebClient);
            Positions = new ClientTools.Positions(RestWebClient);
            Markets   = new ClientTools.Markets(RestWebClient);
        }