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

Docs wrong for getOrderByClientOrderId()

Open hardillb opened this issue 3 years ago • 2 comments

https://github.com/alpacahq/alpaca-trade-api-js#get-order-by-client-id

 getOrderByClientOrderId(string) => Promise<Order>

should be

getOrderByClientId(string) => Promise<Order>

hardillb avatar Mar 24 '21 17:03 hardillb

Also the replaceOrder doc doesn't mention the need to pass a new order

replaceOrder(uuid) => Promise<Order>

should be

replaceOrder(uuid,{
  symbol: string, // any valid ticker symbol
  qty: number,
  side: 'buy' | 'sell',
  type: 'market' | 'limit' | 'stop' | 'stop_limit' | 'trailing_stop',
  time_in_force: 'day' | 'gtc' | 'opg' | 'ioc',
  limit_price: number, // optional,
  stop_price: number, // optional,
  client_order_id: string, // optional,
  extended_hours: boolean, // optional,
  order_class: string, // optional,
  take_profit: object, // optional,
  stop_loss: object, // optional,
  trail_price: string, // optional,
  trail_percent: string // optional,
}) => Promise<Order> 

hardillb avatar Mar 25 '21 12:03 hardillb

docs still wrong...

ferric-sol avatar Jun 06 '23 21:06 ferric-sol