-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5cce863
commit c15dd11
Showing
101 changed files
with
4,456 additions
and
320 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,58 @@ | ||
using System; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Alpaca.Markets; | ||
|
||
public class AccountActivityMessage | ||
{ | ||
[JsonPropertyName("activity_type")] | ||
public string ActivityType { get; set; } | ||
|
||
[JsonPropertyName("id")] | ||
public string ActivityId { get; set; } | ||
|
||
[JsonPropertyName("symbol")] | ||
public string Symbol { get; set; } | ||
|
||
[JsonIgnore] | ||
public DateOnly? ActivityDate { get; set; } | ||
|
||
[JsonPropertyName("net_amount")] | ||
public double? NetAmount { get; set; } | ||
|
||
[JsonPropertyName("per_share_amount")] | ||
public double? PerShareAmount { get; set; } | ||
|
||
[JsonPropertyName("qty")] | ||
public double? Quantity { get; set; } | ||
|
||
[JsonPropertyName("cum_qty")] | ||
public double? CumulativeQuantity { get; set; } | ||
|
||
[JsonPropertyName("leaves_qty")] | ||
public double? LeavesQuantity { get; set; } | ||
|
||
[JsonPropertyName("price")] | ||
public double? Price { get; set; } | ||
|
||
[JsonPropertyName("side")] | ||
public string Side { get; set; } | ||
|
||
[JsonPropertyName("type")] | ||
public string Type { get; set; } | ||
|
||
[JsonPropertyName("date")] | ||
public DateTime? ActivityDateTime { get; set; } | ||
|
||
[JsonIgnore] | ||
public DateTime? ActivityDateTimeUtc { get; set; } | ||
|
||
[JsonPropertyName("transaction_time")] | ||
public DateTime? TransactionTimeUtc { get; set; } | ||
|
||
[JsonIgnore] | ||
public string ActivityGuid { get; set; } | ||
|
||
[JsonPropertyName("order_id")] | ||
public string OrderId { get; set; } | ||
} |
24 changes: 24 additions & 0 deletions
24
Gateways/Alpaca/Libs/Messages/AccountConfigurationMessage.cs
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,24 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Alpaca.Markets; | ||
|
||
public class AccountConfigurationMessage | ||
{ | ||
[JsonPropertyName("dtbp_check")] | ||
public string DayTradeMarginCallProtection { get; set; } | ||
|
||
[JsonPropertyName("trade_confirm_email")] | ||
public string TradeConfirmEmail { get; set; } | ||
|
||
[JsonPropertyName("suspend_trade")] | ||
public bool IsSuspendTrade { get; set; } | ||
|
||
[JsonPropertyName("no_shorting")] | ||
public bool IsNoShorting { get; set; } | ||
|
||
[JsonPropertyName("ptp_no_exception_entry")] | ||
public bool IsPtpNoExceptionEntry { get; set; } | ||
|
||
[JsonPropertyName("max_options_trading_level")] | ||
public string MaxOptionsTradingLevel { get; set; } | ||
} |
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,106 @@ | ||
using System; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Alpaca.Markets; | ||
|
||
public class AccountMessage | ||
{ | ||
[JsonPropertyName("id")] | ||
public string AccountId { get; set; } | ||
|
||
[JsonPropertyName("account_number")] | ||
public string AccountNumber { get; set; } | ||
|
||
[JsonPropertyName("status")] | ||
public string Status { get; set; } | ||
|
||
[JsonPropertyName("crypto_status")] | ||
public string CryptoStatus { get; set; } | ||
|
||
[JsonPropertyName("currency")] | ||
public string Currency { get; set; } | ||
|
||
[JsonPropertyName("cash")] | ||
public double? TradableCash { get; set; } | ||
|
||
[JsonPropertyName("pattern_day_trader")] | ||
public bool IsDayPatternTrader { get; set; } | ||
|
||
[JsonPropertyName("trading_blocked")] | ||
public bool IsTradingBlocked { get; set; } | ||
|
||
[JsonPropertyName("transfers_blocked")] | ||
public bool IsTransfersBlocked { get; set; } | ||
|
||
[JsonPropertyName("account_blocked")] | ||
public bool IsAccountBlocked { get; set; } | ||
|
||
[JsonPropertyName("trade_suspended_by_user")] | ||
public bool TradeSuspendedByUser { get; set; } | ||
|
||
[JsonPropertyName("shorting_enabled")] | ||
public bool ShortingEnabled { get; set; } | ||
|
||
[JsonPropertyName("multiplier")] | ||
public double? Multiplier { get; set; } | ||
|
||
[JsonPropertyName("buying_power")] | ||
public double? BuyingPower { get; set; } | ||
|
||
[JsonPropertyName("daytrading_buying_power")] | ||
public double? DayTradingBuyingPower { get; set; } | ||
|
||
[JsonPropertyName("non_maginable_buying_power")] | ||
public double? NonMarginableBuyingPower { get; set; } | ||
|
||
[JsonPropertyName("regt_buying_power")] | ||
public double? RegulationBuyingPower { get; set; } | ||
|
||
[JsonPropertyName("long_market_value")] | ||
public double? LongMarketValue { get; set; } | ||
|
||
[JsonPropertyName("short_market_value")] | ||
public double? ShortMarketValue { get; set; } | ||
|
||
[JsonPropertyName("equity")] | ||
public double? Equity { get; set; } | ||
|
||
[JsonPropertyName("last_equity")] | ||
public double? LastEquity { get; set; } | ||
|
||
[JsonPropertyName("initial_margin")] | ||
public double? InitialMargin { get; set; } | ||
|
||
[JsonPropertyName("maintenance_margin")] | ||
public double? MaintenanceMargin { get; set; } | ||
|
||
[JsonPropertyName("last_maintenance_margin")] | ||
public double? LastMaintenanceMargin { get; set; } | ||
|
||
[JsonPropertyName("daytrade_count")] | ||
public double? DayTradeCount { get; set; } | ||
|
||
[JsonPropertyName("sma")] | ||
public double? Sma { get; set; } | ||
|
||
[JsonPropertyName("created_at")] | ||
public DateTime? CreatedAtUtc { get; set; } | ||
|
||
[JsonPropertyName("accrued_fees")] | ||
public double? AccruedFees { get; set; } | ||
|
||
[JsonPropertyName("pending_transfer_in")] | ||
public double? PendingTransferIn { get; set; } | ||
|
||
[JsonPropertyName("pending_transfer_out")] | ||
public double? PendingTransferOut { get; set; } | ||
|
||
[JsonPropertyName("options_trading_level")] | ||
public string OptionsTradingLevel { get; set; } | ||
|
||
[JsonPropertyName("options_approved_level")] | ||
public string OptionsApprovedLevel { get; set; } | ||
|
||
[JsonPropertyName("options_buying_power")] | ||
public double? OptionsBuyingPower { get; set; } | ||
} |
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,15 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Alpaca.Markets; | ||
|
||
public class ActiveStockMessage | ||
{ | ||
[JsonPropertyName("symbol")] | ||
public string Symbol { get; set; } | ||
|
||
[JsonPropertyName("volume")] | ||
public double? Volume { get; set; } | ||
|
||
[JsonPropertyName("trade_count")] | ||
public double? TradeCount { get; set; } | ||
} |
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,10 @@ | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Alpaca.Markets; | ||
|
||
public class ActiveStocksMessage | ||
{ | ||
[JsonPropertyName("most_actives")] | ||
public List<ActiveStockMessage> MostActives { get; set; } = []; | ||
} |
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,52 @@ | ||
using System; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Alpaca.Markets; | ||
|
||
public class AnnouncementMessage | ||
{ | ||
[JsonPropertyName("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonPropertyName("corporate_action_id")] | ||
public string CorporateActionId { get; set; } | ||
|
||
[JsonPropertyName("ca_type")] | ||
public string Type { get; set; } | ||
|
||
[JsonPropertyName("ca_sub_type")] | ||
public string SubType { get; set; } | ||
|
||
[JsonPropertyName("initiating_symbol")] | ||
public string InitiatingSymbol { get; set; } | ||
|
||
[JsonPropertyName("initiating_original_cusip")] | ||
public string InitiatingCusip { get; set; } | ||
|
||
[JsonPropertyName("target_symbol")] | ||
public string TargetSymbol { get; set; } | ||
|
||
[JsonPropertyName("target_original_cusip")] | ||
public string TargetCusip { get; set; } | ||
|
||
[JsonPropertyName("declaration_date")] | ||
public DateOnly? DeclarationDate { get; set; } | ||
|
||
[JsonPropertyName("ex_date")] | ||
public DateOnly? ExecutionDate { get; set; } | ||
|
||
[JsonPropertyName("record_date")] | ||
public DateOnly? RecordDate { get; set; } | ||
|
||
[JsonPropertyName("payable_date")] | ||
public DateOnly? PayableDate { get; set; } | ||
|
||
[JsonPropertyName("cash")] | ||
public double? Cash { get; set; } | ||
|
||
[JsonPropertyName("old_rate")] | ||
public double? OldRate { get; set; } | ||
|
||
[JsonPropertyName("new_rate")] | ||
public double? NewRate { get; set; } | ||
} |
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,56 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Alpaca.Markets; | ||
|
||
public class AssetMessage | ||
{ | ||
[JsonPropertyName("id")] | ||
public string AssetId { get; set; } | ||
|
||
[JsonPropertyName("class")] | ||
public string Class { get; set; } | ||
|
||
[JsonPropertyName("exchange")] | ||
public string Exchange { get; set; } | ||
|
||
[JsonPropertyName("symbol")] | ||
public string Symbol { get; set; } | ||
|
||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonPropertyName("status")] | ||
public string Status { get; set; } | ||
|
||
[JsonPropertyName("tradable")] | ||
public bool IsTradable { get; set; } | ||
|
||
[JsonPropertyName("marginable")] | ||
public bool Marginable { get; set; } | ||
|
||
[JsonPropertyName("shortable")] | ||
public bool Shortable { get; set; } | ||
|
||
[JsonPropertyName("easy_to_borrow")] | ||
public bool EasyToBorrow { get; set; } | ||
|
||
[JsonPropertyName("fractionable")] | ||
public bool Fractionable { get; set; } | ||
|
||
[JsonPropertyName("min_order_size")] | ||
public double? MinOrderSize { get; set; } | ||
|
||
[JsonPropertyName("min_trade_increment")] | ||
public double? MinTradeIncrement { get; set; } | ||
|
||
[JsonPropertyName("price_increment")] | ||
public double? PriceIncrement { get; set; } | ||
|
||
[JsonPropertyName("maintenance_margin_requirement")] | ||
public double? MaintenanceMarginRequirement { get; set; } | ||
|
||
[JsonPropertyName("attributes")] | ||
public List<string> AttributesList { get; set; } = []; | ||
} |
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 @@ | ||
using System; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Alpaca.Markets; | ||
|
||
public class AuctionEntryMessage | ||
{ | ||
[JsonPropertyName("t")] | ||
public DateTime? TimestampUtc { get; set; } | ||
|
||
[JsonPropertyName("p")] | ||
public double? Price { get; set; } | ||
|
||
[JsonPropertyName("s")] | ||
public double? Size { get; set; } | ||
|
||
[JsonPropertyName("x")] | ||
public string Exchange { get; set; } | ||
|
||
[JsonPropertyName("c")] | ||
public string Condition { get; set; } | ||
} |
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,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Alpaca.Markets; | ||
|
||
public class AuctionMessage | ||
{ | ||
[JsonPropertyName("d")] | ||
internal DateTime? DateTime { get; set; } | ||
|
||
[JsonPropertyName("o")] | ||
internal List<AuctionEntryMessage> OpeningsList { get; set; } = []; | ||
|
||
[JsonPropertyName("c")] | ||
internal List<AuctionEntryMessage> ClosingsList { get; set; } = []; | ||
|
||
[JsonIgnore] | ||
public string Symbol { get; set; } | ||
|
||
[JsonIgnore] | ||
public List<AuctionEntryMessage> Openings { get; set; } = []; | ||
|
||
[JsonIgnore] | ||
public List<AuctionEntryMessage> Closings { get; set; } = []; | ||
} |
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,19 @@ | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Alpaca.Markets; | ||
|
||
public class AuctionsPageMessage | ||
{ | ||
[JsonPropertyName("auctions")] | ||
public List<AuctionMessage> ItemsList { get; set; } = []; | ||
|
||
[JsonPropertyName("symbol")] | ||
public string Symbol { get; set; } | ||
|
||
[JsonPropertyName("next_page_token")] | ||
public string NextPageToken { get; set; } | ||
|
||
[JsonIgnore] | ||
public List<AuctionMessage> Items { get; set; } = []; | ||
} |
Oops, something went wrong.