getTokenBalances - http 400 - error 141 for a wallet with 3000 tokens [UNSOLVED]

Hi all,

Iโ€™ve been trying to get Transactions of a big wallet with 3000 erc tokens, 10.000.000+ transactions.
I receive http error 400 with response:

Error {"message": "[object object]", "code":141}
address in question: 0x631fc1ea2270e98fbd9d92658ece0f5a269aa161

Please advice :slight_smile:

let tAddress = '0x631fc1ea2270e98fbd9d92658ece0f5a269aa161';

Moralis.Web3API.account.getTokenBalances({ chain: 'bsc', address: tAddress }).then(function (tokens) {
    ///check for length and process
}).catch(function (error) {
    console.log('getTokenbalances Error: ');
    console.log(error);
});

Moralis.Web3API.account.getTransactions({ chain: 'bsc', address: tAddress }) .then(function (transactions) {
    //check for length and process
}).catch(function (error) {
    console.log('getTransactions Error: ');
    console.log(error);
});

Hi,
Moralis.Web3API.account.getTransactions looks to work fine now,
I get: {total: 10642373, page: 0, page_size: 500, result: Array(500)}
Moralis.Web3API.account.getTokenBalances still gives an error.

2 Likes

Thank you very much for your response!

Is there anything I can do? Or is it something on the backend of the server?

I donโ€™t think that it is something you can do now, it looks to be something on the backend. We will check.

1 Like

Alright, weโ€™ll wait and hope itโ€™s found and resolved soon :slight_smile:
Thanks for your update!

please let me know when itโ€™s resolved :slight_smile: thanks!

get token balances still gives error 400 :frowning:
my best guess is a timeout and gettokenbalances should have an pagination as well

we need more time until we are going to fix this, some refactoring needs to be done

1 Like