{"id":19779416,"url":"https://github.com/ranjanrak/async-ticker","last_synced_at":"2025-04-30T21:31:45.862Z","repository":{"id":128638326,"uuid":"409178093","full_name":"ranjanrak/async-ticker","owner":"ranjanrak","description":"Kite connect websocket implementation in asyncio, to get away with twisted dependency.","archived":false,"fork":false,"pushed_at":"2023-05-20T09:14:28.000Z","size":9,"stargazers_count":13,"open_issues_count":2,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T04:51:09.419Z","etag":null,"topics":["websocket"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ranjanrak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-22T11:32:17.000Z","updated_at":"2025-02-24T05:03:28.000Z","dependencies_parsed_at":"2023-08-23T16:16:21.581Z","dependency_job_id":null,"html_url":"https://github.com/ranjanrak/async-ticker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjanrak%2Fasync-ticker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjanrak%2Fasync-ticker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjanrak%2Fasync-ticker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjanrak%2Fasync-ticker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ranjanrak","download_url":"https://codeload.github.com/ranjanrak/async-ticker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251785458,"owners_count":21643482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["websocket"],"created_at":"2024-11-12T05:34:40.762Z","updated_at":"2025-04-30T21:31:45.854Z","avatar_url":"https://github.com/ranjanrak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# async-ticker\n[Kite connect websocket](https://kite.trade/docs/connect/v3/websocket/) implementation in asyncio, to get away with twisted dependency.\n\n## Installation\n```\ngit clone https://github.com/ranjanrak/async-ticker.git\n```\n\n## Usage\nClient side usage remains same as of [current kiteconnect websocket](https://github.com/zerodha/pykiteconnect#websocket-usage). \n\n```\nimport logging\nfrom async_ticker import MainTicker\n\nlogging.basicConfig(level=logging.DEBUG)\n\n# API credentials\napi_key = \"your_api_key\"\naccess_token = \"your_access_token\"\n\n# Initialize main ticker \nws = MainTicker(api_key, access_token)\n\ndef on_ticks(ws, ticks):\n    # Callback to receive ws ticks.\n    logging.debug(\"Ticks: {}\".format(ticks))\n\ndef on_connect(ws, response):\n    # Callback on successful connect.\n    ws.subscribe([738561, 5633])\n    \n    ws.set_mode(ws.MODE_LTP, [5633])\n    ws.set_mode(ws.MODE_FULL, [738561])\n\nws.on_connect = on_connect\nws.on_ticks = on_ticks\nws.connect_ws()\n```\n\n## Response\nResponse structure remains the same of [current kiteconnect websocket](https://kite.trade/docs/connect/v3/websocket/#quote-packet-structure).\n```\nDEBUG:root:Ticks: [{'tradable': True, 'mode': 'ltp', 'instrument_token': 5633, 'last_price': 2298.85}, \n{'tradable': True, 'mode': 'full', 'instrument_token': 738561, 'last_price': 2483.45, \n'last_traded_quantity': 21, \n'average_traded_price': 2488.65, 'volume_traded': 6723054, 'total_buy_quantity': 184955, \n'total_sell_quantity': 1315993, 'ohlc': {'open': 2503.55, 'high': 2505.45, 'low': 2472.0, \n'close': 2489.9}, 'change': -0.2590465480541497, 'last_trade_time': None, 'oi': 0, 'oi_day_high': 0, \n'oi_day_low': 0, 'exchange_timestamp': None, 'depth': {.....}}]\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franjanrak%2Fasync-ticker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franjanrak%2Fasync-ticker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franjanrak%2Fasync-ticker/lists"}