Empty response even if mosaics are present under namespace

Hello,

I’m using /namespace/mosaic/definition/page?namespace=namespaceName this API to retrieve all the mosaics under given namespace. But for some of the namespaces, it returns empty even if mosaics are present.

For example,
“namespaceId”: “imre.g”,
“name”: “tokens”

HTTP Response:
{
“data”: []
}

Why this?

It’s because namespace imre expired.
If namespace will expire all mosaics in it are no longer transferable and balances are removed from accounts.

Is there any other way or API to get that information then?
I want to calculate balance deduction from account. And if transaction is of mosaic transfer and levy is configured then levy fee should be deducted from the sender so

In such a case, how explorers are showing this even after deletion?

@CryptoBeliever Can you please help?

In such a case, how explorers are showing this even after deletion?

I think there are two possibilities:

  1. Explorer is using as the source node db (h2 db)
  2. Mosaics definition information is created during loading mosaics transactions

You can try to ask explorer author Explorer.ournem.com - Feedback

Hi,

Is there any way to get the mosaic definitions at a particular block height?

If the mosaic is expired at 100th block height and created again with the same name but a different definition, and if I fetch the information now then it will give me the latest one not the one which was there before the 100th block and this will cause balance mismatch for the <100 blocks.

@CryptoBeliever Could you please help here?

No (afaik). You have do as described here: Mosaic levy fee at a particular blockheight - #2 by CryptoBeliever

Ok, Thanks!