Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fugle-realtime

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fugle-realtime

Fugle Realtime API client library for Python

  • 0.4.2
  • PyPI
  • Socket score

Maintainers
3

Fugle Realtime

PyPI version Python version Build Status

Fugle Realtime API client library for Python

Install

$ pip install fugle-realtime

Usage

The library a Python client that supports HTTP API and WebSocket.

HTTP API

from fugle_realtime import HttpClient

api_client = HttpClient(api_token='demo')
intraday.meta
api_client.intraday.meta(symbolId='2884')
intraday.quote
api_client.intraday.quote(symbolId='2884')
intraday.chart
api_client.intraday.chart(symbolId='2884')
intraday.dealts
api_client.intraday.dealts(symbolId='2884', limit=50)
intraday.volumes
api_client.intraday.volumes(symbolId='2884')
historical.candles
api_client.historical.candles('2884', '2022-02-07', '2022-02-11', None)
api_client.historical.candles('2884', None, None, 'open,high,low,close,volume,turnover,change')

Simple WebSocket Demo

import time
from fugle_realtime import WebSocketClient

def handle_message(message):
    print(message)

def main():
    ws_client = WebSocketClient(api_token='demo')
    ws = ws_client.intraday.quote(symbolId='2884', on_message=handle_message)
    ws.run_async()
    time.sleep(3)
    ws.close()

if __name__ == '__main__':
    main()

Reference

Fugle Realtime API

License

MIT

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc