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')
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.2.tar.gz
(4.3 kB
view hashes)
Built Distribution
Close
Hashes for fugle_realtime-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c02e3a2000ad8423a647b4ab70b82290d5b7484ae795baf8303f7cd4436431eb |
|
MD5 | 8358a4614f1d3b983bbfb429ba2d5711 |
|
BLAKE2b-256 | ca0991128477d018ccee84f27a71df2aaf3131d36c7e5c447ccb3d10385935ce |