kartulin/fmp-api-sdk

v1.0.0 2022-06-01 12:28 UTC

This package is auto-updated.

Last update: 2024-09-29 06:08:46 UTC


README

Latest Version on Packagist Total Downloads

舒适的工作库,用于与 FinancialModelingPrep.com 进行交互。易于与任何php框架集成。您必须拥有 api_key 才能开始工作。它是免费的...

安装

您可以通过 composer 安装此包(php 7.4 及以上版本

composer require kartulin/fmp-api-sdk

用法

use Kartulin\FmpApiSdk\FMP;

$token='you_api_key_here';

//You must initialize the client with $token
//You can use DI of your framework
$client = FMP::make($token);
// or
$client = new FMP($token);

// Select required endpoint with arguments
$response = $client->companyQuote('aapl', true)->get();
// or
$response = FMP::make($config)->companyQuote('AAPL', true)->get();

var_dump($response) // is array
^ array:1 [▼
  0 => {#37 ▼
    +"symbol": "AAPL"
    +"name": "Apple Inc."
    +"price": 148.84
    +"changesPercentage": -0.53461844
    +"change": -0.80000305
    +"dayLow": 146.84
   any_data
  }
]

所有端点类都有良好的文档,并链接到 FMP 文档服务。同时,IDE 完成功能正常。

此包提供的可用端点和类的列表

变更日志

请参阅 CHANGELOG 了解最近有哪些变更。

安全性

如果您发现任何安全相关的问题,请通过电子邮件 stalkerxxl@gmail.com 联系,而不是使用问题跟踪器。

鸣谢

许可证

MIT 许可证(MIT)。有关更多信息,请参阅 许可证文件