-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Desktop UI now interfaces via REST webservice instead of directly thr…
…ough DLLs
- Loading branch information
Showing
13 changed files
with
2,848 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
using ProjectX.Core; | ||
using ProjectX.Core.Services; | ||
using ProjectX.Core.Strategy; | ||
|
||
namespace ProjectX.GatewayAPI.Controllers; | ||
|
||
[ApiController] | ||
[Route("[controller]")] | ||
public class StockSignalController : ControllerBase | ||
{ | ||
private readonly ILogger<StockSignalController> _logger; | ||
private readonly IStockSignalService _stockSignalService; | ||
private readonly IStockMarketSource _stockMarketSource; | ||
|
||
public StockSignalController(ILogger<StockSignalController> logger, IStockSignalService stockSignalService, IStockMarketSource stockMarketSource) | ||
{ | ||
_logger = logger; | ||
_stockSignalService = stockSignalService; | ||
_stockMarketSource = stockMarketSource; | ||
} | ||
|
||
[HttpGet("MovingAverageSignals")] | ||
public async Task<ActionResult<IEnumerable<PriceSignal>>> MovingAverageSignalAsync(string ticker, DateTime fromDate, DateTime toDate, int movingWindow, MovingAverageImpl movingAverageImpl) | ||
{ | ||
var signals = await _stockSignalService.GetSignalUsingMovingAverageByDefault(ticker, fromDate, toDate, movingWindow, movingAverageImpl); | ||
|
||
return Ok(signals); | ||
} | ||
|
||
[HttpGet("Hursts")] | ||
public async Task<ActionResult<IEnumerable<double?>>> Hursts(string ticker, DateTime fromDate, DateTime toDate) | ||
{ | ||
var signals = await _stockMarketSource.GetHurst(ticker, fromDate, toDate); | ||
|
||
return Ok(signals); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.