Skip to main content

Fugle Realtime API client library for Python

Project description

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')

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fugle-realtime-0.3.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fugle_realtime-0.3.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file fugle-realtime-0.3.1.tar.gz.

File metadata

  • Download URL: fugle-realtime-0.3.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.9.7 Darwin/20.6.0

File hashes

Hashes for fugle-realtime-0.3.1.tar.gz
Algorithm Hash digest
SHA256 6aeaabe0cb93b1eb11c61d9a5db86e286d51f4a9614c90ff0ab87f53782c15bd
MD5 6db34b5a72e8e41a970f4d474ab7326f
BLAKE2b-256 fcf08a6e7b286771facd48e5df14f1562308ae158b19bdc0b3ab530c77bf8109

See more details on using hashes here.

File details

Details for the file fugle_realtime-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: fugle_realtime-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.9.7 Darwin/20.6.0

File hashes

Hashes for fugle_realtime-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e85a83444eaaaf4943126c158358531c9cc3aa9b14d09d6a5f303e7af015ddaf
MD5 63bd410948b02aa026a4381bfe5a9d56
BLAKE2b-256 167d3eae16ce73949c1f49a8d9f4ce1124a8156a3dcd13171ceab582c55d5efa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page