Skip to content

Commit

Permalink
Regenerate SDKs (#14)
Browse files Browse the repository at this point in the history
Co-authored-by: konfig-publisher <publisher@konfigthis.com>
  • Loading branch information
konfig-bot[bot] and konfig-publisher committed Aug 22, 2024
1 parent 3f846b9 commit 537240e
Show file tree
Hide file tree
Showing 29 changed files with 1,040 additions and 324 deletions.
2 changes: 1 addition & 1 deletion .konfig/generate-id.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f0afe0fb-5d7b-4b66-b3b3-84b060a496ab
81b14b50-3280-483c-ae3d-052f538020aa
107 changes: 57 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ Places the option strategy order and returns the order record received from the

```php
$result = $snaptrade->options->placeOptionStrategy(
order_type: "Limit",
order_type: "Market",
time_in_force: "FOK",
user_id: "snaptrade-user-123",
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
Expand Down Expand Up @@ -1477,8 +1477,7 @@ The ID of the account to search for symbols within.

### `snaptrade.trading.cancelUserAccountOrder`<a id="snaptradetradingcanceluseraccountorder"></a>

Sends a signal to the brokerage to cancel the specified order.
This will only work if the order has not yet been executed.
Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.



Expand All @@ -1489,7 +1488,7 @@ $result = $snaptrade->trading->cancelUserAccountOrder(
user_id: "snaptrade-user-123",
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
brokerage_order_id: "2bcd7cc3-e922-4976-bce1-9858296801c3"
brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e"
);
```

Expand All @@ -1501,10 +1500,10 @@ $result = $snaptrade->trading->cancelUserAccountOrder(

##### account_id: `string`<a id="account_id-string"></a>

The ID of the account to cancel the order in.

##### brokerage_order_id: `string`<a id="brokerage_order_id-string"></a>

Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.


#### 🔄 Return<a id="🔄-return"></a>

Expand All @@ -1521,53 +1520,57 @@ The ID of the account to cancel the order in.

### `snaptrade.trading.getOrderImpact`<a id="snaptradetradinggetorderimpact"></a>

Return the trade object and it's impact on the account for the specified order.
Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.


#### 🛠️ Usage<a id="🛠️-usage"></a>

```php
$result = $snaptrade->trading->getOrderImpact(
account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
action: "BUY",
universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
order_type: "Market",
time_in_force: "FOK",
user_id: "snaptrade-user-123",
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
account_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
action: "BUY",
order_type: "Limit",
price: 31.33,
stop: 31.33,
time_in_force: "FOK",
units: 3.14,
universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
units: 10.5,
notional_value: None
);
```

#### ⚙️ Parameters<a id="⚙️-parameters"></a>

##### user_id: `string`<a id="user_id-string"></a>

##### user_secret: `string`<a id="user_secret-string"></a>

##### account_id: `string`<a id="account_id-string"></a>

Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.

##### action:<a id="action"></a>

##### universal_symbol_id: `string`<a id="universal_symbol_id-string"></a>

Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.

##### order_type:<a id="order_type"></a>

##### time_in_force:<a id="time_in_force"></a>

##### user_id: `string`<a id="user_id-string"></a>

##### user_secret: `string`<a id="user_secret-string"></a>

##### price: `float`<a id="price-float"></a>

Trade Price if limit or stop limit order
The limit price for `Limit` and `StopLimit` orders.

##### stop: `float`<a id="stop-float"></a>

Stop Price. If stop loss or stop limit order, the price to trigger the stop

##### time_in_force:<a id="time_in_force"></a>
The price at which a stop order is triggered for `Stop` and `StopLimit` orders.

##### units: [`float`](./lib/Model/float.php)<a id="units-floatlibmodelfloatphp"></a>

##### universal_symbol_id: `string`<a id="universal_symbol_id-string"></a>

##### notional_value: [`ManualTradeFormNotionalValue`](./lib/Model/ManualTradeFormNotionalValue.php)<a id="notional_value-manualtradeformnotionalvaluelibmodelmanualtradeformnotionalvaluephp"></a>


Expand All @@ -1586,7 +1589,7 @@ Stop Price. If stop loss or stop limit order, the price to trigger the stop

### `snaptrade.trading.getUserAccountQuotes`<a id="snaptradetradinggetuseraccountquotes"></a>

Returns quote(s) from the brokerage for the specified symbol(s).
Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.


#### 🛠️ Usage<a id="🛠️-usage"></a>
Expand All @@ -1609,15 +1612,13 @@ $result = $snaptrade->trading->getUserAccountQuotes(

##### symbols: `string`<a id="symbols-string"></a>

List of universal_symbol_id or tickers to get quotes for.
List of Universal Symbol IDs or tickers to get quotes for.

##### account_id: `string`<a id="account_id-string"></a>

The ID of the account to get quotes.

##### use_ticker: `bool`<a id="use_ticker-bool"></a>

Should be set to True if providing tickers.
Should be set to `True` if `symbols` are comprised of tickers. Defaults to `False` if not provided.


#### 🔄 Return<a id="🔄-return"></a>
Expand All @@ -1635,53 +1636,60 @@ Should be set to True if providing tickers.

### `snaptrade.trading.placeForceOrder`<a id="snaptradetradingplaceforceorder"></a>

Places a specified trade in the specified account.
Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds.

This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact).



#### 🛠️ Usage<a id="🛠️-usage"></a>

```php
$result = $snaptrade->trading->placeForceOrder(
account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
action: "BUY",
universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
order_type: "Market",
time_in_force: "FOK",
user_id: "snaptrade-user-123",
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
account_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
action: "BUY",
order_type: "Limit",
price: 31.33,
stop: 31.33,
time_in_force: "FOK",
units: 3.14,
universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
units: 10.5,
notional_value: None
);
```

#### ⚙️ Parameters<a id="⚙️-parameters"></a>

##### user_id: `string`<a id="user_id-string"></a>

##### user_secret: `string`<a id="user_secret-string"></a>

##### account_id: `string`<a id="account_id-string"></a>

Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.

##### action:<a id="action"></a>

##### universal_symbol_id: `string`<a id="universal_symbol_id-string"></a>

Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.

##### order_type:<a id="order_type"></a>

##### time_in_force:<a id="time_in_force"></a>

##### user_id: `string`<a id="user_id-string"></a>

##### user_secret: `string`<a id="user_secret-string"></a>

##### price: `float`<a id="price-float"></a>

Trade Price if limit or stop limit order
The limit price for `Limit` and `StopLimit` orders.

##### stop: `float`<a id="stop-float"></a>

Stop Price. If stop loss or stop limit order, the price to trigger the stop

##### time_in_force:<a id="time_in_force"></a>
The price at which a stop order is triggered for `Stop` and `StopLimit` orders.

##### units: [`float`](./lib/Model/float.php)<a id="units-floatlibmodelfloatphp"></a>

##### universal_symbol_id: `string`<a id="universal_symbol_id-string"></a>

##### notional_value: [`ManualTradeFormNotionalValue`](./lib/Model/ManualTradeFormNotionalValue.php)<a id="notional_value-manualtradeformnotionalvaluelibmodelmanualtradeformnotionalvaluephp"></a>


Expand All @@ -1700,16 +1708,15 @@ Stop Price. If stop loss or stop limit order, the price to trigger the stop

### `snaptrade.trading.placeOrder`<a id="snaptradetradingplaceorder"></a>

Places the specified trade object. This places the order in the account and
returns the status of the order from the brokerage.
Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder).



#### 🛠️ Usage<a id="🛠️-usage"></a>

```php
$result = $snaptrade->trading->placeOrder(
trade_id: "tradeId_example",
trade_id: "139e307a-82f7-4402-b39e-4da7baa87758",
user_id: "snaptrade-user-123",
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
wait_to_confirm: True
Expand All @@ -1720,15 +1727,15 @@ $result = $snaptrade->trading->placeOrder(

##### trade_id: `string`<a id="trade_id-string"></a>

The ID of trade object obtained from trade/impact endpoint
Obtained from calling the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact)

##### user_id: `string`<a id="user_id-string"></a>

##### user_secret: `string`<a id="user_secret-string"></a>

##### wait_to_confirm: `bool`<a id="wait_to_confirm-bool"></a>

Optional, defaults to true. Determines if a wait is performed to check on order status. If false, latency will be reduced but orders returned will be more likely to be of status PENDING as we will not wait to check on the status before responding to the request
Optional, defaults to true. Determines if a wait is performed to check on order status. If false, latency will be reduced but orders returned will be more likely to be of status `PENDING` as we will not wait to check on the status before responding to the request.


#### 🔄 Return<a id="🔄-return"></a>
Expand Down
Loading

0 comments on commit 537240e

Please sign in to comment.