Skip to content

Commit e03b12e

Browse files
snaptrade-sdks[bot]Passiv Ops
andauthored
Regenerate SDKs (#240)
Co-authored-by: Passiv Ops <passiv-ops@passiv.com>
1 parent aa28d28 commit e03b12e

15 files changed

+4431
-1
lines changed

.konfig/generate-id.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
44ee0dff-4416-4311-8e55-469b27c84d1b
1+
99ba219d-4d6d-4a86-ba2e-d3e3c054cdc6

README.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ Connect brokerage accounts to your app for live positions and trading
4646
* [`snaptrade.connections.removeBrokerageAuthorization`](#snaptradeconnectionsremovebrokerageauthorization)
4747
* [`snaptrade.connections.returnRates`](#snaptradeconnectionsreturnrates)
4848
* [`snaptrade.connections.sessionEvents`](#snaptradeconnectionssessionevents)
49+
* [`snaptrade.experimentalEndpoints.getUserAccountOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountordersv2)
50+
* [`snaptrade.experimentalEndpoints.getUserAccountRecentOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountrecentordersv2)
4951
* [`snaptrade.options.getOptionsChain`](#snaptradeoptionsgetoptionschain)
5052
* [`snaptrade.options.listOptionHoldings`](#snaptradeoptionslistoptionholdings)
5153
* [`snaptrade.referenceData.getCurrencyExchangeRatePair`](#snaptradereferencedatagetcurrencyexchangeratepair)
@@ -1186,6 +1188,105 @@ Optional comma separated list of session IDs used to filter the request on speci
11861188
---
11871189

11881190

1191+
### `snaptrade.experimentalEndpoints.getUserAccountOrdersV2`<a id="snaptradeexperimentalendpointsgetuseraccountordersv2"></a>
1192+
1193+
Returns a list of recent orders in the specified account.
1194+
1195+
The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg.
1196+
1197+
If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1198+
1199+
1200+
1201+
#### 🛠️ Usage<a id="🛠️-usage"></a>
1202+
1203+
```php
1204+
$result = $snaptrade->experimentalEndpoints->getUserAccountOrdersV2(
1205+
"snaptrade-user-123",
1206+
"adf2aa34-8219-40f7-a6b3-60156985cc61",
1207+
"917c8734-8470-4a3e-a18f-57c3f2ee6631",
1208+
"all",
1209+
30
1210+
);
1211+
```
1212+
1213+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
1214+
1215+
##### user_id: `string`<a id="user_id-string"></a>
1216+
1217+
##### user_secret: `string`<a id="user_secret-string"></a>
1218+
1219+
##### account_id: `string`<a id="account_id-string"></a>
1220+
1221+
##### state: `string`<a id="state-string"></a>
1222+
1223+
defaults value is set to \"all\"
1224+
1225+
##### days: `int`<a id="days-int"></a>
1226+
1227+
Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in.
1228+
1229+
1230+
#### 🔄 Return<a id="🔄-return"></a>
1231+
1232+
[**AccountOrdersV2Response**](./lib/Model/AccountOrdersV2Response.php)
1233+
1234+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
1235+
1236+
`/accounts/{accountId}/orders/v2` `GET`
1237+
1238+
[🔙 **Back to Table of Contents**](#table-of-contents)
1239+
1240+
---
1241+
1242+
1243+
### `snaptrade.experimentalEndpoints.getUserAccountRecentOrdersV2`<a id="snaptradeexperimentalendpointsgetuseraccountrecentordersv2"></a>
1244+
1245+
A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format.
1246+
This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders.
1247+
Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days.
1248+
By default only returns executed orders, but that can be changed by setting *only_executed* to false.
1249+
**Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
1250+
1251+
1252+
1253+
#### 🛠️ Usage<a id="🛠️-usage"></a>
1254+
1255+
```php
1256+
$result = $snaptrade->experimentalEndpoints->getUserAccountRecentOrdersV2(
1257+
"snaptrade-user-123",
1258+
"adf2aa34-8219-40f7-a6b3-60156985cc61",
1259+
"917c8734-8470-4a3e-a18f-57c3f2ee6631",
1260+
True
1261+
);
1262+
```
1263+
1264+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
1265+
1266+
##### user_id: `string`<a id="user_id-string"></a>
1267+
1268+
##### user_secret: `string`<a id="user_secret-string"></a>
1269+
1270+
##### account_id: `string`<a id="account_id-string"></a>
1271+
1272+
##### only_executed: `bool`<a id="only_executed-bool"></a>
1273+
1274+
Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
1275+
1276+
1277+
#### 🔄 Return<a id="🔄-return"></a>
1278+
1279+
[**AccountOrdersV2Response**](./lib/Model/AccountOrdersV2Response.php)
1280+
1281+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
1282+
1283+
`/accounts/{accountId}/recentOrders/v2` `GET`
1284+
1285+
[🔙 **Back to Table of Contents**](#table-of-contents)
1286+
1287+
---
1288+
1289+
11891290
### `snaptrade.options.getOptionsChain`<a id="snaptradeoptionsgetoptionschain"></a>
11901291

11911292
Returns the option chain for the specified symbol in the specified account.

0 commit comments

Comments
 (0)