Skip to content

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

Open
@jmpf2018

Description

@jmpf2018

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions