flaviovs/php-questrade
Composer 安装命令:
composer require flaviovs/php-questrade
包简介
Thin abstraction layer around Questrade API for PHP
README 文档
README
This package provide a thin abstraction layer around Questrade API
This package is not affiliated, sponsored, or endorsed by Questrade in any way. The name Questrade, as well as related names and images, are registered trademarks of their respective owners.
Requirements
- PHP >= 5.6
- CURL extension
Installation
composer require flaviovs/php-questrade
Usage
use fv\questrade\Client; use fv\questrade\Error; use fv\questrade\Token; // Manual authorization can be done in // https://login.questrade.com/APIAccess/UserApps.aspx const REFRESH_TOKEN = 'MANUAL-AUTH-API-KEY'; $client = new Client(Client::URL_LIVE); try { $token = $client->getAccessToken(REFRESH_TOKEN); } catch (Error $ex) { echo $ex->getMessage() . "\n"; exit(1); } foreach ($client->symbolSearch($token, 'DJI') as $result) { print_r($result); } // By default this will fetch daily quotes from 7 day ago until // today. See the code for more information. // Note: 16434 == DJI symbol ID. foreach ($client->marketsCandles($token, 16434) as $result) { print_r($result); }
Bugs? Suggestions?
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-08-05