Class SymbolApiController
java.lang.Object
com.bluebell.greenhouse.planter.controllers.symbol.SymbolApiController
@RestController
@RequestMapping("${bluebell.base.api.controller.endpoint}/symbol")
@CrossOrigin(origins="*",
methods={GET,DELETE,POST,PUT})
public class SymbolApiController
extends Object
API controller for symbols & equities.
- Version:
- 3.0.6
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> deleteSymbol(String symbolId) Deletes a symbol.org.springframework.http.ResponseEntity<org.springframework.core.io.ByteArrayResource> Exports the raw symbol registry JSON file.Returns a list ofSymbolDTOs ready for assignment.org.springframework.http.ResponseEntity<List<NewsLookupSymbolDTO>> Returns a list ofNewsLookupSymbolDTOs eligible for news lookup.org.springframework.http.ResponseEntity<SymbolDTO> getSymbolDetails(String query) Returns aResponseEntitycontaining aSymbolDTO.org.springframework.http.ResponseEntity<List<SymbolSentimentPointDTO>> getSymbolSentiment(SymbolSentimentRequest sentimentRequest) Returns symbol sentiment points for a ticker.org.springframework.http.ResponseEntity<SymbolSentimentPointDTO> getSymbolSentimentSummary(SymbolSentimentRequest sentimentRequest) Returns aggregated symbol sentiment for a ticker.org.springframework.http.ResponseEntity<PaginatedSymbolDTO> getSymbolsPaged(SymbolSearchRequest searchRequest) Return aResponseEntitycontainingSymbols filtered.getTradedSymbols(AccountRequestContext context) Returns aResponseEntitycontaining the symbols that were traded on this account.org.springframework.http.ResponseEntity<Boolean> postAssignToSymbol(String symbolAliasUid, String symbolId) Assigns the givenSymbolAliasto a newSymbol.org.springframework.http.ResponseEntity<SymbolDTO> postCreateNewSymbol(@Valid CreateUpdateSymbolDTO data) Creates a newSymbol.org.springframework.http.ResponseEntity<ManualSymbolEnrichmentResponse> postEnrichSymbol(String ticker, String exchangeMic, String symbolType) Enriches a symbol's metadata with additional information from the web.org.springframework.http.ResponseEntity<Boolean> postReassignSymbol(String oldTicker, String newTicker, String dataSource) org.springframework.http.ResponseEntity<SymbolDTO> putUpdateSymbol(@Valid CreateUpdateSymbolDTO data, String symbolId) Updates an existingSymbol.
-
Constructor Details
-
SymbolApiController
public SymbolApiController()
-
-
Method Details
-
getTradedSymbols
@GetMapping("/get-traded-symbols") public org.springframework.http.ResponseEntity<Set<String>> getTradedSymbols(@ResolvedAccount AccountRequestContext context) Returns aResponseEntitycontaining the symbols that were traded on this account.- Parameters:
context-AccountRequestContext- Returns:
ResponseEntity
-
getSymbolsPaged
@GetMapping("/search-symbols") public org.springframework.http.ResponseEntity<PaginatedSymbolDTO> getSymbolsPaged(@ModelAttribute SymbolSearchRequest searchRequest) Return aResponseEntitycontainingSymbols filtered.- Parameters:
searchRequest-SymbolSearchRequest- Returns:
ResponseEntity
-
getSymbolDetails
-
getAvailableSymbolsForAssignment
-
getNewsLookupSymbols
@GetMapping("/get-news-lookup-symbols") public org.springframework.http.ResponseEntity<List<NewsLookupSymbolDTO>> getNewsLookupSymbols()Returns a list ofNewsLookupSymbolDTOs eligible for news lookup.- Returns:
ResponseEntity
-
getSymbolSentiment
@GetMapping("/get-symbol-sentiment") public org.springframework.http.ResponseEntity<List<SymbolSentimentPointDTO>> getSymbolSentiment(@ModelAttribute SymbolSentimentRequest sentimentRequest) Returns symbol sentiment points for a ticker.- Parameters:
sentimentRequest-SymbolSentimentRequest- Returns:
ResponseEntity
-
getSymbolSentimentSummary
@GetMapping("/get-symbol-sentiment-summary") public org.springframework.http.ResponseEntity<SymbolSentimentPointDTO> getSymbolSentimentSummary(@ModelAttribute SymbolSentimentRequest sentimentRequest) Returns aggregated symbol sentiment for a ticker.- Parameters:
sentimentRequest-SymbolSentimentRequest- Returns:
ResponseEntity
-
exportSymbolRegistry
@GetMapping(value="/export-symbol-registry", produces="application/json") public org.springframework.http.ResponseEntity<org.springframework.core.io.ByteArrayResource> exportSymbolRegistry()Exports the raw symbol registry JSON file.- Returns:
ResponseEntitywithByteArrayResourcefor download
-
postCreateNewSymbol
@PostMapping("/create-symbol") public org.springframework.http.ResponseEntity<SymbolDTO> postCreateNewSymbol(@Valid @RequestBody @Valid CreateUpdateSymbolDTO data) Creates a newSymbol.- Parameters:
data-CreateUpdateSymbolDTO- Returns:
ResponseEntity
-
postReassignSymbol
@PostMapping("/re-assign-symbol") public org.springframework.http.ResponseEntity<Boolean> postReassignSymbol(@RequestParam("oldSymbolId") String oldTicker, @RequestParam("newSymbolId") String newTicker, @RequestParam("dataSource") String dataSource) - Parameters:
oldTicker- old symbolnewTicker- new symboldataSource-DataSourcestring- Returns:
ResponseEntity
-
postAssignToSymbol
@PostMapping("/assign-to-symbol") public org.springframework.http.ResponseEntity<Boolean> postAssignToSymbol(@RequestParam("symbolAliasUid") String symbolAliasUid, @RequestParam("symbolId") String symbolId) Assigns the givenSymbolAliasto a newSymbol.- Parameters:
symbolAliasUid- symbol alias uidsymbolId- symbol id- Returns:
ResponseEntity
-
postEnrichSymbol
@PostMapping("/enrich-symbol") public org.springframework.http.ResponseEntity<ManualSymbolEnrichmentResponse> postEnrichSymbol(@RequestParam("ticker") String ticker, @RequestParam("exchangeMic") String exchangeMic, @RequestParam("symbolType") String symbolType) Enriches a symbol's metadata with additional information from the web.- Parameters:
ticker- symbol tickerexchangeMic- symbol exchange MICsymbolType- symbol type- Returns:
ResponseEntity
-
putUpdateSymbol
@PutMapping("/update-symbol") public org.springframework.http.ResponseEntity<SymbolDTO> putUpdateSymbol(@Valid @RequestBody @Valid CreateUpdateSymbolDTO data, @RequestParam("symbolId") String symbolId) Updates an existingSymbol.- Parameters:
data-CreateUpdateSymbolDTOsymbolId- symbol id- Returns:
ResponseEntity
-
deleteSymbol
-