Setup basic Alpaca action fetch and test.
This commit is contained in:
@ -37,7 +37,8 @@ export class AlpacaActionProvider {
|
||||
activity.side === "buy" ? ActionSide.Buy : ActionSide.Sell,
|
||||
parseFloat(activity.price)
|
||||
);
|
||||
})
|
||||
}),
|
||||
undefined
|
||||
);
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
|
@ -1,6 +1,7 @@
|
||||
import Alpaca from '@alpacahq/alpaca-trade-api';
|
||||
import { AlpacaPortfolioProvider } from './portfolio';
|
||||
import { AlpacaQuoteProvider } from './quote';
|
||||
import { AlpacaActionProvider } from './actions';
|
||||
import { Exchange } from '../interface/exchange';
|
||||
import { PortfolioProvider } from '../interface/portfolio';
|
||||
import { QuoteProvider } from '../interface/quote';
|
||||
@ -51,7 +52,7 @@ export class AlpacaExchange implements Exchange {
|
||||
|
||||
this.portfolioProvider = new AlpacaPortfolioProvider(this.alpaca);
|
||||
this.quoteProvider = new AlpacaQuoteProvider(this.alpaca);
|
||||
this.actionProvider = null!;
|
||||
this.actionProvider = new AlpacaActionProvider(this.alpaca);
|
||||
|
||||
this.name = 'Alpaca';
|
||||
}
|
||||
|
Reference in New Issue
Block a user