Qluxzz / avanza

A Python library for the unofficial Avanza API
https://qluxzz.github.io/avanza/
MIT License
85 stars 40 forks source link

[#103]: Extend StopLossTrigger model. #104

Closed wenrir closed 2 weeks ago

wenrir commented 3 weeks ago

Close #103 .

Overview

Extend StopLossTrigger to use valueType and triggerOnMarketMakerQuote.

Require valueType Optional triggerOnMarketMakerQuote (Defaults to False)

Avanza API endpoint call

POST to https://www.avanza.se/_api/trading-critical/rest/stoploss/new

...
"stopLossTrigger":
{"type":"FOLLOW_UPWARDS",
"value":15,
"valueType":"PERCENTAGE",
"validUntil":"2024-07-19",
"triggerOnMarketMakerQuote":false
}
...
Qluxzz commented 2 weeks ago

LGTM, thanks for contributing!