Git Product home page Git Product logo

phpkc-ticker's Introduction

phpkc-ticker

PHP kiteconnect client websocket ticker implementation.

Usage

To-do: Add all ticker callbacks

$kitewebsocket = new KiteTicker("api_key", "access_token", "full", [59736071]);
$tick_data = $kitewebsocket->connect();
print_r($tick_data);

Response

Response structure remains the same of current kiteconnect websocket.

Array
(
    [tradable] => 1
    [mode] => full
    [instrument_token] => 59736071
    [last_price] => 9269
    [last_traded_quantity] => 1
    [average_traded_price] => 9503.08
    [volume_traded] => 81873
    [total_buy_quantity] => 973
    [total_sell_quantity] => 762
    [ohlc] => Array
        (
            [open] => 8750
            [high] => 9753
            [low] => 8750
            [close] => 8580
        )

    [last_trade_time] => 2022-03-07 18:45:44
    [oi] => 10930
    [oi_day_high] => 13000
    [oi_day_low] => 10857
    [exchange_timestamp] => 2022-03-07 18:45:45
    [depth] => Array
        (
            [buy] => Array
                (
                    [0] => Array
                        (
                            [quantity] => 1
                            [price] => 9267
                            [orders] => 1
                        )

                    [1] => Array
                        (
                            [quantity] => 2
                            [price] => 9266
                            [orders] => 2
                        )

                    [2] => Array
                        (
                            [quantity] => 1
                            [price] => 9265
                            [orders] => 1
                        )

                    [3] => Array
                        (
                            [quantity] => 2
                            [price] => 9264
                            [orders] => 2
                        )

                    [4] => Array
                        (
                            [quantity] => 1
                            [price] => 9263
                            [orders] => 1
                        )

                )

            [sell] => Array
                (
                    [0] => Array
                        (
                            [quantity] => 6
                            [price] => 9269
                            [orders] => 2
                        )

                    [1] => Array
                        (
                            [quantity] => 1
                            [price] => 9270
                            [orders] => 1
                        )

                    [2] => Array
                        (
                            [quantity] => 1
                            [price] => 9271
                            [orders] => 1
                        )

                    [3] => Array
                        (
                            [quantity] => 4
                            [price] => 9272
                            [orders] => 2
                        )

                    [4] => Array
                        (
                            [quantity] => 1
                            [price] => 9274
                            [orders] => 1
                        )

                )

        )
)

phpkc-ticker's People

Contributors

ranjanrak avatar

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.