pushpak1300/laravel-phpkiteconnect 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

pushpak1300/laravel-phpkiteconnect

Composer 安装命令:

composer require pushpak1300/laravel-phpkiteconnect

包简介

Laravel wrapper for zerodha/phpkiteconnect

README 文档

README

The UnOfficial Laravel client for communicating with the Kite Connect API.

Kite Connect is a set of REST-like APIs that expose many capabilities required to build a complete investment and trading platform. Execute orders in real time, manage user portfolio and more, with the simple HTTP API collection.

Documentation

Installing

Requirements

You can install the package via composer:

composer require pushpak/laravel-phpkiteconnect

Usage

<?php
   
    // Assuming you have obtained the `request_token`
    // after the auth flow redirect by redirecting the
    // user to KiteConnect::login_url()
    try {
        $user = KiteConnect::generateSession("request_token_obtained", "your_api_secret");
        echo "Authentication successful. \n";
        print_r($user);
        KiteConnect::setAccessToken($user->access_token);
    } catch(Exception $e) {
        echo "Authentication failed: ".$e->getMessage();
        throw $e;
    }

    echo $user->user_id." has logged in";

    // Get the list of positions.
    echo "Positions: \n";
    dump(KiteConnect::getPositions());

    // Place order.
    $order = KiteConnect::placeOrder("regular", [
        "tradingsymbol" => "INFY",
        "exchange" => "NSE",
        "quantity" => 1,
        "transaction_type" => "BUY",
        "order_type" => "MARKET",
        "product" => "NRML"
    ]);

    echo "Order id is ".$order->order_id;
?>

Examples

This package provide laravel facade to make work with KiteConnect Refer to the PHP client documentation for the complete list of supported methods.

Changelog

Check CHANGELOG.md

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固