Variables
Broker¶
Broker Name¶
str
| Name | Value |
|---|---|
| Alice Blue | aliceblue |
| Angel One | angel |
| Choice | choice |
| Dhan | dhan |
| 5paisa | fivepaisa |
| 5paisa xstream | fivepaisa-xts |
| FYERS | fyers |
| Motilal Oswal | mo |
| m.stock | mstock |
| nuvama | nuvama |
| Sharekhan | sharekhan |
| Upstox | upstox |
| Zerodha | zerodha |
Broker Account Valitidy¶
str
| Name | Value |
|---|---|
| Expired | -2 |
| Unknown | -1 |
| Infinity | 0 |
Broker Role¶
str
| Name | Value |
|---|---|
| Owner | owner |
| Reader | reader |
| Executor | executor |
Broker Client¶
str
Structure = BROKER,CLIENT_ID
Broker Credentials to add¶
dict
DHAN¶
| Name | Description |
|---|---|
access_token str |
Access Token from DHAN platform |
CHOICE¶
| Name | Description |
|---|---|
mobile str |
Mobile number linked to CHOICE broker |
client_access_token str |
Access Token from CHOICE platform |
Sample Payload
Exchange¶
str
| Name | Value |
|---|---|
| NSE-FO | NSE-FO |
Order¶
OrderStatus¶
str
| Name | Value |
|---|---|
| Cancelled | cancelled |
| Completed | completed |
| Partial | partial |
| Pending | pending |
| Failed | failed |
| Placed | placed |
| Rejected | rejected |
| Transit | transit |
OrderType¶
str
| Name | Value |
|---|---|
| Limit | limit |
| Market | market |
| Stop Loss Limit | sll |
| Stop Loss Market | slm |
OrderBuySell¶
str
| Name | Value |
|---|---|
| Buy | b |
| Sell | s |
ProductType¶
str
| Name | Value |
|---|---|
| Intraday | intraday |
| Normal | nrml |
OrderValidity¶
str
| Name | Value |
|---|---|
| Day | day |
| Immediate or Cancel | ioc |
OrderPlacementBrokerAccounts¶
dict
| Name | Description |
|---|---|
BrokerClient int |
Lot size multiplier |
OrderPlacementLeg¶
dict
| Name | Description | Allowed Values |
|---|---|---|
qty int |
Multiples of LotSize for the symbol specified |
- |
price float |
Price at the order needs to be placed | - |
symbol str |
Symbol at the order needs to be placed | - |
segment str |
Segment at the order needs to be placed | options=o | future=x |
opt_type str |
Option Type at the order needs to be placed | options=c, p | future=x |
expiry str |
Expiry of the symbol at the order needs to be placed |
format=DD-MMM-YY |
strike int|float |
Valid Strike related to symbol & expiry at the order needs to be placed |
- |
buy_sell str |
Buy or Sell order | BuySell |
stop_price float |
StopPrice at the order needs to be placed (only for Stop Loss Limit Order type) | - |
Sample payload
OrderPlacementSetting¶
dict
| Name | Description |
|---|---|
margin_benefit bool |
On multi-legs order placement when true first place Buy orders and then Sell orders |
OrderCancelOrderIds¶
dict
| Name | Description |
|---|---|
b_orderid str |
Broker OrderID to cancel |
e_orderid str |
Exchange OrderID to cancel |
OrderCancelData¶
dict
| Name | Description | Allowed Values |
|---|---|---|
BrokerClient list[dict] |
Broker Account to cancel orders | list[OrderCancelOrderIds] |