firstrade 0.0.14__tar.gz → 0.0.15__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.
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: firstrade
3
- Version: 0.0.14
3
+ Version: 0.0.15
4
4
  Summary: An unofficial API for Firstrade
5
5
  Home-page: https://github.com/MaxxRK/firstrade-api
6
- Download-URL: https://github.com/MaxxRK/firstrade-api/archive/refs/tags/0014.tar.gz
6
+ Download-URL: https://github.com/MaxxRK/firstrade-api/archive/refs/tags/0015.tar.gz
7
7
  Author: MaxxRK
8
8
  Author-email: maxxrk@pm.me
9
9
  License: MIT
@@ -24,26 +24,34 @@ Requires-Dist: beautifulsoup4
24
24
  Requires-Dist: lxml
25
25
 
26
26
  # firstrade-api
27
- A reverse-engineered python API to interact with the Firstrade Trading platform.
28
27
 
29
- This is not an official api! This api's functionality may change at any time.
28
+ A reverse-engineered python API to interact with the Firstrade Trading platform.
30
29
 
31
- This api provides a means of buying and selling stocks through Firstrade. It uses the Session class from requests to get authorization cookies. The rest is done with reverse engineered requests to Firstrade's API.
30
+ This is not an official api! This api's functionality may change at any time.
32
31
 
33
- ---
32
+ This api provides a means of buying and selling stocks through Firstrade. It uses the Session class from requests to get authorization cookies. The rest is done with reverse engineered requests to Firstrade's API.
33
+
34
+ In order to use Fractional shares you must accept the agreement on the website before using it in this API.
35
+
36
+ ---
34
37
 
35
38
  ## Contribution
39
+
36
40
  I am new to coding and new to open-source. I would love any help and suggestions!
37
41
 
38
42
  ## Setup
43
+
39
44
  Install using pypi:
45
+
40
46
  ```
41
47
  pip install firstrade
42
48
  ```
43
49
 
44
50
  ## Quikstart
45
- The code below will:
46
- - Login and print account info.
51
+
52
+ The code below will:
53
+
54
+ - Login and print account info.
47
55
  - Get a quote for 'INTC' and print out the information
48
56
  - Place a market order for 'INTC' on the first account in the `account_numbers` list
49
57
  - Print out the order confirmation
@@ -97,9 +105,10 @@ ft_order.place_order(
97
105
  symbol="INTC",
98
106
  price_type=order.PriceType.MARKET,
99
107
  order_type=order.OrderType.BUY,
100
- quantity=1,
108
+ quantity=1, # number of shares or amount of dollar, depends on the value of notional
101
109
  duration=order.Duration.DAY,
102
110
  dry_run=True,
111
+ notional=False, # set to True if quantity above is "dollar"
103
112
  )
104
113
 
105
114
  # Print Order data Dict
@@ -117,21 +126,24 @@ else:
117
126
  # Delete cookies
118
127
  ft_ss.delete_cookies()
119
128
  ```
129
+
120
130
  This code is also in test.py
121
131
 
122
132
  ---
123
133
 
124
- ## Implemented Features
125
- - [x] Login
126
- - [x] Get Quotes
127
- - [x] Get Account Data
128
- - [x] Place Orders and Receive order confirmation
129
- - [x] Get Currently Held Positions
134
+ ## Implemented Features
135
+
136
+ - [x] Login
137
+ - [x] Get Quotes
138
+ - [x] Get Account Data
139
+ - [x] Place Orders and Receive order confirmation
140
+ - [x] Get Currently Held Positions
130
141
 
131
142
  ## TO DO
132
- - [ ] Check on placed order status.
133
- - [ ] Cancel placed orders
134
- - [ ] Options
135
- - [ ] Give me some Ideas!
136
143
 
137
- [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/O5O6PTOYG)
144
+ - [ ] Check on placed order status.
145
+ - [ ] Cancel placed orders
146
+ - [ ] Options
147
+ - [ ] Give me some Ideas!
148
+
149
+ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/O5O6PTOYG)
@@ -1,24 +1,32 @@
1
1
  # firstrade-api
2
- A reverse-engineered python API to interact with the Firstrade Trading platform.
3
2
 
4
- This is not an official api! This api's functionality may change at any time.
3
+ A reverse-engineered python API to interact with the Firstrade Trading platform.
5
4
 
6
- This api provides a means of buying and selling stocks through Firstrade. It uses the Session class from requests to get authorization cookies. The rest is done with reverse engineered requests to Firstrade's API.
5
+ This is not an official api! This api's functionality may change at any time.
7
6
 
8
- ---
7
+ This api provides a means of buying and selling stocks through Firstrade. It uses the Session class from requests to get authorization cookies. The rest is done with reverse engineered requests to Firstrade's API.
8
+
9
+ In order to use Fractional shares you must accept the agreement on the website before using it in this API.
10
+
11
+ ---
9
12
 
10
13
  ## Contribution
14
+
11
15
  I am new to coding and new to open-source. I would love any help and suggestions!
12
16
 
13
17
  ## Setup
18
+
14
19
  Install using pypi:
20
+
15
21
  ```
16
22
  pip install firstrade
17
23
  ```
18
24
 
19
25
  ## Quikstart
20
- The code below will:
21
- - Login and print account info.
26
+
27
+ The code below will:
28
+
29
+ - Login and print account info.
22
30
  - Get a quote for 'INTC' and print out the information
23
31
  - Place a market order for 'INTC' on the first account in the `account_numbers` list
24
32
  - Print out the order confirmation
@@ -72,9 +80,10 @@ ft_order.place_order(
72
80
  symbol="INTC",
73
81
  price_type=order.PriceType.MARKET,
74
82
  order_type=order.OrderType.BUY,
75
- quantity=1,
83
+ quantity=1, # number of shares or amount of dollar, depends on the value of notional
76
84
  duration=order.Duration.DAY,
77
85
  dry_run=True,
86
+ notional=False, # set to True if quantity above is "dollar"
78
87
  )
79
88
 
80
89
  # Print Order data Dict
@@ -92,21 +101,24 @@ else:
92
101
  # Delete cookies
93
102
  ft_ss.delete_cookies()
94
103
  ```
104
+
95
105
  This code is also in test.py
96
106
 
97
107
  ---
98
108
 
99
- ## Implemented Features
100
- - [x] Login
101
- - [x] Get Quotes
102
- - [x] Get Account Data
103
- - [x] Place Orders and Receive order confirmation
104
- - [x] Get Currently Held Positions
109
+ ## Implemented Features
110
+
111
+ - [x] Login
112
+ - [x] Get Quotes
113
+ - [x] Get Account Data
114
+ - [x] Place Orders and Receive order confirmation
115
+ - [x] Get Currently Held Positions
105
116
 
106
117
  ## TO DO
107
- - [ ] Check on placed order status.
108
- - [ ] Cancel placed orders
109
- - [ ] Options
110
- - [ ] Give me some Ideas!
111
118
 
112
- [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/O5O6PTOYG)
119
+ - [ ] Check on placed order status.
120
+ - [ ] Cancel placed orders
121
+ - [ ] Options
122
+ - [ ] Give me some Ideas!
123
+
124
+ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/O5O6PTOYG)
@@ -68,6 +68,7 @@ class Order:
68
68
  duration: Duration,
69
69
  price=0.00,
70
70
  dry_run=True,
71
+ notional=False,
71
72
  ):
72
73
  """
73
74
  Builds and places an order.
@@ -100,6 +101,7 @@ class Order:
100
101
  "submiturl": "/cgi-bin/orderbar",
101
102
  "orderbar_clordid": "",
102
103
  "orderbar_accountid": "",
104
+ "notional": "yes" if notional else "",
103
105
  "stockorderpage": "yes",
104
106
  "submitOrders": "1",
105
107
  "previewOrders": previewOrders,
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: firstrade
3
- Version: 0.0.14
3
+ Version: 0.0.15
4
4
  Summary: An unofficial API for Firstrade
5
5
  Home-page: https://github.com/MaxxRK/firstrade-api
6
- Download-URL: https://github.com/MaxxRK/firstrade-api/archive/refs/tags/0014.tar.gz
6
+ Download-URL: https://github.com/MaxxRK/firstrade-api/archive/refs/tags/0015.tar.gz
7
7
  Author: MaxxRK
8
8
  Author-email: maxxrk@pm.me
9
9
  License: MIT
@@ -24,26 +24,34 @@ Requires-Dist: beautifulsoup4
24
24
  Requires-Dist: lxml
25
25
 
26
26
  # firstrade-api
27
- A reverse-engineered python API to interact with the Firstrade Trading platform.
28
27
 
29
- This is not an official api! This api's functionality may change at any time.
28
+ A reverse-engineered python API to interact with the Firstrade Trading platform.
30
29
 
31
- This api provides a means of buying and selling stocks through Firstrade. It uses the Session class from requests to get authorization cookies. The rest is done with reverse engineered requests to Firstrade's API.
30
+ This is not an official api! This api's functionality may change at any time.
32
31
 
33
- ---
32
+ This api provides a means of buying and selling stocks through Firstrade. It uses the Session class from requests to get authorization cookies. The rest is done with reverse engineered requests to Firstrade's API.
33
+
34
+ In order to use Fractional shares you must accept the agreement on the website before using it in this API.
35
+
36
+ ---
34
37
 
35
38
  ## Contribution
39
+
36
40
  I am new to coding and new to open-source. I would love any help and suggestions!
37
41
 
38
42
  ## Setup
43
+
39
44
  Install using pypi:
45
+
40
46
  ```
41
47
  pip install firstrade
42
48
  ```
43
49
 
44
50
  ## Quikstart
45
- The code below will:
46
- - Login and print account info.
51
+
52
+ The code below will:
53
+
54
+ - Login and print account info.
47
55
  - Get a quote for 'INTC' and print out the information
48
56
  - Place a market order for 'INTC' on the first account in the `account_numbers` list
49
57
  - Print out the order confirmation
@@ -97,9 +105,10 @@ ft_order.place_order(
97
105
  symbol="INTC",
98
106
  price_type=order.PriceType.MARKET,
99
107
  order_type=order.OrderType.BUY,
100
- quantity=1,
108
+ quantity=1, # number of shares or amount of dollar, depends on the value of notional
101
109
  duration=order.Duration.DAY,
102
110
  dry_run=True,
111
+ notional=False, # set to True if quantity above is "dollar"
103
112
  )
104
113
 
105
114
  # Print Order data Dict
@@ -117,21 +126,24 @@ else:
117
126
  # Delete cookies
118
127
  ft_ss.delete_cookies()
119
128
  ```
129
+
120
130
  This code is also in test.py
121
131
 
122
132
  ---
123
133
 
124
- ## Implemented Features
125
- - [x] Login
126
- - [x] Get Quotes
127
- - [x] Get Account Data
128
- - [x] Place Orders and Receive order confirmation
129
- - [x] Get Currently Held Positions
134
+ ## Implemented Features
135
+
136
+ - [x] Login
137
+ - [x] Get Quotes
138
+ - [x] Get Account Data
139
+ - [x] Place Orders and Receive order confirmation
140
+ - [x] Get Currently Held Positions
130
141
 
131
142
  ## TO DO
132
- - [ ] Check on placed order status.
133
- - [ ] Cancel placed orders
134
- - [ ] Options
135
- - [ ] Give me some Ideas!
136
143
 
137
- [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/O5O6PTOYG)
144
+ - [ ] Check on placed order status.
145
+ - [ ] Cancel placed orders
146
+ - [ ] Options
147
+ - [ ] Give me some Ideas!
148
+
149
+ [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/O5O6PTOYG)
@@ -5,7 +5,7 @@ with open("README.md", "r") as f:
5
5
 
6
6
  setuptools.setup(
7
7
  name="firstrade",
8
- version="0.0.14",
8
+ version="0.0.15",
9
9
  author="MaxxRK",
10
10
  author_email="maxxrk@pm.me",
11
11
  description="An unofficial API for Firstrade",
@@ -13,7 +13,7 @@ setuptools.setup(
13
13
  long_description_content_type="text/markdown",
14
14
  license="MIT",
15
15
  url="https://github.com/MaxxRK/firstrade-api",
16
- download_url="https://github.com/MaxxRK/firstrade-api/archive/refs/tags/0014.tar.gz",
16
+ download_url="https://github.com/MaxxRK/firstrade-api/archive/refs/tags/0015.tar.gz",
17
17
  keywords=["FIRSTRADE", "API"],
18
18
  install_requires=["requests", "beautifulsoup4", "lxml"],
19
19
  packages=["firstrade"],
File without changes
File without changes
File without changes