Exemplo n.º 1
0
 public void Bind(ITradeAccount account, Marketplace marketplace)
 {
     _account = account;
     _account.Updated += TradeAccountOnUpdated;
     _marketplace = marketplace;
     UpdateAll();
 }
Exemplo n.º 2
0
 public AutoTrader(
     ITradeAccount buyAccount,
     ITradeAccount sellAccount,
     TradeInfo tradeInfo)
 {
     this.BuyAccount = buyAccount;
     this.BuyAccount = sellAccount;
     this.TradeInfo  = tradeInfo;
 }
Exemplo n.º 3
0
 public TradeFlowAnalyzer(
     TradeFlow tradeFlow,
     ITradeAccount binanceAccount,
     ITradeAccount bittrexAccount)
 {
     AnalyzeTheTradeFlow(
         tradeFlow,
         binanceAccount,
         bittrexAccount);
 }
Exemplo n.º 4
0
 public AutoTrader(
     ITradeAccount buyAccount,
     ITradeAccount sellAccount,
     TradeInfo tradeInfo,
     bool testMode,
     string trans,
     ILogger <AutoTrader> logger)
 {
     this._buyAccount  = buyAccount;
     this._sellAccount = sellAccount;
     this._tradeInfo   = tradeInfo;
     this._testMode    = testMode;
     this._trans       = trans;
     this._logger      = logger;
 }
Exemplo n.º 5
0
        private void AnalyzeTheTradeFlow(
            TradeFlow tradeFlow,
            ITradeAccount binanceAccount,
            ITradeAccount bittrexAccount)
        {
            switch (tradeFlow)
            {
            case TradeFlow.BuyAtBinanceSellAtBittrex:
                this.SellAccount = bittrexAccount;
                this.BuyAccount  = binanceAccount;
                break;

            case TradeFlow.SellAtBinanceBuyAtBittrex:
                this.SellAccount = binanceAccount;
                this.BuyAccount  = bittrexAccount;
                break;

            default:
                break;
            }
        }
Exemplo n.º 6
0
        public static ITradeBotBuilder WithBuyAccount(this ITradeBotBuilder tradeBotBuilder, ITradeAccount buyAccount)
        {
            tradeBotBuilder.SetBuyAccount(buyAccount);

            return(tradeBotBuilder);
        }
Exemplo n.º 7
0
        public static ITradeBotBuilder WithSellAccount(this ITradeBotBuilder tradeBotBuilder, ITradeAccount sellAccount)
        {
            tradeBotBuilder.SetSellAccount(sellAccount);

            return(tradeBotBuilder);
        }
 public static List <ITradeAccount> AddTradeAccount(this List <ITradeAccount> tradeAccounts, ITradeAccount tradeAccount)
 {
     tradeAccounts.Add(tradeAccount);
     return(tradeAccounts);
 }
Exemplo n.º 9
0
        public ITradeBotBuilder SetSellAccount(ITradeAccount sellAccount)
        {
            this._options.SellAccount = sellAccount;

            return(this);
        }
Exemplo n.º 10
0
        public ITradeBotBuilder SetBuyAccount(ITradeAccount buyAccount)
        {
            this._options.BuyAccount = buyAccount;

            return(this);
        }