Exemple #1
0
        public BitMEXConnectorStatus TryConnect()
        {
            long r = GetExchangeAccountNumber();

            if (r > 0)
            {
                Account         = r;
                ConnectorStatus = BitMEXConnectorStatus.Connected;
            }
            else
            {
                ConnectorStatus = BitMEXConnectorStatus.Disconnected;
            }

            return(ConnectorStatus);
        }
Exemple #2
0
        // TESTLONG  [51091]    : "QbpGewiOyIYMbyQ-ieaTKfOJ"
        // TESTSHORT [170591]   : "xEuMT-y7ffwxrvHA2yDwL1bZ"

        public MordoR(string bitmexKey,
                      string bitmexSecret,
                      string bitmexDomain = "https://testnet.bitmex.com")
        {
            ApiKey             = bitmexKey;
            ApiSecret          = bitmexSecret;
            Domain             = bitmexDomain;
            LastKnownRateLimit = 30;
            ConnectorStatus    = TryConnect();

            //if (l == null)
            //{
            //    log4net.Config.XmlConfigurator.Configure();
            //    log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
            //}
            //else
            //    log = l;

            //log.Info(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " instantiated.");
        }