eth_sendRawTransaction error by websocket

this is my code
signed_transaction = my_account.signTransaction(transaction)
playload = {“jsonrpc”: “2.0”, “method”: “eth_sendRawTransaction”, “chainid”:56, “params”: [signed_transaction.rawTransaction], “id”: 20}
await websocket.send(Web3.toJSON(playload))

websocket response:
{‘id’: 20, ‘jsonrpc’: ‘2.0’, ‘error’: {‘code’: -32000, ‘message’: ‘invalid chainID 0’}}

so, chainID add where?

Hey xk :wave:,

What chain is this for?

-Nick

bsc bsc bsc bsc bsc bsc bsc bsc chain

Hi,

You can get the chain id using eth_chainId, save it in a variable, and then pass the variable.

Another suggestion would be to send transactions using the HTTPS Provider instead of WSS Provider.