Qluxzz / avanza

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

[Suggestion] Add support for `value_type` and `triggerOnMarketMakerQuote` in StopLossTrigger #103

Closed wenrir closed 2 weeks ago

wenrir commented 3 weeks ago

The StopLossTrigger endpoint _api/trading-critical/rest/stoploss/new has the following fields:

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

StopLossTrigger supports type, value and valid_until.

I will raise a PR with implementation suggestion.