Confirming a transaction from Python?
I'm writing a script to process transactions using a Python script. Is there a way to get the Confirmed/Unconfirmed state of a transaction? I'd like the script to not process transactions that are already confirmed. Also is there a way to set a transaction as Confirmed? I'm trying to avoid doing that manually after.
I tried looking at getStatus(), but that seems to always return 40 and I can't seem to find what the status actually means in the Java developer documentation
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by J on 19 Feb, 2019 06:30 AM
OK.So I think I found part of the answer. txn.isNew() seems yield confirmed/unconfirmed status from what I can tell.
There doesn't seem to be a way to change isNew to False??
(Still not clear what getStatus() is for?)
Support Staff 2 Posted by Sean Reilly on 19 Feb, 2019 11:35 PM
Hi J,
Great questions! You're right about the meaning of
isNew()
and you can also usesetIsNew(false)
to mark a transaction as confirmed.As for
getStatus()
, that has a bit of documentation here: https://infinitekind.com/dev/apidoc/com/infinitekind/moneydance/mod... but the short answer is that it is the old version ofgetClearedStatus()
and should really be marked as deprecated.Thanks,
Sean Reilly
Developer, The Infinite Kind
http://infinitekind.com
3 Posted by J on 20 Feb, 2019 03:51 AM
Thanks for the response. So I tried txn.setIsNew(False) and that works well. Is there a reason that setIsNew isn't documented?
Had another question...what do I feed into setClearedStatus()? I see it wants AbstractTxn.ClearedStatus, but I'm not sure how to create something in Python set this value. I'd like to be able to set the CLEARED, RECONCILING, UNRECONCILED state from Python as well.
4 Posted by Jim C on 26 Feb, 2019 04:44 AM
(Bumping my own thread...)
Any thoughts on:
how to setClearedStatus() in Python? I see it wants
AbstractTxn.ClearedStatus, but I'm not sure how to create something in
Python set this value. I'd like to be able to set the CLEARED, RECONCILING,
UNRECONCILED state from Python as well.
System closed this discussion on 28 May, 2019 04:50 AM.