alpaca-trade-api-js
alpaca-trade-api-js copied to clipboard
Node.js library for Alpaca Trade API.
### Question form pre-submit checklist. - [X] I have searched the existing issues to ensure there isn't already an issue about this question. - [X] My question has to do...
### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior ```import Alpaca from '@alpacahq/alpaca-trade-api';``` Inside of a cloudflare worker’s code fails...
This PR is aimed to remove `tools` directory from npm artifact. Current files structure looks like: Definitely that `tools` directory is redundant for target users of the library.
OS: MacOS 12.2 Node: 16 NPM Package Version: 2.12.1 I started getting this error yesterday: ``` /Users/me/Documents/Code/Experiments/alpaca/node_modules/@alpacahq/alpaca-trade-api/dist/resources/datav2/rest_v2.js:115 for (const item of items) { ^ TypeError: items is not iterable at...
### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior Needs to be refactored to include `getBarsV2()` function.  trying to...
Getting this "getBars is not a function" error when attempting to run this example. 
Running `npm run lint` right now on master gives ``` .... ✖ 503 problems (1 error, 502 warnings) ``` We need to come in and either solve all these issues...
I'm noticing an issue with the alpaca node client version `2.12.1` where after the `trade_ws` socket successfully connects it does not emit events for programmatically generated order events. It DOES...
Issue is here: https://github.com/alpacahq/alpaca-trade-api-js/blob/master/lib/api.js#L25-L27 If I catch an exception in the client code all I get is `Request failed with status code 422` which is not useful. What I really...
As per the Alpaca docs - Close a position by symbol endpoint - `[DELETE]/v2/positions/{symbol}` Accepts a query parameter `qty - the number of shares to liquidate`, But this nodejs implementation...