Skip to content
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

How to get depthCache information without using WebSocket, is that possible? #495

Open
jmpf2018 opened this issue Jan 25, 2023 · 0 comments

Comments

@jmpf2018
Copy link

i'm creating a Job that stores price information at every 1 minute, when using WebSocket I'm not able to do so because the Job doen't end.
Is there any easy way to do this and get the information?

$api->depthCache([$this->pair_ticker], function($api, $symbol, $depth) {
            $limit = 10; // Show only the closest asks/bids
            $sorted = $api->sortDepth($symbol, $limit);
            $bid = $api->first($sorted['bids']);
            $ask = $api->first($sorted['asks']);
        });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant