metaapi-cloud-metastats-sdk


Namemetaapi-cloud-metastats-sdk JSON
Version 5.0.1 PyPI version JSON
download
home_pageNone
SummaryPython SDK for MetaStats forex trading statistics API. Can calculate metrics for MetaTrader accounts added to MetaApi. Supports both MetaTrader 5 (MT5) and MetaTrader 4 (MT4). (https://metaapi.cloud)
upload_time2024-11-21 00:24:54
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
license(c) Copyright 2021-2023 MetaApi DMCC. All rights reserved See https://metaapi.cloud/terms for the license. The client library is provided as an open-source project to all metaapi.cloud users or developers free of charge provided you use it in order to implement applications which use metaapi.cloud API service. Provided the above condition is met and if needed by your project you can create derivative works from this code. However we strongly recommend you to create issues in our github repository instead, so that we can integrate the features you need into this project. The use of this code in competing projects or for implementing products which are not using metaapi.cloud API service is permitted only if you have a written approval from the MetaApi project owners.
keywords metaapi.cloud metatrader metatrader 5 metatrader 4 metatrader5 metatrader4 mt mt4 mt5 forex api rest client sdk cloud metrics metastats metastats
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            MetaStats forex metrics API
###########################
MetaStats is a fast, cost-efficient, easy to use and standards-driven cloud forex trading statistics API supporting
both MetaTrader 4 and MetaTrader 5 platforms designed to boost forex application development process.

Using MetaStats API you can develop applications similar to Myfxbook or MetriX extremely fast, saving time you
otherwise spend for coding, optimizing and testing your own trading metrics calculation engine, since we already
did it for you.

MetaStats API is a member of MetaApi project (`https://metaapi.cloud <https://metaapi.cloud>`_), a powerful cloud forex
trading API which supports both MetaTrader 4 and MetaTrader 5 platforms.

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

MetaStats API features
======================
Features supported:

- support for MetaTrader 4 and MetaTrader 5 platforms
- metrics calculation for MetaTrader accounts added to MetaApi
- optionally include open positions in metrics calculation
- get historical trades for MetaApi account. The historical trades data is updated when you invoke metrics calculation
  endpoint or when set query parameter updateHistory to true
- get open trades for MetaApi account

The features described above are available for use via a professional, fast, easy to use, standards-driven REST API
which can be easily consumed from any programming language.

The primary intended use of MetaStats API is creating trade monitoring applications.

Pricing
=======
MetaStats is available to all MetaApi users without extra charges at this point.

You pay a fee executing MetaTrader terminal on MetaApi cloud. See
`https://metaapi.cloud/#pricing <https://metaapi.cloud/#pricing>`_ for more details.

MetaApi provides a free tier so that you can test our APIs without any charges.

Frequently asked questions (FAQ)
================================
FAQ is located here: `http://metaapi.cloud/docs/metastats/faq/ <http://metaapi.cloud/docs/metastats/faq/>`_

REST API documentation
======================
MetaStats SDK is built on top of MetaStats REST API.

MetaStats REST API docs are available at
`https://metaapi.cloud/docs/metastats/ <https://metaapi.cloud/docs/metastats/>`_

Code examples
=============
We published some code examples in our github repository, namely:

- Python: `https://github.com/metaapi/metaapi-metastats-python-sdk/tree/master/examples <https://github.com/metaapi/metaapi-metastats-python-sdk/tree/master/>`_

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

    pip install metaapi-cloud-sdk

Retrieving API token
====================
Please visit `https://app.metaapi.cloud/token <https://app.metaapi.cloud/token>`_ web UI to obtain your API token.

Configuring trading statistics
==============================
.. code-block:: python

    from metaapi_cloud_sdk import MetaStats

    token = '...'
    api = MetaStats(token=token)

See in-code documentation for full definition of possible configuration options.

Retrieving trading statistics
=============================
.. code-block:: python

    account_id = '...'  #  MetaApi account id

    # retrieve MetaApi MetaTrader account statistics
    print(await metaStats.get_metrics(account_id=account_id))

    # retrieve MetaApi MetaTrader account statistics including open positions
    print(await metaStats.get_metrics(account_id=account_id, include_open_positions=True))

    # retrieve MetaApi MetaTrader account trades
    print(await metaStats.get_account_trades(account_id=account_id, start_time='2020-01-01 00:00:00.000',
                                             end_time='2021-01-01 00:00:00.000'))

    # retrieve MetaApi MetaTrader account open trades
    print(await metaStats.get_account_open_trades(account_id=account_id))

Quotas and rate limits
======================
API calls you make are subject to rate limits. See `https://metaapi.cloud/docs/metastats/rateLimiting/ <https://metaapi.cloud/docs/metastats/rateLimiting/>`_ for more details.

Related projects:
=================
See our website for the full list of APIs and features supported `https://metaapi.cloud/#features <https://metaapi.cloud/#features>`_

Some of the APIs you might decide to use together with this module:

1. MetaApi cloud forex trading API `https://metaapi.cloud/docs/client/ <https://metaapi.cloud/docs/client/>`_
2. CopyFactory copy trading  API `https://metaapi.cloud/docs/copyfactory/ <https://metaapi.cloud/docs/copyfactory/>`_
3. MetaTrader account management API `https://metaapi.cloud/docs/provisioning/ <https://metaapi.cloud/docs/provisioning/>`_
4. MetaApi MT manager API `https://metaapi.cloud/docs/manager/ <https://metaapi.cloud/docs/manager/>`_
5. MetaApi risk management API `https://metaapi.cloud/docs/risk-management/ <https://metaapi.cloud/docs/risk-management/>`_

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "metaapi-cloud-metastats-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, API, REST, client, sdk, cloud, metrics, MetaStats, metastats",
    "author": null,
    "author_email": "MetaApi <support@metaapi.cloud>",
    "download_url": "https://files.pythonhosted.org/packages/e9/cd/41d5577cc239588fc13602e6c2ab740d8a61472c64a7e3c6a3e4604b5abe/metaapi_cloud_metastats_sdk-5.0.1.tar.gz",
    "platform": null,
    "description": "MetaStats forex metrics API\n###########################\nMetaStats is a fast, cost-efficient, easy to use and standards-driven cloud forex trading statistics API supporting\nboth MetaTrader 4 and MetaTrader 5 platforms designed to boost forex application development process.\n\nUsing MetaStats API you can develop applications similar to Myfxbook or MetriX extremely fast, saving time you\notherwise spend for coding, optimizing and testing your own trading metrics calculation engine, since we already\ndid it for you.\n\nMetaStats API is a member of MetaApi project (`https://metaapi.cloud <https://metaapi.cloud>`_), a powerful cloud forex\ntrading API which supports both MetaTrader 4 and MetaTrader 5 platforms.\n\nThis SDK requires a 3.8+ version of Python to run.\n\nMetaStats API features\n======================\nFeatures supported:\n\n- support for MetaTrader 4 and MetaTrader 5 platforms\n- metrics calculation for MetaTrader accounts added to MetaApi\n- optionally include open positions in metrics calculation\n- get historical trades for MetaApi account. The historical trades data is updated when you invoke metrics calculation\n  endpoint or when set query parameter updateHistory to true\n- get open trades for MetaApi account\n\nThe features described above are available for use via a professional, fast, easy to use, standards-driven REST API\nwhich can be easily consumed from any programming language.\n\nThe primary intended use of MetaStats API is creating trade monitoring applications.\n\nPricing\n=======\nMetaStats is available to all MetaApi users without extra charges at this point.\n\nYou pay a fee executing MetaTrader terminal on MetaApi cloud. See\n`https://metaapi.cloud/#pricing <https://metaapi.cloud/#pricing>`_ for more details.\n\nMetaApi provides a free tier so that you can test our APIs without any charges.\n\nFrequently asked questions (FAQ)\n================================\nFAQ is located here: `http://metaapi.cloud/docs/metastats/faq/ <http://metaapi.cloud/docs/metastats/faq/>`_\n\nREST API documentation\n======================\nMetaStats SDK is built on top of MetaStats REST API.\n\nMetaStats REST API docs are available at\n`https://metaapi.cloud/docs/metastats/ <https://metaapi.cloud/docs/metastats/>`_\n\nCode examples\n=============\nWe published some code examples in our github repository, namely:\n\n- Python: `https://github.com/metaapi/metaapi-metastats-python-sdk/tree/master/examples <https://github.com/metaapi/metaapi-metastats-python-sdk/tree/master/>`_\n\nInstallation\n============\n.. code-block:: bash\n\n    pip install metaapi-cloud-sdk\n\nRetrieving API token\n====================\nPlease visit `https://app.metaapi.cloud/token <https://app.metaapi.cloud/token>`_ web UI to obtain your API token.\n\nConfiguring trading statistics\n==============================\n.. code-block:: python\n\n    from metaapi_cloud_sdk import MetaStats\n\n    token = '...'\n    api = MetaStats(token=token)\n\nSee in-code documentation for full definition of possible configuration options.\n\nRetrieving trading statistics\n=============================\n.. code-block:: python\n\n    account_id = '...'  #  MetaApi account id\n\n    # retrieve MetaApi MetaTrader account statistics\n    print(await metaStats.get_metrics(account_id=account_id))\n\n    # retrieve MetaApi MetaTrader account statistics including open positions\n    print(await metaStats.get_metrics(account_id=account_id, include_open_positions=True))\n\n    # retrieve MetaApi MetaTrader account trades\n    print(await metaStats.get_account_trades(account_id=account_id, start_time='2020-01-01 00:00:00.000',\n                                             end_time='2021-01-01 00:00:00.000'))\n\n    # retrieve MetaApi MetaTrader account open trades\n    print(await metaStats.get_account_open_trades(account_id=account_id))\n\nQuotas and rate limits\n======================\nAPI calls you make are subject to rate limits. See `https://metaapi.cloud/docs/metastats/rateLimiting/ <https://metaapi.cloud/docs/metastats/rateLimiting/>`_ for more details.\n\nRelated projects:\n=================\nSee our website for the full list of APIs and features supported `https://metaapi.cloud/#features <https://metaapi.cloud/#features>`_\n\nSome of the APIs you might decide to use together with this module:\n\n1. MetaApi cloud forex trading API `https://metaapi.cloud/docs/client/ <https://metaapi.cloud/docs/client/>`_\n2. CopyFactory copy trading  API `https://metaapi.cloud/docs/copyfactory/ <https://metaapi.cloud/docs/copyfactory/>`_\n3. MetaTrader account management API `https://metaapi.cloud/docs/provisioning/ <https://metaapi.cloud/docs/provisioning/>`_\n4. MetaApi MT manager API `https://metaapi.cloud/docs/manager/ <https://metaapi.cloud/docs/manager/>`_\n5. MetaApi risk management API `https://metaapi.cloud/docs/risk-management/ <https://metaapi.cloud/docs/risk-management/>`_\n",
    "bugtrack_url": null,
    "license": "(c) Copyright 2021-2023 MetaApi DMCC. All rights reserved  See https://metaapi.cloud/terms for the license.  The client library is provided as an open-source project to all metaapi.cloud users or developers free of charge provided you use it in order to implement applications which use metaapi.cloud API service.  Provided the above condition is met and if needed by your project you can create derivative works from this code. However we strongly recommend you to create issues in our github repository instead, so that we can integrate the features you need into this project.  The use of this code in competing projects or for implementing products which are not using metaapi.cloud API service is permitted only if you have a written approval from the MetaApi project owners. ",
    "summary": "Python SDK for MetaStats forex trading statistics API. Can calculate metrics for MetaTrader accounts added to MetaApi. Supports both MetaTrader 5 (MT5) and MetaTrader 4 (MT4). (https://metaapi.cloud)",
    "version": "5.0.1",
    "project_urls": {
        "Homepage": "https://github.com/metaapi/metaapi-metastats-python-sdk"
    },
    "split_keywords": [
        "metaapi.cloud",
        " metatrader",
        " metatrader 5",
        " metatrader 4",
        " metatrader5",
        " metatrader4",
        " mt",
        " mt4",
        " mt5",
        " forex",
        " api",
        " rest",
        " client",
        " sdk",
        " cloud",
        " metrics",
        " metastats",
        " metastats"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "be589d79335511ed25aab5165c9151f726ddb89db70067d8fa89ebf3d4694785",
                "md5": "442a87abedc7b05521c385165f252c47",
                "sha256": "8a5b91923d635771732ce7e732a0621fcbfbafdb0f3f1fdf52a923aa3c725c96"
            },
            "downloads": -1,
            "filename": "metaapi_cloud_metastats_sdk-5.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "442a87abedc7b05521c385165f252c47",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 21159,
            "upload_time": "2024-11-21T00:24:53",
            "upload_time_iso_8601": "2024-11-21T00:24:53.056301Z",
            "url": "https://files.pythonhosted.org/packages/be/58/9d79335511ed25aab5165c9151f726ddb89db70067d8fa89ebf3d4694785/metaapi_cloud_metastats_sdk-5.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9cd41d5577cc239588fc13602e6c2ab740d8a61472c64a7e3c6a3e4604b5abe",
                "md5": "ea5c224a49e8462c416dfda2e7adc7fc",
                "sha256": "b33d8137e1fd6247d2b85fe30aff92585b884805bd397616d3520873e5b54e4c"
            },
            "downloads": -1,
            "filename": "metaapi_cloud_metastats_sdk-5.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ea5c224a49e8462c416dfda2e7adc7fc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 20559,
            "upload_time": "2024-11-21T00:24:54",
            "upload_time_iso_8601": "2024-11-21T00:24:54.882829Z",
            "url": "https://files.pythonhosted.org/packages/e9/cd/41d5577cc239588fc13602e6c2ab740d8a61472c64a7e3c6a3e4604b5abe/metaapi_cloud_metastats_sdk-5.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-21 00:24:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "metaapi",
    "github_project": "metaapi-metastats-python-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "metaapi-cloud-metastats-sdk"
}
        
Elapsed time: 0.46954s