Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .konfig/generate-id.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
91597193-8d71-4b24-b49e-33d571495054
0ec39786-f650-439c-b34f-fbd0cd7e40d7
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Connect brokerage accounts to your app for live positions and trading

[![Packagist](https://img.shields.io/badge/Packagist-v2.0.30-blue)](https://packagist.org/packages/konfig/snaptrade-php-sdk)
[![Packagist](https://img.shields.io/badge/Packagist-v2.0.31-blue)](https://packagist.org/packages/konfig/snaptrade-php-sdk)
[![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)

</div>
Expand Down Expand Up @@ -86,7 +86,7 @@ To install the bindings via [Composer](https://getcomposer.org/), add the follow
}
],
"require": {
"konfig/snaptrade-php-sdk": "2.0.30"
"konfig/snaptrade-php-sdk": "2.0.31"
}
}
```
Expand Down Expand Up @@ -340,6 +340,8 @@ The ID of the account to get positions.

Lists balances, positions, option positions, and recent orders for the specified account. The data returned is similar to the data returned over the more fine-grained [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getUserAccountPositions) and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders) endpoints. __The finer-grained APIs are preferred. They are easier to work with, faster, and have better error handling than this coarse-grained API.__

The data returned here is cached. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for "Cache Expiry Time" to see the exact value for a specific brokerage. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.



#### 🛠️ Usage<a id="🛠️-usage"></a>
Expand Down
4 changes: 2 additions & 2 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = 'Konfig/2.0.30/PHP';
protected $userAgent = 'Konfig/2.0.31/PHP';

/**
* Debug switch (default set to false)
Expand Down Expand Up @@ -487,7 +487,7 @@ public static function toDebugReport()
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' The version of the OpenAPI document: 1.0.0' . PHP_EOL;
$report .= ' SDK Package Version: 2.0.30' . PHP_EOL;
$report .= ' SDK Package Version: 2.0.31' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
8 changes: 5 additions & 3 deletions lib/Model/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Account implements ModelInterface, ArrayAccess, \JsonSerializable
'institution_name' => 'string',
'created_date' => 'string',
'meta' => 'array<string,mixed>',
'cash_restrictions' => '\SnapTrade\Model\CashRestriction[]',
'cash_restrictions' => 'string[]',
'sync_status' => '\SnapTrade\Model\AccountSyncStatus',
'balance' => '\SnapTrade\Model\AccountBalance'
];
Expand Down Expand Up @@ -588,7 +588,8 @@ public function setMeta($meta)
/**
* Gets cash_restrictions
*
* @return \SnapTrade\Model\CashRestriction[]|null
* @return string[]|null
* @deprecated
*/
public function getCashRestrictions()
{
Expand All @@ -598,9 +599,10 @@ public function getCashRestrictions()
/**
* Sets cash_restrictions
*
* @param \SnapTrade\Model\CashRestriction[]|null $cash_restrictions cash_restrictions
* @param string[]|null $cash_restrictions This field is deprecated.
*
* @return self
* @deprecated
*/
public function setCashRestrictions($cash_restrictions)
{
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/AccountHoldingsAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* AccountHoldingsAccount Class Doc Comment
*
* @category Class
* @description A wrapper object containing holdings information for a single account
* @description A wrapper object containing holdings information for a single account.
* @package SnapTrade
* @implements \ArrayAccess<string, mixed>
*/
Expand Down Expand Up @@ -468,7 +468,7 @@ public function getOrders()
/**
* Sets orders
*
* @param \SnapTrade\Model\AccountOrderRecord[]|null $orders List of recent orders in the account, including both pending and executed orders.
* @param \SnapTrade\Model\AccountOrderRecord[]|null $orders List of recent orders in the account, including both pending and executed orders. Note that option orders are included in this list. Option orders will have a null `universal_symbol` field and a non-null `option_symbol` field.
*
* @return self
*/
Expand Down
Loading