PHPackages                             mansuriyabrij/angelone-smartapi-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mansuriyabrij/angelone-smartapi-laravel

ActiveLibrary[API Development](/categories/api)

mansuriyabrij/angelone-smartapi-laravel
=======================================

Angel One SmartAPI Laravel SDK

1.0.0(3mo ago)014MITPHPPHP ^8.2

Since Mar 11Pushed 3mo agoCompare

[ Source](https://github.com/MansuriyaBrij/angelone-smartapi-laravel)[ Packagist](https://packagist.org/packages/mansuriyabrij/angelone-smartapi-laravel)[ RSS](/packages/mansuriyabrij-angelone-smartapi-laravel/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

SmartAPI - PHP Client SDK
=========================

[](#smartapi---php-client-sdk)

Installation
------------

[](#installation)

#### Without composer

[](#without-composer)

Download library from [here](https://github.com/angelbroking-github/smartapi-php/archive/refs/tags/1.7.zip) and use as your custom library

#### Via composer

[](#via-composer)

```
composer require smartapi-php/angelbroking
```

Usage
-----

[](#usage)

The simplest usage of the library would be as follows:

```

```

Usage for frameworks
--------------------

[](#usage-for-frameworks)

Import package to controller

```
use AngelBroking\SmartApi;

```

Getting started with API
------------------------

[](#getting-started-with-api)

```
  //in your function of controller create instance of AngelBroking class

    $smart_api  = new SmartApi(
    				// OPTIONAL
			    //  "YOUR_ACCESS_TOKEN",
			    // "YOUR_REFRESH_TOKEN"
				);

    //Login
    $smart_api ->GenerateSession("Client-code","password");

    //methods
    $token = $smart_api ->GenerateToken();

    $profile = $smart_api ->GetProfile();

    $smart_api ->LogOut(array('clientcode'=>'your client-code'));

    $rms = $smart_api ->GetRMS();

    $order = $smart_api ->PlaceOrder(array('variety' => 'NORMAL',
                                    'tradingsymbol'  =>  'JINDALSTEL-EQ',
                                    'symboltoken' => '6733',
                                    'exchange' => 'NSE',
                                    'transactiontype' => 'SELL',
                                    'ordertype' => 'LIMIT',
                                    'quantity' => '1',
                                    'producttype' => 'INTRADAY',
                                    'price' => 312.65,
                                    'squareoff' => 0,
                                    'stoploss' => 0,
                                    'duration' => 'DAY'));

     $modifyOrder = $smart_api ->ModifyOrder(array('variety' => 'NORMAL',
                                    'tradingsymbol'  =>  'JINDALSTEL-EQ',
                                    'symboltoken' => '6733',
                                    'exchange' => 'NSE',
                                    'transactiontype' => 'BUY',
                                    'ordertype' => 'LIMIT',
                                    'quantity' => '1',
                                    'producttype' => 'INTRADAY',
                                    'price' => 200,
                                    'squareoff' => 0,
                                    'stoploss' => 0,
                                    'duration' => 'DAY',
                                    'orderid' =>210312000000394));

    $cancelOrder = $smart_api ->CancelOrder(array('variety' => 'NORMAL',
                                      'orderid' => '210312000000394'));

    $GetOrderBook = $smart_api ->GetOrderBook();

    $GetTradeBook = $smart_api ->GetTradeBook();

    $GetHoldings =  $smart_api ->GetHoldings();

    $GetPosition  = $smart_api ->GetPosition();

    $ConvertPosition  = $smart_api ->ConvertPosition(array("exchange"=>"NSE",
                                                "oldproducttype"=>"INTRADAY",
                                                "newproducttype"=>"MARGIN",
                                                "tradingsymbol"=>"JINDALSTEL-EQ",
                                                "transactiontype"=>"SELL",
                                                "quantity"=>"1",
                                                "type"=>"DAY"));

   $CreateRule  = $smart_api ->CreateRule(array("tradingsymbol" => "SBIN-EQ",
                                      "symboltoken" => "3045",
                                      "exchange" => "NSE",
                                      "producttype" => "MARGIN",
                                      "transactiontype" => "BUY",
                                      "price" => 100000,
                                      "qty" => 10,
                                      "disclosedqty"=> 10,
                                      "triggerprice" => 200000,
                                      "timeperiod" => 365));

   $ModifyRule  = $smart_api ->ModifyRule(array('id' => '1000059',
                                       "tradingsymbol" => "SBIN-EQ",
                                      "symboltoken" => "3045",
                                      "exchange" => "NSE",
                                      "producttype" => "MARGIN",
                                      "transactiontype" => "BUY",
                                      "price" => 100000,
                                      "qty" => 20,
                                      "disclosedqty"=> 10,
                                      "triggerprice" => 200000,
                                      "timeperiod" => 365));

    $CancelRule = $smart_api ->CancelRule(array('symboltoken'  => '3045'
                                       'exchange'   =>   'NSE' ,
                                      'id'  => '1000059'));

    $RuleDetails = $smart_api ->RuleDetails(array('id'=>'1000059'));

    $RuleList = $smart_api ->RuleList(array( "status"=> [
                                      "NEW",
                                      "CANCELLED",
                                      "ACTIVE",
                                      "SENTTOEXCHANGE",
                                      "FORALL"
                                 ],
                                 "page"=> 1,
                                 "count"=> 10));

    $GetCandleData = $smart_api ->GetCandleData(array("exchange"=> "NSE",
                                             "symboltoken"=> "3045",
                                             "interval"=> "ONE_MINUTE",
                                             "fromdate"=> "2021-02-08 09:00",
                                             "todate"=> "2021-02-08 09:16"));

```

Getting started with SmartAPI Websocket's
-----------------------------------------

[](#getting-started-with-smartapi-websockets)

Download [socket.js](https://raw.githubusercontent.com/angelbroking-github/smartapi-php/main/src/socket.js) from src/socket.js and add it to your assets folder

```
//include script.js in you current file

//write script wherever you want live steaming

		var ws =new  websocket('clientCode', 'feedToken', 'scrip', 'task');

		//connect to server
		ws.connection().then(() => {
	        ws.runScript("nse_cm|2885", "mw");
	         // SCRIPT: exchange|token for multi stocks use & seperator, mcx_fo|222900  ### TASK: mw|sfi|dp

	        setTimeout(function () {
	            ws.close()
	        }, 3000)
	    });

	   //add callback method where you can manipulate socket data
		ws.on('tick', receiveTick);

		//user defined function
		function receiveTick(data) {

		    data =  JSON.parse(data);
		    if (data!=='' ) {
		    	console.log(data.ltp);
		    }

		}

```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance80

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

107d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48708476?v=4)[Mansuriya Brij](/maintainers/brijmansuriya)[@brijmansuriya](https://github.com/brijmansuriya)

---

Top Contributors

[![Anam-magnus](https://avatars.githubusercontent.com/u/80564052?v=4)](https://github.com/Anam-magnus "Anam-magnus (49 commits)")[![angelbroking-github](https://avatars.githubusercontent.com/u/72397159?v=4)](https://github.com/angelbroking-github "angelbroking-github (1 commits)")[![brijmansuriya](https://avatars.githubusercontent.com/u/48708476?v=4)](https://github.com/brijmansuriya "brijmansuriya (1 commits)")

### Embed Badge

![Health badge](/badges/mansuriyabrij-angelone-smartapi-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/mansuriyabrij-angelone-smartapi-laravel/health.svg)](https://phpackages.com/packages/mansuriyabrij-angelone-smartapi-laravel)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1772.4k4](/packages/aimeos-prisma)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
