icastillejogomez / degiro-api

Unofficial DeGiro stock broker API. See your portfolio and set up orders in the market like wall street
MIT License
195 stars 29 forks source link

order.error.default when selling open position #55

Open JoshuaSparx opened 1 year ago

JoshuaSparx commented 1 year ago

Hi,

Everything always used to work fine, but for some reason all of a sudden whenever i try to sell a asset (ADYEN) in this case., i always get the error: order.error.default as a return when creating the order. I currently have 1 position open on adyen (size=1), and try to do SELL 1.

    const order = {
      buySell: DeGiroActions.SELL,
      orderType: DeGiroMarketOrderTypes.MARKET, // LIMITED, MARKET, STOP_LOSS_LIMIT, STOP_LOSS
      productId: symbolId,
      size: 1,
      timeType: DeGiroTimeTypes.PERMANENT,
    };