@pipedream/alpaca
Version:
Pipedream Alpaca Components
27 lines (25 loc) • 612 B
JavaScript
import app from "../../alpaca.app.mjs";
export default {
type: "action",
key: "alpaca-get-account-info",
version: "0.0.1",
name: "Get Account Info",
description: "Returns the account info, [See the docs](https://alpaca.markets/docs/api-references/trading-api/account/)",
props: {
app,
isPaperAPI: {
propDefinition: [
app,
"isPaperAPI",
],
},
},
async run ({ $ }) {
const response = this.app.getAccountInfo({
$,
isPaperAPI: this.isPaperAPI,
});
$.export("$summary", "Account info has been retreived.");
return response;
},
};