aurbano / robinhood-node

:chart_with_upwards_trend: NodeJS client for Robinhood Trading :fire:

Home Page:https://aurbano.github.io/robinhood-node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

trigger and time (in force) are reversed in README

chiefsmurph opened this issue · comments

If I am not mistaken, the buy order and sell order documentation in the README has the trigger and time's reversed.

It is either reverse in the README, or reverse in the .d.ts. Either way, something is reversed.

README is wrong. The .d.ts has some issues too.

Example of a good for day - stop loss (at stop price it becomes a market order)
"time_in_force":"gfd","fees":"0.00","cumulative_quantity":"0.00000","stop_price":"7.00000000","reject_reason":null,"instrument":"https://api.robinhood.com/instruments/39ff611b-84e7-425b-bfb8-6fe2a983fcf3/","state":"queued","trigger":"stop","type": "market"

Example of a good till canceled - stop limit (at stop price it becomes a limit order at price)
"time_in_force":"gtc","fees":"0.00","stop_price":"7.01000000","reject_reason":null,"instrument":"https://api.robinhood.com/instruments/39ff611b-84e7-425b-bfb8-6fe2a983fcf3/","state":"queued","trigger":"stop","override_dtbp_checks":false,"type":"limit",

Limit order would be "type":"limit", "price":"7.00000" , "trigger":"immediate"
Market order would be "type":"Market", "price":"7.35000" , "trigger":"immediate"
(they don't do real market orders so price is still used)

.d.ts should be something like:
export type TriggerTypes =
'immediate'
| 'stop'
;

export type TimeInForceTypes =
'gfd'
| 'gtc';