Fugle Realtime API client library for Python
Project description
Fugle Realtime
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
License
Project details
Release history Release notifications | RSS feed
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.4.1.tar.gz
(4.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fugle-realtime-0.4.1.tar.gz.
File metadata
- Download URL: fugle-realtime-0.4.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.14 Darwin/20.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe15ef5fc974a7ac13b4b2c5b566ce6be8de4e80f5e756f3450143a929d8ffda
|
|
| MD5 |
0b78ca07c5b4f03e9b50b737cb015015
|
|
| BLAKE2b-256 |
d1c3be88dd9966be7b4c51e5579fb6711d2747aaa58f1629124727389d21556a
|
File details
Details for the file fugle_realtime-0.4.1-py3-none-any.whl.
File metadata
- Download URL: fugle_realtime-0.4.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.14 Darwin/20.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
657dd7808e42863b3574ad4ff77f00efd04a46c834dd5b7bc7bad90af46cba06
|
|
| MD5 |
d392d4be38604c7cceb8882cd9547bd2
|
|
| BLAKE2b-256 |
a5afea24f9d9a4d855754f93fcc2185af42fc7925d93f1c93f83f3ec6d44a56c
|