Getting crypto symbols, but only want stocks

Getting crypto symbols, when not requesting crypto symbols.

AssetsRequest assetRequest = new AssetsRequest() { AssetStatus = AssetStatus.Active };

I thought the default behavior was UsEquity? How to query for only stock symbols (non-crypto) ? AssetClass property not exposed on AssetsRequest.

Thanks

Sorry for the delayed answer. I assume that you are using the .NET SDK for connecting to Alpaca from the C# code, right? In this case, just use the AssetClass property of the AssetRequest class.

I’m checking this forum only time-to-time. If you’ll have any other issues/questions related to Alpaca .NET SDK, use the GitHub issues for faster turnaround.

image

Where is the AssetClass property? This is the latest C# SDK.

It seems every few months something changes that completely breaks the normal functionality.

I don’t know why your IDE doesn’t display it (maybe because property name and type are equal and your settings prevent displaying types). This property exists starting from version 3.6.0 and is used in many samples/tests.

You can see the example that demonstrates all 3 available properties of the AssetsRequest class in the tests source code on GitHub.