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='demo')
intraday.chart
api_client.intraday.chart(symbolId='demo')
intraday.dealts
api_client.intraday.chart(symbolId='demo', limit=50)
intraday.volumes
api_client.intraday.volumes(symbolId='demo')
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.3.0.tar.gz
(4.3 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.3.0.tar.gz.
File metadata
- Download URL: fugle-realtime-0.3.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
467f64d8d873a6ed7abce13382c56315ffaf40bf7b1fab2be46e0c54dfced133
|
|
| MD5 |
fdd9d4dc7786fd558d56360c4eed23a7
|
|
| BLAKE2b-256 |
8fa81d73532efa35125fd46d3fe99a4034e3aac38e6f81b97f34d45a67317a6e
|
File details
Details for the file fugle_realtime-0.3.0-py3-none-any.whl.
File metadata
- Download URL: fugle_realtime-0.3.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e9e6b6c8b28ec7edaff8b1fbbe3acb0ea3f1138a937e01465842b8f0416b432
|
|
| MD5 |
39167cfa98034e8c921f84ddd59e78b8
|
|
| BLAKE2b-256 |
6cc6e021d7aa2ff4c3cfada77b349bc34fa8a22e3dbe5c14fcaa621f1ed1cffb
|