alpacahq / alpaca-trade-api-js

Node.js library for Alpaca Trade API.
https://www.npmjs.com/package/@alpacahq/alpaca-trade-api
Apache License 2.0
509 stars 132 forks source link

Docs wrong for getOrderByClientOrderId() #126

Open hardillb opened 3 years ago

hardillb commented 3 years ago

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

 getOrderByClientOrderId(string) => Promise<Order>

should be

getOrderByClientId(string) => Promise<Order>
hardillb commented 3 years ago

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> 
ferric-sol commented 1 year ago

docs still wrong...