Show / Hide Table of Contents

Interface IAlpacaCryptoDataClient

Provides unified type-safe access for Alpaca Crypto Data API via HTTP/REST.

Inherited Members
IHistoricalQuotesClient<HistoricalCryptoQuotesRequest>.ListHistoricalQuotesAsync(HistoricalCryptoQuotesRequest, CancellationToken)
IHistoricalQuotesClient<HistoricalCryptoQuotesRequest>.GetHistoricalQuotesAsync(HistoricalCryptoQuotesRequest, CancellationToken)
IHistoricalTradesClient<HistoricalCryptoTradesRequest>.ListHistoricalTradesAsync(HistoricalCryptoTradesRequest, CancellationToken)
IHistoricalTradesClient<HistoricalCryptoTradesRequest>.GetHistoricalTradesAsync(HistoricalCryptoTradesRequest, CancellationToken)
IHistoricalBarsClient<HistoricalCryptoBarsRequest>.ListHistoricalBarsAsync(HistoricalCryptoBarsRequest, CancellationToken)
IHistoricalBarsClient<HistoricalCryptoBarsRequest>.GetHistoricalBarsAsync(HistoricalCryptoBarsRequest, CancellationToken)
IAlpacaScreenerClient.GetTopMarketMoversAsync(Nullable<Int32>, CancellationToken)
IRateLimitProvider.GetRateLimitValues()
Namespace: Alpaca.Markets
Assembly: Alpaca.Markets.dll
Syntax
public interface IAlpacaCryptoDataClient : IHistoricalQuotesClient<HistoricalCryptoQuotesRequest>, IHistoricalTradesClient<HistoricalCryptoTradesRequest>, IHistoricalBarsClient<HistoricalCryptoBarsRequest>, IAlpacaScreenerClient, IRateLimitProvider

Methods

| Improve this Doc View Source

GetLatestBarAsync(LatestDataRequest, CancellationToken)

Gets most recent bar for a single asset from Alpaca REST API endpoint.

Declaration
Task<IBar> GetLatestBarAsync(LatestDataRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
LatestDataRequest request

Asset symbol and exchange pair for data retrieval.

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
Task<IBar>

Read-only latest bar information.

Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

GetLatestBestBidOfferAsync(LatestBestBidOfferRequest, CancellationToken)

Gets current cross-exchange best bid/offer (XBBO) for single asset from Alpaca REST API endpoint.

Declaration
Task<IQuote> GetLatestBestBidOfferAsync(LatestBestBidOfferRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
LatestBestBidOfferRequest request

Asset symbol and exchanges list pair for data retrieval.

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
Task<IQuote>

Read-only current XBBO information.

Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

GetLatestQuoteAsync(LatestDataRequest, CancellationToken)

Gets current quote for single asset from Alpaca REST API endpoint.

Declaration
Task<IQuote> GetLatestQuoteAsync(LatestDataRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
LatestDataRequest request

Asset symbol and exchange pair for data retrieval.

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
Task<IQuote>

Read-only current quote information.

Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

GetLatestTradeAsync(LatestDataRequest, CancellationToken)

Gets most recent trade for a single asset from Alpaca REST API endpoint.

Declaration
Task<ITrade> GetLatestTradeAsync(LatestDataRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
LatestDataRequest request

Asset symbol and exchange pair for data retrieval.

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
Task<ITrade>

Read-only latest trade information.

Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

GetSnapshotAsync(SnapshotDataRequest, CancellationToken)

Gets current snapshot data for single asset from Alpaca REST API endpoint.

Declaration
Task<ISnapshot> GetSnapshotAsync(SnapshotDataRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
SnapshotDataRequest request

Asset symbol and exchange pair for data retrieval.

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
Task<ISnapshot>

Read-only current snapshot information.

Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

ListLatestBarsAsync(LatestDataListRequest, CancellationToken)

Gets most recent bar for several assets from Alpaca REST API endpoint.

Declaration
Task<IReadOnlyDictionary<String, IBar>> ListLatestBarsAsync(LatestDataListRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
LatestDataListRequest request

Asset symbols list for data retrieval.

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
Task<IReadOnlyDictionary<String, IBar>>

Read-only dictionary with the latest bars information.

Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

ListLatestBestBidOffersAsync(LatestBestBidOfferListRequest, CancellationToken)

Gets current cross-exchange best bid/offer (XBBO) for several assets from Alpaca REST API endpoint.

Declaration
Task<IReadOnlyDictionary<String, IQuote>> ListLatestBestBidOffersAsync(LatestBestBidOfferListRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
LatestBestBidOfferListRequest request

Asset symbol and exchanges list pair for data retrieval.

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
Task<IReadOnlyDictionary<String, IQuote>>

Read-only dictionary with the current XBBO information.

Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

ListLatestOrderBooksAsync(LatestOrderBooksRequest, CancellationToken)

Gets current order books for several assets from Alpaca REST API endpoint.

Declaration
Task<IReadOnlyDictionary<String, IOrderBook>> ListLatestOrderBooksAsync(LatestOrderBooksRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
LatestOrderBooksRequest request

Asset symbols list for data retrieval.

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
Task<IReadOnlyDictionary<String, IOrderBook>>

Read-only dictionary with the current order book information.

Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

ListLatestQuotesAsync(LatestDataListRequest, CancellationToken)

Gets most recent quote for several assets from Alpaca REST API endpoint.

Declaration
Task<IReadOnlyDictionary<String, IQuote>> ListLatestQuotesAsync(LatestDataListRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
LatestDataListRequest request

Asset symbols list for data retrieval.

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
Task<IReadOnlyDictionary<String, IQuote>>

Read-only dictionary with the latest quotes information.

Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

ListLatestTradesAsync(LatestDataListRequest, CancellationToken)

Gets most recent trade for several assets from Alpaca REST API endpoint.

Declaration
Task<IReadOnlyDictionary<String, ITrade>> ListLatestTradesAsync(LatestDataListRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
LatestDataListRequest request

Asset symbols list for data retrieval.

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
Task<IReadOnlyDictionary<String, ITrade>>

Read-only dictionary with the latest trades information.

Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

| Improve this Doc View Source

ListSnapshotsAsync(SnapshotDataListRequest, CancellationToken)

Gets current snapshot data for several assets from Alpaca REST API endpoint.

Declaration
Task<IReadOnlyDictionary<String, ISnapshot>> ListSnapshotsAsync(SnapshotDataListRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
SnapshotDataListRequest request

Asset symbol for data retrieval.

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
Task<IReadOnlyDictionary<String, ISnapshot>>

Read-only dictionary with the current snapshot information.

Exceptions
Type Condition
RequestValidationException

The request argument contains invalid data or some required data is missing, unable to create a valid HTTP request.

RestClientErrorException

The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX