metaapi-cloud-sdk


Namemetaapi-cloud-sdk JSON
Version 27.1.1 PyPI version JSON
download
home_pagehttps://github.com/metaapi/metaapi-python-sdk
SummarySDK for MetaApi, a professional cloud forex API which includes MetaTrader REST API and MetaTrader websocket API. Supports both MetaTrader 5 (MT5) and MetaTrader 4 (MT4). CopyFactorycopy trading API included. (https://metaapi.cloud)
upload_time2024-07-27 12:18:31
maintainerNone
docs_urlNone
authorMetaApi DMCC
requires_python>=3.8
licenseSEE LICENSE IN LICENSE
keywords metaapi.cloud metatrader metatrader 5 metatrader 4 metatrader5 metatrader4 mt mt4 mt5 forex trading api rest websocket client sdk cloud free copy trading copytrade copy trade trade copying
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            metaapi.cloud SDK for Python
############################

MetaApi 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.

CopyFactory is a simple yet powerful copy-trading API which is a part of MetaApi. See below for CopyFactory readme section.

MetaApi is a paid service, however we offer a free tier for testing and personal use.

The `MetaApi pricing <https://metaapi.cloud/#pricing>`_ was developed with the intent to make your charges less or equal to what you would have to pay
for hosting your own infrastructure. This is possible because over time we managed to heavily optimize
our MetaTrader infrastructure. And with MetaApi you can save significantly on application development and
maintenance costs and time thanks to high-quality API, open-source SDKs and convenience of a cloud service.

Official REST and websocket API documentation: https://metaapi.cloud/docs/client/

This SDK requires a 3.8+ version of Python to run.

Please note that this SDK provides an abstraction over REST and websocket API to simplify your application logic.

For more information about SDK APIs please check docstring documentation in source codes located inside lib folder of this package.

Working code examples
=====================
Please check `this short video <https://youtu.be/LIqFOOOLP-g>`_ to see how you can download samples via our web application.

You can find code examples at `examples folder of our github repo <https://github.com/metaapi/metaapi-python-sdk/tree/master/examples>`_ or in the examples folder of the pip package.

We have composed a `short guide explaining how to use the example code <https://metaapi.cloud/docs/client/usingCodeExamples/>`_

Installation
============
.. code-block:: bash

    pip install metaapi-cloud-sdk

Connecting to MetaApi
=====================
Please use one of these ways:

1. https://app.metaapi.cloud/token web UI to obtain your API token.
2. An account access token which grants access to a single account. See section below on instructions on how to retrieve account access token.

Supply token to the MetaApi class constructor.

.. code-block:: python

    from metaapi_cloud_sdk import MetaApi

    token = '...'
    api = MetaApi(token=token)

Retrieving account access token
===============================
Account access token grants access to a single account. You can retrieve account access token via API:

.. code-block:: python

    account_id = '...'
    validity_in_hours = 24
    account_access_token = await api.token_management_api.narrow_down_token(
        {
            'applications': ['trading-account-management-api', 'copyfactory-api', 'metaapi-rest-api', 'metaapi-rpc-api', 'metaapi-real-time-streaming-api', 'metastats-api', 'risk-management-api'],
            'roles': ['reader'],
            'resources': [{'entity': 'account', 'id': account_id}]

        },
        validity_in_hours
    )
    print(account_access_token)

Alternatively, you can retrieve account access token via web UI on https://app.metaapi.cloud/accounts page (see `this video <https://youtu.be/PKYiDns6_xI>`_).

Table of contents
=================

1. `MT account management <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/metaApi/managingAccounts.rst>`_

2. `MetaApi RPC API <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/metaApi/rpcApi.rst>`_

3. `MetaApi real-time streaming API (websocket API) <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/metaApi/streamingApi.rst>`_

4. `Risk management API <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/riskManagement.rst>`_

5. `CopyFactory copy trading API <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/copyTrading.rst>`_

6. `MetaStats trading statistics API <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/metaStats.rst>`_

7. `MetaApi MT manager API <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/managerApi.rst>`_

8. `Tracking latencies <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/trackingLatencies.rst>`_

9. `Enable log4js logging <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/logging.rst>`_

10. `Rate limits & quotas <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/rateLimits.rst>`_

11. `Token management API <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/tokenManagementApi.rst>`_

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/metaapi/metaapi-python-sdk",
    "name": "metaapi-cloud-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "metaapi.cloud, MetaTrader, MetaTrader 5, MetaTrader 4, MetaTrader5, MetaTrader4, MT, MT4, MT5, forex, trading, API, REST, websocket, client, sdk, cloud, free, copy trading, copytrade, copy trade, trade copying",
    "author": "MetaApi DMCC",
    "author_email": "support@metaapi.cloud",
    "download_url": "https://files.pythonhosted.org/packages/a5/5b/7f0acd7f89752de11c5c0dc0155294b40d9353a79cbb83bbf606d565c1e1/metaapi_cloud_sdk-27.1.1.tar.gz",
    "platform": null,
    "description": "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 offer a free tier for testing and personal use.\n\nThe `MetaApi pricing <https://metaapi.cloud/#pricing>`_ 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 <https://youtu.be/LIqFOOOLP-g>`_ to see how you can download samples via our web application.\n\nYou can find code examples at `examples folder of our github repo <https://github.com/metaapi/metaapi-python-sdk/tree/master/examples>`_ or in the examples folder of the pip package.\n\nWe have composed a `short guide explaining how to use the example code <https://metaapi.cloud/docs/client/usingCodeExamples/>`_\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 <https://youtu.be/PKYiDns6_xI>`_).\n\nTable of contents\n=================\n\n1. `MT account management <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/metaApi/managingAccounts.rst>`_\n\n2. `MetaApi RPC API <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/metaApi/rpcApi.rst>`_\n\n3. `MetaApi real-time streaming API (websocket API) <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/metaApi/streamingApi.rst>`_\n\n4. `Risk management API <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/riskManagement.rst>`_\n\n5. `CopyFactory copy trading API <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/copyTrading.rst>`_\n\n6. `MetaStats trading statistics API <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/metaStats.rst>`_\n\n7. `MetaApi MT manager API <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/managerApi.rst>`_\n\n8. `Tracking latencies <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/trackingLatencies.rst>`_\n\n9. `Enable log4js logging <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/logging.rst>`_\n\n10. `Rate limits & quotas <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/rateLimits.rst>`_\n\n11. `Token management API <https://github.com/metaapi/metaapi-python-sdk/blob/master/docs/tokenManagementApi.rst>`_\n",
    "bugtrack_url": null,
    "license": "SEE LICENSE IN LICENSE",
    "summary": "SDK for MetaApi, a professional cloud forex API which includes MetaTrader REST API and MetaTrader websocket API. Supports both MetaTrader 5 (MT5) and MetaTrader 4 (MT4). CopyFactorycopy trading API included. (https://metaapi.cloud)",
    "version": "27.1.1",
    "project_urls": {
        "Homepage": "https://github.com/metaapi/metaapi-python-sdk"
    },
    "split_keywords": [
        "metaapi.cloud",
        " metatrader",
        " metatrader 5",
        " metatrader 4",
        " metatrader5",
        " metatrader4",
        " mt",
        " mt4",
        " mt5",
        " forex",
        " trading",
        " api",
        " rest",
        " websocket",
        " client",
        " sdk",
        " cloud",
        " free",
        " copy trading",
        " copytrade",
        " copy trade",
        " trade copying"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a55b7f0acd7f89752de11c5c0dc0155294b40d9353a79cbb83bbf606d565c1e1",
                "md5": "675d6add1ecab2d3063c51fcc772dec0",
                "sha256": "4343cb098e6a54141667677b2c4c68637625920fecdf45bd97d3104643a04c50"
            },
            "downloads": -1,
            "filename": "metaapi_cloud_sdk-27.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "675d6add1ecab2d3063c51fcc772dec0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 283555,
            "upload_time": "2024-07-27T12:18:31",
            "upload_time_iso_8601": "2024-07-27T12:18:31.671211Z",
            "url": "https://files.pythonhosted.org/packages/a5/5b/7f0acd7f89752de11c5c0dc0155294b40d9353a79cbb83bbf606d565c1e1/metaapi_cloud_sdk-27.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-27 12:18:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "metaapi",
    "github_project": "metaapi-python-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "metaapi-cloud-sdk"
}
        
Elapsed time: 0.70714s