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 SourceGetHistoricalTradesAsync(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 |
RestClientErrorException | The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. |
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 |
RestClientErrorException | The response contains an error message or the received response cannot be deserialized properly due to JSON schema mismatch. |