metatrader-sockets-client


Namemetatrader-sockets-client JSON
Version 0.0.4 PyPI version JSON
download
home_pagehttps://github.com/FortesenseLabs/metatrader-terminal
SummaryClient SDK of MetaTrader Sockets API
upload_time2024-07-23 09:25:18
maintainerNone
docs_urlNone
authorFortesense Labs
requires_python>=3.7
licenseGPL-3.0
keywords metatrader api socket-io mt5 mt4 websockets socketio mt5-ea f-api historical-data financial-data stocks funds etfs indices currency crosses bonds commodities crypto currencies synthetic instruments trading investment portfolio backtesting quantitative analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MetaTrader Sockets API Client

Client SDK of MetaTrader Sockets API

## Run

```python
import asyncio
from metatrader import (
    TerminalClient,
)


async def main():
    client = await TerminalClient.create(verbose=False)

    async def fetch_account_info():
        account_info = await client.get_account()
        if account_info:
            print(f"Account Info: {account_info}")
        else:
            print("Failed to fetch account info.")

    async def fetch_exchange_info():
        exchange_info = await client.get_exchange_info()
        if exchange_info:
            print(f"Exchange Info: {exchange_info}")
        else:
            print("Failed to fetch exchange info.")

    await fetch_account_info()
    # OR
    tasks = [fetch_account_info, fetch_exchange_info]
    await client._run(tasks)


if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    try:
        loop.run_until_complete(main())
    finally:
        loop.close()

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/FortesenseLabs/metatrader-terminal",
    "name": "metatrader-sockets-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "metatrader, api, socket-io, mt5, mt4, websockets, socketio, mt5-ea, f-api, historical-data, financial-data, stocks, funds, etfs, indices, currency crosses, bonds, commodities, crypto currencies, synthetic instruments, trading, investment, portfolio, backtesting, quantitative analysis",
    "author": "Fortesense Labs",
    "author_email": "fortesenselabs@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f0/e2/ba454be4e68bbfc292ecac20973abfdf7065aec68b5265f0a69cb288bfc4/metatrader_sockets_client-0.0.4.tar.gz",
    "platform": null,
    "description": "# MetaTrader Sockets API Client\n\nClient SDK of MetaTrader Sockets API\n\n## Run\n\n```python\nimport asyncio\nfrom metatrader import (\n    TerminalClient,\n)\n\n\nasync def main():\n    client = await TerminalClient.create(verbose=False)\n\n    async def fetch_account_info():\n        account_info = await client.get_account()\n        if account_info:\n            print(f\"Account Info: {account_info}\")\n        else:\n            print(\"Failed to fetch account info.\")\n\n    async def fetch_exchange_info():\n        exchange_info = await client.get_exchange_info()\n        if exchange_info:\n            print(f\"Exchange Info: {exchange_info}\")\n        else:\n            print(\"Failed to fetch exchange info.\")\n\n    await fetch_account_info()\n    # OR\n    tasks = [fetch_account_info, fetch_exchange_info]\n    await client._run(tasks)\n\n\nif __name__ == \"__main__\":\n    loop = asyncio.get_event_loop()\n    try:\n        loop.run_until_complete(main())\n    finally:\n        loop.close()\n\n```\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "Client SDK of MetaTrader Sockets API",
    "version": "0.0.4",
    "project_urls": {
        "Bug Reports": "https://github.com/FortesenseLabs/metatrader-terminal/issues",
        "Documentation": "https://github.com/FortesenseLabs/metatrader-terminal/tree/main/clients/metatrader-sockets/examples",
        "Download": "https://github.com/FortesenseLabs/metatrader-terminal/releases/tag/0.0.4",
        "Homepage": "https://github.com/FortesenseLabs/metatrader-terminal",
        "Source": "https://github.com/FortesenseLabs/metatrader-terminal/tree/main/clients/metatrader-sockets/"
    },
    "split_keywords": [
        "metatrader",
        " api",
        " socket-io",
        " mt5",
        " mt4",
        " websockets",
        " socketio",
        " mt5-ea",
        " f-api",
        " historical-data",
        " financial-data",
        " stocks",
        " funds",
        " etfs",
        " indices",
        " currency crosses",
        " bonds",
        " commodities",
        " crypto currencies",
        " synthetic instruments",
        " trading",
        " investment",
        " portfolio",
        " backtesting",
        " quantitative analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3657d79a902918820164061a5b68b62c6d80d9015543cbd1c1928104381e710a",
                "md5": "7cdd9f0608f01353753ccff2afa90ffe",
                "sha256": "1823d104dd20280d2961540dc849ff8e108670f08f4043ce6c32c28419847aec"
            },
            "downloads": -1,
            "filename": "metatrader_sockets_client-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7cdd9f0608f01353753ccff2afa90ffe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 14874,
            "upload_time": "2024-07-23T09:25:17",
            "upload_time_iso_8601": "2024-07-23T09:25:17.178877Z",
            "url": "https://files.pythonhosted.org/packages/36/57/d79a902918820164061a5b68b62c6d80d9015543cbd1c1928104381e710a/metatrader_sockets_client-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f0e2ba454be4e68bbfc292ecac20973abfdf7065aec68b5265f0a69cb288bfc4",
                "md5": "22936ea0f9fde6b8386c880460d3ccf7",
                "sha256": "d5607236d475283b354e53b181b8ba493ce308553836997802bf312b64624907"
            },
            "downloads": -1,
            "filename": "metatrader_sockets_client-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "22936ea0f9fde6b8386c880460d3ccf7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 12709,
            "upload_time": "2024-07-23T09:25:18",
            "upload_time_iso_8601": "2024-07-23T09:25:18.598591Z",
            "url": "https://files.pythonhosted.org/packages/f0/e2/ba454be4e68bbfc292ecac20973abfdf7065aec68b5265f0a69cb288bfc4/metatrader_sockets_client-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-23 09:25:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "FortesenseLabs",
    "github_project": "metatrader-terminal",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "metatrader-sockets-client"
}
        
Elapsed time: 1.85087s