jaggedsoft / php-binance-api

PHP Binance API is an asynchronous PHP library for the Binance API designed to be easy to use. https://github.com/binance-exchange/php-binance-api
MIT License
604 stars 496 forks source link

websockets not working local #112

Closed wingmanAT closed 6 years ago

wingmanAT commented 6 years ago

Hi, I've installed your API on my local machine. I've installed the newest version of XAMPP with PHP 7.2.4. I've installed composer through the installer-file, selected the right file for php.exe.

Xampp is working, I build a script and I am able to access data through the rest-api. But nothing works with the websockets.api, even the example-files are not working.

Here are the errors I get:

From the web_socket_chart.php (example-file) I got this error: Fatal error: Uncaught Error: Class 'React\EventLoop\Factory' not found in E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api\php-binance-api.php:1200 Stack trace: #0 E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api\examples\web_socket_chart.php(13): Binance\API->chart(Array, '15m', Object(Closure)) #1 {main} thrown in E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api\php-binance-api.php on line 1200

If I try the web_socket_depth.php I get this: Fatal error: Uncaught Error: Class 'React\EventLoop\Factory' not found in E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api\php-binance-api.php:1106 Stack trace: #0 E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api\examples\web_socket_depth.php(18): Binance\API->depthCache(Array, Object(Closure)) #1 {main} thrown in E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api\php-binance-api.php on line 1106

I can't access any of the websocket-data. Maybe you can give me a hint?

Thank you.

dmzoneill commented 6 years ago

What is the output of

composer -vvv install

In the same folder as composer.json

wingmanAT commented 6 years ago

This one:

Reading ./composer.json Loading config file ./composer.json Checked CA file E:\xampp7\apache\bin\curl-ca-bundle.crt: valid Executing command (E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api): git branch --no-color --no-abbrev -v Executing command (E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api): git describe --exact-match --tags Executing command (E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api): git log --pretty="%H" -n1 HEAD Executing command (E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api): hg branch Executing command (E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api): fossil branch list Executing command (E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api): fossil tag list Executing command (E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api): svn info --xml Failed to initialize global composer: Composer could not find the config file: C:/Users/human/AppData/Roaming/Composer/composer.json To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section Running 1.6.3 (2018-01-31 16:28:17) with PHP 7.2.3 on Windows NT / 10.0 Loading composer repositories with package information Downloading https://api.github.com/repos/jaggedsoft/php-binance-api Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=master Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/master Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/tags?per_page=100 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/git/refs/heads?per_page=100 Reading composer.json of jaggedsoft/php-binance-api (v0.2.6) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=f379c03ee214f9bd0300d30d948f8ed02ec2c27e Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/f379c03ee214f9bd0300d30d948f8ed02ec2c27e Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/f379c03ee214f9bd0300d30d948f8ed02ec2c27e into cache Importing tag v0.2.6 (0.2.6.0) Reading composer.json of jaggedsoft/php-binance-api (v0.2.5) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=0667f3d85bbd3a0c7afab2201814c1207941b113 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/0667f3d85bbd3a0c7afab2201814c1207941b113 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/0667f3d85bbd3a0c7afab2201814c1207941b113 into cache Importing tag v0.2.5 (0.2.5.0) Reading composer.json of jaggedsoft/php-binance-api (v0.2.4) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=0b7d96bf80a98b805d7f1ad16e5f6f75e655da13 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/0b7d96bf80a98b805d7f1ad16e5f6f75e655da13 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/0b7d96bf80a98b805d7f1ad16e5f6f75e655da13 into cache Importing tag v0.2.4 (0.2.4.0) Reading composer.json of jaggedsoft/php-binance-api (v0.2.3) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=8943fb11d6a6e1473190f441c0be6c2c84838a45 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/8943fb11d6a6e1473190f441c0be6c2c84838a45 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/8943fb11d6a6e1473190f441c0be6c2c84838a45 into cache Importing tag v0.2.3 (0.2.3.0) Reading composer.json of jaggedsoft/php-binance-api (v0.2.2) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=4ea6bbb36e3681efe941cfb04925421addc2140f Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/4ea6bbb36e3681efe941cfb04925421addc2140f Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/4ea6bbb36e3681efe941cfb04925421addc2140f into cache Importing tag v0.2.2 (0.2.2.0) Reading composer.json of jaggedsoft/php-binance-api (v0.2.1) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=c8e492fb71d80a3a018ce9a2cb82f47311070b5f Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/c8e492fb71d80a3a018ce9a2cb82f47311070b5f Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/c8e492fb71d80a3a018ce9a2cb82f47311070b5f into cache Importing tag v0.2.1 (0.2.1.0) Reading composer.json of jaggedsoft/php-binance-api (v0.2.0) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=c5d9101174c5b29d1707498f821b80f4b12d770d Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/c5d9101174c5b29d1707498f821b80f4b12d770d Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/c5d9101174c5b29d1707498f821b80f4b12d770d into cache Importing tag v0.2.0 (0.2.0.0) Reading composer.json of jaggedsoft/php-binance-api (v0.1.11) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=641f70a40c2c80245bc8aee4b1fec7cdf92af3cc Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/641f70a40c2c80245bc8aee4b1fec7cdf92af3cc Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/641f70a40c2c80245bc8aee4b1fec7cdf92af3cc into cache Importing tag v0.1.11 (0.1.11.0) Reading composer.json of jaggedsoft/php-binance-api (v0.1.10) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=f753a9bdfbb13f7b89f330f3830f4cf2dc253522 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/f753a9bdfbb13f7b89f330f3830f4cf2dc253522 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/f753a9bdfbb13f7b89f330f3830f4cf2dc253522 into cache Importing tag v0.1.10 (0.1.10.0) Reading composer.json of jaggedsoft/php-binance-api (v0.1.9) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=89a32fcbe96f7a8d495c8abd145ec89f812254eb Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/89a32fcbe96f7a8d495c8abd145ec89f812254eb Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/89a32fcbe96f7a8d495c8abd145ec89f812254eb into cache Importing tag v0.1.9 (0.1.9.0) Reading composer.json of jaggedsoft/php-binance-api (v0.1.8) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=2e357397f06532933a6cac7a87eb2a797c089c82 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/2e357397f06532933a6cac7a87eb2a797c089c82 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/2e357397f06532933a6cac7a87eb2a797c089c82 into cache Importing tag v0.1.8 (0.1.8.0) Reading composer.json of jaggedsoft/php-binance-api (v0.1.7) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=09011880abfa68b0d222f364e1c3c5636d41038f Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/09011880abfa68b0d222f364e1c3c5636d41038f Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/09011880abfa68b0d222f364e1c3c5636d41038f into cache Importing tag v0.1.7 (0.1.7.0) Reading composer.json of jaggedsoft/php-binance-api (v0.1.6) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=788ec48c7b512f7b794e0e2756e59ba28a14ef86 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/788ec48c7b512f7b794e0e2756e59ba28a14ef86 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/788ec48c7b512f7b794e0e2756e59ba28a14ef86 into cache Importing tag v0.1.6 (0.1.6.0) Reading composer.json of jaggedsoft/php-binance-api (v0.1.5) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=e47f0d2131301d929532bcc0d7cc5d2ece181f23 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/e47f0d2131301d929532bcc0d7cc5d2ece181f23 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/e47f0d2131301d929532bcc0d7cc5d2ece181f23 into cache Importing tag v0.1.5 (0.1.5.0) Reading composer.json of jaggedsoft/php-binance-api (v0.1.4) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=2e8e16418d8a1a599c176bdda778c7706d92eef3 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/2e8e16418d8a1a599c176bdda778c7706d92eef3 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/2e8e16418d8a1a599c176bdda778c7706d92eef3 into cache Importing tag v0.1.4 (0.1.4.0) Reading composer.json of jaggedsoft/php-binance-api (v0.1.3) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=f93f435a87d48b225879be69643c224f88b1e471 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/f93f435a87d48b225879be69643c224f88b1e471 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/f93f435a87d48b225879be69643c224f88b1e471 into cache Importing tag v0.1.3 (0.1.3.0) Reading composer.json of jaggedsoft/php-binance-api (v0.1.2) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=a8804eb95a6104ae830723c0110ff0bcda46407d Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/a8804eb95a6104ae830723c0110ff0bcda46407d Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/a8804eb95a6104ae830723c0110ff0bcda46407d into cache Importing tag v0.1.2 (0.1.2.0) Reading composer.json of jaggedsoft/php-binance-api (v0.1.1) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=a089f600e2c7bc6b0c4e9c27e9d7487369df955e Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/a089f600e2c7bc6b0c4e9c27e9d7487369df955e Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/a089f600e2c7bc6b0c4e9c27e9d7487369df955e into cache Importing tag v0.1.1 (0.1.1.0) Reading composer.json of jaggedsoft/php-binance-api (v0.1.0) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=a3af1f4d03757bd93aa47dc62dc64be1606dcb17 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/a3af1f4d03757bd93aa47dc62dc64be1606dcb17 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/a3af1f4d03757bd93aa47dc62dc64be1606dcb17 into cache Importing tag v0.1.0 (0.1.0.0) Reading composer.json of jaggedsoft/php-binance-api (v0.0.17) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=f56ffe99271cb1b35df4f286ffff9a09ec82b8eb Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/f56ffe99271cb1b35df4f286ffff9a09ec82b8eb Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/f56ffe99271cb1b35df4f286ffff9a09ec82b8eb into cache Importing tag v0.0.17 (0.0.17.0) Reading composer.json of jaggedsoft/php-binance-api (v0.0.16) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=b5fcc5b08587cda84443280c57d1c4ed3c3463d8 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/b5fcc5b08587cda84443280c57d1c4ed3c3463d8 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/b5fcc5b08587cda84443280c57d1c4ed3c3463d8 into cache Importing tag v0.0.16 (0.0.16.0) Reading composer.json of jaggedsoft/php-binance-api (v0.0.15) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=696d9cc6ffdc8e0d054ebf225c2107434b842500 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/696d9cc6ffdc8e0d054ebf225c2107434b842500 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/696d9cc6ffdc8e0d054ebf225c2107434b842500 into cache Importing tag v0.0.15 (0.0.15.0) Reading composer.json of jaggedsoft/php-binance-api (v0.0.14) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=be2bb60742abea3ec304cf78df50e301723d7d6c Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/be2bb60742abea3ec304cf78df50e301723d7d6c Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/be2bb60742abea3ec304cf78df50e301723d7d6c into cache Importing tag v0.0.14 (0.0.14.0) Reading composer.json of jaggedsoft/php-binance-api (v0.0.13) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=80ca7bdd8a5f46b34ffe78e32dcde75c6e3006b7 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/80ca7bdd8a5f46b34ffe78e32dcde75c6e3006b7 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/80ca7bdd8a5f46b34ffe78e32dcde75c6e3006b7 into cache Importing tag v0.0.13 (0.0.13.0) Reading composer.json of jaggedsoft/php-binance-api (v0.0.12) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=8f8d989b715e0b6253f8faf9f1e4048c12e95898 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/8f8d989b715e0b6253f8faf9f1e4048c12e95898 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/8f8d989b715e0b6253f8faf9f1e4048c12e95898 into cache Importing tag v0.0.12 (0.0.12.0) Reading composer.json of jaggedsoft/php-binance-api (v0.0.11) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=ed531e66f9b1aae4a9de3967136bb094c4cc0ffb Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/ed531e66f9b1aae4a9de3967136bb094c4cc0ffb Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/ed531e66f9b1aae4a9de3967136bb094c4cc0ffb into cache Importing tag v0.0.11 (0.0.11.0) Reading composer.json of jaggedsoft/php-binance-api (v0.0.10) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=e25dd24ca612f38834b51f10b64cd1c031526422 Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/e25dd24ca612f38834b51f10b64cd1c031526422 Writing C:/Users/human/AppData/Local/Composer/repo/github.com/jaggedsoft/php-binance-api/e25dd24ca612f38834b51f10b64cd1c031526422 into cache Importing tag v0.0.10 (0.0.10.0) Reading composer.json of jaggedsoft/php-binance-api (v0.0.9) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=283e30758ab5dc22896bc5b71050f7353eac074a Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/commits/283e30758ab5dc22896bc5b71050f7353eac074a

Could not fetch https://api.github.com/repos/jaggedsoft/php-binance-api/commits/283e30758ab5dc22896bc5b71050f7353eac074a, please create a GitHub OAuth token to go over the API rate limit Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+Sergiu-PC+2018-04-15+1318 to retrieve a token. It will be stored in "C:/Users/human/AppData/Roaming/Composer/auth.json" for future use by Composer. Token (hidden): No token given, aborting. You can also add it manually later by using "composer config --global --auth github-oauth.github.com " Skipped tag v0.0.9, no composer file was found Reading composer.json of jaggedsoft/php-binance-api (v0.0.8) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=c9d026532bb1f337a62f04e3a1a2113425c0c900

Could not fetch https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=c9d026532bb1f337a62f04e3a1a2113425c0c900, please create a GitHub OAuth token to go over the API rate limit Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+Sergiu-PC+2018-04-15+1319 to retrieve a token. It will be stored in "C:/Users/human/AppData/Roaming/Composer/auth.json" for future use by Composer. Token (hidden): Downloading https://api.github.com/ Invalid token provided. You can also add it manually later by using "composer config --global --auth github-oauth.github.com " Skipped tag v0.0.8, no composer file was found Reading composer.json of jaggedsoft/php-binance-api (v0.0.7) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=76b7b529abfc6a451151b6aa62c1e7cd964abd25

Could not fetch https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=c9d026532bb1f337a62f04e3a1a2113425c0c900, please create a GitHub OAuth token to go over the API rate limit Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+Sergiu-PC+2018-04-15+1319 to retrieve a token. It will be stored in "C:/Users/human/AppData/Roaming/Composer/auth.json" for future use by Composer. Token (hidden): Downloading https://api.github.com/ Invalid token provided. You can also add it manually later by using "composer config --global --auth github-oauth.github.com " Skipped tag v0.0.8, no composer file was found Reading composer.json of jaggedsoft/php-binance-api (v0.0.7) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=76b7b529abfc6a451151b6aa62c1e7cd964abd25

Could not fetch https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=76b7b529abfc6a451151b6aa62c1e7cd964abd25, please create a GitHub OAuth token to go over the API rate limit Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+Sergiu-PC+2018-04-15+1319 to retrieve a token. It will be stored in "C:/Users/human/AppData/Roaming/Composer/auth.json" for future use by Composer. Token (hidden): No token given, aborting. You can also add it manually later by using "composer config --global --auth github-oauth.github.com " Skipped tag v0.0.7, no composer file was found Reading composer.json of jaggedsoft/php-binance-api (v0.0.6) Downloading https://api.github.com/repos/jaggedsoft/php-binance-api/contents/composer.json?ref=57610d5014c1443de6679bde59c1530b5a1ce14e

and so on. Never ending?

dmzoneill commented 6 years ago

Did you follow the instructions to create the token, to get passed the rate limit and download the remaining dependancies?

wingmanAT commented 6 years ago

ok. i deinstalled everything and installed again. I have this folder structure: here is my project: E:\xampp7\htdocs\binance\ I navigate to this folder inside of the console and called

composer require "jaggedsoft/php-binance-api @dev"

he creates a composer.json file and many subfolders:

E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api\

inside of the last folder there is also a composer.json. is this correct? I run this file http://localhost/binance/vendor/jaggedsoft/php-binance-api/examples/web_socket_chart.php

and he says:

Warning: require(php-binance-api.php): failed to open stream: No such file or directory in E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api\examples\web_socket_chart.php on line 3

Fatal error: require(): Failed opening required 'php-binance-api.php' (include_path='E:\xampp7\php\PEAR') in E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api\examples\web_socket_chart.php on line 3

why is he trying to include from php\PEAR? ... Inside of the installation process of composer he asked me where the php.exe is. This file is inside of E:\xampp7\php\ ... is this the "problem"?...

if I call inside of my project-folder: E:\xampp7\htdocs\binance\

composer -vvv install

he says this:

E:\xampp7\htdocs\binance>composer -vvv install Reading ./composer.json Loading config file ./composer.json Checked CA file E:\xampp7\apache\bin\curl-ca-bundle.crt: valid Executing command (E:\xampp7\htdocs\binance): git branch --no-color --no-abbrev -v Executing command (E:\xampp7\htdocs\binance): git describe --exact-match --tags Executing command (E:\xampp7\htdocs\binance): git log --pretty="%H" -n1 HEAD Executing command (E:\xampp7\htdocs\binance): hg branch Executing command (E:\xampp7\htdocs\binance): fossil branch list Executing command (E:\xampp7\htdocs\binance): fossil tag list Executing command (E:\xampp7\htdocs\binance): svn info --xml Failed to initialize global composer: Composer could not find the config file: C:/Users/human/AppData/Roaming/Composer/composer.json To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section Reading E:\xampp7\htdocs\binance/vendor/composer/installed.json Running 1.6.4 (2018-04-13 12:04:24) with PHP 7.2.3 on Windows NT / 10.0 Reading ./composer.lock Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Reading ./composer.lock Resolving dependencies through SAT Dependency resolution completed in 0.001 seconds Analyzed 74 packages to resolve dependencies Analyzed 150 rules to resolve dependencies Nothing to install or update Generating autoload files

so everything is fine, but he is doing something weird...

wingmanAT commented 6 years ago

EDIT: I got it done.

I copied all files outside of E:\xampp7\htdocs\binance\vendor\jaggedsoft\php-binance-api\

directly to my folder: E:\xampp7\htdocs\binance\

even the examples have false link structre inside. If I copy them inside of my main folder (outside of the examples folder), they are working. Now he is able to pull data from web_socket_chart.php

oh guys.... this is complicated for no reason. Just put the files online and make them downloadable. All this installation process with false paths is not needed. But good work indeed! Thank you for helping!

jaggedsoft commented 6 years ago

Hmm, I just installed it on a brand new $5 VPS and it installed and required fine. Not sure why you ran into problems but thanks for reporting it and glad to hear you are up and running.