zhouaini528 / binance-php

Binance API Like the official document interface, Support for arbitrary extension.
MIT License
107 stars 43 forks source link

websocket #32

Open tudoavinfo opened 2 years ago

tudoavinfo commented 2 years ago

Connection refused {"exception":"[object] (Exception(code: 0): Connection refused at /var/www/ltdempire/vendor/workerman/globaldata/src/Client.php:69)

wooly-booly commented 2 years ago

+1 same error

zhouaini528 commented 2 years ago

@tudoavinfo @wooly-booly Is there a more detailed code example?

tudoavinfo commented 2 years ago

solved it was bad formatting of the sent data

tudoavinfo commented 2 years ago

But on the server I have this error:

`Call to undefined function GuzzleHttp\Psr7\uri_for()

at public_html/vendor/ratchet/pawl/src/Connector.php:126 122▕ @throws \InvalidArgumentException 123▕ @return \Psr\Http\Message\RequestInterface 124▕ */ 125▕ protected function generateRequest($url, array $subProtocols, array $headers) { ➜ 126▕ $uri = gPsr\uri_for($url); 127▕ 128▕ $scheme = $uri->getScheme(); 129▕ 130▕ if (!in_array($scheme, ['ws', 'wss'])) {`

zhouaini528 commented 2 years ago

But on the server I have this error:

`Call to undefined function GuzzleHttp\Psr7\uri_for()

at public_html/vendor/ratchet/pawl/src/Connector.php:126 122▕ @throws \InvalidArgumentException 123▕ @return \Psr\Http\Message\RequestInterface 124▕ */ 125▕ protected function generateRequest($url, array $subProtocols, array $headers) { ➜ 126▕ $uri = gPsr\uri_for($url); 127▕ 128▕ $scheme = $uri->getScheme(); 129▕ 130▕ if (!in_array($scheme, ['ws', 'wss'])) {`

I don't know the reason for this error. I used GuzzleHttp. I guess if it is a problem with the PHP environment?