{"id":21447166,"url":"https://github.com/metaapi/metaapi-metastats-java-sdk","last_synced_at":"2025-03-17T01:43:39.487Z","repository":{"id":206157694,"uuid":"715982569","full_name":"metaapi/metaapi-metastats-java-sdk","owner":"metaapi","description":"Java SDK for MetaStats forex trading statistics API. Supports MetaTrader 5 (MT5) and MetaTrader 4 (MT4)","archived":false,"fork":false,"pushed_at":"2024-01-19T14:55:58.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T11:34:20.735Z","etag":null,"topics":["api","cloud","forex","java","metaapi","metaapi-cloud","metastats","metatrader","metatrader4","metatrader5","metrics","mt4","mt4-api","mt5","mt5-api","rest","trading"],"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.md","changelog":null,"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}},"created_at":"2023-11-08T08:28:12.000Z","updated_at":"2023-11-08T12:31:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b6960aa-0b78-4206-b999-e4fe5b0fd70d","html_url":"https://github.com/metaapi/metaapi-metastats-java-sdk","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"63262884480d8e7f55a267b77bac5a03b229df3e"},"previous_names":["metaapi/metaapi-metastats-java-sdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaapi%2Fmetaapi-metastats-java-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaapi%2Fmetaapi-metastats-java-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaapi%2Fmetaapi-metastats-java-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metaapi%2Fmetaapi-metastats-java-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metaapi","download_url":"https://codeload.github.com/metaapi/metaapi-metastats-java-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243960449,"owners_count":20375101,"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","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","java","metaapi","metaapi-cloud","metastats","metatrader","metatrader4","metatrader5","metrics","mt4","mt4-api","mt5","mt5-api","rest","trading"],"created_at":"2024-11-23T03:09:03.909Z","updated_at":"2025-03-17T01:43:39.464Z","avatar_url":"https://github.com/metaapi.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# MetaStats forex metrics API\n\nNote: The Java SDK was updated long time ago and lacks important bugfixes and updates. We plan to update the java SDK soon. Meanwhile we recommend you to use javascript or python SDK instead. \n\nMetaStats 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.\n\nUsing 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.\n\nMetaStats 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.\n\n## MetaStats API features\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\nThe 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.\n\nThe primary intended use of MetaStats API is creating trade monitoring applications.\n\n## Pricing\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 [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\n## Frequently asked questions (FAQ)\nFAQ is located here: [http://metaapi.cloud/docs/metastats/faq/](http://metaapi.cloud/docs/metastats/faq/)\n\n## REST API documentation\nMetaStats SDK is built on top of MetaStats REST API.\n\nMetaStats REST API docs are available at [https://metaapi.cloud/docs/metastats/](https://metaapi.cloud/docs/metastats/)\n\n## Code examples\nWe published some code examples in our github repository, namely:\n\n- Java: [https://github.com/metaapi/metaapi-metastats-java-sdk/tree/master/examples](https://github.com/metaapi/metaapi-metastats-java-sdk/tree/master/examples)\n\n## Installation\nIf you use Apache Maven, add this to `\u003cdependencies\u003e` in your `pom.xml`:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecloud.metaapi.sdk\u003c/groupId\u003e\n  \u003cartifactId\u003emetaapi-java-sdk\u003c/artifactId\u003e\n  \u003cversion\u003e14.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nOther options can be found on [this page](https://search.maven.org/artifact/cloud.metaapi.sdk/metaapi-java-sdk/14.0.0/jar).\n\n### Running examples\nIn order to run the examples, follow these steps:\n1. Make sure that you have installed [Maven](http://maven.apache.org) and its command `mvn` is accessible.\n2. Navigate to the root folder of the example project (where its `pom.xml` is located).\n3. Build the project with `mvn package`.\n4. Run `mvn exec:java@`_`ExampleClassName`_ where _`ExampleClassName`_ is the example to execute, e.g. `mvn exec:java@MetaStatsExample`.\n\nExample parameters such as token or account id can be passed via environment variables, or set directly in the example source code. In the last case you need to rebuild the example with `mvn package`. \n\n## Retrieving API token\nPlease visit [https://app.metaapi.cloud/token](https://app.metaapi.cloud/token) web UI to obtain your API token.\n\n## Configuring trading statistics\n```java\nimport cloud.metaapi.sdk.MetaStats;\n\nString token = \"...\";\nMetaStats metaStats = new MetaStats(token);\n```\nSee javadoc in-code documentation for full definition of possible configuration options.\n\n## Retrieving trading statistics\n```java\nString accountId = \"...\"; // MetaApi account id\n\n// retrieve MetaApi MetaTrader account statistics\nSystem.out.println(metaStats.getMetrics(accountId).join());\n\n// retrieve MetaApi MetaTrader account statistics including open positions\nSystem.out.println(metaStats.getMetrics(accountId, true).join());\n```\n\n## Quotas and rate limits\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\n## Related projects:\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/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetaapi%2Fmetaapi-metastats-java-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetaapi%2Fmetaapi-metastats-java-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetaapi%2Fmetaapi-metastats-java-sdk/lists"}