{"id":21447152,"url":"https://github.com/metaapi/metaapi-python-sdk","last_synced_at":"2025-10-25T06:09:16.140Z","repository":{"id":206138845,"uuid":"715944976","full_name":"metaapi/metaapi-python-sdk","owner":"metaapi","description":"Python SDK for MetaApi, a professional cloud forex trading API for MetaTrader platform which supports both MetaTrader MetaTrader 5 and MetaTrader 4. Free usage tier available.","archived":false,"fork":false,"pushed_at":"2025-09-02T04:58:38.000Z","size":163,"stargazers_count":50,"open_issues_count":1,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-02T05:23:01.520Z","etag":null,"topics":["api","cloud","forex","metaapi","metaapi-cloud","metatrader","metatrader4","metatrader5","mt4","mt4-api","mt5","mt5-api","python","rest","trading","websocket","ws"],"latest_commit_sha":null,"homepage":"https://metaapi.cloud","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metaapi.png","metadata":{"files":{"readme":"README.rst","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-08T06:38:21.000Z","updated_at":"2025-09-02T04:57:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"e825f682-6b6d-4f11-b907-b497539bf693","html_url":"https://github.com/metaapi/metaapi-python-sdk","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"9f9d6c634b99f7ad7649d832baa1982b810db7dd"},"previous_names":["metaapi/metaapi-python-sdk"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/metaapi/metaapi-python-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaapi%2Fmetaapi-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaapi%2Fmetaapi-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaapi%2Fmetaapi-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaapi%2Fmetaapi-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metaapi","download_url":"https://codeload.github.com/metaapi/metaapi-python-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaapi%2Fmetaapi-python-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280912355,"owners_count":26412417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cloud","forex","metaapi","metaapi-cloud","metatrader","metatrader4","metatrader5","mt4","mt4-api","mt5","mt5-api","python","rest","trading","websocket","ws"],"created_at":"2024-11-23T03:09:02.927Z","updated_at":"2025-10-25T06:09:16.124Z","avatar_url":"https://github.com/metaapi.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"metaapi.cloud SDK for Python\n############################\n\nMetaApi is a powerful, fast, cost-efficient, easy to use and standards-driven cloud forex trading API for MetaTrader 4 and MetaTrader 5 platform designed for traders, investors and forex application developers to boost forex application development process. MetaApi can be used with any broker and does not require you to be a brokerage.\n\nCopyFactory is a simple yet powerful copy-trading API which is a part of MetaApi. See below for CopyFactory readme section.\n\nMetaApi is a paid service, however we may offer a free tier access in some cases.\n\nThe `MetaApi pricing \u003chttps://metaapi.cloud/#pricing\u003e`_ was developed with the intent to make your charges less or equal to what you would have to pay\nfor hosting your own infrastructure. This is possible because over time we managed to heavily optimize\nour MetaTrader infrastructure. And with MetaApi you can save significantly on application development and\nmaintenance costs and time thanks to high-quality API, open-source SDKs and convenience of a cloud service.\n\nOfficial REST and websocket API documentation: https://metaapi.cloud/docs/client/\n\nThis SDK requires a 3.8+ version of Python to run.\n\nPlease note that this SDK provides an abstraction over REST and websocket API to simplify your application logic.\n\nFor more information about SDK APIs please check docstring documentation in source codes located inside lib folder of this package.\n\nWorking code examples\n=====================\nPlease check `this short video \u003chttps://youtu.be/LIqFOOOLP-g\u003e`_ to see how you can download samples via our web application.\n\nYou can find code examples at `examples folder of our github repo \u003chttps://github.com/metaapi/metaapi-python-sdk/tree/master/examples\u003e`_ or in the examples folder of the pip package.\n\nWe have composed a `short guide explaining how to use the example code \u003chttps://metaapi.cloud/docs/client/usingCodeExamples/\u003e`_\n\nInstallation\n============\n.. code-block:: bash\n\n    pip install metaapi-cloud-sdk\n\nConnecting to MetaApi\n=====================\nPlease use one of these ways:\n\n1. https://app.metaapi.cloud/token web UI to obtain your API token.\n2. An account access token which grants access to a single account. See section below on instructions on how to retrieve account access token.\n\nSupply token to the MetaApi class constructor.\n\n.. code-block:: python\n\n    from metaapi_cloud_sdk import MetaApi\n\n    token = '...'\n    api = MetaApi(token=token)\n\nRetrieving account access token\n===============================\nAccount access token grants access to a single account. You can retrieve account access token via API:\n\n.. code-block:: python\n\n    account_id = '...'\n    validity_in_hours = 24\n    account_access_token = await api.token_management_api.narrow_down_token(\n        {\n            'applications': ['trading-account-management-api', 'copyfactory-api', 'metaapi-rest-api', 'metaapi-rpc-api', 'metaapi-real-time-streaming-api', 'metastats-api', 'risk-management-api'],\n            'roles': ['reader'],\n            'resources': [{'entity': 'account', 'id': account_id}]\n\n        },\n        validity_in_hours\n    )\n    print(account_access_token)\n\nAlternatively, you can retrieve account access token via web UI on https://app.metaapi.cloud/accounts page (see `this video \u003chttps://youtu.be/PKYiDns6_xI\u003e`_).\n\nTable of contents\n=================\n\n1. `MT account management \u003chttps://github.com/metaapi/metaapi-python-sdk/blob/master/docs/metaApi/managingAccounts.rst\u003e`_\n\n2. `MetaApi RPC API \u003chttps://github.com/metaapi/metaapi-python-sdk/blob/master/docs/metaApi/rpcApi.rst\u003e`_\n\n3. `MetaApi real-time streaming API (websocket API) \u003chttps://github.com/metaapi/metaapi-python-sdk/blob/master/docs/metaApi/streamingApi.rst\u003e`_\n\n4. `Risk management API \u003chttps://github.com/metaapi/metaapi-python-sdk/blob/master/docs/riskManagement.rst\u003e`_\n\n5. `CopyFactory copy trading API \u003chttps://github.com/metaapi/metaapi-python-sdk/blob/master/docs/copyTrading.rst\u003e`_\n\n6. `MetaStats trading statistics API \u003chttps://github.com/metaapi/metaapi-python-sdk/blob/master/docs/metaStats.rst\u003e`_\n\n7. `MetaApi MT manager API \u003chttps://github.com/metaapi/metaapi-python-sdk/blob/master/docs/managerApi.rst\u003e`_\n\n8. `Tracking latencies \u003chttps://github.com/metaapi/metaapi-python-sdk/blob/master/docs/trackingLatencies.rst\u003e`_\n\n9. `Enable log4js logging \u003chttps://github.com/metaapi/metaapi-python-sdk/blob/master/docs/logging.rst\u003e`_\n\n10. `Rate limits \u0026 quotas \u003chttps://github.com/metaapi/metaapi-python-sdk/blob/master/docs/rateLimits.rst\u003e`_\n\n11. `Token management API \u003chttps://github.com/metaapi/metaapi-python-sdk/blob/master/docs/tokenManagementApi.rst\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetaapi%2Fmetaapi-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetaapi%2Fmetaapi-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetaapi%2Fmetaapi-python-sdk/lists"}