Help Center/
Web3 Node Engine Service/
Developer Guide/
BNB Smart Chain/
BNB Smart Chain APIs/
Shared Edition/
net_version
Updated on 2024-11-14 GMT+08:00
net_version
Introduction
This API returns the current network ID. It consumes 107 CUs.
Parameter Description
This method does not accept any parameters.
Return Value
Object: The string value of current network ID. Typical values are as follows:
- 1 - ethereum mainnet
- 2 - morden testnet (deprecated)
- 3 - ropsten testnet
- 4 - rinkeby testnet
- 5 - goerli testnet
- 11155111 - sepolia testnet
- 10 - optimism mainnet
- 69 - optimism kovan testnet
- 42 - kovan testnet
- 137 - matic/polygon mainnet
- 80001 - matic/polygon mumbai testnet
- 250 - fantom mainnet
- 100 - xdai mainnet
- 56 - bsc mainnet
Request
curl https://your-http-endpoint/v1/<API-KEY> \ -X POST \ -H "Content-Type: application/json" \ --data '{"method":"net_version","params":[],"id":1,"jsonrpc":"2.0"}'
Parent topic: Shared Edition
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot