Giter Site home page Giter Site logo

Connectivity issue about bybit-php HOT 10 CLOSED

zhouaini528 avatar zhouaini528 commented on July 18, 2024
Connectivity issue

from bybit-php.

Comments (10)

zhouaini528 avatar zhouaini528 commented on July 18, 2024

Thank you for your discovery. I need to check it. Please wait a moment.

from bybit-php.

vlavani avatar vlavani commented on July 18, 2024

Ok thank you so much. Really appreciate the work you have put into creating api access for many exchanges.

from bybit-php.

zhouaini528 avatar zhouaini528 commented on July 18, 2024

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.

from bybit-php.

vlavani avatar vlavani commented on July 18, 2024

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?

from bybit-php.

zhouaini528 avatar zhouaini528 commented on July 18, 2024

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

from bybit-php.

vlavani avatar vlavani commented on July 18, 2024

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

from bybit-php.

zhouaini528 avatar zhouaini528 commented on July 18, 2024

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

from bybit-php.

zhouaini528 avatar zhouaini528 commented on July 18, 2024

Demo test https://github.com/zhouaini528/bybit-php/blob/master/tests/inverse/publics.php

from bybit-php.

vlavani avatar vlavani commented on July 18, 2024

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.

from bybit-php.

vlavani avatar vlavani commented on July 18, 2024

Nevermind got it working thank you so much for your help and resources !

from bybit-php.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.