fhqvst / avanza

A JavaScript client for the unofficial Avanza API
MIT License
229 stars 59 forks source link

placeOrder #4

Closed ghost closed 7 years ago

ghost commented 7 years ago

With filling up the placeOrder with e.g. where accountId is an integer of the wanted accountId and where validUntil's date is the current date. The response is 400, Bad Request.

options: {
    price: 49,
    validUntil: '2017-01-31',
    volume: 1,
    orderbookId: 537416,
    orderType: 'BUY',
    accountId: 0000000 }
}
ghost commented 7 years ago

Figured out that the issue was that accountId is supposed to be a string, not an integer.