8000 Bibox exchange does not support fetchTickers · Issue #2203 · ccxt/ccxt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bibox exchange does not support fetchTickers #2203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
forexhill opened this issue Mar 10, 2018 · 4 comments
Closed

Bibox exchange does not support fetchTickers #2203

forexhill opened this issue Mar 10, 2018 · 4 comments
Assignees
Labels

Comments

@forexhill
Copy link

Bibox exchange does not support fetchTickers as can be seen from https://github.com/Biboxcom/api_reference/wiki/api_reference as well as by testing (an empty array is returned whereas fetchTicker works fine). Thus;

'fetchTickers' => true, to be changed to 'fetchTickers' => false, in ccxt/php/bibox.php

Thank you

@kroitor kroitor self-assigned this Mar 10, 2018
@kroitor
Copy link
Member
kroitor commented Mar 10, 2018

Hey!)

mbp:ccxt igorkroitor$ php -f examples/php/cli.php bibox fetch_tickers
./keys.local.json
bibox->fetch_tickers ()
Array
(
    [BIX/BTC] => Array
        (
            [symbol] => BIX/BTC
            [timestamp] => 1520656397
            [datetime] => 1970-01-18T14:24:16.397+00:00
            [high] => 6.021E-5
            [low] => 5.155E-5
            [bid] =>
            [ask] =>
            [vwap] =>
            [open] =>
            [close] =>
            [first] =>
            [last] => 5.681E-5
            [change] =>
            [percentage] => -5.36%
            ...

It does work normally for me. Try it yourself with the script above (examples/php/cli.php). Let us know if it does not help. Thx!

@kroitor kroitor closed this as completed Mar 10, 2018
@forexhill
Copy link
Author

Hey @kroitor - I sent you an email at your gmail, please check.

@forexhill
Copy link
Author

$ticker=$exchange->fetchTickers(array('BTC/USDT','BTC/LTC'));var_dump($ticker) should work correctly - right? It is this one that returns an empty array. The CLI example works, but seems to fetch all tickers. The code suggest that $symbol can be passed (as an array).

@kroitor
Copy link
Member
kroitor commented Mar 10, 2018

$ticker=$exchange->fetchTickers(array('BTC/USDT','BTC/LTC'));var_dump($ticker) should work correctly - right?

Right, however...

It is this one that returns an empty array.

There are two errors:

  1. There was a bug in ccxt that I fixed in version 1.11.62, please update it to make it work properly with BTC/USDT
  2. There's a bug in your code as well, as Bibox does not have a "BTC/LTC" symbol, it has "LTC/BTC".

So, if you update and run

$tickers=$exchange->fetchTickers(array('BTC/USDT','BTC/LTC'));
print_r($tickers);

It should show just one symbol (the one of the two that is a proper one, namely BTC/USDT):

Array
(
    [BTC/USDT] => Array
        (
            [symbol] => BTC/USDT
            [timestamp] => 1520662985
            [datetime] => 1970-01-18T14:24:23.985+00:00
            [high] => 9487.9656
            [low] => 8417.1545
            [bid] =>
            [ask] =>
            [vwap] =>
            [open] =>
            [close] =>
            [first] =>
            [last] => 9458.419
            [change] =>
            [percentage] => +9.96%
            [average] =>
            [baseVolume] =>
            [quoteVolume] =>
            [info] => Array
                (
                    [id] => 36
                    [coin_symbol] => BTC
                    [currency_symbol] => USDT
                    [last] => 9458.4190
                    [high] => 9487.9656
                    [low] => 8417.1545
                    [change] => +856.9624
                    [percent] => +9.96%
                    [vol24H] => 159
                    [amount] => 893331.73
                    [last_cny] => 59966.38
                    [high_cny] => 60153.70
                    [low_cny] => 53364.76
                    [last_usd] => 9458.42
                    [high_usd] => 9487.97
                    [low_usd] => 8417.15
                )

        )

)

... and if you fix your code for "BTC/LTC""LTC/BTC", it will output both tickers as it should.

The code suggest that $symbol can be passed (as an array).

Yep, an array of $symbols to be precise...

Let us know if it does not help. Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0