diff --git a/src/alpaca/exchange.ts b/src/alpaca/exchange.ts new file mode 100644 index 0000000..56748c5 --- /dev/null +++ b/src/alpaca/exchange.ts @@ -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'; + } +} \ No newline at end of file