snaptrade 3.0.65 → 3.0.66
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.
- checksums.yaml +4 -4
- data/README.md +155 -153
- data/lib/snaptrade/api/account_information_api.rb +8 -8
- data/lib/snaptrade/api/experimental_endpoints_api.rb +0 -184
- data/lib/snaptrade/api/trading_api.rb +184 -0
- data/lib/snaptrade/models/account_universal_activity.rb +1 -1
- data/lib/snaptrade/models/activity.rb +1 -1
- data/lib/snaptrade/models/universal_activity.rb +1 -1
- data/lib/snaptrade/version.rb +1 -1
- data/spec/api/account_information_api_spec.rb +2 -2
- data/spec/api/experimental_endpoints_api_spec.rb +0 -15
- data/spec/api/trading_api_spec.rb +15 -0
- metadata +292 -292
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: adbfad2f0329340a617d9623d2d318a5c25c77f46818d8037c72d20a8cfd35bb
|
|
4
|
+
data.tar.gz: f34460027d39bcb60c930bdf61b6ddee6677b1184273b1bd2008313bc98ffc48
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6bed7205bde90c1fe63e6add9e54caa52bbeeef8a2804cdfdb02cc5c111a490a8761fb238959959d85665cf26e3e0e3dbb2e12f6038bde7fde9b5e06d087a57e
|
|
7
|
+
data.tar.gz: 14964f0f2b2678340eed90a6138f1cb8ede6e0ede03ff85cdba30409dfba0b8bf82b4f77d6d692bc7377b66539c06fd11b96d2057c6b627f9c79e2e1298adf33
|
data/README.md
CHANGED
|
@@ -63,7 +63,7 @@ backoff with jitter rather than from the headers.
|
|
|
63
63
|
See https://docs.snaptrade.com/docs/ratelimiting.
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
[](https://rubygems.org/gems/snaptrade/versions/3.0.66)
|
|
67
67
|
[](https://snaptrade.com/)
|
|
68
68
|
|
|
69
69
|
</div>
|
|
@@ -116,7 +116,6 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
116
116
|
* [`snaptrade.experimental_endpoints.get_user_account_orders_v2`](#snaptradeexperimental_endpointsget_user_account_orders_v2)
|
|
117
117
|
* [`snaptrade.experimental_endpoints.get_user_account_recent_orders_v2`](#snaptradeexperimental_endpointsget_user_account_recent_orders_v2)
|
|
118
118
|
* [`snaptrade.experimental_endpoints.list_subscriptions`](#snaptradeexperimental_endpointslist_subscriptions)
|
|
119
|
-
* [`snaptrade.experimental_endpoints.place_simple_order`](#snaptradeexperimental_endpointsplace_simple_order)
|
|
120
119
|
* [`snaptrade.management.get_stats`](#snaptrademanagementget_stats)
|
|
121
120
|
* [`snaptrade.management.get_stats_legacy`](#snaptrademanagementget_stats_legacy)
|
|
122
121
|
* [`snaptrade.reference_data.get_partner_info`](#snaptradereference_dataget_partner_info)
|
|
@@ -139,6 +138,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
139
138
|
* [`snaptrade.trading.place_force_order`](#snaptradetradingplace_force_order)
|
|
140
139
|
* [`snaptrade.trading.place_mleg_order`](#snaptradetradingplace_mleg_order)
|
|
141
140
|
* [`snaptrade.trading.place_order`](#snaptradetradingplace_order)
|
|
141
|
+
* [`snaptrade.trading.place_simple_order`](#snaptradetradingplace_simple_order)
|
|
142
142
|
* [`snaptrade.trading.preview_crypto_order`](#snaptradetradingpreview_crypto_order)
|
|
143
143
|
* [`snaptrade.trading.replace_order`](#snaptradetradingreplace_order)
|
|
144
144
|
* [`snaptrade.trading.search_cryptocurrency_pair_instruments`](#snaptradetradingsearch_cryptocurrency_pair_instruments)
|
|
@@ -150,7 +150,7 @@ See https://docs.snaptrade.com/docs/ratelimiting.
|
|
|
150
150
|
Add to Gemfile:
|
|
151
151
|
|
|
152
152
|
```ruby
|
|
153
|
-
gem 'snaptrade', '~> 3.0.
|
|
153
|
+
gem 'snaptrade', '~> 3.0.66'
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -258,14 +258,15 @@ Optional comma separated list of transaction types to filter by. SnapTrade does
|
|
|
258
258
|
a best effort to categorize brokerage transaction types into a common set of
|
|
259
259
|
values. Here are some of the most popular values: - `BUY` - Asset bought. -
|
|
260
260
|
`SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` -
|
|
261
|
-
Payment in lieu of a dividend. - `
|
|
262
|
-
|
|
263
|
-
`
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
`
|
|
268
|
-
|
|
261
|
+
Payment in lieu of a dividend. - `CAPITAL_GAINS_LONG` - Long-term capital-gain
|
|
262
|
+
distribution. - `CAPITAL_GAINS_SHORT` - Short-term capital-gain distribution. -
|
|
263
|
+
`CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` -
|
|
264
|
+
Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company
|
|
265
|
+
distributes shares instead of cash - `INTEREST` - Interest deposited into the
|
|
266
|
+
account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee.
|
|
267
|
+
- `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option
|
|
268
|
+
assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` -
|
|
269
|
+
Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
269
270
|
|
|
270
271
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
271
272
|
|
|
@@ -488,14 +489,15 @@ values. Here are some of the most popular values: - `BUY` - Asset bought. -
|
|
|
488
489
|
`BUY_TO_CLOSE` - Option bought to close a short position. - `SELL_TO_OPEN` -
|
|
489
490
|
Option sold to open a short position. - `SELL_TO_CLOSE` - Option sold to close a
|
|
490
491
|
long position. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment
|
|
491
|
-
in lieu of a dividend. - `
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
`
|
|
497
|
-
|
|
498
|
-
`
|
|
492
|
+
in lieu of a dividend. - `CAPITAL_GAINS_LONG` - Long-term capital-gain
|
|
493
|
+
distribution. - `CAPITAL_GAINS_SHORT` - Short-term capital-gain distribution. -
|
|
494
|
+
`CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` -
|
|
495
|
+
Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company
|
|
496
|
+
distributes shares instead of cash - `INTEREST` - Interest deposited into the
|
|
497
|
+
account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee.
|
|
498
|
+
- `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option
|
|
499
|
+
assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` -
|
|
500
|
+
Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
499
501
|
|
|
500
502
|
##### offset: `Integer`<a id="offset-integer"></a>
|
|
501
503
|
An integer that specifies the starting point of the paginated results. Default
|
|
@@ -1880,140 +1882,6 @@ p result
|
|
|
1880
1882
|
---
|
|
1881
1883
|
|
|
1882
1884
|
|
|
1883
|
-
### `snaptrade.experimental_endpoints.place_simple_order`<a id="snaptradeexperimental_endpointsplace_simple_order"></a>
|
|
1884
|
-
|
|
1885
|
-
**Beta.** Places a single-leg or multi-leg order using a common request format for equities, equity options, futures, and future options. This endpoint is experimental; breaking changes are possible during the experimental phase.
|
|
1886
|
-
|
|
1887
|
-
Equity and equity-option orders use the existing brokerage trading capabilities. Futures are supported on tastytrade, Webull US, and TradeStation (live and SIM); future options are supported on tastytrade and TradeStation (live and SIM). Order types, time in force, optional fields, and strategy combinations remain subject to brokerage support. See the [brokerage trading support page](https://support.snaptrade.com/brokerages).
|
|
1888
|
-
|
|
1889
|
-
An order may contain equity/option legs or future/future_option legs, but cannot mix those two families. Equity/option strategies must share the same underlying symbol. Each strategy is submitted as one brokerage order; unsupported strategies are never split into independent orders. Tastytrade supports single-leg outright futures and up to four future-option legs, and does not support multi-leg market orders.
|
|
1890
|
-
|
|
1891
|
-
Webull US supports single-leg futures orders with buy or sell actions and positive whole-contract quantities. Supported order types are market, limit, stop, and stop_limit, with day or gtc duration. Futures options, multi-leg futures, trailing stops, and Webull Canada futures trading are not supported. Webull determines contract availability, margin requirements, and valid price increments.
|
|
1892
|
-
|
|
1893
|
-
TradeStation and TradeStation SIM support single-leg futures and futures-option orders in Futures accounts, with positive whole-contract quantities. Supported order types are market, limit, stop, and stop_limit, with day, gtc, ioc, or fok duration, subject to the contract and route's supported combinations. Futures use buy/sell; futures options use the open/close option actions. Multi-leg futures-family strategies are not supported. Prices are forwarded without rounding; TradeStation determines contract availability, permissions, margin requirements, and valid price increments.
|
|
1894
|
-
|
|
1895
|
-
All string choices use lower snake_case and are case-sensitive. Symbols retain their native format: equity tickers, OCC equity-option symbols, or brokerage-native futures symbols. For tastytrade, use the exact BrokerageInstrument ticker, including any spaces. For Webull US, use a specific unprefixed futures contract symbol such as ESZ6; slash-prefixed aliases, continuous/root-only symbols, and whitespace are not accepted. For TradeStation, use a specific two-digit-year contract such as ESZ26 or @ESZ26, or a futures-option symbol such as `ESZ26 C6000`, preserving the space and any session alias. The optional @ prefix is supported for dated futures contracts and is forwarded unchanged. Slash-prefixed aliases and root-only continuous symbols such as @ES are not accepted. A futures symbol does not need to be present in SnapTrade's local instrument catalog to submit an order.
|
|
1896
|
-
|
|
1897
|
-
A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details.
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1901
|
-
|
|
1902
|
-
```ruby
|
|
1903
|
-
result = snaptrade.experimental_endpoints.place_simple_order(
|
|
1904
|
-
order_type: "stop_limit",
|
|
1905
|
-
time_in_force: "day",
|
|
1906
|
-
legs: [
|
|
1907
|
-
{
|
|
1908
|
-
"instrument" => {
|
|
1909
|
-
"kind" => "future",
|
|
1910
|
-
"symbol" => "/ESZ6",
|
|
1911
|
-
},
|
|
1912
|
-
"action" => "buy",
|
|
1913
|
-
"units" => "1.25",
|
|
1914
|
-
}
|
|
1915
|
-
],
|
|
1916
|
-
account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1917
|
-
user_id: "snaptrade-user-123",
|
|
1918
|
-
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1919
|
-
limit_price: "1.25",
|
|
1920
|
-
stop_price: "1.25",
|
|
1921
|
-
price_effect: "debit",
|
|
1922
|
-
client_order_id: "550e8400-e29b-41d4-a716-446655440000",
|
|
1923
|
-
expiry_date: "2026-12-18T20:00:00Z",
|
|
1924
|
-
notional_value: "1.25",
|
|
1925
|
-
trading_session: "regular",
|
|
1926
|
-
)
|
|
1927
|
-
p result
|
|
1928
|
-
```
|
|
1929
|
-
|
|
1930
|
-
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1931
|
-
|
|
1932
|
-
##### order_type: [`SimpleTradeFormOrderType`](./lib/snaptrade/models/simple_trade_form_order_type.rb)<a id="order_type-simpletradeformordertypelibsnaptrademodelssimple_trade_form_order_typerb"></a>
|
|
1933
|
-
##### time_in_force: [`SimpleTradeFormTimeInForce`](./lib/snaptrade/models/simple_trade_form_time_in_force.rb)<a id="time_in_force-simpletradeformtimeinforcelibsnaptrademodelssimple_trade_form_time_in_forcerb"></a>
|
|
1934
|
-
Order duration, subject to brokerage and execution-path support. gtd requires
|
|
1935
|
-
expiry_date and a non-market single-leg equity/option order. Existing single-leg
|
|
1936
|
-
option routing does not support ioc. Futures and multi-leg orders do not support
|
|
1937
|
-
gtd through this endpoint. Webull US futures only support day and gtc.
|
|
1938
|
-
TradeStation futures and futures options accept day, gtc, ioc, and fok, subject
|
|
1939
|
-
to the contract and route's supported combinations.
|
|
1940
|
-
|
|
1941
|
-
##### legs: Array<[`SimpleTradeLeg`](./lib/snaptrade/models/simple_trade_leg.rb)><a id="legs-array"></a>
|
|
1942
|
-
Legs of one brokerage order. Use equity/option legs or future/future_option
|
|
1943
|
-
legs, without mixing the two families. Brokerage strategy and leg-count limits
|
|
1944
|
-
apply.
|
|
1945
|
-
|
|
1946
|
-
##### account_id: `String`<a id="account_id-string"></a>
|
|
1947
|
-
The ID of the account to execute the trade on.
|
|
1948
|
-
|
|
1949
|
-
##### user_id: `String`<a id="user_id-string"></a>
|
|
1950
|
-
##### user_secret: `String`<a id="user_secret-string"></a>
|
|
1951
|
-
##### limit_price: [`Float`](./lib/snaptrade/models/float.rb)<a id="limit_price-floatlibsnaptrademodelsfloatrb"></a>
|
|
1952
|
-
Required for limit and stop_limit orders, except that multi-leg price_effect
|
|
1953
|
-
even implies zero. Must be omitted or null for market and stop orders. For
|
|
1954
|
-
multi-leg orders this is the net strategy price. Negative prices are accepted
|
|
1955
|
-
only for futures-family orders, subject to brokerage support.
|
|
1956
|
-
|
|
1957
|
-
##### stop_price: [`Float`](./lib/snaptrade/models/float.rb)<a id="stop_price-floatlibsnaptrademodelsfloatrb"></a>
|
|
1958
|
-
Required for stop and stop_limit orders. Must be omitted or null for market and
|
|
1959
|
-
limit orders. Must be positive for equity/option orders; futures-family trigger
|
|
1960
|
-
prices are subject to brokerage support.
|
|
1961
|
-
|
|
1962
|
-
##### price_effect: [`SimpleTradeFormPriceEffect`](./lib/snaptrade/models/simple_trade_form_price_effect.rb)<a id="price_effect-simpletradeformpriceeffectlibsnaptrademodelssimple_trade_form_price_effectrb"></a>
|
|
1963
|
-
Only applicable to multi-leg limit and stop_limit orders. Requirements and
|
|
1964
|
-
supported values depend on the brokerage; tastytrade requires credit or debit.
|
|
1965
|
-
even implies a zero limit_price, which may be omitted and must be zero if
|
|
1966
|
-
supplied. Single-leg price effects are derived from the action.
|
|
1967
|
-
|
|
1968
|
-
##### client_order_id: [`String`](./lib/snaptrade/models/string.rb)<a id="client_order_id-stringlibsnaptrademodelsstringrb"></a>
|
|
1969
|
-
Canonical UUID. Required for Wealthsimple multi-leg placement regardless of
|
|
1970
|
-
client-order-ID enablement; reuse it when retrying the same attempt.
|
|
1971
|
-
Wealthsimple multi-leg attempts retain the ID after success or failure, and
|
|
1972
|
-
reuse by the same user across accounts or placement endpoints returns 409
|
|
1973
|
-
without another submission. A 409 does not establish whether the original
|
|
1974
|
-
attempt was accepted; reconcile it before creating a new order with a new ID.
|
|
1975
|
-
Optional for other orders, forwarded where the existing execution path supports
|
|
1976
|
-
it and for tastytrade, Webull US, and TradeStation futures-family orders. Other
|
|
1977
|
-
orders require the existing client-order-ID enablement; when disabled the value
|
|
1978
|
-
is ignored. Brokerage behavior on duplicates varies. OAuth requests also reject
|
|
1979
|
-
a client_order_id the user has already used with 409. Tastytrade uses this as
|
|
1980
|
-
external-identifier for correlation and does not deduplicate submissions. For
|
|
1981
|
-
Webull US futures, SnapTrade converts the supplied UUID (or its generated order
|
|
1982
|
-
UUID) to lowercase 32-character hexadecimal without hyphens. The original
|
|
1983
|
-
supplied UUID remains in SnapTrade's trade audit; the converted value is
|
|
1984
|
-
returned as brokerage_order_id for subsequent order reads. For TradeStation live
|
|
1985
|
-
and SIM, SnapTrade encodes the supplied UUID (or its generated order UUID) as
|
|
1986
|
-
22-character URL-safe base64 without padding and sends it as OrderConfirmID for
|
|
1987
|
-
brokerage duplicate prevention; the response contains TradeStation's separate
|
|
1988
|
-
order ID.
|
|
1989
|
-
|
|
1990
|
-
##### expiry_date: `Time`<a id="expiry_date-time"></a>
|
|
1991
|
-
ISO 8601 expiry timestamp, required for gtd and invalid with other durations. A
|
|
1992
|
-
missing timezone is treated as UTC. Supported only through existing single-leg
|
|
1993
|
-
Public and Sandbox execution paths.
|
|
1994
|
-
|
|
1995
|
-
##### notional_value: [`Float`](./lib/snaptrade/models/float.rb)<a id="notional_value-floatlibsnaptrademodelsfloatrb"></a>
|
|
1996
|
-
Positive order value, supported only for a single-equity market order on
|
|
1997
|
-
eligible brokerages and partners. Mutually exclusive with leg units. Omit or set
|
|
1998
|
-
units to null when supplied.
|
|
1999
|
-
|
|
2000
|
-
##### trading_session: [`SimpleTradeFormTradingSession`](./lib/snaptrade/models/simple_trade_form_trading_session.rb)<a id="trading_session-simpletradeformtradingsessionlibsnaptrademodelssimple_trade_form_trading_sessionrb"></a>
|
|
2001
|
-
extended uses existing single-leg equity/option brokerage support and requires
|
|
2002
|
-
extended-hours enablement. Futures and multi-leg orders only accept regular.
|
|
2003
|
-
|
|
2004
|
-
#### 🔄 Return<a id="🔄-return"></a>
|
|
2005
|
-
|
|
2006
|
-
[SimpleTradeResponse](./lib/snaptrade/models/simple_trade_response.rb)
|
|
2007
|
-
|
|
2008
|
-
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
2009
|
-
|
|
2010
|
-
`/accounts/{accountId}/trading/simple` `POST`
|
|
2011
|
-
|
|
2012
|
-
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
2013
|
-
|
|
2014
|
-
---
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
1885
|
### `snaptrade.management.get_stats`<a id="snaptrademanagementget_stats"></a>
|
|
2018
1886
|
|
|
2019
1887
|
**Beta.** This endpoint and its response schema may change.
|
|
@@ -3092,6 +2960,140 @@ before responding to the request.
|
|
|
3092
2960
|
---
|
|
3093
2961
|
|
|
3094
2962
|
|
|
2963
|
+
### `snaptrade.trading.place_simple_order`<a id="snaptradetradingplace_simple_order"></a>
|
|
2964
|
+
|
|
2965
|
+
**Beta.** Places a single-leg or multi-leg order using a common request format for equities, equity options, futures, and future options. Breaking changes are possible while this endpoint is in beta.
|
|
2966
|
+
|
|
2967
|
+
Equity and equity-option orders use the existing brokerage trading capabilities. Futures are supported on tastytrade, Webull US, and TradeStation (live and SIM); future options are supported on tastytrade and TradeStation (live and SIM). Order types, time in force, optional fields, and strategy combinations remain subject to brokerage support. See the [brokerage trading support page](https://support.snaptrade.com/brokerages).
|
|
2968
|
+
|
|
2969
|
+
An order may contain equity/option legs or future/future_option legs, but cannot mix those two families. Equity/option strategies must share the same underlying symbol. Each strategy is submitted as one brokerage order; unsupported strategies are never split into independent orders. Tastytrade supports single-leg outright futures and up to four future-option legs, and does not support multi-leg market orders.
|
|
2970
|
+
|
|
2971
|
+
Webull US supports single-leg futures orders with buy or sell actions and positive whole-contract quantities. Supported order types are market, limit, stop, and stop_limit, with day or gtc duration. Futures options, multi-leg futures, trailing stops, and Webull Canada futures trading are not supported. Webull determines contract availability, margin requirements, and valid price increments.
|
|
2972
|
+
|
|
2973
|
+
TradeStation and TradeStation SIM support single-leg futures and futures-option orders in Futures accounts, with positive whole-contract quantities. Supported order types are market, limit, stop, and stop_limit, with day, gtc, ioc, or fok duration, subject to the contract and route's supported combinations. Futures use buy/sell; futures options use the open/close option actions. Multi-leg futures-family strategies are not supported. Prices are forwarded without rounding; TradeStation determines contract availability, permissions, margin requirements, and valid price increments.
|
|
2974
|
+
|
|
2975
|
+
All string choices use lower snake_case and are case-sensitive. Symbols retain their native format: equity tickers, OCC equity-option symbols, or brokerage-native futures symbols. For tastytrade, use the exact BrokerageInstrument ticker, including any spaces. For Webull US, use a specific unprefixed futures contract symbol such as ESZ6; slash-prefixed aliases, continuous/root-only symbols, and whitespace are not accepted. For TradeStation, use a specific two-digit-year contract such as ESZ26 or @ESZ26, or a futures-option symbol such as `ESZ26 C6000`, preserving the space and any session alias. The optional @ prefix is supported for dated futures contracts and is forwarded unchanged. Slash-prefixed aliases and root-only continuous symbols such as @ES are not accepted. A futures symbol does not need to be present in SnapTrade's local instrument catalog to submit an order.
|
|
2976
|
+
|
|
2977
|
+
A successful response contains only the brokerage order ID. Use the existing order endpoints to retrieve order details.
|
|
2978
|
+
|
|
2979
|
+
|
|
2980
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
2981
|
+
|
|
2982
|
+
```ruby
|
|
2983
|
+
result = snaptrade.trading.place_simple_order(
|
|
2984
|
+
order_type: "stop_limit",
|
|
2985
|
+
time_in_force: "day",
|
|
2986
|
+
legs: [
|
|
2987
|
+
{
|
|
2988
|
+
"instrument" => {
|
|
2989
|
+
"kind" => "future",
|
|
2990
|
+
"symbol" => "/ESZ6",
|
|
2991
|
+
},
|
|
2992
|
+
"action" => "buy",
|
|
2993
|
+
"units" => "1.25",
|
|
2994
|
+
}
|
|
2995
|
+
],
|
|
2996
|
+
account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
2997
|
+
user_id: "snaptrade-user-123",
|
|
2998
|
+
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
2999
|
+
limit_price: "1.25",
|
|
3000
|
+
stop_price: "1.25",
|
|
3001
|
+
price_effect: "debit",
|
|
3002
|
+
client_order_id: "550e8400-e29b-41d4-a716-446655440000",
|
|
3003
|
+
expiry_date: "2026-12-18T20:00:00Z",
|
|
3004
|
+
notional_value: "1.25",
|
|
3005
|
+
trading_session: "regular",
|
|
3006
|
+
)
|
|
3007
|
+
p result
|
|
3008
|
+
```
|
|
3009
|
+
|
|
3010
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
3011
|
+
|
|
3012
|
+
##### order_type: [`SimpleTradeFormOrderType`](./lib/snaptrade/models/simple_trade_form_order_type.rb)<a id="order_type-simpletradeformordertypelibsnaptrademodelssimple_trade_form_order_typerb"></a>
|
|
3013
|
+
##### time_in_force: [`SimpleTradeFormTimeInForce`](./lib/snaptrade/models/simple_trade_form_time_in_force.rb)<a id="time_in_force-simpletradeformtimeinforcelibsnaptrademodelssimple_trade_form_time_in_forcerb"></a>
|
|
3014
|
+
Order duration, subject to brokerage and execution-path support. gtd requires
|
|
3015
|
+
expiry_date and a non-market single-leg equity/option order. Existing single-leg
|
|
3016
|
+
option routing does not support ioc. Futures and multi-leg orders do not support
|
|
3017
|
+
gtd through this endpoint. Webull US futures only support day and gtc.
|
|
3018
|
+
TradeStation futures and futures options accept day, gtc, ioc, and fok, subject
|
|
3019
|
+
to the contract and route's supported combinations.
|
|
3020
|
+
|
|
3021
|
+
##### legs: Array<[`SimpleTradeLeg`](./lib/snaptrade/models/simple_trade_leg.rb)><a id="legs-array"></a>
|
|
3022
|
+
Legs of one brokerage order. Use equity/option legs or future/future_option
|
|
3023
|
+
legs, without mixing the two families. Brokerage strategy and leg-count limits
|
|
3024
|
+
apply.
|
|
3025
|
+
|
|
3026
|
+
##### account_id: `String`<a id="account_id-string"></a>
|
|
3027
|
+
The ID of the account to execute the trade on.
|
|
3028
|
+
|
|
3029
|
+
##### user_id: `String`<a id="user_id-string"></a>
|
|
3030
|
+
##### user_secret: `String`<a id="user_secret-string"></a>
|
|
3031
|
+
##### limit_price: [`Float`](./lib/snaptrade/models/float.rb)<a id="limit_price-floatlibsnaptrademodelsfloatrb"></a>
|
|
3032
|
+
Required for limit and stop_limit orders, except that multi-leg price_effect
|
|
3033
|
+
even implies zero. Must be omitted or null for market and stop orders. For
|
|
3034
|
+
multi-leg orders this is the net strategy price. Negative prices are accepted
|
|
3035
|
+
only for futures-family orders, subject to brokerage support.
|
|
3036
|
+
|
|
3037
|
+
##### stop_price: [`Float`](./lib/snaptrade/models/float.rb)<a id="stop_price-floatlibsnaptrademodelsfloatrb"></a>
|
|
3038
|
+
Required for stop and stop_limit orders. Must be omitted or null for market and
|
|
3039
|
+
limit orders. Must be positive for equity/option orders; futures-family trigger
|
|
3040
|
+
prices are subject to brokerage support.
|
|
3041
|
+
|
|
3042
|
+
##### price_effect: [`SimpleTradeFormPriceEffect`](./lib/snaptrade/models/simple_trade_form_price_effect.rb)<a id="price_effect-simpletradeformpriceeffectlibsnaptrademodelssimple_trade_form_price_effectrb"></a>
|
|
3043
|
+
Only applicable to multi-leg limit and stop_limit orders. Requirements and
|
|
3044
|
+
supported values depend on the brokerage; tastytrade requires credit or debit.
|
|
3045
|
+
even implies a zero limit_price, which may be omitted and must be zero if
|
|
3046
|
+
supplied. Single-leg price effects are derived from the action.
|
|
3047
|
+
|
|
3048
|
+
##### client_order_id: [`String`](./lib/snaptrade/models/string.rb)<a id="client_order_id-stringlibsnaptrademodelsstringrb"></a>
|
|
3049
|
+
Canonical UUID. Required for Wealthsimple multi-leg placement regardless of
|
|
3050
|
+
client-order-ID enablement; reuse it when retrying the same attempt.
|
|
3051
|
+
Wealthsimple multi-leg attempts retain the ID after success or failure, and
|
|
3052
|
+
reuse by the same user across accounts or placement endpoints returns 409
|
|
3053
|
+
without another submission. A 409 does not establish whether the original
|
|
3054
|
+
attempt was accepted; reconcile it before creating a new order with a new ID.
|
|
3055
|
+
Optional for other orders, forwarded where the existing execution path supports
|
|
3056
|
+
it and for tastytrade, Webull US, and TradeStation futures-family orders. Other
|
|
3057
|
+
orders require the existing client-order-ID enablement; when disabled the value
|
|
3058
|
+
is ignored. Brokerage behavior on duplicates varies. OAuth requests also reject
|
|
3059
|
+
a client_order_id the user has already used with 409. Tastytrade uses this as
|
|
3060
|
+
external-identifier for correlation and does not deduplicate submissions. For
|
|
3061
|
+
Webull US futures, SnapTrade converts the supplied UUID (or its generated order
|
|
3062
|
+
UUID) to lowercase 32-character hexadecimal without hyphens. The original
|
|
3063
|
+
supplied UUID remains in SnapTrade's trade audit; the converted value is
|
|
3064
|
+
returned as brokerage_order_id for subsequent order reads. For TradeStation live
|
|
3065
|
+
and SIM, SnapTrade encodes the supplied UUID (or its generated order UUID) as
|
|
3066
|
+
22-character URL-safe base64 without padding and sends it as OrderConfirmID for
|
|
3067
|
+
brokerage duplicate prevention; the response contains TradeStation's separate
|
|
3068
|
+
order ID.
|
|
3069
|
+
|
|
3070
|
+
##### expiry_date: `Time`<a id="expiry_date-time"></a>
|
|
3071
|
+
ISO 8601 expiry timestamp, required for gtd and invalid with other durations. A
|
|
3072
|
+
missing timezone is treated as UTC. Supported only through existing single-leg
|
|
3073
|
+
Public and Sandbox execution paths.
|
|
3074
|
+
|
|
3075
|
+
##### notional_value: [`Float`](./lib/snaptrade/models/float.rb)<a id="notional_value-floatlibsnaptrademodelsfloatrb"></a>
|
|
3076
|
+
Positive order value, supported only for a single-equity market order on
|
|
3077
|
+
eligible brokerages and partners. Mutually exclusive with leg units. Omit or set
|
|
3078
|
+
units to null when supplied.
|
|
3079
|
+
|
|
3080
|
+
##### trading_session: [`SimpleTradeFormTradingSession`](./lib/snaptrade/models/simple_trade_form_trading_session.rb)<a id="trading_session-simpletradeformtradingsessionlibsnaptrademodelssimple_trade_form_trading_sessionrb"></a>
|
|
3081
|
+
extended uses existing single-leg equity/option brokerage support and requires
|
|
3082
|
+
extended-hours enablement. Futures and multi-leg orders only accept regular.
|
|
3083
|
+
|
|
3084
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
3085
|
+
|
|
3086
|
+
[SimpleTradeResponse](./lib/snaptrade/models/simple_trade_response.rb)
|
|
3087
|
+
|
|
3088
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
3089
|
+
|
|
3090
|
+
`/accounts/{accountId}/trading/simple` `POST`
|
|
3091
|
+
|
|
3092
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
3093
|
+
|
|
3094
|
+
---
|
|
3095
|
+
|
|
3096
|
+
|
|
3095
3097
|
### `snaptrade.trading.preview_crypto_order`<a id="snaptradetradingpreview_crypto_order"></a>
|
|
3096
3098
|
|
|
3097
3099
|
Previews an order using the specified account.
|
|
@@ -38,7 +38,7 @@ module SnapTrade
|
|
|
38
38
|
# @param end_date [Date] The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
|
|
39
39
|
# @param offset [Integer] An integer that specifies the starting point of the paginated results. Default is 0.
|
|
40
40
|
# @param limit [Integer] An integer that specifies the maximum number of transactions to return. Default of 1000.
|
|
41
|
-
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
41
|
+
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CAPITAL_GAINS_LONG` - Long-term capital-gain distribution. - `CAPITAL_GAINS_SHORT` - Short-term capital-gain distribution. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
42
42
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
43
43
|
def get_account_activities(account_id:, user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, offset: SENTINEL, limit: SENTINEL, type: SENTINEL, extra: {})
|
|
44
44
|
extra[:start_date] = start_date if start_date != SENTINEL
|
|
@@ -71,7 +71,7 @@ module SnapTrade
|
|
|
71
71
|
# @param end_date [Date] The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
|
|
72
72
|
# @param offset [Integer] An integer that specifies the starting point of the paginated results. Default is 0.
|
|
73
73
|
# @param limit [Integer] An integer that specifies the maximum number of transactions to return. Default of 1000.
|
|
74
|
-
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
74
|
+
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CAPITAL_GAINS_LONG` - Long-term capital-gain distribution. - `CAPITAL_GAINS_SHORT` - Short-term capital-gain distribution. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
75
75
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
76
76
|
def get_account_activities_with_http_info(account_id:, user_id:, user_secret:, start_date: SENTINEL, end_date: SENTINEL, offset: SENTINEL, limit: SENTINEL, type: SENTINEL, extra: {})
|
|
77
77
|
extra[:start_date] = start_date if start_date != SENTINEL
|
|
@@ -92,7 +92,7 @@ module SnapTrade
|
|
|
92
92
|
# @option opts [Date] :end_date The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
|
|
93
93
|
# @option opts [Integer] :offset An integer that specifies the starting point of the paginated results. Default is 0.
|
|
94
94
|
# @option opts [Integer] :limit An integer that specifies the maximum number of transactions to return. Default of 1000.
|
|
95
|
-
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
95
|
+
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CAPITAL_GAINS_LONG` - Long-term capital-gain distribution. - `CAPITAL_GAINS_SHORT` - Short-term capital-gain distribution. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
96
96
|
# @return [PaginatedUniversalActivity]
|
|
97
97
|
private def get_account_activities_impl(account_id, user_id, user_secret, opts = {})
|
|
98
98
|
data, _status_code, _headers = get_account_activities_with_http_info(account_id, user_id, user_secret, opts)
|
|
@@ -109,7 +109,7 @@ module SnapTrade
|
|
|
109
109
|
# @option opts [Date] :end_date The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
|
|
110
110
|
# @option opts [Integer] :offset An integer that specifies the starting point of the paginated results. Default is 0.
|
|
111
111
|
# @option opts [Integer] :limit An integer that specifies the maximum number of transactions to return. Default of 1000.
|
|
112
|
-
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
112
|
+
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CAPITAL_GAINS_LONG` - Long-term capital-gain distribution. - `CAPITAL_GAINS_SHORT` - Short-term capital-gain distribution. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
113
113
|
# @return [Array<(PaginatedUniversalActivity, Integer, Hash)>] PaginatedUniversalActivity data, response status code and response headers
|
|
114
114
|
private def get_account_activities_with_http_info_impl(account_id, user_id, user_secret, opts = {})
|
|
115
115
|
if @api_client.config.debugging
|
|
@@ -670,7 +670,7 @@ module SnapTrade
|
|
|
670
670
|
# @param user_secret [String]
|
|
671
671
|
# @param start_date [Date] First date to include (UTC). Defaults to the earliest available transaction.
|
|
672
672
|
# @param end_date [Date] Last date to include (UTC). Defaults to the latest available transaction.
|
|
673
|
-
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `BUY_TO_OPEN` - Option bought to open a long position. - `BUY_TO_CLOSE` - Option bought to close a short position. - `SELL_TO_OPEN` - Option sold to open a short position. - `SELL_TO_CLOSE` - Option sold to close a long position. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
673
|
+
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `BUY_TO_OPEN` - Option bought to open a long position. - `BUY_TO_CLOSE` - Option bought to close a short position. - `SELL_TO_OPEN` - Option sold to open a short position. - `SELL_TO_CLOSE` - Option sold to close a long position. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CAPITAL_GAINS_LONG` - Long-term capital-gain distribution. - `CAPITAL_GAINS_SHORT` - Short-term capital-gain distribution. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
674
674
|
# @param offset [Integer] An integer that specifies the starting point of the paginated results. Default is 0.
|
|
675
675
|
# @param limit [Integer] An integer that specifies the maximum number of transactions to return. Default of 1000.
|
|
676
676
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
@@ -695,7 +695,7 @@ module SnapTrade
|
|
|
695
695
|
# @param user_secret [String]
|
|
696
696
|
# @param start_date [Date] First date to include (UTC). Defaults to the earliest available transaction.
|
|
697
697
|
# @param end_date [Date] Last date to include (UTC). Defaults to the latest available transaction.
|
|
698
|
-
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `BUY_TO_OPEN` - Option bought to open a long position. - `BUY_TO_CLOSE` - Option bought to close a short position. - `SELL_TO_OPEN` - Option sold to open a short position. - `SELL_TO_CLOSE` - Option sold to close a long position. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
698
|
+
# @param type [String] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `BUY_TO_OPEN` - Option bought to open a long position. - `BUY_TO_CLOSE` - Option bought to close a short position. - `SELL_TO_OPEN` - Option sold to open a short position. - `SELL_TO_CLOSE` - Option sold to close a long position. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CAPITAL_GAINS_LONG` - Long-term capital-gain distribution. - `CAPITAL_GAINS_SHORT` - Short-term capital-gain distribution. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
699
699
|
# @param offset [Integer] An integer that specifies the starting point of the paginated results. Default is 0.
|
|
700
700
|
# @param limit [Integer] An integer that specifies the maximum number of transactions to return. Default of 1000.
|
|
701
701
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
@@ -716,7 +716,7 @@ module SnapTrade
|
|
|
716
716
|
# @param [Hash] opts the optional parameters
|
|
717
717
|
# @option opts [Date] :start_date First date to include (UTC). Defaults to the earliest available transaction.
|
|
718
718
|
# @option opts [Date] :end_date Last date to include (UTC). Defaults to the latest available transaction.
|
|
719
|
-
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `BUY_TO_OPEN` - Option bought to open a long position. - `BUY_TO_CLOSE` - Option bought to close a short position. - `SELL_TO_OPEN` - Option sold to open a short position. - `SELL_TO_CLOSE` - Option sold to close a long position. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
719
|
+
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `BUY_TO_OPEN` - Option bought to open a long position. - `BUY_TO_CLOSE` - Option bought to close a short position. - `SELL_TO_OPEN` - Option sold to open a short position. - `SELL_TO_CLOSE` - Option sold to close a long position. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CAPITAL_GAINS_LONG` - Long-term capital-gain distribution. - `CAPITAL_GAINS_SHORT` - Short-term capital-gain distribution. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
720
720
|
# @option opts [Integer] :offset An integer that specifies the starting point of the paginated results. Default is 0. (default to 0)
|
|
721
721
|
# @option opts [Integer] :limit An integer that specifies the maximum number of transactions to return. Default of 1000. (default to 1000)
|
|
722
722
|
# @return [AccountTransactionsResponse]
|
|
@@ -733,7 +733,7 @@ module SnapTrade
|
|
|
733
733
|
# @param [Hash] opts the optional parameters
|
|
734
734
|
# @option opts [Date] :start_date First date to include (UTC). Defaults to the earliest available transaction.
|
|
735
735
|
# @option opts [Date] :end_date Last date to include (UTC). Defaults to the latest available transaction.
|
|
736
|
-
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `BUY_TO_OPEN` - Option bought to open a long position. - `BUY_TO_CLOSE` - Option bought to close a short position. - `SELL_TO_OPEN` - Option sold to open a short position. - `SELL_TO_CLOSE` - Option sold to close a long position. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
736
|
+
# @option opts [String] :type Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `BUY_TO_OPEN` - Option bought to open a long position. - `BUY_TO_CLOSE` - Option bought to close a short position. - `SELL_TO_OPEN` - Option sold to open a short position. - `SELL_TO_CLOSE` - Option sold to close a long position. - `DIVIDEND` - Dividend payout. - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend. - `CAPITAL_GAINS_LONG` - Long-term capital-gain distribution. - `CAPITAL_GAINS_SHORT` - Short-term capital-gain distribution. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
|
|
737
737
|
# @option opts [Integer] :offset An integer that specifies the starting point of the paginated results. Default is 0. (default to 0)
|
|
738
738
|
# @option opts [Integer] :limit An integer that specifies the maximum number of transactions to return. Default of 1000. (default to 1000)
|
|
739
739
|
# @return [Array<(AccountTransactionsResponse, Integer, Hash)>] AccountTransactionsResponse data, response status code and response headers
|