Exemplo n.º 1
0
 public IEnumerable <DbBalance> GetBalanceSnapshots(string currency = "", string baseExchange = "", string counterExchange = "", DateTime?fromDate = null, int processId = 0)
 {
     using (var reader = DbServiceHelper.ExecuteQuery(sqlConnectionString, "dbo.GetBalances", 15,
                                                      new SqlParameter[]
     {
         new SqlParameter {
             ParameterName = "@currency", Value = currency
         },
         new SqlParameter {
             ParameterName = "@baseExchange", Value = baseExchange
         },
         new SqlParameter {
             ParameterName = "@counterExchange", Value = counterExchange
         },
         new SqlParameter {
             ParameterName = "@fromDate", Value = fromDate
         },
         new SqlParameter {
             ParameterName = "@processId", Value = processId
         }
     }))
     {
         return(reader.ToList <DbBalance>());
     }
 }
Exemplo n.º 2
0
 public IEnumerable <DbHeroStat> GetHeroStats(int hours)
 {
     using (var reader = DbServiceHelper.ExecuteQuery(sqlConnectionString, "dbo.GetHeroStats", 15,
                                                      new SqlParameter[]
     {
         new SqlParameter {
             ParameterName = "@hours", Value = hours
         }
     }))
     {
         return(reader.ToList <DbHeroStat>());
     }
 }
Exemplo n.º 3
0
 public IEnumerable <DbOpportunity> GetRecentOpportunities(int hours = 1)
 {
     using (var reader = DbServiceHelper.ExecuteQuery(sqlConnectionString, "dbo.GetRecentOpportunities", 15,
                                                      new SqlParameter[]
     {
         new SqlParameter {
             ParameterName = "@hours", Value = hours
         }
     }))
     {
         return(reader.ToList <DbOpportunity>());
     }
 }
Exemplo n.º 4
0
 public IEnumerable <DbMakerOrder> GetMakerOrdersByStatus(string status, int pairId = 0)
 {
     using (var reader = DbServiceHelper.ExecuteQuery(sqlConnectionString, "dbo.GetMakerOrdersByStatus", 15,
                                                      new SqlParameter[]
     {
         new SqlParameter {
             ParameterName = "@status", Value = status
         },
         new SqlParameter {
             ParameterName = "@pairId", Value = pairId
         }
     }))
     {
         return(reader.ToList <DbMakerOrder>());
     }
 }
Exemplo n.º 5
0
 public IEnumerable <DbArbitragePair> GetArbitragePairs(string type, string baseExchange = "", string arbExchange = "")
 {
     using (var reader = DbServiceHelper.ExecuteQuery(sqlConnectionString, "dbo.GetArbitragePairs", 15,
                                                      new SqlParameter[]
     {
         new SqlParameter {
             ParameterName = "@type", Value = type
         },
         new SqlParameter {
             ParameterName = "@baseExchange", Value = baseExchange
         },
         new SqlParameter {
             ParameterName = "@arbExchange", Value = arbExchange
         }
     }))
     {
         return(reader.ToList <DbArbitragePair>());
     }
 }