How to create new addess for same wallet?

Is that possible to create new address for the same wallet as it done for bitcoin?

I see that shapeshift.io creates new address for each new transaction and cant figure out how they do it.

The only method in API that I see is https://nemproject.github.io/#generating-new-account-data - but there not just address being generated, even private key.

for bitcoin it also generates a new private key. It’s always a KeyPair composed of a private key and a public key.

Shapeshift probably uses wallet derivation paths (BIP32) and creates hierarchies of accounts (as usually done with bitcoin and others).

They could also be using their own node and simply call the API request you forwarded above to create new accounts.

Creating them over the network might be something you wish to avoid though.

So here a possible solution in PHP: https://github.com/evias/nem-php/blob/master/src/Core/KeyPair.php

It is basically the PHP version of the nem.core implementation which you will find a little more detailed (with its own Ed25519 wrapper and Keccak hashing implementation).