Dhan broker plugin package for bt_api.
pip install -e .The package exposes the old plugin mode entry point in pyproject.toml:
[project.entry-points."bt_api.plugins"]
dhan = "bt_api_dhan.plugin:register_plugin"frombt_api_dhan.gateway.adapterimportDhanGatewayAdapteradapter=DhanGatewayAdapter(access_token="demo-token", client_id="demo-client", paper=True)
adapter.connect()
balance=adapter.get_balance()
positions=adapter.get_positions()python -m pytest tests/test_auth.py tests/test_mapping.py tests/test_transport.py tests/test_exchange_data.py tests/test_runtime_feed.py tests/test_plugin.py tests/test_contract.py tests/test_bt_api_integration.py -q