Show / Hide Table of Contents

Interface IHistoricalBarsClient<TRequest>

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

Namespace: Alpaca.Markets
Assembly: Alpaca.Markets.dll
Syntax
public interface IHistoricalBarsClient<in TRequest>
    where TRequest : IHistoricalRequest<TRequest, IBar>
Type Parameters
Name Description
TRequest

Methods

| Improve this Doc View Source

GetHistoricalBarsAsync(TRequest, CancellationToken)

Gets historical bars dictionary for several assets from Alpaca REST API endpoint.

Declaration
Task<IMultiPage<IBar>> GetHistoricalBarsAsync(TRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
TRequest request

Historical bars request parameters.

CancellationToken cancellationToken

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

Returns
Type Description
Task<IMultiPage<IBar>>

Read-only dictionary of historical bars for specified assets (with pagination data).

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

ListHistoricalBarsAsync(TRequest, CancellationToken)

Gets historical bars list for single asset from Alpaca REST API endpoint.

Declaration
Task<IPage<IBar>> ListHistoricalBarsAsync(TRequest request, CancellationToken cancellationToken = null)
Parameters
Type Name Description
TRequest request

Historical bars request parameters.

CancellationToken cancellationToken

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

Returns
Type Description
Task<IPage<IBar>>

Read-only list of historical bars for specified asset (with pagination data).

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