I have a small seed for testing using the Python API, linking to a local CarrIOTA node. The seed has only one used address.

If I run get_account_data(), the balance shows as 0 since I haven't reattached any transactions yet.

With get_inputs(start=0, stop=1,threshold=0), I can see the Address and totalBalance that I want to reattach, but how can I find the transaction info so I can use attach_to_tangle?

get_balances(address) gives me the address, balance, a reference (which seems to be the same for all addresses), the current milestoneIndex, and 'milestone'=None. and find_transactions(address) returns an empty hash.


2 Answers 2


Following from the light wallet:

https://github.com/iotaledger/wallet/blob/4a50e49c15c76ec57793614eafaa2edf54352927/ui/js/ui.addresses.js#L55 https://github.com/iotaledger/wallet/blob/4a50e49c15c76ec57793614eafaa2edf54352927/ui/js/ui.addresses.js#L77

and the cli-wallet (line 41): https://github.com/iotaledger/cli-app/blob/master/lib/commands/address.js

it seems that when you press generate address, get_new_addresses is called, and then a 0 value transfer is sent from the address to itself while you are waiting for "attaching to tangle"

I ran:

adds = api.get_new_addresses(0,1)['addresses']

  depth = 3,
  transfers = [
      address = Address(adds[0],),
      value = 0,

which returned:

{u'bundle': <iota.transaction.base.Bundle object at 0xXXXXX>}

Additionally, get_transfers(0,1) now shows a bundle!


If your transaction confirmed, there is no need to reattach it after the snapshot.

If it did not confirm, you'd have to create a new transaction.

Anyway all transactions are "gone" now, so if you did not store the trytes before the snapshot, there is no way to reattach them now via API.

  • Is there an API equivalent to the generate address/attach process that you have to do manually using a light wallet? How does the light wallet grab the pre-snapshot balances? The transaction confirmed and was available well before the snapshot. Jan 30, 2018 at 21:04
  • In: github.com/iotaledger/wallet/blob/… github.com/iotaledger/wallet/blob/… It seems that the wallet sends a 0 value transaction to itself and then shows "attaching to tangle". I wander whether this would work, but I would rather not lose the balance completely Jan 30, 2018 at 21:17
  • yes, that works. Just send 0 value transactions to all your addresses and the wallet will see the balance again. The balance is still there for other tools to use even without reattaching.
    – mihi
    Jan 30, 2018 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.