Show / Hide Table of Contents

Interface IHistoricalTradesClient<TRequest>

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

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

Methods

| Improve this Doc View Source

GetHistoricalTradesAsync(TRequest, CancellationToken)

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

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

Historical trades 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<ITrade>>

Read-only dictionary of historical trades 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

ListHistoricalTradesAsync(TRequest, CancellationToken)

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

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

Historical trades 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<ITrade>>

Read-only list of historical trades 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