-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #741 - Added the
PositionIntent
enum and related properties i…
…nto the `NewOrderRequest` and `OrderBase` classes.
- Loading branch information
Showing
7 changed files
with
84 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
namespace Alpaca.Markets; | ||
|
||
/// <summary> | ||
/// Position intent for order placement in Alpaca REST API. | ||
/// </summary> | ||
[JsonConverter(typeof(StringEnumConverter))] | ||
public enum PositionIntent | ||
{ | ||
/// <summary> | ||
/// Buy to open a long position. | ||
/// </summary> | ||
[UsedImplicitly] | ||
[EnumMember(Value = "buy_to_open")] | ||
BuyToOpen, | ||
|
||
/// <summary> | ||
/// Buy to close a short position. | ||
/// </summary> | ||
[UsedImplicitly] | ||
[EnumMember(Value = "buy_to_close")] | ||
BuyToClose, | ||
|
||
/// <summary> | ||
/// Sell to open a short position. | ||
/// </summary> | ||
[UsedImplicitly] | ||
[EnumMember(Value = "sell_to_open")] | ||
SellToOpen, | ||
|
||
/// <summary> | ||
/// Sell to close a long position. | ||
/// </summary> | ||
[UsedImplicitly] | ||
[EnumMember(Value = "sell_to_close")] | ||
SellToClose, | ||
} |
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