Add Alpaca Exchange impl
This commit is contained in:
parent
efd9770ccc
commit
4b0a2a284a
18
src/alpaca/exchange.ts
Normal file
18
src/alpaca/exchange.ts
Normal 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';
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user