alpaca-trade-api-js icon indicating copy to clipboard operation
alpaca-trade-api-js copied to clipboard

Node.js library for Alpaca Trade API.

Results 60 alpaca-trade-api-js issues
Sort by recently updated
recently updated
newest added

### 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...

bug
Being Worked On

### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior Needs to be refactored to include `getBarsV2()` function. ![image](https://user-images.githubusercontent.com/52934303/167171595-ba2dd91b-5f18-4eff-9fd6-47b8fd4c2112.png) trying to...

bug
Examples

Getting this "getBars is not a function" error when attempting to run this example. ![image](https://user-images.githubusercontent.com/52934303/166698002-bb48691a-2eab-46b5-ba1f-daf790a19630.png)

bug
Examples

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...

enhancement

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...