Added documentation for Alpaca
This commit is contained in:
@@ -5,7 +5,13 @@ import { Exchange } from '../interface/exchange'
|
||||
import { PortfolioProvider } from '../interface/portfolio'
|
||||
import { QuoteProvider } from '../interface/quote'
|
||||
|
||||
/**
|
||||
* Exchange implementation for Alpaca.
|
||||
*/
|
||||
export class AlpacaExchange implements Exchange {
|
||||
/**
|
||||
* The Alpaca API client.
|
||||
*/
|
||||
readonly alpaca: Alpaca;
|
||||
|
||||
/**
|
||||
@@ -23,6 +29,13 @@ export class AlpacaExchange implements Exchange {
|
||||
*/
|
||||
readonly name: string;
|
||||
|
||||
/**
|
||||
* Creates an instance of the Alpaca exchange.
|
||||
* @constructor
|
||||
* @param {string} keyId - The API key ID for the Alpaca exchange.
|
||||
* @param {string} secretKey - The secret key for the Alpaca exchange.
|
||||
* @param {boolean} paper - Whether to use the paper trading environment or not.
|
||||
*/
|
||||
constructor(keyId: string, secretKey: string, paper: boolean) {
|
||||
this.alpaca = new Alpaca({
|
||||
keyId: keyId,
|
||||
|
||||
Reference in New Issue
Block a user