Add Alpaca Exchange impl

This commit is contained in:
Carter Bertolini 2023-10-17 17:09:29 -04:00
parent efd9770ccc
commit 4b0a2a284a

18
src/alpaca/exchange.ts Normal file
View File

@ -0,0 +1,18 @@
import Alpaca from '@alpacahq/alpaca-trade-api'
import { Exchange } from '../interface/exchange'
export class AlpacaExchange implements Exchange {
readonly alpaca: Alpaca;
readonly name: string;
constructor(keyId: string, secretKey: string, paper: boolean) {
this.alpaca = new Alpaca({
keyId: keyId,
secretKey: secretKey,
paper: paper
});
this.name = 'Alpaca';
}
}