ibf / mt5-manager-api

dev-main 2024-01-17 09:15 UTC

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

模型文档

授权文档

bearerAuth

  • 类型:HTTP bearer身份验证

作者

mikha.dev@gmail.com