fugle-marketdata


Namefugle-marketdata JSON
Version 2.3.1 PyPI version JSON
download
home_pagehttps://github.com/fugle-dev/fugle-realtime-py#readme
SummaryFugle Realtime API 1.0 client library for Python
upload_time2025-07-18 03:08:56
maintainerNone
docs_urlNone
authorFortuna Intelligence Co., Ltd.
requires_python<4.0,>=3.7
licenseMIT
keywords fugle realtime stock
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Fugle MarketData

> Fugle MarketData API client library for Python

## Installation

```sh
$ pip install fugle-marketdata
```

## Importing

```py
from fugle_marketdata import WebSocketClient, RestClient

```

## Usage

The library is an isomorphic Python client that supports REST API and WebSocket.

### REST API

```py

client = RestClient(api_key = 'YOUR_API_KEY')
stock = client.stock  # Stock REST API client
print(stock.intraday.quote(symbol="2330"))
```

### WebSocket API

```py
from fugle_marketdata import WebSocketClient, RestClient


def handle_message(message):
    print(f'message: {message}')


def handle_connect():
    print('connected')


def handle_disconnect(code, message):
    print(f'disconnect: {code}, {message}')


def handle_error(error):
    print(f'error: {error}')


def main():
    client = WebSocketClient(api_key='YOUR_API_KEY')
    stock = client.stock
    stock.on("connect", handle_connect)
    stock.on("message", handle_message)
    stock.on("disconnect", handle_disconnect)
    stock.on("error", handle_error)
    stock.connect()
    stock.subscribe({
        "channel": 'trades',
        "symbol": '2330'
    })


if __name__ == "__main__":
    main()

```

## License

[MIT](LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fugle-dev/fugle-realtime-py#readme",
    "name": "fugle-marketdata",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.7",
    "maintainer_email": null,
    "keywords": "fugle, realtime, stock",
    "author": "Fortuna Intelligence Co., Ltd.",
    "author_email": "development@fugle.tw",
    "download_url": "https://files.pythonhosted.org/packages/e7/30/e063fe3f4306ff96c961aff1256b7447c10c87458e6ac044fe007801c4a7/fugle_marketdata-2.3.1.tar.gz",
    "platform": null,
    "description": "# Fugle MarketData\n\n> Fugle MarketData API client library for Python\n\n## Installation\n\n```sh\n$ pip install fugle-marketdata\n```\n\n## Importing\n\n```py\nfrom fugle_marketdata import WebSocketClient, RestClient\n\n```\n\n## Usage\n\nThe library is an isomorphic Python client that supports REST API and WebSocket.\n\n### REST API\n\n```py\n\nclient = RestClient(api_key = 'YOUR_API_KEY')\nstock = client.stock  # Stock REST API client\nprint(stock.intraday.quote(symbol=\"2330\"))\n```\n\n### WebSocket API\n\n```py\nfrom fugle_marketdata import WebSocketClient, RestClient\n\n\ndef handle_message(message):\n    print(f'message: {message}')\n\n\ndef handle_connect():\n    print('connected')\n\n\ndef handle_disconnect(code, message):\n    print(f'disconnect: {code}, {message}')\n\n\ndef handle_error(error):\n    print(f'error: {error}')\n\n\ndef main():\n    client = WebSocketClient(api_key='YOUR_API_KEY')\n    stock = client.stock\n    stock.on(\"connect\", handle_connect)\n    stock.on(\"message\", handle_message)\n    stock.on(\"disconnect\", handle_disconnect)\n    stock.on(\"error\", handle_error)\n    stock.connect()\n    stock.subscribe({\n        \"channel\": 'trades',\n        \"symbol\": '2330'\n    })\n\n\nif __name__ == \"__main__\":\n    main()\n\n```\n\n## License\n\n[MIT](LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Fugle Realtime API 1.0 client library for Python",
    "version": "2.3.1",
    "project_urls": {
        "Documentation": "https://developer.fugle.tw",
        "Homepage": "https://github.com/fugle-dev/fugle-realtime-py#readme",
        "Repository": "https://github.com/fugle-dev/fugle-realtime-py"
    },
    "split_keywords": [
        "fugle",
        " realtime",
        " stock"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2a212a3e4664b1978a0ce9a3d1c6c335b74dc69c4754ecea2ef64c2a6c7e2a63",
                "md5": "2f4dc9c87ca188a85c85e4d70cfa2727",
                "sha256": "92456e40a717eb6735cb0f7731116ad5e60e70b332091b7ef02c0ca65e4e44e3"
            },
            "downloads": -1,
            "filename": "fugle_marketdata-2.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2f4dc9c87ca188a85c85e4d70cfa2727",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.7",
            "size": 11860,
            "upload_time": "2025-07-18T03:08:55",
            "upload_time_iso_8601": "2025-07-18T03:08:55.108053Z",
            "url": "https://files.pythonhosted.org/packages/2a/21/2a3e4664b1978a0ce9a3d1c6c335b74dc69c4754ecea2ef64c2a6c7e2a63/fugle_marketdata-2.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e730e063fe3f4306ff96c961aff1256b7447c10c87458e6ac044fe007801c4a7",
                "md5": "42c608eb764c0a5b991c3ffd36f902ae",
                "sha256": "79a4e42bbf76418bed0d74baa8ae1cf47a462550c4e747f83eb94e8c95ab9a6a"
            },
            "downloads": -1,
            "filename": "fugle_marketdata-2.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "42c608eb764c0a5b991c3ffd36f902ae",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.7",
            "size": 6421,
            "upload_time": "2025-07-18T03:08:56",
            "upload_time_iso_8601": "2025-07-18T03:08:56.167503Z",
            "url": "https://files.pythonhosted.org/packages/e7/30/e063fe3f4306ff96c961aff1256b7447c10c87458e6ac044fe007801c4a7/fugle_marketdata-2.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-18 03:08:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fugle-dev",
    "github_project": "fugle-realtime-py#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "fugle-marketdata"
}
        
Elapsed time: 0.90746s