diff --git a/QuantConnect.AlpacaBrokerage.Tests/AlpacaBrokerageDataQueueHandlerTests.cs b/QuantConnect.AlpacaBrokerage.Tests/AlpacaBrokerageDataQueueHandlerTests.cs index 8abd6d7..9c5b6fa 100644 --- a/QuantConnect.AlpacaBrokerage.Tests/AlpacaBrokerageDataQueueHandlerTests.cs +++ b/QuantConnect.AlpacaBrokerage.Tests/AlpacaBrokerageDataQueueHandlerTests.cs @@ -36,7 +36,7 @@ private static TestCaseData[] TestParameters new TestCaseData(Symbols.ETHUSD, Resolution.Tick, false), new TestCaseData(Symbols.AAPL, Resolution.Minute, false), new TestCaseData(Symbols.AAPL, Resolution.Second, false), - new TestCaseData(Symbol.CreateOption(Symbols.AAPL, Symbols.AAPL.ID.Market, OptionStyle.American, OptionRight.Call, 230, new DateTime(2024, 12, 20)), Resolution.Second, false).Explicit("TODO"), + new TestCaseData(Symbol.CreateOption(Symbols.AAPL, Symbols.AAPL.ID.Market, OptionStyle.American, OptionRight.Call, 230, new DateTime(2024, 12, 20)), Resolution.Second, false), }; } } diff --git a/QuantConnect.AlpacaBrokerage.Tests/QuantConnect.AlpacaBrokerage.Tests.csproj b/QuantConnect.AlpacaBrokerage.Tests/QuantConnect.AlpacaBrokerage.Tests.csproj index 46056aa..edaae68 100644 --- a/QuantConnect.AlpacaBrokerage.Tests/QuantConnect.AlpacaBrokerage.Tests.csproj +++ b/QuantConnect.AlpacaBrokerage.Tests/QuantConnect.AlpacaBrokerage.Tests.csproj @@ -37,5 +37,8 @@ PreserveNewest - + + ..\QuantConnect.AlpacaBrokerage\Alpaca.Markets.dll + + \ No newline at end of file diff --git a/QuantConnect.AlpacaBrokerage/Alpaca.Markets.deps.json b/QuantConnect.AlpacaBrokerage/Alpaca.Markets.deps.json new file mode 100644 index 0000000..584be3f --- /dev/null +++ b/QuantConnect.AlpacaBrokerage/Alpaca.Markets.deps.json @@ -0,0 +1,288 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v6.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v6.0": { + "Alpaca.Markets/7.1.0": { + "dependencies": { + "IsExternalInit": "1.0.3", + "JetBrains.Annotations": "2023.3.0", + "MessagePack": "2.5.172", + "Microsoft.CodeAnalysis.PublicApiAnalyzers": "3.3.4", + "Microsoft.NET.ILLink.Analyzers": "7.0.100-1.23401.1", + "Microsoft.NET.ILLink.Tasks": "7.0.100-1.23401.1", + "Microsoft.SourceLink.GitHub": "8.0.0", + "Newtonsoft.Json": "13.0.3", + "Polly": "8.3.1", + "System.IO.Pipelines": "8.0.0", + "System.Threading.Channels": "8.0.0" + }, + "runtime": { + "Alpaca.Markets.dll": {} + } + }, + "IsExternalInit/1.0.3": {}, + "JetBrains.Annotations/2023.3.0": {}, + "MessagePack/2.5.172": { + "dependencies": { + "MessagePack.Annotations": "2.5.172", + "Microsoft.NET.StringTools": "17.6.3" + }, + "runtime": { + "lib/net6.0/MessagePack.dll": { + "assemblyVersion": "2.5.0.0", + "fileVersion": "2.5.172.9839" + } + } + }, + "MessagePack.Annotations/2.5.172": { + "runtime": { + "lib/netstandard2.0/MessagePack.Annotations.dll": { + "assemblyVersion": "2.5.0.0", + "fileVersion": "2.5.172.9839" + } + } + }, + "Microsoft.Bcl.AsyncInterfaces/6.0.0": { + "runtime": { + "lib/netstandard2.1/Microsoft.Bcl.AsyncInterfaces.dll": { + "assemblyVersion": "6.0.0.0", + "fileVersion": "6.0.21.52210" + } + } + }, + "Microsoft.Bcl.TimeProvider/8.0.0": { + "dependencies": { + "Microsoft.Bcl.AsyncInterfaces": "6.0.0" + }, + "runtime": { + "lib/netstandard2.0/Microsoft.Bcl.TimeProvider.dll": { + "assemblyVersion": "8.0.0.0", + "fileVersion": "8.0.23.53103" + } + } + }, + "Microsoft.Build.Tasks.Git/8.0.0": {}, + "Microsoft.CodeAnalysis.PublicApiAnalyzers/3.3.4": {}, + "Microsoft.NET.ILLink.Analyzers/7.0.100-1.23401.1": {}, + "Microsoft.NET.ILLink.Tasks/7.0.100-1.23401.1": {}, + "Microsoft.NET.StringTools/17.6.3": { + "dependencies": { + "System.Memory": "4.5.5", + "System.Runtime.CompilerServices.Unsafe": "6.0.0" + }, + "runtime": { + "lib/netstandard2.0/Microsoft.NET.StringTools.dll": { + "assemblyVersion": "1.0.0.0", + "fileVersion": "17.6.3.22601" + } + } + }, + "Microsoft.SourceLink.Common/8.0.0": {}, + "Microsoft.SourceLink.GitHub/8.0.0": { + "dependencies": { + "Microsoft.Build.Tasks.Git": "8.0.0", + "Microsoft.SourceLink.Common": "8.0.0" + } + }, + "Newtonsoft.Json/13.0.3": { + "runtime": { + "lib/net6.0/Newtonsoft.Json.dll": { + "assemblyVersion": "13.0.0.0", + "fileVersion": "13.0.3.27908" + } + } + }, + "Polly/8.3.1": { + "dependencies": { + "Polly.Core": "8.3.1" + }, + "runtime": { + "lib/net6.0/Polly.dll": { + "assemblyVersion": "8.0.0.0", + "fileVersion": "8.3.1.3207" + } + } + }, + "Polly.Core/8.3.1": { + "dependencies": { + "Microsoft.Bcl.TimeProvider": "8.0.0" + }, + "runtime": { + "lib/net6.0/Polly.Core.dll": { + "assemblyVersion": "8.0.0.0", + "fileVersion": "8.3.1.3207" + } + } + }, + "System.IO.Pipelines/8.0.0": { + "runtime": { + "lib/net6.0/System.IO.Pipelines.dll": { + "assemblyVersion": "8.0.0.0", + "fileVersion": "8.0.23.53103" + } + } + }, + "System.Memory/4.5.5": {}, + "System.Runtime.CompilerServices.Unsafe/6.0.0": {}, + "System.Threading.Channels/8.0.0": { + "runtime": { + "lib/net6.0/System.Threading.Channels.dll": { + "assemblyVersion": "8.0.0.0", + "fileVersion": "8.0.23.53103" + } + } + } + } + }, + "libraries": { + "Alpaca.Markets/7.1.0": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "IsExternalInit/1.0.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-jcdN7vpDwjnV7U9KGCv/oNIWHJ/RIbyrpVsLQL2qbj6Cbi5U3iafKsaMn1rP+qCbkLbkB0v6oAwbVEkqrUnlyg==", + "path": "isexternalinit/1.0.3", + "hashPath": "isexternalinit.1.0.3.nupkg.sha512" + }, + "JetBrains.Annotations/2023.3.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-PHfnvdBUdGaTVG9bR/GEfxgTwWM0Z97Y6X3710wiljELBISipSfF5okn/vz+C2gfO+ihoEyVPjaJwn8ZalVukA==", + "path": "jetbrains.annotations/2023.3.0", + "hashPath": "jetbrains.annotations.2023.3.0.nupkg.sha512" + }, + "MessagePack/2.5.172": { + "type": "package", + "serviceable": true, + "sha512": "sha512-tO/SIeix4UjmHo0J7Z1IRMvHEfqLlN9FAQCzwGcoG50mt7gPyYsAuMU9Ngu9iDSv0ak/YZOyobs0BidFde+gDw==", + "path": "messagepack/2.5.172", + "hashPath": "messagepack.2.5.172.nupkg.sha512" + }, + "MessagePack.Annotations/2.5.172": { + "type": "package", + "serviceable": true, + "sha512": "sha512-LJWMr5BDpvLaIfsUXufFWQW3VRFg7EKnGAHjArbwCaSeTIWEXaRoClkQtPaXvtVPZk5ZIpc9SBQd/WJD/m99Ww==", + "path": "messagepack.annotations/2.5.172", + "hashPath": "messagepack.annotations.2.5.172.nupkg.sha512" + }, + "Microsoft.Bcl.AsyncInterfaces/6.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==", + "path": "microsoft.bcl.asyncinterfaces/6.0.0", + "hashPath": "microsoft.bcl.asyncinterfaces.6.0.0.nupkg.sha512" + }, + "Microsoft.Bcl.TimeProvider/8.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-f5Kr5JepAbiGo7uDmhgvMqhntwxqXNn6/IpTBSSI4cuHhgnJGrLxFRhMjVpRkLPp6zJXO0/G0l3j9p9zSJxa+w==", + "path": "microsoft.bcl.timeprovider/8.0.0", + "hashPath": "microsoft.bcl.timeprovider.8.0.0.nupkg.sha512" + }, + "Microsoft.Build.Tasks.Git/8.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ==", + "path": "microsoft.build.tasks.git/8.0.0", + "hashPath": "microsoft.build.tasks.git.8.0.0.nupkg.sha512" + }, + "Microsoft.CodeAnalysis.PublicApiAnalyzers/3.3.4": { + "type": "package", + "serviceable": true, + "sha512": "sha512-kNLTfXtXUWDHVt5iaPkkiPuyHYlMgLI6SOFT4w88bfeI2vqSeGgHunFkdvlaCM8RDfcY0t2+jnesQtidRJJ/DA==", + "path": "microsoft.codeanalysis.publicapianalyzers/3.3.4", + "hashPath": "microsoft.codeanalysis.publicapianalyzers.3.3.4.nupkg.sha512" + }, + "Microsoft.NET.ILLink.Analyzers/7.0.100-1.23401.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-XirkjOLc5Vc3HsXRc2Z6ZbQv6l0RvWgJa/31w7XqZ914MoSi3H3OCNRMWFw7H2EYfsnKbokFfhCcysAmUcEOgw==", + "path": "microsoft.net.illink.analyzers/7.0.100-1.23401.1", + "hashPath": "microsoft.net.illink.analyzers.7.0.100-1.23401.1.nupkg.sha512" + }, + "Microsoft.NET.ILLink.Tasks/7.0.100-1.23401.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-mI6vCdPEhluLtMn/GV0texEWg5oAPQWCCE4LWspM+Bmy75Nd4EQsziQXrdOFqNeSBQMrxDX9C/O5Xi3kpKSMIw==", + "path": "microsoft.net.illink.tasks/7.0.100-1.23401.1", + "hashPath": "microsoft.net.illink.tasks.7.0.100-1.23401.1.nupkg.sha512" + }, + "Microsoft.NET.StringTools/17.6.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-N0ZIanl1QCgvUumEL1laasU0a7sOE5ZwLZVTn0pAePnfhq8P7SvTjF8Axq+CnavuQkmdQpGNXQ1efZtu5kDFbA==", + "path": "microsoft.net.stringtools/17.6.3", + "hashPath": "microsoft.net.stringtools.17.6.3.nupkg.sha512" + }, + "Microsoft.SourceLink.Common/8.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw==", + "path": "microsoft.sourcelink.common/8.0.0", + "hashPath": "microsoft.sourcelink.common.8.0.0.nupkg.sha512" + }, + "Microsoft.SourceLink.GitHub/8.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==", + "path": "microsoft.sourcelink.github/8.0.0", + "hashPath": "microsoft.sourcelink.github.8.0.0.nupkg.sha512" + }, + "Newtonsoft.Json/13.0.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==", + "path": "newtonsoft.json/13.0.3", + "hashPath": "newtonsoft.json.13.0.3.nupkg.sha512" + }, + "Polly/8.3.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-xN9AxOudus8u4a//Tfu6Wxd5Oj7S4pjh/651S6FfIiVrbxQ8TeM+ieZC8c0y7Qto70zKBM5g8rBTqbAJnbetOA==", + "path": "polly/8.3.1", + "hashPath": "polly.8.3.1.nupkg.sha512" + }, + "Polly.Core/8.3.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-b9mMAjqXuCXFCtf/RtRPwFUkAm/sz37s7G+taDvS5EqfkJsLiWfO2xO2cSISjIgIY+88oIZTGguP6UrRGRlqzg==", + "path": "polly.core/8.3.1", + "hashPath": "polly.core.8.3.1.nupkg.sha512" + }, + "System.IO.Pipelines/8.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA==", + "path": "system.io.pipelines/8.0.0", + "hashPath": "system.io.pipelines.8.0.0.nupkg.sha512" + }, + "System.Memory/4.5.5": { + "type": "package", + "serviceable": true, + "sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", + "path": "system.memory/4.5.5", + "hashPath": "system.memory.4.5.5.nupkg.sha512" + }, + "System.Runtime.CompilerServices.Unsafe/6.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==", + "path": "system.runtime.compilerservices.unsafe/6.0.0", + "hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512" + }, + "System.Threading.Channels/8.0.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-CMaFr7v+57RW7uZfZkPExsPB6ljwzhjACWW1gfU35Y56rk72B/Wu+sTqxVmGSk4SFUlPc3cjeKND0zktziyjBA==", + "path": "system.threading.channels/8.0.0", + "hashPath": "system.threading.channels.8.0.0.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/QuantConnect.AlpacaBrokerage/Alpaca.Markets.dll b/QuantConnect.AlpacaBrokerage/Alpaca.Markets.dll new file mode 100644 index 0000000..adb7700 Binary files /dev/null and b/QuantConnect.AlpacaBrokerage/Alpaca.Markets.dll differ diff --git a/QuantConnect.AlpacaBrokerage/Alpaca.Markets.pdb b/QuantConnect.AlpacaBrokerage/Alpaca.Markets.pdb new file mode 100644 index 0000000..2607057 Binary files /dev/null and b/QuantConnect.AlpacaBrokerage/Alpaca.Markets.pdb differ diff --git a/QuantConnect.AlpacaBrokerage/Alpaca.Markets.xml b/QuantConnect.AlpacaBrokerage/Alpaca.Markets.xml new file mode 100644 index 0000000..5ecfe33 --- /dev/null +++ b/QuantConnect.AlpacaBrokerage/Alpaca.Markets.xml @@ -0,0 +1,9775 @@ + + + + Alpaca.Markets + + + + + Reserved to be used by the compiler for tracking metadata. + This class should not be used by developers in source code. + + + This definition is provided by the IsExternalInit NuGet package (https://www.nuget.org/packages/IsExternalInit). + Please see https://github.com/manuelroemer/IsExternalInit for more information. + + + + + + + + OAuth key for Alpaca API authentication. + + + + + Creates new instance of object. + + OAuth key. + + The argument is null. + + + + + Secret API key for Alpaca API authentication. + + + + + Creates a new instance of object. + + Secret API key identifier. + Secret API key value. + + The or argument is null. + + + + + Base class for 'security key' abstraction. + + + + + Creates new instance of object. + + Security key value. + + The argument is null. + + + + + Types of account activities + + + + + Order fills (both partial and full fills) + + + + + Cash transactions (both and ) + + + + + Miscellaneous or rarely used activity types (All types except those in + , , or ) + + + + + ACATS IN/OUT (Cash) + + + + + ACATS IN/OUT (Securities) + + + + + Cash deposit (+) + + + + + Cash withdrawal (-) + + + + + Dividends + + + + + Dividend (capital gains long term) + + + + + Dividend (capital gain short term) + + + + + Dividend fee + + + + + Dividend adjusted (Foreign Tax Withheld) + + + + + Dividend adjusted (NRA Withheld) + + + + + Dividend return of capital + + + + + Dividend adjusted (Tefra Withheld) + + + + + Dividend (tax exempt) + + + + + Interest (credit/margin) + + + + + Interest adjusted (NRA Withheld) + + + + + Interest adjusted (Tefra Withheld) + + + + + Journal entry + + + + + Journal entry (cash) + + + + + Journal entry (stock) + + + + + Merger/Acquisition + + + + + Name change + + + + + Pass Thru Charge + + + + + Pass Thru Rebate + + + + + Reorganization + + + + + Symbol change + + + + + Stock spinoff + + + + + Stock split + + + + + REG/TAF fees + + + + + Option assignment + + + + + Option expiration + + + + + Option exercise + + + + + Fee denominated in USD + + + + + Crypto Fee + + + + + User account status in Alpaca REST API. + + + + + Account opened but not verified. + + + + + Missed important information. + + + + + Additional information added. + + + + + Account data updated. + + + + + Approval request sent. + + + + + Account approved and working. + + + + + Account approval rejected. + + + + + Account disabled. + + + + + Disable request sent. + + + + + Account approved but still not active. + + + + + Account approved but not active. + + + + + Application was edited (e.g. to match info from uploaded docs). + + + + + Application requires manual action. + + + + + Account is closed. + + + + + Account approved only for paper trading. + + + + + Supported bar corporate action adjustment types for Alpaca Data API. + + + + + Raw data - no adjustment. + + + + + Stock split adjustments. + + + + + Stock dividend adjustments. + + + + + Stock splits and dividend adjustments. + + + + + Unique asset characteristics for Alpaca REST API. + + + + + Unknown asset attribute. + + + + + PTP asset accepting orders without exception. + + + + + PTP asset accepting orders with exception. + + + + + IPO asset, only limit orders are allowed prior to an IPO being traded on secondary market + + + + + Asset supports options trading. + + + + + Asset supports fractional trading at extended hours. + + + + + Supported asset classes for Alpaca REST API. + + + + + US equity asset class. + + + + + Cryptocurrency asset class. + + + + + US option asset class. + + + + + Single asset status in Alpaca REST API. + + + + + Active asset. + + + + + Inactive asset. + + + + + Delisted asset. + + + + + Authorization status for Alpaca streaming API. + + + + + Client successfully authorized. + + + + + Client is not authorized. + + + + + Connection limit exceeded. + + + + + Supported bar duration for Alpaca Data API. + + + + + Creates new instance of object. + + Duration value in units. + Duration units (minutes, hours, days) + + + + Gets specified duration units. + + + + + Gets specified duration value. + + + + + + + + Minute bars. + + + + + Hour bars. + + + + + Daily bars. + + + + + Weekly bars. + + + + + Monthly bars. + + + + + Quarterly (3 months) bars. + + + + + Half year (6 month) bars. + + + + + Year (12 months) bars. + + + + + Supported bar duration for Alpaca Data API. + + + + + Minute bars. + + + + + Hour bars. + + + + + Daily bars. + + + + + Weekly bars. + + + + + Monthly bars. + + + + + Connection and authentication status for Alpaca streaming API. + + + + + Client successfully connected. + + + + + Client successfully authorized. + + + + + Client authentication required. + + + + + Client authentication failed. + + + + + Requested operation successfully completed. + + + + + Requested operation failed. + + + + + Client successfully authorized. + + + + + Client authentication failed. + + + + + Client authentication completed. + + + + + Corporate action type in Alpaca REST API. + + + + + Date the corporate action or subsequent terms update was announced. + + + + + The first date that purchasing a security will not + result in a corporate action entitlement. + + + + + The date an account must hold a settled position in the security + in order to receive the corporate action entitlement. + + + + + The date the announcement will take effect. On this date, account + stock and cash balances are expected to be processed accordingly. + + + + + Corporate action sub type in Alpaca REST API. + + + + + Sub type for the type. + + + + + Sub type for the type. + + + + + Sub type for the type. + + + + + Sub type for the type. + + + + + Sub type for the type. + + + + + Sub type for the type. + + + + + Sub type for the type. + + + + + Sub type for the type. + + + + + Sub type for the type. + + + + + Corporate action type in Alpaca REST API. + + + + + Dividends payment. + + + + + Merge another symbol. + + + + + Spin off another symbol. + + + + + Split company shares. + + + + + Crypto currency exchanges supported by Alpaca REST API. + + + + + Unknown exchange (i.e. one not supported by this version of SDK). + + + + + ErisX Exchange. + + + + + FTX US Exchange. + + + + + Coinbase Exchange. + + + + + Day trade margin call protection mode for account. See more information here: + https://docs.alpaca.markets/user-protections/#day-trade-margin-call-dtmc-protection-at-alpaca + + + + + Check rules on position entry. + + + + + Check rules on position exit. + + + + + Check rules on position entry and exit. + + + + + Exchanges supported by Alpaca REST API. + + + + + Unknown exchange (i.e. one not supported by this version of SDK). + + + + + NYSE American Stock Exchange. + + + + + NYSE Arca Stock Exchange. + + + + + New York Stock Exchange (NYSE) + + + + + Nasdaq Stock Market. + + + + + BATS Global Market. + + + + + American Stock Exchange (AMEX) + + + + + Archipelago Stock Exchange (ARCA). + + + + + International Exchange (IEX). + + + + + Over the counter (OTC). + + + + + Alpaca crypto Exchange. + + + + + Period units for portfolio history in the Alpaca REST API. + + + + + Day + + + + + Week + + + + + Month + + + + + Year + + + + + Intraday profit/loss calculation for portfolio history in the Alpaca REST API. + + + + + Don't reset the profit/los value to the previous day's closing equity for each trading day. + + + + + Reset the profit/los value to the previous day's closing equity for each trading day. + + + + + Intraday reporting styles for portfolio history in the Alpaca REST API. + + + + + Only timestamps for the core equity trading hours are returned (usually 9:30am to 4:00pm, trading days only). + + + + + Returns timestamps for the whole session including extended hours (usually 4:00am to 8:00pm, trading days only). + + + + + 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. + + + + + Supported market feed data types for Alpaca Data API. + + + + + IEX feed - the only option available for the free data (no subscription). + + + + + SIP feed - option available for the subscribed clients. + + + + + OTC feed - option available for the subscribed clients. + + + + + Account multiplier value (enum values can be cast to related integer values). + + + + + Invalid default value of enum. + + + + + Standard limited margin account with 1x buying power. + + + + + Regular T margin account with 2x intraday and overnight buying power; + this is the default for all non-PDT accounts with $2,000 or more equity. + + + + + PDT account with 4x intraday buying power and 2x reg T overnight buying power. + + + + + Supported options feed for Alpaca REST API. + + + + + Options Price Reporting Authority. + + + + + Indicative options data. + + + + + Options trading level for Alpaca REST API. + + + + + US options trading completely disabled. + + + + + Us options trading with covered call / cash-secured put. + + + + + US options trading with long call and put support. + + + + + Supported option contract styles for Alpaca REST API. + + + + + American option contract execution style. + + + + + European option contract execution style. + + + + + Supported option contract types for Alpaca REST API. + + + + + Call option contract. + + + + + Put option contract. + + + + + Order class for advanced orders in the Alpaca REST API. + + + + + Simple order + + + + + Bracket order + + + + + One Cancels Other order + + + + + One Triggers Other order + + + + + Order side in Alpaca REST API. + + + + + Buy order. + + + + + Sell order. + + + + + Order status in Alpaca REST API. + + + + + Order accepted by server. + + + + + New working order. + + + + + Partial fill (event) on order. + + + + + Order partially filled (status). + + + + + Order completely filled. + + + + + Order processing done. + + + + + Order cancelled. + + + + + Order replaced (modified). + + + + + Order cancellation request pending. + + + + + Order processing stopped by server. + + + + + Order rejected by server. + + + + + Order processing suspended by server. + + + + + Initial new order request pending. + + + + + Order information calculated by server. + + + + + Order expired. + + + + + Order accepted for bidding by server. + + + + + Order replacement request pending. + + + + + Order completely filled. + + + + + Order held pending trigger event. + + + + + Order statuses filter for call from Alpaca REST API. + + + + + Returns only open orders. + + + + + Returns only closed orders. + + + + + Returns all orders. + + + + + Supported order types in Alpaca REST API. + + + + + Market order (no prices required). + + + + + Stop order (stop price required). + + + + + Limit order (limit price required). + + + + + Stop limit order (both stop and limit prices required). + + + + + Trailing stop order (dollars or percent offset required). + + + + + Position intent for order placement in Alpaca REST API. + + + + + Buy to open a long position. + + + + + Buy to close a short position. + + + + + Sell to open a short position. + + + + + Sell to close a long position. + + + + + Position side in Alpaca REST API. + + + + + Long position. + + + + + Short position. + + + + + Supported sort directions in Alpaca REST API. + + + + + Descending sort order + + + + + Ascending sort order + + + + + Possible crypto taker side types for Alpaca Crypto Data API. + + + + + Unspecified crypto trade take side. + + + + + Buy crypto trade take side. + + + + + Sell crypto trade take side. + + + + + Supported tape types for Alpaca Data API. + + + + + Tape A - NYSE. + + + + + Tape B - NYSE Arca and NYSE Amex. + + + + + Tape C - NASDAQ. + + + + + Supported bar duration for Alpaca REST API. + + + + + One minute bars. + + + + + Five minutes bars. + + + + + Fifteen minutes bars. + + + + + Daily bars. + + + + + Supported order durations in Alpaca REST API. + See Alpaca Trading Documentation for more information. + + + + + The order is good for the day and it will be canceled automatically at the end of market hours. + + + + + The order is good until canceled. + + + + + The order is placed at the time the market opens. + + + Not supported for crypto trading. + + + + + The order is immediately filled or canceled after being placed (may partial fill). + + + + + The order is immediately filled or canceled after being placed (may not partial fill). + + + + + The order will become a limit order if a limit price is specified or a market order otherwise at market close. + + + Not supported for crypto trading. + + + + + Notification level for order fill emails. + + + + + Never send email notification for order fills. + + + + + Send email notification for all order fills. + + + + + Trade event in Alpaca trade update stream + + + + + New working order. + + + + + Partial fill (event) on order. + + + + + Order completely filled. + + + + + Order processing done. + + + + + Order cancelled. + + + + + Order cancellation request pending. + + + + + Order processing stopped by server. + + + + + Order rejected by server side. + + + + + Order processing suspended by server. + + + + + Initial new order request pending. + + + + + Order information calculated by server. + + + + + Order expired. + + + + + Order cancellation was rejected. + + + + + Requested replacement of an order was processed. + + + + + The order is awaiting replacement. + + + + + The order replace has been rejected. + + + + + Order partially filled (status). + + + + + Order accepted by server. + + + + + Order held pending trigger event. + + + + + Order review pending (order cost basis is large). + + + + + Collection of helper extension methods for interface. + + + + + Creates the new instance of interface + implementation for specific environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + The new instance of interface implementation. + + + + Creates new instance of for specific + environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + New instance of object. + + + + Creates the new instance of interface + implementation for specific environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + The new instance of interface implementation. + + + + Creates new instance of for specific + environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + New instance of object. + + + + Creates the new instance of interface + implementation for specific environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + The new instance of interface implementation. + + + + Creates new instance of for specific + environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + New instance of object. + + + + Creates the new instance of interface + implementation for specific environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + The new instance of interface implementation. + + + + Creates new instance of for specific + environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + New instance of object. + + + + Creates the new instance of interface + implementation for specific environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + The new instance of interface implementation. + + + + Creates new instance of for specific + environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + New instance of object. + + + + Creates the new instance of interface + implementation for specific environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + The new instance of interface implementation. + + + + Creates new instance of for specific + environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + New instance of object. + + + + Creates the new instance of interface + implementation for specific environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + The new instance of interface implementation. + + + + Creates new instance of for specific + environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + New instance of object. + + + + Creates the new instance of interface + implementation for specific environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + The new instance of interface implementation. + + + + Creates new instance of for specific + environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + New instance of object. + + + + Creates the new instance of interface + implementation for specific environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + The new instance of interface implementation. + + + + Creates new instance of for specific + environment provided as argument. + + Target environment for new object. + Alpaca API security key. + + The or argument is null. + + New instance of object. + + + + Provides single entry point for obtaining information about different environments. + + + + + Gets live trading environment. + + + + + Gets paper trading environment. Paper trading is a simulation environment that does not use real money. + See Alpaca Paper Trading Documentation for more information. + + + + + Provides URLs for different APIs available for this SDK on specific environment. + + + + + Gets Alpaca trading REST API base URL for this environment. + + + + + Gets Alpaca data REST API base URL for this environment. + + + + + Gets Alpaca streaming API base URL for this environment. + + + + + Gets Alpaca data streaming API base URL for this environment. + + + + + Gets Alpaca crypto streaming API base URL for this environment. + + + + + Gets Alpaca crypto streaming API base URL for this environment. + + + + + Gets Alpaca news streaming API base URL for this environment. + + + + + Represents exception information for request input data validation errors. + + + + + Creates new instance of class. + + + + + Creates new instance of class with specified error message. + + The message that describes the error. + + + + Creates new instance of class with + specified error message and reference to the inner exception that is the cause of this exception. + + The message that describes the error. + The exception that is the cause of this exception. + + + + Creates new instance of class with specified error message. + + The message that describes the error. + The invalid property name. + + + + Gets the invalid property name that causes this validation exception. + + + + + Represents Alpaca REST and Streaming API specific error information. + + + + + Creates new instance of class. + + + + + Creates new instance of class with specified error message. + + The message that describes the error. + + + + Creates new instance of class with + specified error message and reference to the inner exception that is the cause of this exception. + + The message that describes the error. + The exception that is the cause of this exception. + + + + Gets original error code returned by REST API endpoint. + + + + + Gets original HTTP status code returned by REST API endpoint. + + + + + Gets extended error information if it provided by server. + + + + + Set of extensions methods for creating strongly-typed Alpaca REST API clients. + + + + + Creates a new instance of interface + implementation using the argument. + + Client configuration parameters. + + The argument is null. + + A new instance of interface implementation. + + + + Creates a new instance of interface + implementation using the argument. + + Client configuration parameters. + + The argument is null. + + A new instance of interface implementation. + + + + Creates a new instance of interface + implementation using the argument. + + Client configuration parameters. + + The argument is null. + + A new instance of interface implementation. + + + + Creates a new instance of interface + implementation using the argument. + + Client configuration parameters. + + The argument is null. + + A new instance of interface implementation. + + + + Creates a new instance of interface + implementation using the argument. + + Client configuration parameters. + + The argument is null. + + A new instance of interface implementation. + + + + Creates a new instance of interface + implementation using the argument. + + Client configuration parameters. + + The argument is null. + + A new instance of interface implementation. + + + + Creates a new instance of interface + implementation using the argument. + + Client configuration parameters. + + The argument is null. + + A new instance of interface implementation. + + + + Creates a new instance of interface + implementation using the argument. + + Client configuration parameters. + + The argument is null. + + A new instance of interface implementation. + + + + Creates a new instance of object with + configured custom factory method. + + Type of configuration parameters. + Client configuration parameters. + + Factory method for creating custom (delegating) instance of inheritor. + + An original object with configured factory method. + + + + Set of extensions methods for the interface. + + + + + Gets the corporate action declaration date () + or null if date not specified or not applicable for this corporate action type. + + Corporate action announcement record. + + The argument is null. + + + + + Gets the corporate action execution date () + or null if date not specified or not applicable for this corporate action type. + + Corporate action announcement record. + + The argument is null. + + + + + Gets the corporate action payable date () + or null if date not specified or not applicable for this corporate action type. + + Corporate action announcement record. + + The argument is null. + + + + + Gets the corporate action record date () + or null if date not specified or not applicable for this corporate action type. + + Corporate action announcement record. + + The argument is null. + + + + + Set of extension methods for inheritors' initialization. + + + + + Sets the request page size using the fluent interface approach. + + Request parameters object. + The request page size. + + The argument is null. + + The original request parameters object. + + + + Sets the request page token using the fluent interface approach. + + Request parameters object. + The request page token. + + The argument is null. + + The original request parameters object. + + + + Set of extensions methods for the interface. + + + + + Gets trading date (midnight or 00:00 time point). + + Alpaca calendar data. + + The argument is null. + + + + + Gets trading open time in EST time zone. + + Alpaca calendar data. + + The argument is null. + + + + + Gets trading close time in EST time zone. + + Alpaca calendar data. + + The argument is null. + + + + + Gets trading open time in UTC time zone. + + Alpaca calendar data. + + The argument is null. + + + + + Gets trading close time in UTC time zone. + + Alpaca calendar data. + + The argument is null. + + + + + Gets session open time in EST time zone. + + Alpaca calendar data. + + The argument is null. + + + + + Gets session close time in EST time zone. + + Alpaca calendar data. + + The argument is null. + + + + + Gets session open time in UTC time zone. + + Alpaca calendar data. + + The argument is null. + + + + + Gets session close time in UTC time zone. + + Alpaca calendar data. + + The argument is null. + + + + + Set of extensions methods for the structure. + + + + + Converts a Interval into a Interval. + + Input inclusive time interval for converting. + Date interval initialized with data from the original inclusive time interval. + + + + Converts a Interval into a Interval. + + Input date interval for converting. + Inclusive time interval initialized with data from the original date interval. + + + + Gets exclusive open time interval starting from the date/time point. + + Starting point for filtering. + Exclusive open time interval. + + + + Gets exclusive open time interval ending at the date/time point. + + Ending point for filtering. + Exclusive open time interval. + + + + Encapsulates session starting and ending points - session open and close time in EST time zone. + + + + + Creates new instance of the structure. + + + + + Creates new instance of the structure from date and two time points. + + Session date + Open time in EST time zone. + Close time in EST time zone. + + + + Gets open time in EST time zone. + + + + + Gets close time in EST time zone. + + + + + Gets session open and close time as instance with UTC times. + + + + + + Gets session open and close time as instance with UTC times. + + + + + Set of extension methods for interface. + + + + + Gets order quantity as instance of the structure. + + Order for reading quantity value. + + The argument is null. + + + Both fractional and notional order quantity values are null. + + Fractional or notional order quantity value. + + + + Represents the market day order quantity in dollars or as (possible fractional) number of shares. + + + + + Creates new instance of the structure. + + + + + Gets the market day order quantity or notional value. + + + + + Returns true if is an amount in dollars. + + + + + Returns true if is a number of shares (fractional or integer). + + + + + Creates new instance of the object + initialized with as dollars amount. + + Amount of dollars to buy or sell. + Initialized object. + + + + Creates new instance of the object + initialized with as number of shares. + + Number of shares (integer or fractional). + Initialized object. + + + + Creates new instance of the object + initialized with as number of shares. + + Integer number of shares. + Initialized object. + + + + Creates new instance of the object + initialized with as number of shares. + + Integer number of shares. + Initialized object. + + + + Represents the position liquidation quantity in (possible fractional) number of shares or in percents. + + + + + Creates new instance of the structure. + + + + + Gets the position liquidation quantity in shares or in percentage value. + + + + + Returns true if is a number of shares (fractional or integer). + + + + + Returns true if is an amount in percents (from 0 to 100). + + + + + Creates new instance of the object + initialized with as number of shares. + + Amount of dollars to buy or sell. + Initialized object. + + + + Creates new instance of the object + initialized with as percentage value. + + Number of shares (integer or fractional). + + The argument is less than 0 or greater than 100. + + Initialized object. + + + + Gets all validation exceptions (inconsistent request data errors). + + Lazy-evaluated list of validation errors. + + + + Encapsulates full account information from Alpaca REST API. + + + + + Gets unique account identifier. + + + + + Gets updated account status. + + + + + Gets updated crypto account status. + + + + + Gets main account currency. + + + + + Gets amount of money available for trading. + + + + + Gets timestamp of account creation event in UTC. + + + + + Gets account number (string identifier). + + + + + Returns true if account is linked to pattern day trader. + + + + + Returns true if account trading functions are blocked. + + + + + Returns true if account transfer functions are blocked. + + + + + User setting. If true, the account is not allowed to place orders. + + + + + Flag to denote whether or not the account is permitted to short. + + + + + Buying power multiplier that represents account margin classification. + + + + + Current available buying power. + + + + + Your buying power for day trades (continuously updated value). + + + + + Your buying power under Regulation T (your excess equity - equity minus margin value - times your margin multiplier). + + + + + Your non-marginable buying power for day trades (useful for crypto-trading). + + + + + Real-time MtM value of all long positions held in the account. + + + + + Real-time MtM value of all short positions held in the account. + + + + + Cash + LongMarketValue + ShortMarketValue. + + + + + Equity as of previous trading day at 16:00:00 ET. + + + + + Reg T initial margin requirement (continuously updated value). + + + + + Maintenance margin requirement (continuously updated value). + + + + + Your maintenance margin requirement on the previous trading day + + + + + the current number of day trades that have been made in the last 5 trading days (inclusive of today). + + + + + Value of special memorandum account. + + + + + Returns true if account is completely blocked. + + + + + Gets fees collected value (if any). + + + + + Gets cash pending transfer in. + + + + + Gets cash pending transfer out. + + + + + Gets the effective options trading level of the account. This is the minimum between the + and the . + + + + + Gets the options trading level that was approved for this account. + + + + + Gets the option buying power that was approved for this account. + + + + + Encapsulates account activity information from Alpaca REST API. + + + + + Activity type. + + + + + An ID for the activity, always in "{date}::{uuid}" format. Can be sent as page_token in requests to facilitate the paging of results. + + + + + An activity timestamp (date and time) from in the UTC. + + + + + An activity unique identifier from . + + + + + The symbol of the security involved with the activity. Not present for all activity types. + + + + + The date on which the activity occurred or on which the transaction associated with the activity settled in the UTC. + + + + + The net amount of money (positive or negative) associated with the activity. + + + + + For dividend activities, the average amount paid per share. Not present for other activity types. + + + + + The number of shares that contributed to the transaction (with the fractional part). Not present for all activity types. + + + + + The cumulative quantity of shares involved in the execution (with the fractional part). + + + + + For partially_filled orders, the quantity of shares that are left to be filled (with the fractional part). + + + + + The number of shares that contributed to the transaction (rounded to the nearest integer). Not present for all activity types. + + + + + The cumulative quantity of shares involved in the execution (rounded to the nearest integer). + + + + + For partially_filled orders, the quantity of shares that are left to be filled (rounded to the nearest integer). + + + + + The per-share price that a trade was executed at. + + + + + The order side of a trade execution. + + + + + The time at which an execution occurred in the UTC. + + + + + The type of trade event associated with an execution. + + + + + Gets the id for the order that filled (for the trade activity). + + + + + Encapsulates account configuration settings from Alpaca REST API. + + + + + Gets or sets day trade margin call protection mode for account. + + + + + Gets or sets notification level for order fill emails. + + + + + Gets or sets control flag for blocking new orders placement. + + + + + Gets or sets control flag for enabling long-only account mode. + + + + + Gets or sets control flag for enabling orders acceptance for PTP symbols with no exception. + + + + + Gets the desired maximum options trading level. + + + + + Encapsulates the single active stock information from Alpaca APIs. + + + + + Gets the stock instrument symbol name. + + + + + Gets the current instrument volume value. + + + + + Gets the current instrument trade count value. + + + + + Provides unified type-safe access for Alpaca Crypto Data API via HTTP/REST. + + + + + Gets most recent bar for a single asset from Alpaca REST API endpoint. + + Asset symbol and exchange pair for data retrieval. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only latest bar information. + + + + Gets most recent bar for several assets from Alpaca REST API endpoint. + + Asset symbols list for data retrieval. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the latest bars information. + + + + Gets most recent trade for a single asset from Alpaca REST API endpoint. + + Asset symbol and exchange pair for data retrieval. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only latest trade information. + + + + Gets most recent trade for several assets from Alpaca REST API endpoint. + + Asset symbols list for data retrieval. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the latest trades information. + + + + Gets current quote for single asset from Alpaca REST API endpoint. + + Asset symbol and exchange pair for data retrieval. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only current quote information. + + + + Gets most recent quote for several assets from Alpaca REST API endpoint. + + Asset symbols list for data retrieval. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the latest quotes information. + + + + Gets current cross-exchange best bid/offer (XBBO) for single asset from Alpaca REST API endpoint. + + Asset symbol and exchanges list pair for data retrieval. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only current XBBO information. + + + + Gets current cross-exchange best bid/offer (XBBO) for several assets from Alpaca REST API endpoint. + + Asset symbol and exchanges list pair for data retrieval. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the current XBBO information. + + + + Gets current snapshot data for single asset from Alpaca REST API endpoint. + + Asset symbol and exchange pair for data retrieval. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only current snapshot information. + + + + Gets current snapshot data for several assets from Alpaca REST API endpoint. + + Asset symbol for data retrieval. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the current snapshot information. + + + + Gets current order books for several assets from Alpaca REST API endpoint. + + Asset symbols list for data retrieval. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the current order book information. + + + + Provides unified type-safe access for Alpaca crypto data streaming API via websockets. + + + + + Gets the order book updates subscription for the asset. + + Alpaca asset name. + + The underlying subscriptions dictionary contains too many elements. + + + The argument is null. + + + Subscription object for tracking updates via the event. + + + + + Provides unified type-safe access for Alpaca Data API via HTTP/REST. + + + + + Gets most recent bar for single asset from Alpaca REST API endpoint. + + Latest bar data request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only latest bar information. + + + + Gets most recent bars for several assets from Alpaca REST API endpoint. + + Latest bar data request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the latest bars information. + + + + Gets most recent trade for singe asset from Alpaca REST API endpoint. + + Latest trade data request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only latest trade information. + + + + Gets most recent trades for several assets from Alpaca REST API endpoint. + + Latest trade data request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the latest trades information. + + + + Gets most recent quote for singe asset from Alpaca REST API endpoint. + + Latest quote data request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only current quote information. + + + + Gets most recent quotes for several assets from Alpaca REST API endpoint. + + Latest quote data request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the latest quotes information. + + + + Gets current snapshot (latest trade/quote and minute/days bars) for singe asset from Alpaca REST API endpoint. + + Latest snapshot data request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only current snapshot information. + + + + Gets current snapshot (latest trade/quote and minute/days bars) for several assets from Alpaca REST API endpoint. + + Latest snapshot data request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the current snapshot information. + + + + Gets dictionary with exchange code to the exchange name mappings. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only dictionary where the key is the exchange code and the value is the code's corresponding exchange name. + + + + Gets dictionary with trades conditions code to the condition description mappings. + + SIP tape identifier for retrieving trade conditions. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only dictionary where the key is the trade conditions code and the value is the corresponding condition description. + + + + Gets dictionary with quotes conditions code to the condition description mappings. + + SIP tape identifier for retrieving quote conditions. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only dictionary where the key is the quote conditions code and the value is the corresponding condition description. + + + + Gets historical news articles list from Alpaca REST API endpoint. + + Historical news articles request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only list of historical news articles for specified parameters (with pagination data). + + + + Gets historical auctions list for single asset from Alpaca REST API endpoint. + + Historical auctions request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only list of historical auctions for specified asset (with pagination data). + + + + Gets historical auctions dictionary for several assets from Alpaca REST API endpoint. + + Historical auctions request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary of historical auctions for specified assets (with pagination data). + + + + Returns the most active stocks by volume for the current trading session. + + + Number of top most active stocks to fetch per day. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only list of most active stocks ranked by volume. + + + + Returns the most active stocks by trade count for the current trading session. + + + Number of top most active stocks to fetch per day. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only list of most active stocks ranked by trade count. + + + + Provides unified type-safe access for Alpaca data streaming API via websockets. + + + + + Gets the trading statuses subscription for the asset. + + Alpaca asset symbol. + + The underlying subscriptions dictionary contains too many elements. + + + The argument is null. + + + Subscription object for tracking updates via the event. + + + + + Gets the trade cancellations subscription for the asset. + + Alpaca asset symbol. + + The underlying subscriptions dictionary contains too many elements. + + + The argument is null. + + + Subscription object for tracking updates via the event. + + + + + Gets the trade corrections subscription for the asset. + + Alpaca asset symbol. + + Subscription object for tracking updates via the event. + + + + + Gets the LULD (limit up / limit down) subscription for the asset. + + Alpaca asset symbol. + + Subscription object for tracking updates via the event. + + + + + Encapsulates generic Alpaca Data streaming API subscription item. + + + + + Gets the stream names - updates type (channel name) and asset name (symbol) list. + + + + + Gets boolean flag indicating the current subscription status of this item. + An unsubscribed subscription does not receive streaming data. + + + + + Occurs when a property value has changed. + + + + + Encapsulates strongly-typed Alpaca Data streaming API subscription item. + + Streaming update concrete type. + + + + Occurs when a new item is received from the stream. + + + + + Provides unified type-safe access for Alpaca data streaming API via websockets. + + + + + Gets the news articles' updates subscription for all stock and crypto assets. + + + Subscription object for tracking updates via the event. + + + + + Gets the news articles' updates subscription for the asset. + + Alpaca asset symbol. + + The underlying subscriptions dictionary contains too many elements. + + + The argument is null. + + + Subscription object for tracking updates via the event. + + + + + Provides unified type-safe access for Alpaca Options Data API via HTTP/REST. + + + + + Gets dictionary with exchange code to the exchange name mappings. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only dictionary where the key is the exchange code and the value is the code's corresponding exchange name. + + + + Gets most recent quotes for several option contracts from Alpaca REST API endpoint. + + Option contracts latest data request. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the latest quotes information. + + + + Gets most recent trades for several option contracts from Alpaca REST API endpoint. + + Option contracts latest data request. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the latest trades information. + + + + Gets current snapshot (latest trade/quote) for several option contracts from Alpaca REST API endpoint. + + Option contracts latest data request. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the current snapshot information. + + + + Gets option chain (snapshots list) for option contracts with same underlying symbol from Alpaca REST API endpoint. + + Option contracts latest data request. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary with the current snapshot information. + + + + Provides unified type-safe access for Alpaca Screener API via HTTP/REST. + + + + + Returns top market movers (gainers and losers) and corresponding price change values. + + + Number of top market movers to fetch (gainers and losers). Will return number top for each. By default 10 gainers and 10 losers. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only market movers collections. + + + + Provides unified type-safe access for Alpaca streaming API. + + + + + Occurs when a new trade update is received from the stream. + + + + + Provides unified type-safe access for Alpaca Trading API via HTTP/REST. + + + + + Gets list of watch list objects from Alpaca REST API endpoint. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only list of watch list objects. + + + + Add new watch list object into Alpaca REST API endpoint. + + New watch list request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Newly created watch list object. + + + + Get watch list object from Alpaca REST API endpoint by watch list identifier. + + Unique watch list identifier. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Watch list object with proper value. + + + + Get watch list object from Alpaca REST API endpoint by watch list user-defined name. + + User defined watch list name. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Watch list object with proper value. + + + + Updates watch list object from Alpaca REST API endpoint by watch list identifier. + + Update watch list request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Updated watch list object with proper value. + + + + Adds asset into watch list using Alpaca REST API endpoint by watch list identifier. + + Asset adding request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Updated watch list object with proper value. + + + + Adds asset into watch list using Alpaca REST API endpoint by watch list name. + + Asset adding request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Updated watch list object with proper value. + + + + Deletes asset from watch list using Alpaca REST API endpoint by watch list identifier. + + Asset deleting request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Updated watch list object with proper value. + + + + Deletes asset from watch list using Alpaca REST API endpoint by watch list name. + + Asset deleting request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Updated watch list object with proper value. + + + + Deletes watch list from Alpaca REST API endpoint by watch list identifier. + + Unique watch list identifier. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Returns true if operation completed successfully. + + + + Deletes watch list from Alpaca REST API endpoint by watch list name. + + User defined watch list name. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Returns true if operation completed successfully. + + + + Gets list of available orders from Alpaca REST API endpoint. + + List orders request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only list of order information objects. + + + + Creates new order for execution using Alpaca REST API endpoint. + + New order placement request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only order information object for newly created order. + + + + Creates new order for execution using Alpaca REST API endpoint. + + New order placement request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only order information object for newly created order. + + + + Updates existing order using Alpaca REST API endpoint. + + Patch order request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only order information object for updated order. + + + + Get single order information by client order ID from Alpaca REST API endpoint. + + Client order ID for searching. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only order information object. + + + + Get single order information by server order ID from Alpaca REST API endpoint. + + Server order ID for searching. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only order information object. + + + + Cancels order on server by server order ID using Alpaca REST API endpoint. + + Server order ID for cancelling. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + True if order cancellation was accepted. + + + + Cancels all open orders using Alpaca REST API endpoint. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + List of order cancellation status objects. + + + + Gets account information from Alpaca REST API endpoint. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only account information. + + + + Gets account configuration settings from Alpaca REST API endpoint. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Mutable version of account configuration object. + + + + Updates account configuration settings using Alpaca REST API endpoint. + + New account configuration object for updating. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Mutable version of updated account configuration object. + + + + Gets list of account activities from Alpaca REST API endpoint by specific activity. + + Account activities request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only list of account activity record objects. + + + + Gets portfolio equity history from Alpaca REST API endpoint. + + Portfolio history request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only portfolio history information object. + + + + Gets list of available assets from Alpaca REST API endpoint. + + Asset list request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only list of asset information objects. + + + + Get single asset information by asset symbol from Alpaca REST API endpoint. + + Asset symbol for searching. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only asset information. + + + + Gets list of available positions from Alpaca REST API endpoint. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only list of position information objects. + + + + Gets position information by asset symbol from Alpaca REST API endpoint. + + Position asset symbol. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only position information object. + + + + Liquidates all open positions at market price using Alpaca REST API endpoint. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + List of position cancellation status objects. + + + + Liquidates all open positions at market price using Alpaca REST API endpoint. + + All positions deletion request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + List of position cancellation status objects. + + + + Liquidate an open position at market price using Alpaca REST API endpoint. + + Position deletion request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + The object that represents the position liquidation order (for tracking). + + + + Get current time information from Alpaca REST API endpoint. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only clock information object. + + + + Gets list of trading days from Alpaca REST API endpoint. + + Calendar items request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only list of trading date information object. + + + + Gets list of trading open/close intervals for each day from Alpaca REST API endpoint. + + Calendar items request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only list of trading date information object. + + + + Gets single corporate action information from Alpaca REST API endpoint. + + Corporate action identifier. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only corporate action information object. + + + + Gets list of different corporate actions from Alpaca REST API endpoint. + + Corporate actions request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only list of corporate action information objects. + + + + Gets list of active option contracts from Alpaca REST API endpoint. By default, only active contracts that expire before the upcoming weekend are returned. + + Option contracts request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only list of corporate action information objects. + + + + Gets option contract from Alpaca REST API endpoint using contract identifier. + + Option contract unique identifier. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only list of corporate action information objects. + + + + Gets option contract from Alpaca REST API endpoint using contract symbol name. + + Option contract unique symbol name. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Read-only list of corporate action information objects. + + + + Exercises a held option contract, converting it into the underlying asset based on the specified terms. + + Option contract unique identifier. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + Returns true if operation completed successfully. + + + + Exercises a held option contract, converting it into the underlying asset based on the specified terms. + + Option contract unique symbol name. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Returns true if operation completed successfully. + + + + Encapsulates corporate action announcement information from Alpaca REST API. + + + + + Gets ID that is specific to a single announcement. + + + + + Gets ID that remains consistent across all announcements for the same corporate action. + Unlike , this can be used to connect multiple announcements to see how + the terms have changed throughout the lifecycle of the corporate action event. + + + + + Gets corporate action type. + + + + + Gets corporate action sub-type. + + + + + Gets symbol of the company initiating the announcement. + + + + + Gets CUSIP of the company initiating the announcement. + + + + + Gets symbol of the child company involved in the announcement. + + + + + Gets CUSIP of the child company involved in the announcement. + + + + + Gets the amount of cash to be paid per share held by an account on the record date. + + + + + Gets the denominator to determine any quantity change ratios in positions. + + + + + Gets the numerator to determine any quantity change ratios in positions. + + + + + Gets the corporate action date by date type or null if date not specified. + + Corporate action date type. + Specific date for this corporate action if it's applicable and specified. + + + + Encapsulates asset information from Alpaca REST API. + + + + + Gets unique asset identifier used by Alpaca. + + + + + Gets asset class. + + + + + Gets asset source exchange. + + + + + Gets asset symbol. + + + + + Gets asset name. + + + + + Get asset status in API. + + + + + Returns true if asset is tradable. + + + + + Returns true if asset is marginable. + + + + + Returns true if asset is shortable. + + + + + Returns true if asset is easy-to-borrow. + + + + + Returns true if asset is fractionable. + + + + + Gets minimum order size. This property is valid only for crypto assets. + + + + + Gets amount a trade quantity can be incremented by. This property is valid only for crypto assets. + + + + + Gets amount the price can be incremented by. This property is valid only for crypto assets. + + + + + Gets the % margin requirement for the asset. This property is valid only for equity assets. + + + + + Gets the list of asset attributes (unique asset characteristics like PTP order acceptance mode). + + + + + Encapsulates the basic auction information from Alpaca APIs. + + + + + Gets asset symbol. + + + + + Gets auction date in UTC. + + + + + Gets daily auction openings. + + + + + Gets daily auction closings. + + + + + Encapsulates the auction entry information from Alpaca APIs. + + + + + Gets auction timestamp in UTC. + + + + + Gets identifier of auction source exchange. + + + + + Gets auction price level. + + + + + Gets auction quantity. + + + + + Gets auction condition. + + + + + Encapsulates basic bar information for Alpaca APIs. + + + + + Gets asset symbol. + + + + + Gets the beginning time of this bar in UTC. + + + + + Gets bar open price. + + + + + Gets bar high price. + + + + + Gets bar low price. + + + + + Gets bar close price. + + + + + Gets bar trading volume. + + + + + Gets bar volume weighted average price. + + + + + Gets total trades count for this bar. + + + + + Encapsulates single trading day information from Alpaca REST API. + + + + + Gets trading date in EST time zone. + + + + + Gets trading date in UTC time zone. + + + + + Gets trading date open time in EST time zone. + + + + + Gets trading date open time in UTC time zone. + + + + + Gets trading date close time in EST time zone. + + + + + Gets trading date close time in UTC time zone. + + + + + Encapsulates current trading date information from Alpaca REST API. + + + + + Gets current timestamp in UTC. + + + + + Returns true if trading day is open now. + + + + + Gets nearest trading day open time in UTC. + + + + + Gets nearest trading day close time in UTC. + + + + + Encapsulates trade correction information from Alpaca APIs. + + + + + Gets information about the original trade. + + + + + Gets information about the corrected trade. + + + + + Encapsulates single page response in Alpaca Data API v2. + + Type of paged item (bar, trade or quote) + + + + Gets the next page token for continuation. If value of this property + equals to null this page is the last one and no more data is available. + + + + + Gets list of items for this response grouped by asset symbols. + + + + + Encapsulates extended error information from Alpaca error REST response. + + + + + Gets the symbol name related for the error. + + + + + Gets the number of opened orders if this value related to the error. + + + + + Gets the day trading buying power if this value related to the error. + + + + + Gets the maximal day trading buying power if this value related to the error. + + + + + Gets the used maximal day trading buying power if this value related to the error. + + + + + Options Greeks are a set of risk measures that are used in the options market to evaluate the risk and reward of an option. + + + + + Gets the rate of change of an option's price relative to a change in the price of the underlying asset. + + + + + Gets the rate of change in an option's delta relative to a change in the price of the underlying asset. + + + + + Gets the rate of change in an option's price relative to a change in the risk-free rate of interest. + + + + + Gets the rate of change in an option's price relative to a change in time. + + + + + Gets the rate of change in an option's price relative to a change in the volatility of the underlying asset. + + + + + Provides unified type-safe access for Alpaca Crypto Data API via HTTP/REST. + + + + + Gets historical bars list for single asset from Alpaca REST API endpoint. + + Historical bars request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only list of historical bars for specified asset (with pagination data). + + + + Gets historical bars dictionary for several assets from Alpaca REST API endpoint. + + Historical bars request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary of historical bars for specified assets (with pagination data). + + + + Provides unified type-safe access for Alpaca Crypto Data API via HTTP/REST. + + + + + Gets historical quotes list for single asset from Alpaca REST API endpoint. + + Historical quotes request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only list of historical quotes for specified asset (with pagination data). + + + + Gets historical quotes dictionary for several assets from Alpaca REST API endpoint. + + Historical quotes request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary of historical quotes for specified assets (with pagination data). + + + + Provides unified type-safe access to the historical data request parameters. + + + + + Gets the pagination parameters for the request (page size and token). + + + + + Provides unified type-safe access to the historical data request parameters. + + Historical data request type. + Historical response data item type. + + + + Gets copy of the current request without page token and max allowed page size. + + + + + Provides unified type-safe access for Alpaca Crypto Data API via HTTP/REST. + + + + + Gets historical trades list for single asset from Alpaca REST API endpoint. + + Historical trades request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only list of historical trades for specified asset (with pagination data). + + + + Gets historical trades dictionary for several assets from Alpaca REST API endpoint. + + Historical trades request parameters. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument contains invalid data or some required data is missing, unable to create a valid HTTP request. + + + The request failed due to an underlying issue such as network connectivity, DNS failure, server certificate validation or timeout. + + + The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. + + + The initial TPC socket connection failed due to an underlying low-level network connectivity issue. + + + .NET Core and .NET 5 and later only: The request failed due to timeout. + + + The argument is null. + + Read-only dictionary of historical trades for specified assets (with pagination data). + + + + Encapsulates single trading day information from Alpaca REST API. + + + + + Gets trading open and close times in EST time zone. + + + + + Gets session open and close times in EST time zone. + + + + + Encapsulates the basic LULD update information from Alpaca APIs. + + + + + Gets asset symbol. + + + + + Gets the LULD update timestamp in UTC. + + + + + Gets the current limit up price. + + + + + Gets the current limit down price. + + + + + Gets the indicator name. + + + + + Gets tape. + + + + + Encapsulates the single market mover information from Alpaca APIs. + + + + + Gets the instrument symbol name. + + + + + Gets the current instrument price value. + + + + + Gets the current instrument price change value. + + + + + Gets the current instrument price change value in percents. + + + + + Encapsulates two lists of market movers from Alpaca APIs. + + + + + Gets list of the top market losers. + + + + + Gets list of the top market gainers. + + + + + Encapsulates single page response in Alpaca Data API v2. + + Type of paged item (bar, trade or quote) + + + + Gets the next page token for continuation. If value of this property + equals to null this page is the last one and no more data is available. + + + + + Gets list of items for this response grouped by asset symbols. + + + + + Encapsulates the basic news article information from Alpaca APIs. + + + + + Gets news article unique identifier. + + + + + Gets headline or title of the article. + + + + + Gets news article creation timestamp in UTC. + + + + + Gets news article updating timestamp in UTC. + + + + + Gets original author of news article. + + + + + Gets summary text for the article (may be first sentence of content). + + + + + Gets content of the news article (might contain HTML). + + + + + Gets URL of article (if applicable). + + + + + Gets source where the news originated from. + + + + + Gets list of related or mentioned symbols. + + + + + Gets the thumbnail image URL for the news article. + + + + + Gets the small image URL for the news article. + + + + + Gets the large image URL for the news article. + + + + + + + + + + Gets unique option contract identifier used by Alpaca. + + + + + Get option contract symbol. + + + + + Gets option contract name. + + + + + Get option contract status in API. + + + + + Returns true if asset is tradable. + + + + + Get option contract size. + + + + + Get option contract type. + + + + + Get option contract strike price. + + + + + Get option contract expiration date. + + + + + Get option contract execution style. + + + + + Get option contract root asset property. + + + + + Get option contract underlying asset property. + + + + + Get option contract underlying asset property. + + + + + Get option contract open interest. + + + + + Get option contract open interest date. + + + + + Get option contract close price. + + + + + Get option contract close price date. + + + + + Encapsulates option snapshot information from the Alpaca REST API. + + + + + Gets the snapshot's option symbol. + + + + + Gets the latest quote information. + + + + + Gets the latest trade information. + + + + + Gets the option greeks data. + + + + + Gets the implied volatility of the option. + + + + + Encapsulates order information from Alpaca REST API. + + + + + Gets unique server-side order identifier. + + + + + Gets client-side (user specified) order identifier. Client Order IDs must be unique. + + + + + Gets order creation timestamp in UTC. + + + + + Gets last order update timestamp in UTC. + + + + + Gets order submission timestamp in UTC. + + + + + Gets order fill timestamp in UTC. + + + + + Gets order expiration timestamp in UTC. + + + + + Gets order cancellation timestamp in UTC. + + + + + Gets order rejection timestamp in UTC. + + + + + Gets order replacement timestamp in UTC. + + + + + Gets unique asset identifier. + + + + + Gets asset symbol. + + + + + Gets asset class. + + + + + Gets original notional order quantity (with the fractional part). + + + + + Gets original fractional order quantity (with the fractional part). + + + + + Gets filled order quantity (with the fractional part). + + + + + Gets original order quantity (rounded to the nearest integer). + + + + + Gets filled order quantity (rounded to the nearest integer). + + + + + Gets order type. + + + + + Gets order class. + + + + + Gets order side (buy or sell). + + + + + Gets order duration. + + + + + Gets order limit price for limit and stop-limit orders. + + + + + Gets order stop price for stop and stop-limit orders. + + + + + Gets the profit taking limit price for advanced order types. + + + + + Gets the stop loss stop price for advanced order types. + + + + + Gets the current high water mark price for trailing stop orders. + + + + + Gets order average fill price. + + + + + Gets current order status. + + + + + Gets the order ID that this order was replaced by. + + + + + Gets the order ID that this order replaces. + + + + + Gets legs for this order. + + + + + Encapsulates order action status information from Alpaca REST API. + + + + + Gets unique server-side order identifier. + + + + + Returns true if requested action completed successfully. + + + + + Encapsulates the basic order book information from Alpaca APIs. + + + + + Gets asset name. + + + + + Gets quote timestamp in UTC time zone. + + + + + Gets identifier of source exchange. + + + + + Gets bids price/quantity pairs list. + + + + + Gets asks price/quantity pairs list. + + + + + Gets the order book reset flag. + + + + + Encapsulates the order book price/size pair information. + + + + + Gets price level. + + + + + Gets quantity. + + + + + Encapsulates single page response in Alpaca Data API v2. + + Type of paged item (bar, trade or quote) + + + + Gets the asset symbol for all items on page. + + + + + Gets the next page token for continuation. If value of this property + equals to null this page is the last one and no more data is available. + + + + + Gets list of items for this response. + + + + + Encapsulates portfolio history information from Alpaca REST API. + + + + + Gets historical information items list with timestamps. + + + + + Gets time frame value for this historical view. + + + + + Gets base value for this historical view. + + + + + Encapsulates portfolio history information item from Alpaca REST API. + + + + + Gets historical equity value. + + + + + Gets historical profit/loss value. + + + + + Gets historical profit/loss value as percentages. + + + + + Gets historical timestamp value in UTC time zone. + + + + + Encapsulates position information from Alpaca REST API. + + + + + Gets unique asset identifier. + + + + + Gets asset symbol. + + + + + Gets asset exchange. + + + + + Gets asset class. + + + + + Gets average entry price for position. + + + + + Get position quantity (with the fractional part). + + + + + Get position quantity (rounded to the nearest integer). + + + + + Get total number of shares available minus open orders (with the fractional part). + + + + + Get total number of shares available minus open orders (rounded to the nearest integer). + + + + + Get position side (short or long). + + + + + Get current position market value. + + + + + Get position cost basis. + + + + + Get position unrealized profit loss. + + + + + Get position unrealized profit loss in percent. + + + + + Get position intraday unrealized profit loss. + + + + + Get position intraday unrealized profit loss in percent. + + + + + Gets position's asset current price. + + + + + Gets position's asset last trade price. + + + + + Gets position's asset price change in percent. + + + + + Encapsulates position action status information from Alpaca REST API. + + + + + Gets processed position asset symbol. + + + + + Returns true if requested action completed successfully. + + + + + Encapsulates the basic quote information from Alpaca APIs. + + + + + Gets asset symbol. + + + + + Gets quote timestamp in UTC. + + + + + Gets identifier of bid source exchange. + + + + + Gets identifier of ask source exchange. + + + + + Gets bid price level (highest buy offer). + + + + + Gets ask price level (lowest sell offer). + + + + + Gets bid quantity. + + + + + Gets ask quantity. + + + + + Gets tape where trade occurred. + + + + + Gets trade conditions list. + + + + + Encapsulates snapshot information from the Alpaca REST API. + + + + + Gets the snapshot's asset symbol. + + + + + Gets the latest quote information. + + + + + Gets the latest trade information. + + + + + Gets the current minute bar information. + + + + + Gets the current daily bar information. + + + + + Gets the previous daily bar information. + + + + + Encapsulates the basic trading status update information from Alpaca APIs. + + + + + Gets asset symbol. + + + + + Gets status timestamp in UTC. + + + + + Gets status code. + + + + + Gets status message. + + + + + Gets reason code. + + + + + Gets reason message. + + + + + Gets tape. + + + + + Provides unified type-safe access for websocket streaming APIs. + + + + + Occurs when stream is successfully connected. + + + + + Occurs when underlying web socket is successfully opened. + + + + + Occurs when underlying web socket is successfully closed. + + + + + Occurs when any error occurs in stream. + + + + + Occurs in case of non-critical events. + + + + + Opens connection to a streaming API. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The underlying TPC socket connection failed due to an low-level network connectivity issue. + + + The WebSocket connection failed due to an high-level protocol or connection issue. + + Awaitable task object for handling action completion in asynchronous mode. + + + + Opens connection to a streaming API and awaits for authentication response. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The underlying TPC socket connection failed due to an low-level network connectivity issue. + + + The WebSocket connection failed due to an high-level protocol or connection issue. + + Awaitable task object for handling client authentication event in asynchronous mode. + + + + Closes connection to a streaming API. + + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The underlying TPC socket connection failed due to an low-level network connectivity issue. + + + The WebSocket connection failed due to an high-level protocol or connection issue. + + Awaitable task object for handling action completion in asynchronous mode. + + + + Provides unified type-safe access for websocket streaming APIs with data subscriptions. + + + + + Gets the trade updates subscription for all assets. + + + The underlying subscriptions dictionary contains too many elements. + + + Subscription object for tracking updates via the event. + + + + + Gets the trade updates subscription for the asset. + + Alpaca asset symbol. + + The underlying subscriptions dictionary contains too many elements. + + + The argument is null. + + + Subscription object for tracking updates via the event. + + + + + Gets the quote updates subscription for all assets. + + + The underlying subscriptions dictionary contains too many elements. + + + Subscription object for tracking updates via the event. + + + + + Gets the quote updates subscription for the asset. + + Alpaca asset symbol. + + The underlying subscriptions dictionary contains too many elements. + + + The argument is null. + + + Subscription object for tracking updates via the event. + + + + + Gets the minute aggregate (bar) subscription for all assets. + + + Subscription object for tracking updates via the event. + + + + + Gets the minute aggregate (bar) subscription for the asset. + + Alpaca asset symbol. + + The underlying subscriptions dictionary contains too many elements. + + + The argument is null. + + + Subscription object for tracking updates via the event. + + + + + Gets the daily aggregate (bar) subscription for the asset. + + Alpaca asset symbol. + + The underlying subscriptions dictionary contains too many elements. + + + The argument is null. + + + Subscription object for tracking updates via the event. + + + + + Gets the updated aggregate (bar) subscription for the asset. + + Alpaca asset symbol. + + The underlying subscriptions dictionary contains too many elements. + + + The argument is null. + + + Subscription object for tracking updates via the event. + + + + + Provides unified type-safe access for subscribing/unsubscribing streaming events. + + + + + Subscribes a single object for receiving data from the server. + + Subscription target - asset and update type holder. + + The argument is null. + + + + + Subscribes a single object for receiving data from the server. + + Subscription target - asset and update type holder. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument is null. + + + + + Subscribes several objects for receiving data from the server. + + List of subscription targets - assets and update type holders. + + The argument is null. + + + + + Subscribes several objects for receiving data from the server. + + List of subscription targets - assets and update type holders. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument is null. + + + + + Unsubscribes the single object for receiving data from the server. + + Subscription target - asset and update type holder. + + The argument is null. + + + + + Unsubscribes the single object for receiving data from the server. + + Subscription target - asset and update type holder. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument is null. + + + + + Unsubscribes several objects for receiving data from the server. + + List of subscription targets - assets and update type holders. + + The argument is null. + + + + + Unsubscribes several objects for receiving data from the server. + + List of subscription targets - assets and update type holders. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + The argument is null. + + + + + Encapsulates the basic trade information from Alpaca APIs. + + + + + Gets asset symbol. + + + + + Gets trade timestamp in UTC. + + + + + Gets trade price level. + + + + + Gets trade quantity. + + + + + Gets trade identifier. + + + + + Gets trade source exchange identifier. + + + + + Gets tape where trade occurred. + + + + + Gets trade update reason if any. + + + + + Gets trade conditions list. + + + + + Gets crypto trade taker side. + + + + + Encapsulates trade update information from Alpaca streaming API. + + + + + Gets trade update reason. + + + + + Gets optional order execution identifier. + + + + + Gets updated trade price level. + + + + + Gets updated position quantity (with the fractional part). + + + + + Gets updated position quantity (rounded to the nearest integer). + + + + + Gets updated trade quantity (with the fractional part). + + + + + Gets updated trade quantity (rounded to the nearest integer). + + + + + Gets update timestamp in UTC. + + + + + Gets related order object. + + + + + Encapsulates watch list information from Alpaca REST API. + + + + + Gets unique watch list identifier. + + + + + Gets watch list creation time in UTC. + + + + + Gets watch list last update time in UTC. + + + + + Gets watch list user-defined name. + + + + + Gets for this watch list. + + + + + Gets the content of this watchlist, in the order as registered by the client. + + + + + Encapsulates access point for setting time interval filtering on request instance. + + The sort of time interval (inclusive or exclusive). + + + + Sets time interval value for the current request instance. + + + + + Encapsulates time interval (from and till date/time points) for filtering requires. + + + + + Gets the starting date/time point of filtering interval. + + + + + Gets the ending date/time point of filtering interval. + + + + + Represents the inclusive version of the interface. + + + + + Represents the exclusive version of the interface. + + + + + Encapsulates data for latest crypto XBBO request on Alpaca Data API v2. + + + + + Creates new instance of object. + + Asset symbols list for data retrieval. + Crypto exchanges list for data retrieval. + + The or argument is null. + + + + + Creates new instance of object. + + Asset symbols list for data retrieval. + Crypto exchange for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols list for data retrieval. + + The argument is null. + + + + + Gets asset symbols for data retrieval. + + + + + Gets crypto exchanges list for data retrieval (empty list means 'all exchanges'). + + + + + Encapsulates data for latest crypto XBBO request on Alpaca Data API v2. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Crypto exchanges list for data retrieval. + + The or argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Crypto exchange for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + + The argument is null. + + + + + Gets asset symbol for data retrieval. + + + + + Gets crypto exchanges list for data retrieval (empty list means 'all exchanges'). + + + + + Encapsulates data for latest crypto data requests on Alpaca Data API v2. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Crypto exchange for data retrieval. + + The argument is null. + + + + + Gets asset symbol for data retrieval. + + + + + Gets crypto exchange for data retrieval. + + + + + Encapsulates data for snapshot crypto data requests on Alpaca Data API v2. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Crypto exchange for data retrieval. + + The argument is null. + + + + + Gets asset symbol for data retrieval. + + + + + Gets crypto exchange for data retrieval. + + + + + Encapsulates implementations of the interface and helper methods for it. + + + + + Gets boolean flag signals that time interval is empty (both start and end date equal to null). + + Target time interval for checking. + + Returns true if both and equal to null. + + + + + Gets boolean flag signals that time interval is open (both start or end date equal to null). + + Target time interval for checking. + + Returns true if both or equal to null. + + + + + Gets exclusive open time interval ending at the date/time point. + + Ending date/time point for filtering. + Inclusive open time interval. + + + + Gets inclusive open time interval ending at the date/time point. + + Ending date/time point for filtering. + Inclusive open time interval. + + + + Gets exclusive open time interval starting from the date/time point. + + Starting date/time point for filtering. + Inclusive open time interval. + + + + Gets inclusive open time interval starting from the date/time point. + + Starting date/time point for filtering. + Inclusive open time interval. + + + + Creates new instance of object + with the modified property value. + + Original time interval. + New ending date/time point for interval. + The new instance of object. + + + + Creates new instance of object + with the modified property value. + + Original time interval. + New ending date/time point for interval. + The new instance of object. + + + + Creates new instance of object + with the modified property value. + + Original time interval. + New starting date/time point for interval. + The new instance of object. + + + + Creates new instance of object + with the modified property value. + + Original time interval. + New starting date/time point for interval. + The new instance of object. + + + + Set exclusive time interval for object. + + Target request for setting filtering interval. + Time interval (date/time pair) for filtering. + Fluent interface - returns object. + + + + Set inclusive time interval for object. + + Target request for setting filtering interval. + Time interval (date/time pair) for filtering. + Fluent interface - returns object. + + + + Set exclusive time interval for object. + + Target request for setting filtering interval. + Starting date/time point for filtering. + Ending date/time point for filtering. + Fluent interface - returns object. + + + + Set inclusive time interval for object. + + Target request for setting filtering interval. + Starting date/time point for filtering. + Ending date/time point for filtering. + Fluent interface - returns object. + + + + Deconstructs the instance + into two values (tuple). + + Original time interval. + Time interval starting point. + Time interval ending point. + + + + Deconstructs the instance + into two values (tuple). + + Original time interval. + Time interval starting point. + Time interval ending point. + + + + Encapsulates base data for advanced order types, never used directly by any code. + + + + + Creates new instance of the class. + + Base order object for creating advanced one. + Advanced order class for new smart order. + + The argument is null. + + + + + Gets or sets the order class for advanced order types. + + + + + A bracket order is a chain of three orders that can be used to manage your position entry and exit. + It is a common use case of an OTOCO (One Triggers OCO {One Cancels Other}) order. + + + See Alpaca Order Documentation for more information. + + + + + Gets prices for take profit order for the bracket order. + + + + + Gets prices for stop loss order for the bracket order. + + + + + Encapsulates the price information about the stop loss order. + + + + + Gets the stop loss stop price. + + + + + Gets the stop loss limit price. + + + + + Encapsulates the price information about the take profit order. + + + + + Gets the profit taking limit price. + + + + + A limit order is an order to buy or sell at a specified price or better. + + See Alpaca Order Documentation for more information. + + + + Gets or sets the new order limit price. + + + + + Creates new buy market order using specified symbol and quantity. + + Order asset symbol. + Order quantity. + Order limit price. + + The argument is null. + + The new object instance. + + + + Creates new sell market order using specified symbol and quantity. + + Order asset symbol. + Order quantity. + Order limit price. + + The argument is null. + + The new object instance. + + + + Creates a new instance of the order from the current order. + + Stop loss order stop price. + New advanced order representing pair of original order and stop loss order. + + + + Creates a new instance of the order from the current order. + + Stop loss order stop price. + Stop loss order limit price. + New advanced order representing pair of original order and stop loss order. + + + + A market order is a request to buy or sell a security at the currently available market price. + + See Alpaca Order Documentation for more information. + + + + Creates new buy market order using specified symbol and quantity. + + Order asset symbol. + Order quantity. + + The argument is null. + + The new object instance. + + + + Creates new sell market order using specified symbol and quantity. + + Order asset symbol. + Order quantity. + + The argument is null. + + The new object instance. + + + + OCO (One-Cancels-Other) is another type of advanced order type. + This is a set of two orders with the same side (buy/buy or sell/sell) and currently only exit order is supported. + In other words, this is the second part of the bracket orders where the entry order is already filled, + and you can submit the take-profit and stop-loss in one order submission. + + See Alpaca Order Documentation for more information. + + + + Gets prices for take profit order for the OCO order. + + + + + Gets prices for stop loss order for the OCO order. + + + + + Encapsulates base data for any order types, never used directly by any code. + + + + + Creates new instance of the class. + + Alpaca symbol for order. + Order quantity (absolute value). + Order side (buy or sell). + Order type (market, limit, stop, stop-limit). + + The argument is null. + + + + + Creates new instance of the class. + + Base order for getting parameters. + + The argument is null. + + + + + Gets the new order asset symbol. + + + + + Gets the new order quantity. + + + + + Gets the new order side (buy or sell). + + + + + Gets the new order type. + + + + + Gets the new order duration. + + + + + Gets or sets the client order ID. This is a user-specified ID that must be unique if provided. + + + + + Gets or sets flag indicating that order should be allowed to execute during extended hours trading. + + + + + Gets or sets the optional position intent for order placement. + + + + + Set of extensions methods for implementing the fluent interface for the inheritors. + + + + + Sets the new value for the property of the target order. + + Target order for changing property. + The new property value. + Type of target order for altering. + + The argument is null. + + Fluent interface - returns the object. + + + + Sets the new value for the property of the target order. + + Target order for changing property. + The new property value. + Type of target order for altering. + + The argument is null. + + Fluent interface - returns the object. + + + + Sets the new value for the property of the target order. + + Target order for changing property. + The new property value. + Type of target order for altering. + + The argument is null. + + Fluent interface - returns the object. + + + + Sets the new value for the property of the target order. + + Target order for changing property. + The new property value. + Type of target order for altering. + + The argument is null. + + Fluent interface - returns the object. + + + + Set of extensions methods for creating the inheritors. + + + + + Creates new market order using specified side, symbol, and quantity. + + Order side (buy or sell). + Order asset symbol. + Order quantity. + + The argument is null. + + The new object instance. + + + + Creates new stop order using specified side, symbol, quantity, and stop price. + + Order side (buy or sell). + Order asset symbol. + Order quantity. + Order stop price. + + The argument is null. + + The new object instance. + + + + Creates new limit order using specified side, symbol, quantity, and limit price. + + Order side (buy or sell). + Order asset symbol. + Order quantity. + Order limit price. + + The argument is null. + + The new object instance. + + + + Creates new limit order using specified side, symbol, quantity, stop, and limit prices. + + Order side (buy or sell). + Order asset symbol. + Order quantity. + Order stop price. + Order limit price. + + The argument is null. + + The new object instance. + + + + Creates new trailing stop order using specified side, symbol, quantity, and trail offset. + + Order side (buy or sell). + Order asset symbol. + Order quantity. + Order trail offset. + + The argument is null. + + The new object instance. + + + + Encapsulates base data for ordinal order types, never used directly by any code. + + + + + Creates new instance of the class. + + Alpaca symbol for order. + Order quantity (absolute value). + Order side (buy or sell). + Order type (market, limit, stop, stop-limit). + + The argument is null. + + + + + Creates a new instance of the order from the current order. + + Take profit order limit price. + New advanced order representing pair of original order and take profit order. + + + + Creates a new instance of the order from the current order. + + Stop loss order stop price. + New advanced order representing pair of original order and stop loss order. + + + + Creates a new instance of the order from the current order. + + Stop loss order stop price. + Stop loss order limit price. + New advanced order representing pair of original order and stop loss order. + + + + Creates a new instance of the order from the current order. + + Take profit order limit price. + Stop loss order stop price. + New advanced order representing an original order plus pair of take profit and stop loss orders. + + + + Creates a new instance of the order from the current order. + + Take profit order limit price. + Stop loss order stop price. + Stop loss order limit price. + New advanced order representing an original order plus pair of take profit and stop loss orders. + + + + A stop-limit order is a conditional trade over a set time frame that combines the features of a stop order with + those of a limit order and is used to mitigate risk. + The stop-limit order will be executed at a specified limit price, or better, after a given stop price has been reached. + See https://alpaca.markets/docs/trading/orders/#stop-limit-order + + + + + Gets or sets the new order stop price. + + + + + Gets or sets the new order limit price. + + + + + Creates new buy stop limit order using specified symbol and quantity. + + Order asset symbol. + Order quantity. + Order stop price. + Order limit price. + + The argument is null. + + The new object instance. + + + + Creates new sell stop limit order using specified symbol and quantity. + + Order asset symbol. + Order quantity. + Order stop price. + Order limit price. + + The argument is null. + + The new object instance. + + + + Encapsulates data required for placing stop loss order on the Alpaca REST API. + + + + + + + + + + + Creates a new instance of the order from the current order. + + Take profit order limit price. + New advanced order representing pair of original order and take profit order. + + + + A stop (market) order is an order to buy or sell a security when its price moves past a particular point, + ensuring a higher probability of achieving a predetermined entry or exit price. + See https://alpaca.markets/docs/trading/orders/#stop-order + + + + + Gets or sets the new order stop price. + + + + + Creates new buy stop order using specified symbol and quantity. + + Order asset symbol. + Order quantity. + Order stop price. + + The argument is null. + + The new object instance. + + + + Creates new sell buy order using specified symbol and quantity. + + Order asset symbol. + Order quantity. + Order stop price. + + The argument is null. + + The new object instance. + + + + Encapsulates data required for placing take profit order on the Alpaca REST API. + + + + + + + + Creates a new instance of the order from the current order. + + Stop loss order stop price. + New advanced order representing pair of original order and stop loss order. + + + + Creates a new instance of the order from the current order. + + Stop loss order stop price. + Stop loss order limit price. + New advanced order representing pair of original order and stop loss order. + + + + Trailing stop orders allow you to continuously and automatically keep updating the stop price threshold based on the stock price movement. + See https://alpaca.markets/docs/trading/orders/#trailing-stop-orders + + + + + Gets order trail offset value (in dollars or percent). + + + + + Creates new buy market order using specified symbol and quantity. + + Order asset symbol. + Order quantity. + Trailing stop order offset. + + The argument is null. + + The new object instance. + + + + Creates new sell market order using specified symbol and quantity. + + Order asset symbol. + Order quantity. + Trailing stop order offset. + + The argument is null. + + The new object instance. + + + + Represents the trailing stop order offset in dollars or as percent of HWM (High Water Mark). + + + + + Creates new instance of the structure. + + + + + Gets the trailing stop order price offset value. + + + + + Returns true if trail offset is an amount in dollars. + + + + + Returns true if trail offset is a percentage of HWM value. + + + + + Creates new instance of the object + initialized with as dollars amount. + + Trailing stop order offset in dollars. + Initialized object. + + + + Creates new instance of the object + initialized with as percent of HWM. + + Trailing stop order offset in percents. + Initialized object. + + + + Encapsulates request parameters for call. + + + + + Creates new instance of object for all activity types. + + + + + Creates new instance of object for a single activity types. + + The activity type you want to view entries for. + + + + Creates new instance of object for several activity types. + + The list of activity types you want to view entries for. + + + + Gets the activity types you want to view entries for. Empty list means 'all activity types'. + + + + + Gets the date for which you want to see activities. + + + + + Gets inclusive date interval for filtering items in response. + + + + + Gets or sets the sorting direction for results. + + + + + Gets or sets the maximum number of entries to return in the response. + + + + + Gets or sets the ID of the end of your current page of results. + + + + + Sets filtering for single activities. + + Target date for filtering activities. + Fluent interface method return same instance. + + + + Sets filtering for single activities. + + Target date for filtering activities. + Fluent interface method return same instance. + + + + Sets time interval for filtering data returned by this request. + /// + New filtering interval. + Request with applied filtering. + + + + Configuration parameters object for all REST API client instances. + + + + + Creates new instance of class. + + + The argument is null. + + + + + Security identifier for API authentication. + + + + + Gets or sets Alpaca Data API base URL. + + + + + Gets or sets REST API throttling parameters. + + + + + Gets or sets instance for connecting. + + + + + Configuration parameters object for instance. + + + + + Creates new instance of class. + + + + + Configuration parameters object for instance. + + + + + Creates new instance of class. + + + + + Gets crypto exchanges list for data subscription (empty list means 'all exchanges'). + + + + + Creates new instance of object + with the updated list. + + Crypto exchanges to add into the list. + + The argument is null. + + The new instance of the object. + + + + Creates new instance of object + with the updated list. + + Crypto exchanges to add into the list. + + The argument is null. + + The new instance of the object. + + + + Configuration parameters object for instance. + + + + + Creates new instance of class. + + + + + Configuration parameters object for instance. + + + + + Creates new instance of class. + + + + + Configuration parameters object for implementation. + + + + + Creates new instance of class. + + + + + Configuration parameters object for instance. + + + + + Creates new instance of class. + + + + + Configuration parameters object for instance. + + + + + Creates new instance of class. + + + + + Configuration parameters object for instance. + + + + + Creates new instance of class. + + + + + Configuration parameters object for instance. + + + + + Creates new instance of class. + + + + + Encapsulates request parameters for call. + + + + + Creates new instance of object. + + Single corporate action type for filtering. + Date range when searching corporate action announcements. + + + + Creates new instance of object. + + List of the corporate action types for filtering. + Date range when searching corporate action announcements. + + The argument is null. + + + + + Creates new instance of object. + + Single corporate action type for filtering. + Date range when searching corporate action announcements. + + + + Creates new instance of object. + + List of the corporate action types for filtering. + Date range when searching corporate action announcements. + + + + Gets the list of the corporate action types for filtering. + + + + + Gets the date range when searching corporate action announcements. + + + + + Gets the date range when searching corporate action announcements. + + + + + Gets or sets the type of date for filtering by parameter. + + + + + Gets or sets the symbol of the company initiating the announcement. + + + + + Gets or sets the CUSIP of the company initiating the announcement. + + + + + Encapsulates request parameters for call. + + + + + Gets or sets asset status for filtering. + + + + + Gets or sets asset class for filtering. The null value is equal to value. + + + + + Gets or sets asset exchange for filtering. The null value means "no filtering by exchanges". + + + + + Gets set of asset attributes for filtering. Empty default value means - any attribute allowed (no filtering). + + + + + Encapsulates request parameters for call. + + + + + Creates new instance of object. + + + + + Creates new instance of object. + + Start date for the resulting data set. + End date for the resulting data set. + + + + Creates new instance of object. + + Initial value of the property. + + + + Creates new instance of object with the + property configured for the single day. + + + + + + + Creates new instance of object with the + property configured for the single day. + + + + + + + Gets inclusive date interval for filtering items in response. + + + + + Gets inclusive date interval for filtering items in response. + + + + + Sets time interval for filtering data returned by this request. + /// + New filtering interval. + Request with applied filtering. + + + + Sets time interval for filtering data returned by this request. + /// + New filtering interval. + Request with applied filtering. + + + + Encapsulates request parameters for call. + + + + + Creates new instance of object. + + Server side order identifier. + + + + Gets server side order identifier. + + + + + Gets or sets updated order quantity or null if quantity is not changed. + + + + + Gets or sets updated order duration or null if duration is not changed. + + + + + Gets or sets updated order limit price or null if limit price is not changed. + + + + + Gets or sets updated order stop price or null if stop price is not changed. + + + + + Gets or sets updated client order ID or null if client order ID is not changed. + + + + + Encapsulates request parameters for + , + , + , and + + calls. + + + + + + Creates new instance of object. + + Unique watch list identifier or name. + Asset symbol for adding into watch list. + + The or argument is null. + + + + + Gets unique watch list identifier or name. + + + + + Gets asset symbol for adding/deleting into watch list. + + + + + Encapsulates request parameters for call. + + + + + Gets or sets the flag indicating that request should also cancel all open orders (false if null). + + + + + Gets or sets the operation timeout. Useful in case of deleting a lot of positions. The default + HTTP timeout equal to 100 seconds used if this property is equal to null. + + + + + Encapsulates request parameters for call. + + + + + Creates new instance of object. + + Symbol for liquidation. + + The argument is null. + + + + + Gets or sets the custom position liquidation size (if null the position will be liquidated completely). + + + + + Gets the symbol for liquidation. + + + + + Encapsulates request parameters for + and + calls. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Gets or sets the optional parameter for mapping symbol to contract by a specific date. + + + + + + + + Encapsulates request parameters for + and + calls. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Type of time bars for retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Type of time bars for retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Type of time bars for retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Type of time bars for retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Type of time bars for retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Type of time bars for retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Type of time bars for retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Type of time bars for retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Gets type of time bars for retrieval. + + + + + Gets or sets adjustment type of time bars for retrieval. + + + + + Gets or sets the feed to pull market data from. The and + are only available to those with a subscription. Default is + for free plans and for paid. + + + + + Gets or sets the optional parameter for mapping symbol to contract by a specific date. + + + + + Gets or sets the optional parameter for the returned prices in ISO 4217 standard. + For example: USD, EUR, JPY, etc. In case of null the default USD will be used. + + + + + + + + Encapsulates request parameters for + and + calls. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Type of time bars for retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Type of time bars for retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Type of time bars for retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Type of time bars for retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Type of time bars for retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Type of time bars for retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Type of time bars for retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Type of time bars for retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Gets type of time bars for retrieval. + + + + + Creates new instance of object + with the updated list. + + Crypto exchanges to add into the list. + + The argument is null. + + The new instance of the object. + + + + Creates new instance of object + with the updated list. + + Crypto exchanges to add into the list. + + The argument is null. + + The new instance of the object. + + + + Gets crypto exchanges list for data retrieval (empty list means 'all exchanges'). + + + + + + + + Encapsulates request parameters for + and + calls. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object + with the updated list. + + Crypto exchanges to add into the list. + + The argument is null. + + The new instance of the object. + + + + Creates new instance of object + with the updated list. + + Crypto exchanges to add into the list. + + The argument is null. + + The new instance of the object. + + + + Gets crypto exchanges list for data retrieval (empty list means 'all exchanges'). + + + + + + + + + + + Encapsulates request parameters for + and + calls. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object + with the updated list. + + Crypto exchanges to add into the list. + The new instance of the object. + + The argument is null. + + + + + Creates new instance of object + with the updated list. + + Crypto exchanges to add into the list. + The new instance of the object. + + The argument is null. + + + + + Gets crypto exchanges list for data retrieval (empty list means 'all exchanges'). + + + + + + + + Encapsulates request parameters for + and + calls. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Type of time bars for retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Type of time bars for retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Type of time bars for retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Type of time bars for retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Type of time bars for retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Type of time bars for retrieval. + + The argument is null. + + + + + Gets type of time bars for retrieval. + + + + + + + + + + + Encapsulates request parameters for + and + calls. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + + The argument is null. + + + + + + + + + + + Encapsulates request parameters for + and + calls. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Gets or sets the feed to pull market data from. The and + are only available to those with a subscription. Default is + for free plans and for paid. + + + + + Gets or sets the optional parameter for mapping symbol to contract by a specific date. + + + + + Gets or sets the optional parameter for the returned prices in ISO 4217 standard. + For example: USD, EUR, JPY, etc. In case of null the default USD will be used. + + + + + + + + Encapsulates base logic for all historical data requests on Alpaca Data API v2. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Inclusive time interval for filtering items in response. + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Inclusive time interval for filtering items in response. + + + + Gets asset symbol for data retrieval. + + + + + Gets asset symbols list for data retrieval. + + + + + Gets inclusive date interval for filtering items in response. + + + + + Gets the pagination parameters for the request (page size and token). + + + + + Gets or sets the result sorting direction (sort fields is timestamp). + + + + + Gets the last part of the full REST endpoint URL path. + + + + + Encapsulates request parameters for + and + calls. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Filter data equal to or after this time. + Filter data equal to or before this time. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + Inclusive time interval for filtering items in response. + + The argument is null. + + + + + Gets or sets the feed to pull market data from. The and + are only available to those with a subscription. Default is + for free plans and for paid. + + + + + Gets or sets the optional parameter for mapping symbol to contract by a specific date. + + + + + Gets or sets the optional parameter for the returned prices in ISO 4217 standard. + For example: USD, EUR, JPY, etc. In case of null the default USD will be used. + + + + + + + + Encapsulates account history period request duration - value and unit pair. + + + + + Creates new instance of the structure. + + + + + Creates new instance of object. + + Duration value in units. + Duration units (days, weeks, etc.) + + + + Gets specified duration units. + + + + + Gets specified duration value. + + + + + + + + Encapsulates interval starting and ending points - used for date/time filtering in requests. + + Interval range data type. + + + + Creates the new instance of the structure. + + + + + Creates the new instance of the structure. + + Initial value for the property. + Initial value for the property. + + + + Gets the starting point of interval. + /// + + + + Gets the ending point of interval. + + + + + Deconstructs the instance + into two values (tuple). + + Interval starting point. + Interval ending point. + + + + Gets boolean flag that signals the time interval is empty (both start and end date equal to null). + + + Returns true if both and are equal to null. + + + + + Gets boolean flag that signals the time interval is open (start or end date equal to null). + + + Returns true if both or equal to null. + + + + + Creates new instance of object + with the modified property value. + + New ending point for interval. + The new instance of object. + + + + Creates new instance of object + with the modified property value. + + New starting point for interval. + The new instance of object. + + + + Encapsulates data for latest crypto data requests on Alpaca Data API v2. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbol for data retrieval. + Crypto exchange for data retrieval. + + The argument is null. + + + + + Gets asset symbols for data retrieval. + + + + + Gets crypto exchange for data retrieval. + + + + + Encapsulates data for latest stock data requests on Alpaca Data API v2. + + + + + Creates new instance of object. + + Asset name for data retrieval. + + The argument is null. + + + + + Gets asset name for data retrieval. + + + + + Gets or sets the feed to pull market data from. The and + are only available to those with a subscription. Default is + for free plans and for paid. + + + + + Gets or sets the optional parameter for the returned prices in ISO 4217 standard. + For example: USD, EUR, JPY, etc. In case of null the default USD will be used. + + + + + Encapsulates data for latest stock data requests on Alpaca Data API v2. + + + + + Creates new instance of object. + + Asset name for data retrieval. + + The argument is null. + + + + + Gets asset name for data retrieval. + + + + + Gets or sets the feed to pull market data from. The and + are only available to those with a subscription. Default is + for free plans and for paid. + + + + + Gets or sets the optional parameter for the returned prices in ISO 4217 standard. + For example: USD, EUR, JPY, etc. In case of null the default USD will be used. + + + + + Encapsulates data for latest options data requests on Alpaca Data API v2. + + + + + Creates new instance of object. + + Options symbols list for data retrieval. + + The argument is null. + + + + + Gets options symbols list for data retrieval. + + + + + Gets options feed for data retrieval. + + + + + Encapsulates data for latest crypto XBBO request on Alpaca Data API v2. + + + + + Creates new instance of object. + + Asset symbols list for data retrieval. + Crypto exchanges list for data retrieval. + + The or argument is null. + + + + + Creates new instance of object. + + Asset symbols list for data retrieval. + Crypto exchange for data retrieval. + + The argument is null. + + + + + Creates new instance of object. + + Asset symbols list for data retrieval. + + The argument is null. + + + + + Gets asset symbols for data retrieval. + + + + + Gets crypto exchanges list for data retrieval (empty list means 'all exchanges'). + + + + + Encapsulates request parameters for call. + + + + + Gets or sets order status for filtering. + + + + + Gets or sets the chronological order of response based on the submission time. + + + + + Gets exclusive date time interval for filtering orders in response. + + + + + Gets or sets maximum number of orders in response. + + + + + Gets or sets side of orders in response (all orders if null). + + + + + Gets or sets flag for rolling up multi-leg orders under the property of primary order. + + + + + Gets list of symbols used for filtering the resulting list, if empty - orders for all symbols will be included. + + + + + Adds a single item into the list. + + Single symbol name for filtering. + + The argument is null. + + Fluent interface, returns the original instance. + + + + Adds all items from the list into the list. + + List of symbol names for filtering. + + The argument is null. + + Fluent interface, returns the original instance. + + + + Sets time interval for filtering data returned by this request. + /// + New filtering interval. + Request with applied filtering. + + + + Encapsulates request parameters for call. + + + + + Creates new instance of object. + + Order asset symbol. + Order quantity. + Order side (buy or sell). + Order type. + Order duration. + + The argument is null. + + + + + Gets the new order asset symbol. + + + + + Gets the new order quantity. + + + + + Gets the new order side (buy or sell). + + + + + Gets the new order type. + + + + + Gets the new order duration. + + + + + Gets or sets the new order limit price. + + + + + Gets or sets the new order stop price. + + + + + Gets or sets the new trailing order trail price offset in dollars. + + + + + Gets or sets the new trailing order trail price offset in percent. + + + + + Gets or sets the client order ID. This user-specified ID must be unique if set. + + + + + Gets or sets flag indicating that order should be allowed to execute during extended hours trading. + + + + + Gets or sets the order class for advanced order types. + + + + + Gets or sets the profit taking limit price for advanced order types. + + + + + Gets or sets the stop loss stop price for advanced order types. + + + + + Gets or sets the stop loss limit price for advanced order types. + + + + + Gets or sets the optional position intent for order placement. + + + + + Encapsulates request parameters for call. + + + + + Creates new instance of object. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + + The argument is null. + + + + + Gets assets names list for data retrieval. + + + + + Gets or sets inclusive date interval for filtering items in response. + + + + + Gets or sets articles sorting (by property) direction. + + + + + Gets or sets flag for sending property value for each news article. + + + + + Gets or sets flag for excluding news articles that do not contain + property value (just and values). + + + + + Gets the pagination parameters for the request (page size and token). + + + + + Encapsulates request parameters for call. + + + + + Creates new instance of object. + + User defined watch list name. + + The argument is null. + + + + + Creates new instance of object. + + User defined watch list name. + List of asset symbols for new watch list. + + The or argument is null. + + + + + Gets user defined watch list name. + + + + + Gets list of asset symbols for new watch list. + + + + + Encapsulates data for latest options data requests on Alpaca Data API v2. + + + + + Creates new instance of object. + + Option underlying symbol for data retrieval. + + The argument is null. + + + + + Gets options symbols list for data retrieval. + + + + + Gets options feed for data retrieval. + + + + + Gets or sets filter by the exact option contract expiration date. + + + + + Gets or sets filter by the expiration date greater than or equal to the specified value. + + + + + Gets or sets filter by the expiration date less than or equal to the specified value. + + + + + Gets or sets filter ty the root symbol. + + + + + Gets or sets filter the option contract type. + + + + + Gets or sets filter by the strike price greater than or equal to the specified value. + + + + + Gets or sets filter by the strike price less than or equal to the specified value. + + + + + Gets the pagination parameters for the request (page size and token). + + + + + Encapsulates request parameters for call. + + + + + Creates new instance of object. + + + + + Creates new instance of object. + + The symbol of the underlying asset for filtering. + + + + Creates new instance of object. + + The symbols list of the underlying asset for filtering. + + + + Gets the symbols list of the underlying asset for filtering. + + + + + Gets or sets filter by the asset status. By default, only active contracts are returned. + + + + + Gets or sets filter by the exact option contract expiration date. + + + + + Gets or sets filter by the expiration date greater than or equal to the specified value. + + + + + Gets or sets filter by the expiration date less than or equal to the specified value. + + + + + Gets or sets filter ty the root symbol. + + + + + Gets or sets filter the option contract type. + + + + + Gets or sets filter the option contract execution style. + + + + + Gets or sets filter by the strike price greater than or equal to the specified value. + + + + + Gets or sets filter by the strike price less than or equal to the specified value. + + + + + Gets the pagination parameters for the request (page size and token). + + + + + + + + Encapsulates data for latest options data requests on Alpaca Data API v2. + + + + + Creates new instance of object. + + Options symbols list for data retrieval. + + The argument is null. + + + + + Gets options symbols list for data retrieval. + + + + + Gets options feed for data retrieval. + + + + + Gets the pagination parameters for the request (page size and token). + + + + + Encapsulates all data required for the pagination support in Alpaca Data API v2 + + + + + Gets the maximum valid page size for requests supported by Alpaca Data API v2. + + + + + Gets the maximum valid page size for news requests supported by Alpaca Data API v2. + + + + + Gets and sets the request page size. If equals to null default size will be used. + + + + + Gets and sets the page token for the request. Should be null for the first request. + + + + + Encapsulates request parameters for call. + + + + + Gets inclusive date interval for filtering items in response. + + + + + Gets inclusive date interval for filtering items in response. + + + + + Gets inclusive date interval for filtering items in response. + + + + + Gets or sets the time frame value for desired history. Default value (if null) is 1 minute + for a period shorter than 7 days, 15 minutes for a period less than 30 days, or 1 day for a longer period. + + + + + Gets or sets period value for desired history. Default value (if null) is 1 month. + + + + + Gets or sets intraday reporting style. Make sense only if are equal to . + + + + + Gets or sets intraday profit/loss reset. Make sense only if are equal to . + + + + + Gets or sets flags, indicating that include extended hours included in the result. + This is effective only for time frame less than 1 day. + + + + + Sets time interval for filtering data returned by this request. + /// + New filtering interval. + Request with applied filtering. + + + + Sets time interval for filtering data returned by this request. + /// + New filtering interval. + Request with applied filtering. + + + + Encapsulates data for snapshot crypto data requests on Alpaca Data API v2. + + + + + Creates new instance of object. + + Asset symbols for data retrieval. + + The argument is null. + + + + + Gets asset symbols list for data retrieval. + + + + + Configuration parameters object for class. + + + + + Creates new instance of class. + + + + + Gets or sets Alpaca streaming API base URL. + + + + + Gets or sets Alpaca secret key identifier. + + + + + Gets or sets factory for obtaining web socket client. + + + + + Encapsulates request parameters for call. + + + + + Creates new instance of object. + + Unique watch list identifier. + User defined watch list name. + List of asset symbols for new watch list. + + The or argument is null. + + + + + Gets the target watch list unique identifier. + + + + + Gets the target watch list name. + + + + + Gets list of asset symbols for new watch list. + + + + + Encapsulates access to the latest available rate limit information for this client. + + + + + Gets the latest available rate limit information or default values if no information is available. + + The latest rate limit data from the server or an empty object if no request was made. + + + + Provides information about client-specific rate limit values. + + + + + Gets the total request-per-minute limit for the current client. + + + + + Get the remaining number of requests allowed in the current time interval. + + + + + Gets end of the current time interval for requests limiting. + + + + + Helper class for storing parameters required for initializing rate throttler in class. + + + + + + + + Creates new instance of object. + + + + + + + + Gets throttle parameters initialized with default values. + + + + + Gets or sets maximum number of retry attempts for a single request. + + + + + Gets set of HTTP status codes which when received should initiate a retry of the affected request. + + + + + Gets set of socket error codes which when received should initiate a retry of the affected request. + + + + + Gets or sets the HTTP request timeout. Default timeout value (100 sec) + will be used if this property is equal to null or never set. + + + + + Gets the custom message handler that supports reconnection logic configured with the current settings. + + + + + Gets the custom Polly asynchronous execution policy (can be used by unit tests and DI containers). + + + + + Encapsulates asynchronous interface of web socket client. + + + + + Connects specified endpoint using web socket protocol. + + The web socket endpoint URL for connection. + A cancellation token that can be used by other objects or threads to receive notice of cancellation. + + + + Sends message into the web socket from memory buffer. + + Memory buffer with binary message. + + + + Reads message frame from the web socket into memory. + + Memory buffer for receiving data. + Read action status (frame parameters). + + + + Disconnects web socket channel from endpoint. + + Disconnection code. + + + + Immediately aborts connection at socket level. + + + + + Gets current web socket channel state. + + + + + Gets current web socket channel close status (if any). + + + + + Helper struct for holding results of method calls. + + Web socket message type (text, binary, close). + Is true for the last frame in message. + Number of bytes in the last frame. + + + + Helper struct for holding results of method calls. + + Web socket message type (text, binary, close). + Is true for the last frame in message. + Number of bytes in the last frame. + + + Web socket message type (text, binary, close). + + + Is true for the last frame in message. + + + Number of bytes in the last frame. + + + + + + + + + diff --git a/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.DataQueueHandler.cs b/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.DataQueueHandler.cs index f67f2c8..c45a698 100644 --- a/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.DataQueueHandler.cs +++ b/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.DataQueueHandler.cs @@ -31,7 +31,7 @@ public partial class AlpacaBrokerage : IDataQueueHandler /// The new enumerator for this subscription request public IEnumerator Subscribe(SubscriptionDataConfig dataConfig, EventHandler newDataAvailableHandler) { - if (!CanSubscribe(dataConfig.Symbol) || dataConfig.Symbol.SecurityType == SecurityType.Option) + if (!CanSubscribe(dataConfig.Symbol)) { return null; } diff --git a/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.Messaging.cs b/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.Messaging.cs index e47d19c..7a867f2 100644 --- a/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.Messaging.cs +++ b/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.Messaging.cs @@ -91,11 +91,15 @@ private IStreamingDataClient GetStreamingDataClient(Symbol symbol) IStreamingDataClient streamingClient; if (symbol.SecurityType == SecurityType.Crypto) { - streamingClient = _cryptoStreamingClient; + streamingClient = _cryptoStreamingClient.StreamingClient; } else if (symbol.SecurityType == SecurityType.Equity) { - streamingClient = _equityStreamingClient; + streamingClient = _equityStreamingClient.StreamingClient; + } + else if (symbol.SecurityType.IsOption()) + { + streamingClient = _optionsStreamingClient.StreamingClient; } else { @@ -122,7 +126,7 @@ private void HandleTradeReceived(ITrade obj) TickType = TickType.Trade, Symbol = subscriptionData.Symbol, - Time = obj.TimestampUtc.ConvertFromUtc(subscriptionData.ExchangeTimeZone), + Time = DateTime.UtcNow.ConvertFromUtc(subscriptionData.ExchangeTimeZone), }; lock (_aggregator) { @@ -152,7 +156,7 @@ private void HandleQuoteReceived(IQuote obj) TickType = TickType.Quote, Symbol = subscriptionData.Symbol, - Time = obj.TimestampUtc.ConvertFromUtc(subscriptionData.ExchangeTimeZone), + Time = DateTime.UtcNow.ConvertFromUtc(subscriptionData.ExchangeTimeZone), }; lock (_aggregator) diff --git a/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.cs b/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.cs index 0f83038..9adfd0f 100644 --- a/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.cs +++ b/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.cs @@ -63,8 +63,9 @@ public partial class AlpacaBrokerage : Brokerage private IAlpacaOptionsDataClient _optionsHistoricalDataClient; private IAlpacaStreamingClient _orderStreamingClient; - private IAlpacaDataStreamingClient _equityStreamingClient; - private IAlpacaCryptoStreamingClient _cryptoStreamingClient; + private AlpacaStreamingClientWrapper _equityStreamingClient; + private AlpacaStreamingClientWrapper _optionsStreamingClient; + private AlpacaStreamingClientWrapper _cryptoStreamingClient; private bool _isInitialized; private bool _connected; @@ -170,18 +171,26 @@ private void Initialize(string apiKey, string apiKeySecret, string accessToken, if (secretKey != null) { // equity streaming client - _equityStreamingClient = EnvironmentExtensions.GetAlpacaDataStreamingClient(environment, secretKey); + _equityStreamingClient = new AlpacaStreamingClientWrapper(secretKey, SecurityType.Equity); // streaming crypto - _cryptoStreamingClient = EnvironmentExtensions.GetAlpacaCryptoStreamingClient(environment, secretKey); + _cryptoStreamingClient = new AlpacaStreamingClientWrapper(secretKey, SecurityType.Crypto); - foreach (var streamingClient in new IStreamingClient[] { _cryptoStreamingClient, _equityStreamingClient, _orderStreamingClient }) + // streaming options + _optionsStreamingClient = new AlpacaStreamingClientWrapper(secretKey, SecurityType.Option); + + foreach (var streamingClient in new IStreamingClient[] { _cryptoStreamingClient, _optionsStreamingClient, _equityStreamingClient, _orderStreamingClient }) { streamingClient.Connected += (obj) => StreamingClient_Connected(streamingClient, obj); streamingClient.OnWarning += (obj) => StreamingClient_OnWarning(streamingClient, obj); streamingClient.SocketOpened += () => StreamingClient_SocketOpened(streamingClient); streamingClient.SocketClosed += () => StreamingClient_SocketClosed(streamingClient); streamingClient.OnError += (obj) => StreamingClient_OnError(streamingClient, obj); + + if (streamingClient is AlpacaStreamingClientWrapper wrapper) + { + wrapper.EnviromentFailure += (message) => Log.Trace($"AlpacaBrokerage.Initialize(): {message}"); + } } _subscriptionManager = new EventBasedDataQueueHandlerSubscriptionManager(); @@ -576,7 +585,7 @@ public override void Connect() return; } - foreach (var streamingClient in new IStreamingClient[] { _orderStreamingClient, _equityStreamingClient, _cryptoStreamingClient }) + foreach (var streamingClient in new IStreamingClient[] { _optionsStreamingClient, _orderStreamingClient, _equityStreamingClient, _cryptoStreamingClient }) { if (streamingClient == null) { @@ -630,6 +639,7 @@ public override void Disconnect() _orderStreamingClient?.DisconnectAsync().SynchronouslyAwaitTask(); _equityStreamingClient?.DisconnectAsync().SynchronouslyAwaitTask(); _cryptoStreamingClient?.DisconnectAsync().SynchronouslyAwaitTask(); + _optionsStreamingClient?.DisconnectAsync().SynchronouslyAwaitTask(); } public override void Dispose() @@ -644,6 +654,7 @@ public override void Dispose() _orderStreamingClient.DisposeSafely(); _equityStreamingClient.DisposeSafely(); _cryptoStreamingClient.DisposeSafely(); + _optionsStreamingClient.DisposeSafely(); } /// diff --git a/QuantConnect.AlpacaBrokerage/AlpacaStreamingClientWrapper.cs b/QuantConnect.AlpacaBrokerage/AlpacaStreamingClientWrapper.cs new file mode 100644 index 0000000..2ac94be --- /dev/null +++ b/QuantConnect.AlpacaBrokerage/AlpacaStreamingClientWrapper.cs @@ -0,0 +1,142 @@ +/* + * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. + * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +using System; +using Alpaca.Markets; +using System.Threading; +using QuantConnect.Util; +using System.Threading.Tasks; + +namespace QuantConnect.Brokerages.Alpaca +{ + /// + /// Helper class for alpaca streaming clients, handling paid/free subscriptions + /// + public class AlpacaStreamingClientWrapper : IStreamingClient + { + private readonly SecurityKey _securityKey; + private readonly SecurityType _securityType; + private IEnvironment[] _environments = new[] { Environments.Live, Environments.Paper }; + + public IStreamingDataClient StreamingClient { get; set; } + + public event Action Connected; + public event Action SocketOpened; + public event Action SocketClosed; + public event Action OnError; + public event Action OnWarning; + + public event Action EnviromentFailure; + + /// + /// Creates a new instance using the target security key and security type + /// + public AlpacaStreamingClientWrapper(SecurityKey securityKey, SecurityType securityType) + { + _securityKey = securityKey; + _securityType = securityType; + } + + public async Task ConnectAndAuthenticateAsync(CancellationToken cancellationToken = default) + { + var result = AuthStatus.Unauthorized; + + var failureMessage = ""; + // we first try with live environment which uses paid subscriptions, if it fails try free paper environment + foreach (var environment in _environments) + { + if (StreamingClient != null) + { + StreamingClient.Connected -= Connected; + StreamingClient.OnWarning -= OnWarning; + StreamingClient.SocketOpened -= SocketOpened; + StreamingClient.SocketClosed -= SocketClosed; + StreamingClient.OnError -= OnError; + StreamingClient.DisposeSafely(); + } + + var feedType = environment == Environments.Live ? "paid" : "free"; + Logging.Log.Trace($"AlpacaStreamingClientWrapper.ConnectAndAuthenticateAsync({_securityType}): try connecting {feedType} feed"); + if (_securityType == SecurityType.Crypto) + { + StreamingClient = EnvironmentExtensions.GetAlpacaCryptoStreamingClient(environment, _securityKey); + } + else if (_securityType == SecurityType.Equity) + { + var feed = "'iex'"; + if (environment == Environments.Live) + { + feed = "'sip', will retry with free feed"; + } + failureMessage = $"{_securityType} failed to connect to live feed {feed}"; + StreamingClient = EnvironmentExtensions.GetAlpacaDataStreamingClient(environment, _securityKey); + } + else if (_securityType.IsOption()) + { + var feed = "'indicative'"; + if (environment == Environments.Live) + { + feed = "'opra', will retry with free feed"; + } + failureMessage = $"{_securityType} failed to connect to live feed {feed}"; + StreamingClient = EnvironmentExtensions.GetAlpacaOptionsStreamingClient(environment, _securityKey); + } + else + { + throw new NotImplementedException(); + } + + StreamingClient.Connected += Connected; + StreamingClient.OnWarning += OnWarning; + StreamingClient.SocketOpened += SocketOpened; + StreamingClient.SocketClosed += SocketClosed; + StreamingClient.OnError += OnError; + + result = await StreamingClient.ConnectAndAuthenticateAsync(); + if (result == AuthStatus.Authorized) + { + // once connected we will just keep this environment, if we need to reconnect, due to internet issues, we don't want to retry all + _environments = new[] { environment }; + Logging.Log.Trace($"AlpacaStreamingClientWrapper.ConnectAndAuthenticateAsync({_securityType}): connection succeeded"); + // we got what we wanted + break; + } + else + { + if (!string.IsNullOrEmpty(failureMessage)) + { + EnviromentFailure?.Invoke(failureMessage); + } + } + } + return result; + } + + public Task DisconnectAsync(CancellationToken cancellationToken = default) + { + return StreamingClient?.DisconnectAsync(); + } + + public void Dispose() + { + StreamingClient.DisposeSafely(); + } + + public Task ConnectAsync(CancellationToken cancellationToken = default) + { + throw new NotImplementedException(); + } + } +} diff --git a/QuantConnect.AlpacaBrokerage/QuantConnect.AlpacaBrokerage.csproj b/QuantConnect.AlpacaBrokerage/QuantConnect.AlpacaBrokerage.csproj index cc3a8b5..a6062d5 100644 --- a/QuantConnect.AlpacaBrokerage/QuantConnect.AlpacaBrokerage.csproj +++ b/QuantConnect.AlpacaBrokerage/QuantConnect.AlpacaBrokerage.csproj @@ -27,8 +27,23 @@ - + + + + + + + Alpaca.Markets.dll + + + PreserveNewest + true + + + PreserveNewest + true + \ No newline at end of file