fyers-apiv3 3.1.3__tar.gz → 3.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/PKG-INFO +10 -2
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3/FyersWebsocket/map.json +1 -1
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3/fyersModel.py +86 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3.egg-info/PKG-INFO +10 -2
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/setup.py +2 -2
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/LICENSE.txt +0 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/README.md +0 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3/FyersWebsocket/__init__.py +0 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3/FyersWebsocket/data_ws.py +0 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3/FyersWebsocket/defines.py +0 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3/FyersWebsocket/order_ws.py +0 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3/__init__.py +0 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3/fyers_logger.py +0 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3.egg-info/SOURCES.txt +0 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3.egg-info/dependency_links.txt +0 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3.egg-info/requires.txt +0 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/fyers_apiv3.egg-info/top_level.txt +0 -0
- {fyers_apiv3-3.1.3 → fyers_apiv3-3.1.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: fyers_apiv3
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.5
|
|
4
4
|
Summary: Fyers trading APIs.
|
|
5
5
|
Home-page: https://github.com/FyersDev/fyers-api-sample-code/tree/sample_v3/v3/python
|
|
6
6
|
Author: Fyers-Tech
|
|
@@ -15,6 +15,14 @@ Requires-Dist: asyncio==3.4.3
|
|
|
15
15
|
Requires-Dist: aiohttp==3.9.3
|
|
16
16
|
Requires-Dist: aws_lambda_powertools==1.25.5
|
|
17
17
|
Requires-Dist: websocket-client==1.6.1
|
|
18
|
+
Dynamic: author
|
|
19
|
+
Dynamic: author-email
|
|
20
|
+
Dynamic: classifier
|
|
21
|
+
Dynamic: description
|
|
22
|
+
Dynamic: description-content-type
|
|
23
|
+
Dynamic: home-page
|
|
24
|
+
Dynamic: requires-dist
|
|
25
|
+
Dynamic: summary
|
|
18
26
|
|
|
19
27
|
# The Fyers API Python client - v3
|
|
20
28
|
|
|
@@ -26,7 +26,9 @@ class Config:
|
|
|
26
26
|
convert_position = "/positions"
|
|
27
27
|
funds = "/funds"
|
|
28
28
|
orders_endpoint = "/orders/sync"
|
|
29
|
+
gtt_orders_sync = "/gtt/orders/sync"
|
|
29
30
|
orderbook = "/orders"
|
|
31
|
+
gtt_orders = "/gtt/orders"
|
|
30
32
|
market_status = "/marketStatus"
|
|
31
33
|
auth = "/generate-authcode"
|
|
32
34
|
generate_access_token = "/validate-authcode"
|
|
@@ -688,7 +690,21 @@ class FyersModel:
|
|
|
688
690
|
else:
|
|
689
691
|
response = self.service.get_call(Config.orderbook, self.header, data)
|
|
690
692
|
return response
|
|
693
|
+
|
|
694
|
+
def gtt_orderbook(self, data = None) -> dict:
|
|
695
|
+
"""
|
|
696
|
+
Retrieves the gtt order information.
|
|
691
697
|
|
|
698
|
+
Returns:
|
|
699
|
+
The response JSON as a dictionary.
|
|
700
|
+
"""
|
|
701
|
+
if self.is_async:
|
|
702
|
+
response = self.service.get_async_call(Config.gtt_orders, self.header, data)
|
|
703
|
+
|
|
704
|
+
else:
|
|
705
|
+
response = self.service.get_call(Config.gtt_orders, self.header, data)
|
|
706
|
+
return response
|
|
707
|
+
|
|
692
708
|
def market_status(self) -> dict:
|
|
693
709
|
"""
|
|
694
710
|
Retrieves market status.
|
|
@@ -749,6 +765,23 @@ class FyersModel:
|
|
|
749
765
|
else:
|
|
750
766
|
response = self.service.delete_call(Config.orders_endpoint, self.header, data)
|
|
751
767
|
return response
|
|
768
|
+
|
|
769
|
+
def cancel_gtt_order(self,data) -> dict:
|
|
770
|
+
"""
|
|
771
|
+
Cancel order.
|
|
772
|
+
|
|
773
|
+
Args:
|
|
774
|
+
id (str): Unique identifier for the order to be cancelled, e.g., "25010700000001".
|
|
775
|
+
|
|
776
|
+
Returns:
|
|
777
|
+
The response JSON as a dictionary.
|
|
778
|
+
"""
|
|
779
|
+
|
|
780
|
+
if self.is_async:
|
|
781
|
+
response = self.service.delete_async_call(Config.gtt_orders_sync, self.header, data)
|
|
782
|
+
else:
|
|
783
|
+
response = self.service.delete_call(Config.gtt_orders_sync, self.header, data)
|
|
784
|
+
return response
|
|
752
785
|
|
|
753
786
|
def place_order(self, data) -> dict:
|
|
754
787
|
"""
|
|
@@ -777,6 +810,35 @@ class FyersModel:
|
|
|
777
810
|
else:
|
|
778
811
|
response = self.service.post_call(Config.orders_endpoint, self.header, data)
|
|
779
812
|
return response
|
|
813
|
+
|
|
814
|
+
def place_gtt_order(self,data) -> dict:
|
|
815
|
+
"""
|
|
816
|
+
Places an order based on the provided data.
|
|
817
|
+
|
|
818
|
+
Args:
|
|
819
|
+
data (dict): A dictionary containing the order details.
|
|
820
|
+
- 'id*' (str): Unique identifier for the order to be modified, e.g., "25010700000001".
|
|
821
|
+
- 'side' (int): Indicates the side of the order: 1 for buy, -1 for sell.
|
|
822
|
+
- 'symbol' (str): The instrument's unique identifier, e.g., "NSE:CHOLAFIN-EQ"
|
|
823
|
+
- 'productType*' (str): The product type for the order. Valid values: "CNC", "MARGIN", "MTF".
|
|
824
|
+
- 'orderInfo*' (object): Contains information about the GTT/OCO order legs.
|
|
825
|
+
- 'orderInfo.leg1*' (object): Details for GTT order leg. Mandatory for all orders.
|
|
826
|
+
- 'orderInfo.leg1.price*' (number): Price at which the order.
|
|
827
|
+
- 'orderInfo.leg1.triggerPrice' (number): Trigger price for the GTT order. NOTE: for OCO order this leg trigger price should be always above LTP
|
|
828
|
+
- 'orderInfo.leg1.qty*' (int): Quantity for the GTT order leg.
|
|
829
|
+
- 'orderInfo.leg2*' (object): Details for OCO order leg. Optional and included only for OCO orders.
|
|
830
|
+
- 'orderInfo.leg2.price*' (number): Price at which the second leg of the OCO order should be placed.
|
|
831
|
+
- 'orderInfo.leg2.triggerPrice*' (number): Trigger price for the second leg of the OCO order.NOTE: for OCO order this leg trigger price should be always below LTP
|
|
832
|
+
- 'orderInfo.leg2.qty*' (integer): Quantity for the second leg of the OCO order.
|
|
833
|
+
|
|
834
|
+
Returns:
|
|
835
|
+
The response JSON as a dictionary.
|
|
836
|
+
"""
|
|
837
|
+
if self.is_async:
|
|
838
|
+
response = self.service.post_async_call(Config.gtt_orders_sync, self.header, data)
|
|
839
|
+
else:
|
|
840
|
+
response = self.service.post_call(Config.gtt_orders_sync, self.header, data)
|
|
841
|
+
return response
|
|
780
842
|
|
|
781
843
|
def modify_order(self, data) -> dict:
|
|
782
844
|
"""
|
|
@@ -798,6 +860,30 @@ class FyersModel:
|
|
|
798
860
|
else:
|
|
799
861
|
response = self.service.patch_call(Config.orders_endpoint, self.header, data)
|
|
800
862
|
return response
|
|
863
|
+
|
|
864
|
+
def modify_gtt_order(self,data) -> dict:
|
|
865
|
+
"""
|
|
866
|
+
Modifies the parameters of a pending order based on the provided details.
|
|
867
|
+
|
|
868
|
+
Parameters:
|
|
869
|
+
id (str): Unique identifier for the order to be modified, e.g., "25010700000001"
|
|
870
|
+
orderInfo* (object): Contains updated information about the GTT/OCO order legs.
|
|
871
|
+
orderInfo.leg1* (object): Details for GTT order leg. Mandatory for all modifications.
|
|
872
|
+
orderInfo.leg1.price* (number): Updated price at which the order should be placed.
|
|
873
|
+
orderInfo.leg1.triggerPrice* (number): Updated trigger price for the GTT order. NOTE: for OCO order this leg trigger price should be always above LTP.
|
|
874
|
+
orderInfo.leg1.qty** (integer): Updated quantity for the GTT order leg.
|
|
875
|
+
orderInfo.leg2* (object): Details for OCO order leg. Required if the order is an OCO type.
|
|
876
|
+
orderInfo.leg2.triggerPrice* (number): Updated trigger price for the second leg of the OCO order.NOTE: for OCO order this leg trigger price should be always below LTP.
|
|
877
|
+
orderInfo.leg2.qty* (integer): Updated quantity for the second leg of the OCO order.
|
|
878
|
+
|
|
879
|
+
Returns:
|
|
880
|
+
The response JSON as a dictionary.
|
|
881
|
+
"""
|
|
882
|
+
if self.is_async:
|
|
883
|
+
response = self.service.patch_async_call(Config.gtt_orders_sync, self.header, data)
|
|
884
|
+
else:
|
|
885
|
+
response = self.service.patch_call(Config.gtt_orders_sync, self.header, data)
|
|
886
|
+
return response
|
|
801
887
|
|
|
802
888
|
def exit_positions(self, data={}) -> dict:
|
|
803
889
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: fyers_apiv3
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.5
|
|
4
4
|
Summary: Fyers trading APIs.
|
|
5
5
|
Home-page: https://github.com/FyersDev/fyers-api-sample-code/tree/sample_v3/v3/python
|
|
6
6
|
Author: Fyers-Tech
|
|
@@ -15,6 +15,14 @@ Requires-Dist: asyncio==3.4.3
|
|
|
15
15
|
Requires-Dist: aiohttp==3.9.3
|
|
16
16
|
Requires-Dist: aws_lambda_powertools==1.25.5
|
|
17
17
|
Requires-Dist: websocket-client==1.6.1
|
|
18
|
+
Dynamic: author
|
|
19
|
+
Dynamic: author-email
|
|
20
|
+
Dynamic: classifier
|
|
21
|
+
Dynamic: description
|
|
22
|
+
Dynamic: description-content-type
|
|
23
|
+
Dynamic: home-page
|
|
24
|
+
Dynamic: requires-dist
|
|
25
|
+
Dynamic: summary
|
|
18
26
|
|
|
19
27
|
# The Fyers API Python client - v3
|
|
20
28
|
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name='fyers_apiv3',
|
|
8
|
-
version='3.1.
|
|
8
|
+
version='3.1.5',
|
|
9
9
|
author="Fyers-Tech",
|
|
10
10
|
author_email="support@fyers.in",
|
|
11
11
|
description="Fyers trading APIs.",
|
|
@@ -14,7 +14,7 @@ setuptools.setup(
|
|
|
14
14
|
url="https://github.com/FyersDev/fyers-api-sample-code/tree/sample_v3/v3/python",
|
|
15
15
|
packages=setuptools.find_packages(),
|
|
16
16
|
package_data={
|
|
17
|
-
'fyers_apiv3': ['/Users/
|
|
17
|
+
'fyers_apiv3': ['/Users/em374/Documents/Git/fyers-api-py/fyers_apiv3/FyersWebsocket/map.json']
|
|
18
18
|
},
|
|
19
19
|
include_package_data=True,
|
|
20
20
|
install_requires=[
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|