Hello Matthieu!
I love this idea and your solution. I am wondering what happens if you push the same transaction twice, or if you push a transaction that already exists? Does YNAB kill the pushed duplicate, or would you have to handle this yourself?
I'm working on a related project bank2ynab and we are thinking about using the YNAB API. Instead of starting from scratch, perhaps it would be smarter to integrate your solution.
Regards from Austria!
-Ben