Resolve "Alpaca API Implementation" #28

Merged
clbertolini merged 9 commits from 12-alpaca-api-implementation into main 2023-10-24 20:54:40 +00:00
Showing only changes of commit 4b0a2a284a - Show all commits

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';
}
}