ibf / mt5-manager-api
dev-main
2024-01-17 09:15 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-09-17 10:53:48 UTC
README
MetaTrader5 Rest Api. 通过调用 /init/ 获取令牌,这在其他方法中是必需的。
此PHP包是由Swagger Codegen项目自动生成的
- API版本:0.0.3-oas3
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
要求
PHP 5.5 及以上版本
安装与使用
Composer
要使用Composer安装绑定,请将以下内容添加到 composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/dev4traders/mt5-manager-api.git"
}
],
"require": {
"dev4traders/mt5-manager-api": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请遵循安装过程,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new D4T\MT5Sdk\MT5Manager\AccountApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $login = "login_example"; // string | Login try { $result = $apiInstance->accountLoginGet($login); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountApi->accountLoginGet: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI均相对于 https://:6503/v1
模型文档
- 账户
- 缓存登录数组
- 组数组
- 持仓数组
- 持仓内部数组
- 符号数组
- 符号内部数组
- 交易数组
- 交易内部数组
- 用户响应数组
- 用户响应内部数组
- 余额类型
- 组
- 初始化返回类型
- ping返回类型
- 重置密码类型
- 返回类型
- 交易筛选类型
- 用户
- 用户返回类型
- 用户返回类型用户
- 用户数组
- 用户内部数组
授权文档
bearerAuth
- 类型:HTTP bearer身份验证