예제 #1
0
 private void InitializeAPI()
 {
     bitmex           = BitmexApiConnector.Instance;
     bitmex.ApiKey    = Properties.Settings.Default.key;
     bitmex.ApiSecret = Properties.Settings.Default.secret;
     bitmex.Domain    = Properties.Settings.Default.domain;
     activeInstrument = ActiveInstrument.Instance;
     // We must do this in case symbols are different on test and real net
     // GetAPIValidity(); // Validate API keys by checking and displaying account balance.
     // InitializeSymbolInformation();
     InitializeSymbolInfromation();
 }
예제 #2
0
 public Bot(OrdersOnlineDTO _orderDTO)
 {
     bitmex           = BitmexApiConnector.Instance;
     candleRetriever  = CandleRetriever.Instance;
     botApiCalls      = BotApiCalls.Instance;
     this.orderDTO    = _orderDTO;
     sucessfullOrders = new Dictionary <int, String>();
     stepDOWN         = 0;
     stepUP           = 0;
     isUpTrading      = false;
     isDownTrading    = false;
     semaphoreSlim    = new SemaphoreSlim(1, 1);
 }
예제 #3
0
 private BotApiCalls()
 {
     bitmex           = BitmexApiConnector.Instance;
     candleRetriever  = CandleRetriever.Instance;
     activeInstrument = ActiveInstrument.Instance;
 }
예제 #4
0
 private ActiveInstrument()
 {
     activeInstrument  = new Instrument();
     activeInstruments = new List <Instrument>();
     bitmex            = BitmexApiConnector.Instance;
 }
예제 #5
0
 private CandleRetriever()
 {
     bitmex            = BitmexApiConnector.Instance;
     activeInstruments = ActiveInstrument.Instance;
 }