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.
- {firstrade-0.0.14 → firstrade-0.0.15}/PKG-INFO +32 -20
- {firstrade-0.0.14 → firstrade-0.0.15}/README.md +30 -18
- {firstrade-0.0.14 → firstrade-0.0.15}/firstrade/order.py +2 -0
- {firstrade-0.0.14 → firstrade-0.0.15}/firstrade.egg-info/PKG-INFO +32 -20
- {firstrade-0.0.14 → firstrade-0.0.15}/setup.py +2 -2
- {firstrade-0.0.14 → firstrade-0.0.15}/LICENSE +0 -0
- {firstrade-0.0.14 → firstrade-0.0.15}/firstrade/__init__.py +0 -0
- {firstrade-0.0.14 → firstrade-0.0.15}/firstrade/account.py +0 -0
- {firstrade-0.0.14 → firstrade-0.0.15}/firstrade/symbols.py +0 -0
- {firstrade-0.0.14 → firstrade-0.0.15}/firstrade/urls.py +0 -0
- {firstrade-0.0.14 → firstrade-0.0.15}/firstrade.egg-info/SOURCES.txt +0 -0
- {firstrade-0.0.14 → firstrade-0.0.15}/firstrade.egg-info/dependency_links.txt +0 -0
- {firstrade-0.0.14 → firstrade-0.0.15}/firstrade.egg-info/requires.txt +0 -0
- {firstrade-0.0.14 → firstrade-0.0.15}/firstrade.egg-info/top_level.txt +0 -0
- {firstrade-0.0.14 → firstrade-0.0.15}/setup.cfg +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: firstrade
|
|
3
|
-
Version: 0.0.
|
|
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/
|
|
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
|
-
|
|
28
|
+
A reverse-engineered python API to interact with the Firstrade Trading platform.
|
|
30
29
|
|
|
31
|
-
|
|
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
|
-
|
|
46
|
-
|
|
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
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
[
|
|
144
|
+
- [ ] Check on placed order status.
|
|
145
|
+
- [ ] Cancel placed orders
|
|
146
|
+
- [ ] Options
|
|
147
|
+
- [ ] Give me some Ideas!
|
|
148
|
+
|
|
149
|
+
[](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
|
-
|
|
3
|
+
A reverse-engineered python API to interact with the Firstrade Trading platform.
|
|
5
4
|
|
|
6
|
-
|
|
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
|
-
|
|
21
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
[
|
|
119
|
+
- [ ] Check on placed order status.
|
|
120
|
+
- [ ] Cancel placed orders
|
|
121
|
+
- [ ] Options
|
|
122
|
+
- [ ] Give me some Ideas!
|
|
123
|
+
|
|
124
|
+
[](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.
|
|
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/
|
|
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
|
-
|
|
28
|
+
A reverse-engineered python API to interact with the Firstrade Trading platform.
|
|
30
29
|
|
|
31
|
-
|
|
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
|
-
|
|
46
|
-
|
|
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
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
-
[
|
|
144
|
+
- [ ] Check on placed order status.
|
|
145
|
+
- [ ] Cancel placed orders
|
|
146
|
+
- [ ] Options
|
|
147
|
+
- [ ] Give me some Ideas!
|
|
148
|
+
|
|
149
|
+
[](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.
|
|
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/
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|