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']);
});
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?