Socket error : HTTP/ 1.1.451

Error while trading on API for spot market.
Tried to create new API and run. But same error continues.

Error is - socket error : http/ 1.1.451

04:22:04.601683 Socket error: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a send to call) no address was supplied

According to the error message you didn’t provide address and it failed to connect to the websocket.
Try to debug each step to understand what’s happening. If you’re still unable to detect the error, share here all the steps so that it’s reproducible on our side for us to check further.

1 Like

Okay thanks, Let me check step by step.
But why do I get error 451? This error stands ‘unavailable for legal reasons’.

Regarding HTTP status code of 451 or an error message like:

Service unavailable from a restricted location according to ‘b. Eligibility

this is because some regions/areas may be restricted to access some products or services. For example, US residents are not allowed to access Binance.com . If you have trading client in US, please consider trading on Binance.us .

Please feel free to review the b.Eligibility from https://www.binance.com/en/terms .