定制 necmicolak/yahoo-finance 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

necmicolak/yahoo-finance

最新稳定版本:1.0.0

Composer 安装命令:

composer require necmicolak/yahoo-finance

包简介

Yahoo Finance Unofficial API

README 文档

README

Yahoo finance unofficial API PHP package

Installation

composer require necmicolak/yahoo-finance

Usage

Search Currency, stocks etc.

use Necmicolak\YahooFinance\SearchAsset;

SearchAsset::search('APP', 6);

// Returns an array of exchange, shortname, quoteType, symbol etc.

Fetch meta values

use Necmicolak\YahooFinance\FinanceAsset;
$asset = new FinanceAsset('BTC-USD');
$asset->getMeta();
  • Example Return
[
     "currency" => "USD",
     "symbol" => "BTC-USD",
     "exchangeName" => "CCC",
     "instrumentType" => "CRYPTOCURRENCY",
     "firstTradeDate" => 1410912000,
     "regularMarketTime" => 1651964220,
     "gmtoffset" => 0,
     "timezone" => "UTC",
     "exchangeTimezoneName" => "UTC",
     "regularMarketPrice" => 34982.34,
     "chartPreviousClose" => 36033.406,
     "previousClose" => 36033.406,
     "scale" => 3,
     "priceHint" => 2,
     "currentTradingPeriod" => [
       "pre" => [
         "timezone" => "UTC",
         "end" => 1651881600,
         "start" => 1651881600,
         "gmtoffset" => 0,
       ],
       "regular" => [
         "timezone" => "UTC",
         "end" => 1651967940,
         "start" => 1651881600,
         "gmtoffset" => 0,
       ],
       "post" => [
         "timezone" => "UTC",
         "end" => 1651967940,
         "start" => 1651967940,
         "gmtoffset" => 0,
       ],
     ],
     "tradingPeriods" => [
       [
         [
           "timezone" => "UTC",
           "end" => 1651967940,
           "start" => 1651881600,
           "gmtoffset" => 0,
         ],
       ],
     ],
     "dataGranularity" => "1m",
     "range" => "1d",
     "validRanges" => [
       "1d",
       "5d",
       "1mo",
       "3mo",
       "6mo",
       "1y",
       "2y",
       "5y",
       "10y",
       "ytd",
       "max",
     ],
];

Fetch chart

use Necmicolak\YahooFinance\FinanceAsset;
$asset = new FinanceAsset('BTC-USD');
$asset->getChart();
  • Example return
[
  "timestamp" => [] // timestamp values
  "values" => [] // asset values same count timestamp
]

统计信息

  • 总下载量: 242
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固