PHPackages                             adnanhussainturki/dhan-php - 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. adnanhussainturki/dhan-php

ActiveLibrary[API Development](/categories/api)

adnanhussainturki/dhan-php
==========================

PHP Wrapper for Dhan Trading API

0.1(2y ago)1151MITPHP

Since Feb 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/AdnanHussainTurki/dhan-php)[ Packagist](https://packagist.org/packages/adnanhussainturki/dhan-php)[ RSS](/packages/adnanhussainturki-dhan-php/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

adnanhussainturki/dhan-php
==========================

[](#adnanhussainturkidhan-php)

PHP Wrapper for Dhan Trading API

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

[](#installation)

Install the package via Composer:

```
composer require adnanhussainturki/dhan-php

```

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4
- [Guzzle HTTP client](https://github.com/guzzle/guzzle)

Usage
-----

[](#usage)

Initialize the Dhan client:

```
// Initialize Dhan client
$dhan = new Dhan($clientId, $accessToken);

```

Example usage:

```
// Place an order
$newOrder = new NewOrder();
$newOrder->setTransactionType(TransactionType::BUY);
$newOrder->setSecurityId("505685"); // TAPARIA
$newOrder->setQuantity(1);
$newOrder->setPrice(3.21);
$newOrder->setOrderType(OrderType::LIMIT);
$newOrder->setExchangeSegment(ExchangeSegment::BSE_EQ);
$newOrder->setProductType(ProductType::CNC);
$newOrder->setValidity(OrderValidity::DAY);

try {
    $orderManager->placeOrder($newOrder);
} catch (\Throwable $th) {
    echo "ERROR: " . $th->getMessage() . "\n";
}

```

License
-------

[](#license)

MIT License

Author
------

[](#author)

Adnan Hussain Turki

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

855d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f093c06ab5970c00e683078ba0e3d7c27ca37e7ed22c9ee1dd94f318868167e?d=identicon)[AdnanHussainTurki](/maintainers/AdnanHussainTurki)

---

Top Contributors

[![AdnanHussainTurki](https://avatars.githubusercontent.com/u/24974673?v=4)](https://github.com/AdnanHussainTurki "AdnanHussainTurki (2 commits)")

### Embed Badge

![Health badge](/badges/adnanhussainturki-dhan-php/health.svg)

```
[![Health](https://phpackages.com/badges/adnanhussainturki-dhan-php/health.svg)](https://phpackages.com/packages/adnanhussainturki-dhan-php)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M986](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/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.5M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

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

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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