-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #472 - Added support for the new portfolio history endpoint usi…
…ng the existing `IAlpacaTradingClient.GetPortfolioHistoryAsync` method. (cherry picked from commit 361e0f0)
- Loading branch information
Showing
11 changed files
with
128 additions
and
41 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
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,22 @@ | ||
namespace Alpaca.Markets; | ||
|
||
/// <summary> | ||
/// Intraday profit/loss calculation for portfolio history in the Alpaca REST API. | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum IntradayProfitLoss | ||
{ | ||
/// <summary> | ||
/// Don't reset the profit/los value to the previous day's closing equity for each trading day. | ||
/// </summary> | ||
[UsedImplicitly] | ||
[EnumMember(Value = "no_reset")] | ||
NoReset, | ||
|
||
/// <summary> | ||
/// Reset the profit/los value to the previous day's closing equity for each trading day. | ||
/// </summary> | ||
[UsedImplicitly] | ||
[EnumMember(Value = "per_day")] | ||
PerDay | ||
} |
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,31 @@ | ||
namespace Alpaca.Markets; | ||
|
||
/// <summary> | ||
/// Intraday reporting styles for portfolio history in the Alpaca REST API. | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum IntradayReporting | ||
{ | ||
/// <summary> | ||
/// Only timestamps for the core equity trading hours are returned (usually 9:30am to 4:00pm, trading days only). | ||
/// </summary> | ||
[UsedImplicitly] | ||
[EnumMember(Value = "market_hours")] | ||
MarketHours, | ||
|
||
/// <summary> | ||
/// Returns timestamps for the whole session including extended hours (usually 4:00am to 8:00pm, trading days only). | ||
/// </summary> | ||
[UsedImplicitly] | ||
[EnumMember(Value = "extended_hours")] | ||
ExtendedHours, | ||
|
||
/// <summary> | ||
/// Returns price data points 24/7 (for off-session times too). To calculate the equity values we are using the following prices: | ||
/// - Between 4:00am and 10:00pm on trading days the valuation will be calculated based on the last trade (extended hours and normal hours respectively). | ||
/// - After 10:00pm, until the next session open the equities will be valued at their official closing price on the primary exchange. | ||
/// </summary> | ||
[UsedImplicitly] | ||
[EnumMember(Value = "continuous")] | ||
Continuous | ||
} |
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