How can i subscribe to the new pending transactions of polkadot by using substrate interface python
Another angle, I think it's difference in terminology here. What you probably mean by coming from Ethereum is that pending transactions are transactions that are not yet 'finalized` in Substrate.
Finalized means it can never ever change. In a POW chain you work with confirmations, which gives you some kind certainty, in Substrate you have finality and give you absolute certainty.
This is different than the 'pending extrinsics' in Substrate, which means extrinsics in the tx pool, not yet including in a block.
What you probably want to know is which extrinsics are not yet finalized. So you just retrieve the finalized block_number:
result = substrate.get_block_header(finalized_only=True) finalized_block_number = result['header']['number']
And any extrinsic in block height higher than that is a pending (unfinalized) extrinsic.