alpacahq / alpaca-ts

A TypeScript Node.js library for the https://alpaca.markets REST API and WebSocket streams.
ISC License
154 stars 42 forks source link

Is it possible to streamline the requests more? #4

Closed aqilc closed 4 years ago

aqilc commented 4 years ago

This looks a bit redundant and unnecessary. I suggest just returning the request itself, as it doesn't make a big difference and takes an unnecessary function away from the call stack:

image

117 commented 4 years ago

Agreed, gonna write up some changes to simplify this. Thanks for pointing out the redundancy.

117 commented 4 years ago

The client requests have been simplified in commit 93af83f96ebc053d643e5db10ed01a40b9800184.