承接 michaeldrennen/td-ameritrade-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

michaeldrennen/td-ameritrade-api

最新稳定版本:v0.2.3

Composer 安装命令:

composer require michaeldrennen/td-ameritrade-api

包简介

A PHP library used to interact with the TD Ameritrade API.

README 文档

README

Packagist GitHub issues GitHub stars GitHub forks GitHub license

A PHP library used to interact with the TD Ameritrade API

Visit the link below to set up your developer account with TD Ameritrade, and get information on how to authenticate with their API. https://developer.tdameritrade.com/

// How to create a TDAmeritrade API client.
$userName                     = 'joeuser123';
$accessToken                  = 'stringFromTDAmeritradeAuthentication';
$refreshToken                 = 'anotherStringFromTDAmeritradeAuthentication';
$refreshTokenExpiresInSeconds = intFromTDAmeritradeAuthentication;
$debug                        = false;
$tdaClient = TDAmeritradeAPI( $userName,
                              $accessToken,
                              $refreshToken,
                              $refreshTokenExpiresInSeconds,
                              $debug );
// Once you have a client, you can buy stocks at market price.
$accountId = 123456789;
$ticker    = 'LODE';
$quantity  = 1;

try {
   $tdaClient->buyStockSharesMarketPrice($accountId, $ticker, $quantity);
} catch (Exception $exception) {
   echo $exception->getMessage();
}

// Now, log into your TDAmeritrade account online, and you should see a new order.

// To sell some shares at the market price...
try {
   $tdaClient->sellStockSharesMarketPrice($accountId, $ticker, $quantity);
} catch (Exception $exception) {
   echo $exception->getMessage();
}

You can look through the TDAmeritradeAPI.php file for a complete list of the actions I have written code for.

Happy trading!

-Mike

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固