Skip to content

Commit

Permalink
Fix place_stop_loss_order (#96)
Browse files Browse the repository at this point in the history
THe stop loss order was not being placed working now
  • Loading branch information
hadi-14 authored Apr 22, 2024
1 parent 6eff03e commit abe3f48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions avanza/avanza.py
Original file line number Diff line number Diff line change
Expand Up @@ -2217,16 +2217,16 @@ def place_stop_loss_order(
'accountId': account_id,
'orderBookId': order_book_id,
'stopLossTrigger': {
'type': stop_loss_trigger.type,
'type': stop_loss_trigger.type.value,
'value': stop_loss_trigger.value,
'validUntil': stop_loss_trigger.valid_until.isoformat()
},
'stopLossOrderEvent': {
'type': stop_loss_order_event.type,
'type': stop_loss_order_event.type.value,
'price': stop_loss_order_event.price,
'volume': stop_loss_order_event.volume,
'validDays': stop_loss_order_event.valid_days,
'priceType': stop_loss_order_event.price_type,
'priceType': stop_loss_order_event.price_type.value,
'shortSellingAllowed': stop_loss_order_event.short_selling_allowed
}
}
Expand Down

0 comments on commit abe3f48

Please sign in to comment.