Skip to content

Commit 8c9f064

Browse files
authored
Merge pull request #60 from upstox/feature/including-case-changes
Feature/including case changes
2 parents 828f0db + a49a309 commit 8c9f064

File tree

8 files changed

+178
-10
lines changed

8 files changed

+178
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The official Python client for communicating with the <a href="https://upstox.co
99
Upstox API is a set of rest APIs that provide data required to build a complete investment and trading platform. Execute orders in real time, manage user portfolio, stream live market data (using Websocket), and more, with the easy to understand API collection.
1010

1111
- API version: v2
12-
- Package version: 2.2.0
12+
- Package version: 2.3.0
1313
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
1414

1515
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
long_description = (this_directory / "README.md").read_text()
1919

2020
NAME = "upstox-python-sdk"
21-
VERSION = "2.2.0"
21+
VERSION = "2.3.0"
2222
# To install the library, run the following
2323
#
2424
# python setup.py install

upstox_client/models/holdings_data.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class HoldingsData(object):
3636
'product': 'str',
3737
'quantity': 'int',
3838
'tradingsymbol': 'str',
39+
'trading_symbol': 'str',
3940
'last_price': 'float',
4041
'close_price': 'float',
4142
'pnl': 'float',
@@ -58,6 +59,7 @@ class HoldingsData(object):
5859
'product': 'product',
5960
'quantity': 'quantity',
6061
'tradingsymbol': 'tradingsymbol',
62+
'trading_symbol': 'trading_symbol',
6163
'last_price': 'last_price',
6264
'close_price': 'close_price',
6365
'pnl': 'pnl',
@@ -71,7 +73,7 @@ class HoldingsData(object):
7173
'exchange': 'exchange'
7274
}
7375

74-
def __init__(self, isin=None, cnc_used_quantity=None, collateral_type=None, company_name=None, haircut=None, product=None, quantity=None, tradingsymbol=None, last_price=None, close_price=None, pnl=None, day_change=None, day_change_percentage=None, instrument_token=None, average_price=None, collateral_quantity=None, collateral_update_quantity=None, t1_quantity=None, exchange=None): # noqa: E501
76+
def __init__(self, isin=None, cnc_used_quantity=None, collateral_type=None, company_name=None, haircut=None, product=None, quantity=None, tradingsymbol=None, trading_symbol=None, last_price=None, close_price=None, pnl=None, day_change=None, day_change_percentage=None, instrument_token=None, average_price=None, collateral_quantity=None, collateral_update_quantity=None, t1_quantity=None, exchange=None): # noqa: E501
7577
"""HoldingsData - a model defined in Swagger""" # noqa: E501
7678
self._isin = None
7779
self._cnc_used_quantity = None
@@ -81,6 +83,7 @@ def __init__(self, isin=None, cnc_used_quantity=None, collateral_type=None, comp
8183
self._product = None
8284
self._quantity = None
8385
self._tradingsymbol = None
86+
self._trading_symbol = None
8487
self._last_price = None
8588
self._close_price = None
8689
self._pnl = None
@@ -109,6 +112,8 @@ def __init__(self, isin=None, cnc_used_quantity=None, collateral_type=None, comp
109112
self.quantity = quantity
110113
if tradingsymbol is not None:
111114
self.tradingsymbol = tradingsymbol
115+
if trading_symbol is not None:
116+
self.trading_symbol = trading_symbol
112117
if last_price is not None:
113118
self.last_price = last_price
114119
if close_price is not None:
@@ -316,6 +321,29 @@ def tradingsymbol(self, tradingsymbol):
316321

317322
self._tradingsymbol = tradingsymbol
318323

324+
@property
325+
def trading_symbol(self):
326+
"""Gets the trading_symbol of this HoldingsData. # noqa: E501
327+
328+
Shows the trading symbol of the instrument # noqa: E501
329+
330+
:return: The trading_symbol of this HoldingsData. # noqa: E501
331+
:rtype: str
332+
"""
333+
return self._trading_symbol
334+
335+
@trading_symbol.setter
336+
def trading_symbol(self, trading_symbol):
337+
"""Sets the trading_symbol of this HoldingsData.
338+
339+
Shows the trading symbol of the instrument # noqa: E501
340+
341+
:param trading_symbol: The trading_symbol of this HoldingsData. # noqa: E501
342+
:type: str
343+
"""
344+
345+
self._trading_symbol = trading_symbol
346+
319347
@property
320348
def last_price(self):
321349
"""Gets the last_price of this HoldingsData. # noqa: E501

upstox_client/models/order_book_data.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class OrderBookData(object):
3838
'instrument_token': 'str',
3939
'placed_by': 'str',
4040
'tradingsymbol': 'str',
41+
'trading_symbol': 'str',
4142
'order_type': 'str',
4243
'validity': 'str',
4344
'trigger_price': 'float',
@@ -70,6 +71,7 @@ class OrderBookData(object):
7071
'instrument_token': 'instrument_token',
7172
'placed_by': 'placed_by',
7273
'tradingsymbol': 'tradingsymbol',
74+
'trading_symbol': 'trading_symbol',
7375
'order_type': 'order_type',
7476
'validity': 'validity',
7577
'trigger_price': 'trigger_price',
@@ -91,7 +93,7 @@ class OrderBookData(object):
9193
'order_ref_id': 'order_ref_id'
9294
}
9395

94-
def __init__(self, exchange=None, product=None, price=None, quantity=None, status=None, guid=None, tag=None, instrument_token=None, placed_by=None, tradingsymbol=None, order_type=None, validity=None, trigger_price=None, disclosed_quantity=None, transaction_type=None, average_price=None, filled_quantity=None, pending_quantity=None, status_message=None, status_message_raw=None, exchange_order_id=None, parent_order_id=None, order_id=None, variety=None, order_timestamp=None, exchange_timestamp=None, is_amo=None, order_request_id=None, order_ref_id=None): # noqa: E501
96+
def __init__(self, exchange=None, product=None, price=None, quantity=None, status=None, guid=None, tag=None, instrument_token=None, placed_by=None, tradingsymbol=None, trading_symbol=None, order_type=None, validity=None, trigger_price=None, disclosed_quantity=None, transaction_type=None, average_price=None, filled_quantity=None, pending_quantity=None, status_message=None, status_message_raw=None, exchange_order_id=None, parent_order_id=None, order_id=None, variety=None, order_timestamp=None, exchange_timestamp=None, is_amo=None, order_request_id=None, order_ref_id=None): # noqa: E501
9597
"""OrderBookData - a model defined in Swagger""" # noqa: E501
9698
self._exchange = None
9799
self._product = None
@@ -103,6 +105,7 @@ def __init__(self, exchange=None, product=None, price=None, quantity=None, statu
103105
self._instrument_token = None
104106
self._placed_by = None
105107
self._tradingsymbol = None
108+
self._trading_symbol = None
106109
self._order_type = None
107110
self._validity = None
108111
self._trigger_price = None
@@ -143,6 +146,8 @@ def __init__(self, exchange=None, product=None, price=None, quantity=None, statu
143146
self.placed_by = placed_by
144147
if tradingsymbol is not None:
145148
self.tradingsymbol = tradingsymbol
149+
if trading_symbol is not None:
150+
self.trading_symbol = trading_symbol
146151
if order_type is not None:
147152
self.order_type = order_type
148153
if validity is not None:
@@ -422,6 +427,29 @@ def tradingsymbol(self, tradingsymbol):
422427

423428
self._tradingsymbol = tradingsymbol
424429

430+
@property
431+
def trading_symbol(self):
432+
"""Gets the trading_symbol of this OrderBookData. # noqa: E501
433+
434+
Shows the trading symbol of the instrument # noqa: E501
435+
436+
:return: The trading_symbol of this OrderBookData. # noqa: E501
437+
:rtype: str
438+
"""
439+
return self._trading_symbol
440+
441+
@trading_symbol.setter
442+
def trading_symbol(self, trading_symbol):
443+
"""Sets the trading_symbol of this OrderBookData.
444+
445+
Shows the trading symbol of the instrument # noqa: E501
446+
447+
:param trading_symbol: The trading_symbol of this OrderBookData. # noqa: E501
448+
:type: str
449+
"""
450+
451+
self._trading_symbol = trading_symbol
452+
425453
@property
426454
def order_type(self):
427455
"""Gets the order_type of this OrderBookData. # noqa: E501

upstox_client/models/order_data.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class OrderData(object):
4747
'order_type': 'str',
4848
'parent_order_id': 'str',
4949
'tradingsymbol': 'str',
50+
'trading_symbol': 'str',
5051
'order_timestamp': 'str',
5152
'filled_quantity': 'int',
5253
'transaction_type': 'str',
@@ -75,6 +76,7 @@ class OrderData(object):
7576
'order_type': 'order_type',
7677
'parent_order_id': 'parent_order_id',
7778
'tradingsymbol': 'tradingsymbol',
79+
'trading_symbol': 'trading_symbol',
7880
'order_timestamp': 'order_timestamp',
7981
'filled_quantity': 'filled_quantity',
8082
'transaction_type': 'transaction_type',
@@ -83,7 +85,7 @@ class OrderData(object):
8385
'variety': 'variety'
8486
}
8587

86-
def __init__(self, exchange=None, price=None, product=None, quantity=None, status=None, tag=None, validity=None, average_price=None, disclosed_quantity=None, exchange_order_id=None, exchange_timestamp=None, instrument_token=None, is_amo=None, status_message=None, order_id=None, order_request_id=None, order_type=None, parent_order_id=None, tradingsymbol=None, order_timestamp=None, filled_quantity=None, transaction_type=None, trigger_price=None, placed_by=None, variety=None): # noqa: E501
88+
def __init__(self, exchange=None, price=None, product=None, quantity=None, status=None, tag=None, validity=None, average_price=None, disclosed_quantity=None, exchange_order_id=None, exchange_timestamp=None, instrument_token=None, is_amo=None, status_message=None, order_id=None, order_request_id=None, order_type=None, parent_order_id=None, tradingsymbol=None, trading_symbol=None, order_timestamp=None, filled_quantity=None, transaction_type=None, trigger_price=None, placed_by=None, variety=None): # noqa: E501
8789
"""OrderData - a model defined in Swagger""" # noqa: E501
8890
self._exchange = None
8991
self._price = None
@@ -104,6 +106,7 @@ def __init__(self, exchange=None, price=None, product=None, quantity=None, statu
104106
self._order_type = None
105107
self._parent_order_id = None
106108
self._tradingsymbol = None
109+
self._trading_symbol = None
107110
self._order_timestamp = None
108111
self._filled_quantity = None
109112
self._transaction_type = None
@@ -149,6 +152,8 @@ def __init__(self, exchange=None, price=None, product=None, quantity=None, statu
149152
self.parent_order_id = parent_order_id
150153
if tradingsymbol is not None:
151154
self.tradingsymbol = tradingsymbol
155+
if trading_symbol is not None:
156+
self.trading_symbol = trading_symbol
152157
if order_timestamp is not None:
153158
self.order_timestamp = order_timestamp
154159
if filled_quantity is not None:
@@ -623,6 +628,29 @@ def tradingsymbol(self, tradingsymbol):
623628

624629
self._tradingsymbol = tradingsymbol
625630

631+
@property
632+
def trading_symbol(self):
633+
"""Gets the trading_symbol of this OrderData. # noqa: E501
634+
635+
Shows the trading symbol of the instrument # noqa: E501
636+
637+
:return: The trading_symbol of this OrderData. # noqa: E501
638+
:rtype: str
639+
"""
640+
return self._trading_symbol
641+
642+
@trading_symbol.setter
643+
def trading_symbol(self, trading_symbol):
644+
"""Sets the trading_symbol of this OrderData.
645+
646+
Shows the trading symbol of the instrument # noqa: E501
647+
648+
:param trading_symbol: The trading_symbol of this OrderData. # noqa: E501
649+
:type: str
650+
"""
651+
652+
self._trading_symbol = trading_symbol
653+
626654
@property
627655
def order_timestamp(self):
628656
"""Gets the order_timestamp of this OrderData. # noqa: E501

upstox_client/models/position_data.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class PositionData(object):
5353
'realised': 'float',
5454
'sell_value': 'float',
5555
'tradingsymbol': 'str',
56+
'trading_symbol': 'str',
5657
'close_price': 'float',
5758
'buy_price': 'float',
5859
'sell_price': 'float'
@@ -84,12 +85,13 @@ class PositionData(object):
8485
'realised': 'realised',
8586
'sell_value': 'sell_value',
8687
'tradingsymbol': 'tradingsymbol',
88+
'trading_symbol': 'trading_symbol',
8789
'close_price': 'close_price',
8890
'buy_price': 'buy_price',
8991
'sell_price': 'sell_price'
9092
}
9193

92-
def __init__(self, exchange=None, multiplier=None, value=None, pnl=None, product=None, instrument_token=None, average_price=None, buy_value=None, overnight_quantity=None, day_buy_value=None, day_buy_price=None, overnight_buy_amount=None, overnight_buy_quantity=None, day_buy_quantity=None, day_sell_value=None, day_sell_price=None, overnight_sell_amount=None, overnight_sell_quantity=None, day_sell_quantity=None, quantity=None, last_price=None, unrealised=None, realised=None, sell_value=None, tradingsymbol=None, close_price=None, buy_price=None, sell_price=None): # noqa: E501
94+
def __init__(self, exchange=None, multiplier=None, value=None, pnl=None, product=None, instrument_token=None, average_price=None, buy_value=None, overnight_quantity=None, day_buy_value=None, day_buy_price=None, overnight_buy_amount=None, overnight_buy_quantity=None, day_buy_quantity=None, day_sell_value=None, day_sell_price=None, overnight_sell_amount=None, overnight_sell_quantity=None, day_sell_quantity=None, quantity=None, last_price=None, unrealised=None, realised=None, sell_value=None, tradingsymbol=None, trading_symbol=None, close_price=None, buy_price=None, sell_price=None): # noqa: E501
9395
"""PositionData - a model defined in Swagger""" # noqa: E501
9496
self._exchange = None
9597
self._multiplier = None
@@ -116,6 +118,7 @@ def __init__(self, exchange=None, multiplier=None, value=None, pnl=None, product
116118
self._realised = None
117119
self._sell_value = None
118120
self._tradingsymbol = None
121+
self._trading_symbol = None
119122
self._close_price = None
120123
self._buy_price = None
121124
self._sell_price = None
@@ -170,6 +173,8 @@ def __init__(self, exchange=None, multiplier=None, value=None, pnl=None, product
170173
self.sell_value = sell_value
171174
if tradingsymbol is not None:
172175
self.tradingsymbol = tradingsymbol
176+
if trading_symbol is not None:
177+
self.trading_symbol = trading_symbol
173178
if close_price is not None:
174179
self.close_price = close_price
175180
if buy_price is not None:
@@ -758,6 +763,29 @@ def tradingsymbol(self, tradingsymbol):
758763

759764
self._tradingsymbol = tradingsymbol
760765

766+
@property
767+
def trading_symbol(self):
768+
"""Gets the trading_symbol of this PositionData. # noqa: E501
769+
770+
Shows the trading symbol of the instrument # noqa: E501
771+
772+
:return: The trading_symbol of this PositionData. # noqa: E501
773+
:rtype: str
774+
"""
775+
return self._trading_symbol
776+
777+
@trading_symbol.setter
778+
def trading_symbol(self, trading_symbol):
779+
"""Sets the trading_symbol of this PositionData.
780+
781+
Shows the trading symbol of the instrument # noqa: E501
782+
783+
:param trading_symbol: The trading_symbol of this PositionData. # noqa: E501
784+
:type: str
785+
"""
786+
787+
self._trading_symbol = trading_symbol
788+
761789
@property
762790
def close_price(self):
763791
"""Gets the close_price of this PositionData. # noqa: E501

upstox_client/models/token_response.py

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class TokenResponse(object):
3838
'user_type': 'str',
3939
'poa': 'bool',
4040
'is_active': 'bool',
41-
'access_token': 'str'
41+
'access_token': 'str',
42+
'extended_token': 'str'
4243
}
4344

4445
attribute_map = {
@@ -52,10 +53,11 @@ class TokenResponse(object):
5253
'user_type': 'user_type',
5354
'poa': 'poa',
5455
'is_active': 'is_active',
55-
'access_token': 'access_token'
56+
'access_token': 'access_token',
57+
'extended_token': 'extended_token'
5658
}
5759

58-
def __init__(self, email=None, exchanges=None, products=None, broker=None, user_id=None, user_name=None, order_types=None, user_type=None, poa=None, is_active=None, access_token=None): # noqa: E501
60+
def __init__(self, email=None, exchanges=None, products=None, broker=None, user_id=None, user_name=None, order_types=None, user_type=None, poa=None, is_active=None, access_token=None, extended_token=None): # noqa: E501
5961
"""TokenResponse - a model defined in Swagger""" # noqa: E501
6062
self._email = None
6163
self._exchanges = None
@@ -68,6 +70,7 @@ def __init__(self, email=None, exchanges=None, products=None, broker=None, user_
6870
self._poa = None
6971
self._is_active = None
7072
self._access_token = None
73+
self._extended_token = None
7174
self.discriminator = None
7275
if email is not None:
7376
self.email = email
@@ -91,6 +94,8 @@ def __init__(self, email=None, exchanges=None, products=None, broker=None, user_
9194
self.is_active = is_active
9295
if access_token is not None:
9396
self.access_token = access_token
97+
if extended_token is not None:
98+
self.extended_token = extended_token
9499

95100
@property
96101
def email(self):
@@ -366,6 +371,29 @@ def access_token(self, access_token):
366371

367372
self._access_token = access_token
368373

374+
@property
375+
def extended_token(self):
376+
"""Gets the extended_token of this TokenResponse. # noqa: E501
377+
378+
The authentication token that is to used with every subsequent API requests # noqa: E501
379+
380+
:return: The extended_token of this TokenResponse. # noqa: E501
381+
:rtype: str
382+
"""
383+
return self._extended_token
384+
385+
@extended_token.setter
386+
def extended_token(self, extended_token):
387+
"""Sets the extended_token of this TokenResponse.
388+
389+
The authentication token that is to used with every subsequent API requests # noqa: E501
390+
391+
:param extended_token: The extended_token of this TokenResponse. # noqa: E501
392+
:type: str
393+
"""
394+
395+
self._extended_token = extended_token
396+
369397
def to_dict(self):
370398
"""Returns the model properties as a dict"""
371399
result = {}

0 commit comments

Comments
 (0)