Closed vlavani closed 3 years ago
Thank you for your discovery. I need to check it. Please wait a moment.
Ok thank you so much. Really appreciate the work you have put into creating api access for many exchanges.
Hello, I did not find the error you described. What kind of error is it? I am running in php-cli mode, not running under URL in php-fpm mode.
Ah ok, when i try to run in CLI i get
PHP Parse error: syntax error, unexpected ''../../../vendor/autoload.php'' (T_CONSTANT_ENCAPSED_STRING) in /var/www/html/bybit-php/tests/inverse/publics.php on line 7
Is there any way to run in URL?
You first try to get the data in php-cli mode. See your error may be the path problem, you wait for me to write a URL test
Ok thank you so much. I will wait for a URL test and play around with current stage to see if i can get it to work. Thank you so much
Hello, I just finished the URl test just now.
require __DIR__ .'/vendor/autoload.php';
use \Lin\Bybit\BybitInverse;
$bybit=new BybitInverse();
try {
$result=$bybit->publics()->getOrderBookL2([
'symbol'=>'BTCUSD'
]);
print_r(json_encode($result));
}catch (\Exception $e){
print_r($e->getMessage());
}
try {
$result=$bybit->publics()->getKlineList([
'symbol'=>'BTCUSD',
'interval'=>'15',
'from'=>time()-3600,
]);
print_r(json_encode($result));
}catch (\Exception $e){
print_r($e->getMessage());
}
try {
$result=$bybit->publics()->getTickers();
print_r(json_encode($result));
}catch (\Exception $e){
print_r($e->getMessage());
}
The test url http://161.117.186.61:8089/a.php
hm, still getting errors running.
Cloned repo > composer require linwj/bybit > https://myip.com/bybit-php/tests/inverse/publics.php
Which causes an error. Page does not load.
Nevermind got it working thank you so much for your help and resources !
Hello i currently cloned the repo and ran composer require linwj/bybit
in my VPS when i go to run the test to see even public data endpoints i get errors. This is how i load in my URL
myurl.com/bybit-php/tests/inverse/publics.php