PortfolioController

@RestController
@RequestMapping(value = "/api/portfolio")
open class PortfolioController

Constructors

Link copied to clipboard
@Autowired
constructor(@NotNull portfolioService: @NotNull PortfolioService)

Functions

Link copied to clipboard
@PostMapping(value = "/add")
@PreAuthorize(value = "isAuthenticated()")
@NotNull
open fun addPortfolioAsset(@NotNull @AuthenticationPrincipal user: @NotNull ProductUser, @NotNull @RequestBody portfolioAssetRequest: @NotNull PortfolioAssetRequest): @NotNull ResponseEntity<OperationSuccessfulResponse>
Link copied to clipboard
@GetMapping(value = "/empty")
@PreAuthorize(value = "isAuthenticated()")
@NotNull
open fun emptyPortfolio(@NotNull @AuthenticationPrincipal user: @NotNull ProductUser): @NotNull ResponseEntity<HasPortfolioResponse>
Link copied to clipboard
@GetMapping(value = "/get")
@PreAuthorize(value = "isAuthenticated()")
@NotNull
open fun getPortfolio(@NotNull @AuthenticationPrincipal user: @NotNull ProductUser): @NotNull ResponseEntity<PortfolioResponse>
Link copied to clipboard
@GetMapping(value = "/history/get/asset")
@PreAuthorize(value = "isAuthenticated()")
@NotNull
open fun getPortfolioAssetHistory(@NotNull @AuthenticationPrincipal user: @NotNull ProductUser): @NotNull ResponseEntity<List<PortfolioAssetHistoryResponse>>
Link copied to clipboard
@GetMapping(value = "/history/get/asset/{currencyName}")
@PreAuthorize(value = "isAuthenticated()")
@Nullable
open fun getPortfolioAssetHistoryByCurrency(@NotNull @AuthenticationPrincipal user: @NotNull ProductUser, @Nullable @PathVariable currencyName: @Nullable String): @Nullable ResponseEntity<List<PortfolioAssetHistory>>
Link copied to clipboard
@GetMapping(value = "/history/get")
@PreAuthorize(value = "isAuthenticated()")
@NotNull
open fun getPortfolioHistory(@AuthenticationPrincipal @NotNull user: @NotNull ProductUser): @NotNull ResponseEntity<List<PortfolioHistoryResponse>>
@PostMapping(value = "/history/ranged/get")
@PreAuthorize(value = "isAuthenticated()")
@NotNull
open fun getPortfolioHistory(@AuthenticationPrincipal @NotNull user: @NotNull ProductUser, @RequestBody @NotNull request: @NotNull RangedPortfolioHistoryRequest): @NotNull ResponseEntity<List<PortfolioHistoryResponse>>
Link copied to clipboard
@GetMapping(value = "/history/profit")
@PreAuthorize(value = "isAuthenticated()")
@NotNull
open fun getPortfolioProfit(@NotNull @AuthenticationPrincipal user: @NotNull ProductUser): @NotNull ResponseEntity<AssetValueResponse>
Link copied to clipboard
@GetMapping(value = "/history/profit/{currencyName}")
@PreAuthorize(value = "isAuthenticated()")
@NotNull
open fun getPortfolioProfitByCurrency(@NotNull @AuthenticationPrincipal user: @NotNull ProductUser, @Nullable @PathVariable currencyName: @Nullable String): @NotNull ResponseEntity<AssetValueResponse>