Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wss://ws-mainnet-node.huobichain.com response code: 403 #11

Closed
biluochun opened this issue Mar 8, 2021 · 3 comments
Closed

wss://ws-mainnet-node.huobichain.com response code: 403 #11

biluochun opened this issue Mar 8, 2021 · 3 comments

Comments

@biluochun
Copy link

new Web3('wss://ws-mainnet-node.huobichain.com');
// WebSocket connection to 'wss://ws-mainnet-node.huobichain.com/' failed: Error during WebSocket handshake: Unexpected response code: 403
@kevinho
Copy link
Contributor

kevinho commented Mar 9, 2021

i think the usage is incorrect:

const Web3 = require('web3')
const www =  new Web3(new Web3.providers.WebsocketProvider("wss://ws-mainnet-node.huobichain.com"));

async function f1(){
    const balance = await www.eth.getBalance("0x03245922d9dc42d12F6d07013146C986a4d0Aa86");
    console.log(balance)
}
f1()

@kevinho kevinho closed this as completed Mar 9, 2021
@biluochun
Copy link
Author

WebSocket connection to 'wss://ws-mainnet-node.huobichain.com/' failed: Error during WebSocket handshake: Unexpected response code: 403

i think the usage is incorrect:

const Web3 = require('web3')
const www =  new Web3(new Web3.providers.WebsocketProvider("wss://ws-mainnet-node.huobichain.com"));

async function f1(){
    const balance = await www.eth.getBalance("0x03245922d9dc42d12F6d07013146C986a4d0Aa86");
    console.log(balance)
}
f1()

@woshidama323
Copy link

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants