snaptrade 2.0.107 → 2.0.108

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 817d9798bac47347163b8a5361805130237e1f56ef126382d4fc22d8f71a1301
4
- data.tar.gz: aee96e1dc6deb6783f9399f246100a20e51e0a38967852db2332dfa2ec1cd850
3
+ metadata.gz: 8c8f5a24147781876d57970fcdae5db3667e48813011ae83eac36b460ba33a4c
4
+ data.tar.gz: d77de160e9dfbfc7b5687cf74ff4b4b138d4d9d029975ee687b67a5932d9137f
5
5
  SHA512:
6
- metadata.gz: 379cb39a0e7b561369b8d4f046ed247e059e488aef7d0bcb1d7fa5482c59be71e36397937b38d0df2fc91607cfba14328732258f6f32e7fced153e25387fab2f
7
- data.tar.gz: 2545a4bc7ad00e27ce39e8e945ef5f43f4c5192b4eb796cc10d052b3a4d2961336362e6c094539972f6c74bc58dc12c9c9bcf7460537266776c701274d2d4957
6
+ metadata.gz: 74aacd5c363718ceb5d882cb060d7b27f7b2ede5a2ee3075fddf5150b1ba0646d455284a2296b89bc9f78e9d37222b7d955e1cff6b082566404c054f444069f0
7
+ data.tar.gz: 3008df7a9a53e000bf0550203144dad1690187eab4db4a349182921265d75f97b94d58bf01fe1e2f78d4a8207d5ca75bbf36f76e9ea2022b78d4ad384ceaf640
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.107)
4
+ snaptrade (2.0.108)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -20,7 +20,7 @@ GEM
20
20
  base64
21
21
  faraday-net_http (>= 2.0, < 3.1)
22
22
  ruby2_keywords (>= 0.0.4)
23
- faraday-multipart (1.1.0)
23
+ faraday-multipart (1.1.1)
24
24
  multipart-post (~> 2.0)
25
25
  faraday-net_http (3.0.2)
26
26
  io-console (0.8.0)
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Connect brokerage accounts to your app for live positions and trading
8
8
 
9
- [![npm](https://img.shields.io/badge/gem-v2.0.107-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.107)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.108-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.108)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -43,9 +43,6 @@ Connect brokerage accounts to your app for live positions and trading
43
43
  * [`snaptrade.connections.remove_brokerage_authorization`](#snaptradeconnectionsremove_brokerage_authorization)
44
44
  * [`snaptrade.connections.return_rates`](#snaptradeconnectionsreturn_rates)
45
45
  * [`snaptrade.connections.session_events`](#snaptradeconnectionssession_events)
46
- * [`snaptrade.crypto_trading.get_cryptocurrency_pair_quote`](#snaptradecrypto_tradingget_cryptocurrency_pair_quote)
47
- * [`snaptrade.crypto_trading.place_simple_order`](#snaptradecrypto_tradingplace_simple_order)
48
- * [`snaptrade.crypto_trading.search_cryptocurrency_pair_instruments`](#snaptradecrypto_tradingsearch_cryptocurrency_pair_instruments)
49
46
  * [`snaptrade.options.get_option_strategy`](#snaptradeoptionsget_option_strategy)
50
47
  * [`snaptrade.options.get_options_chain`](#snaptradeoptionsget_options_chain)
51
48
  * [`snaptrade.options.get_options_strategy_quote`](#snaptradeoptionsget_options_strategy_quote)
@@ -64,14 +61,17 @@ Connect brokerage accounts to your app for live positions and trading
64
61
  * [`snaptrade.reference_data.symbol_search_user_account`](#snaptradereference_datasymbol_search_user_account)
65
62
  * [`snaptrade.trading.cancel_order`](#snaptradetradingcancel_order)
66
63
  * [`snaptrade.trading.cancel_user_account_order`](#snaptradetradingcancel_user_account_order)
64
+ * [`snaptrade.trading.get_cryptocurrency_pair_quote`](#snaptradetradingget_cryptocurrency_pair_quote)
67
65
  * [`snaptrade.trading.get_order_impact`](#snaptradetradingget_order_impact)
68
66
  * [`snaptrade.trading.get_user_account_quotes`](#snaptradetradingget_user_account_quotes)
69
67
  * [`snaptrade.trading.place_bracket_order`](#snaptradetradingplace_bracket_order)
70
68
  * [`snaptrade.trading.place_force_order`](#snaptradetradingplace_force_order)
71
69
  * [`snaptrade.trading.place_mleg_order`](#snaptradetradingplace_mleg_order)
72
70
  * [`snaptrade.trading.place_order`](#snaptradetradingplace_order)
71
+ * [`snaptrade.trading.place_simple_order`](#snaptradetradingplace_simple_order)
73
72
  * [`snaptrade.trading.preview_simple_order`](#snaptradetradingpreview_simple_order)
74
73
  * [`snaptrade.trading.replace_order`](#snaptradetradingreplace_order)
74
+ * [`snaptrade.trading.search_cryptocurrency_pair_instruments`](#snaptradetradingsearch_cryptocurrency_pair_instruments)
75
75
  * [`snaptrade.transactions_and_reporting.get_activities`](#snaptradetransactions_and_reportingget_activities)
76
76
  * [`snaptrade.transactions_and_reporting.get_reporting_custom_range`](#snaptradetransactions_and_reportingget_reporting_custom_range)
77
77
 
@@ -82,7 +82,7 @@ Connect brokerage accounts to your app for live positions and trading
82
82
  Add to Gemfile:
83
83
 
84
84
  ```ruby
85
- gem 'snaptrade', '~> 2.0.107'
85
+ gem 'snaptrade', '~> 2.0.108'
86
86
  ```
87
87
 
88
88
  ## Getting Started<a id="getting-started"></a>
@@ -1047,162 +1047,6 @@ specific users
1047
1047
  ---
1048
1048
 
1049
1049
 
1050
- ### `snaptrade.crypto_trading.get_cryptocurrency_pair_quote`<a id="snaptradecrypto_tradingget_cryptocurrency_pair_quote"></a>
1051
-
1052
- Gets a quote for the specified account.
1053
-
1054
-
1055
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1056
-
1057
- ```ruby
1058
- result = snaptrade.crypto_trading.get_cryptocurrency_pair_quote(
1059
- user_id: "snaptrade-user-123",
1060
- user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1061
- account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1062
- instrument_symbol: "BTC-USD",
1063
- )
1064
- p result
1065
- ```
1066
-
1067
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1068
-
1069
- ##### user_id: `String`<a id="user_id-string"></a>
1070
- ##### user_secret: `String`<a id="user_secret-string"></a>
1071
- ##### account_id: `String`<a id="account_id-string"></a>
1072
- ##### instrument_symbol: `String`<a id="instrument_symbol-string"></a>
1073
- #### 🔄 Return<a id="🔄-return"></a>
1074
-
1075
- [CryptocurrencyPairQuote](./lib/snaptrade/models/cryptocurrency_pair_quote.rb)
1076
-
1077
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1078
-
1079
- `/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote` `GET`
1080
-
1081
- [🔙 **Back to Table of Contents**](#table-of-contents)
1082
-
1083
- ---
1084
-
1085
-
1086
- ### `snaptrade.crypto_trading.place_simple_order`<a id="snaptradecrypto_tradingplace_simple_order"></a>
1087
-
1088
- Places an order in the specified account.
1089
- This endpoint does not compute the impact to the account balance from the order before submitting the order.
1090
-
1091
-
1092
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1093
-
1094
- ```ruby
1095
- result = snaptrade.crypto_trading.place_simple_order(
1096
- instrument: {
1097
- "symbol" => "AAPL",
1098
- "type" => "EQUITY",
1099
- },
1100
- side: "BUY",
1101
- type: "MARKET",
1102
- time_in_force: "GTC",
1103
- amount: "123.45",
1104
- user_id: "snaptrade-user-123",
1105
- user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1106
- account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1107
- limit_price: "123.45",
1108
- stop_price: "123.45",
1109
- post_only: false,
1110
- expiration_date: "2024-01-01T00:00:00Z",
1111
- )
1112
- p result
1113
- ```
1114
-
1115
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1116
-
1117
- ##### instrument: [`TradingInstrument`](./lib/snaptrade/models/trading_instrument.rb)<a id="instrument-tradinginstrumentlibsnaptrademodelstrading_instrumentrb"></a>
1118
- ##### side: [`ActionStrict`](./lib/snaptrade/models/action_strict.rb)<a id="side-actionstrictlibsnaptrademodelsaction_strictrb"></a>
1119
- The action describes the intent or side of a trade. This is either `BUY` or
1120
- `SELL`.
1121
-
1122
- ##### type: [`SimpleOrderFormType`](./lib/snaptrade/models/simple_order_form_type.rb)<a id="type-simpleorderformtypelibsnaptrademodelssimple_order_form_typerb"></a>
1123
- The type of order to place.
1124
-
1125
- ##### time_in_force: [`SimpleOrderFormTimeInForce`](./lib/snaptrade/models/simple_order_form_time_in_force.rb)<a id="time_in_force-simpleorderformtimeinforcelibsnaptrademodelssimple_order_form_time_in_forcerb"></a>
1126
- The Time in Force type for the order. This field indicates how long the order
1127
- will remain active before it is executed or expires. - `GTC` - Good Til
1128
- Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or
1129
- Kill. The order must be executed in its entirety immediately or be canceled
1130
- completely. - `IOC` - Immediate Or Cancel. The order must be executed
1131
- immediately. Any portion of the order that cannot be filled immediately will be
1132
- canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
1133
-
1134
- ##### amount: `Float`<a id="amount-float"></a>
1135
- The amount of the base currency to buy or sell.
1136
-
1137
- ##### user_id: `String`<a id="user_id-string"></a>
1138
- ##### user_secret: `String`<a id="user_secret-string"></a>
1139
- ##### account_id: `String`<a id="account_id-string"></a>
1140
- ##### limit_price: `Float`<a id="limit_price-float"></a>
1141
- The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT or
1142
- TAKE_PROFIT_LIMIT.
1143
-
1144
- ##### stop_price: `Float`<a id="stop_price-float"></a>
1145
- The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT,
1146
- TAKE_PROFIT_MARKET or TAKE_PROFIT_LIMIT.
1147
-
1148
- ##### post_only: `Boolean`<a id="post_only-boolean"></a>
1149
- Valid and required only for order type LIMIT. If true orders that would be
1150
- filled immediately are rejected to avoid incurring TAKER fees.
1151
-
1152
- ##### expiration_date: `Time`<a id="expiration_date-time"></a>
1153
- The expiration date of the order. Required if the time_in_force is GTD.
1154
-
1155
- #### 🔄 Return<a id="🔄-return"></a>
1156
-
1157
- [OrderUpdatedResponse](./lib/snaptrade/models/order_updated_response.rb)
1158
-
1159
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1160
-
1161
- `/accounts/{accountId}/trading/simple` `POST`
1162
-
1163
- [🔙 **Back to Table of Contents**](#table-of-contents)
1164
-
1165
- ---
1166
-
1167
-
1168
- ### `snaptrade.crypto_trading.search_cryptocurrency_pair_instruments`<a id="snaptradecrypto_tradingsearch_cryptocurrency_pair_instruments"></a>
1169
-
1170
- Searches cryptocurrency pairs instruments accessible to the specified account.
1171
-
1172
-
1173
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1174
-
1175
- ```ruby
1176
- result = snaptrade.crypto_trading.search_cryptocurrency_pair_instruments(
1177
- user_id: "snaptrade-user-123",
1178
- user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1179
- account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1180
- base: "BTC",
1181
- quote: "USD",
1182
- )
1183
- p result
1184
- ```
1185
-
1186
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1187
-
1188
- ##### user_id: `String`<a id="user_id-string"></a>
1189
- ##### user_secret: `String`<a id="user_secret-string"></a>
1190
- ##### account_id: `String`<a id="account_id-string"></a>
1191
- ##### base: `String`<a id="base-string"></a>
1192
- ##### quote: `String`<a id="quote-string"></a>
1193
- #### 🔄 Return<a id="🔄-return"></a>
1194
-
1195
- [TradingSearchCryptocurrencyPairInstruments200Response](./lib/snaptrade/models/trading_search_cryptocurrency_pair_instruments200_response.rb)
1196
-
1197
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1198
-
1199
- `/accounts/{accountId}/trading/instruments/cryptocurrencyPairs` `GET`
1200
-
1201
- [🔙 **Back to Table of Contents**](#table-of-contents)
1202
-
1203
- ---
1204
-
1205
-
1206
1050
  ### `snaptrade.options.get_option_strategy`<a id="snaptradeoptionsget_option_strategy"></a>
1207
1051
 
1208
1052
  Creates an option strategy object that will be used to place an option strategy order.
@@ -1811,6 +1655,42 @@ the brokerage system.
1811
1655
  ---
1812
1656
 
1813
1657
 
1658
+ ### `snaptrade.trading.get_cryptocurrency_pair_quote`<a id="snaptradetradingget_cryptocurrency_pair_quote"></a>
1659
+
1660
+ Gets a quote for the specified account.
1661
+
1662
+
1663
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
1664
+
1665
+ ```ruby
1666
+ result = snaptrade.trading.get_cryptocurrency_pair_quote(
1667
+ user_id: "snaptrade-user-123",
1668
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1669
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1670
+ instrument_symbol: "BTC-USD",
1671
+ )
1672
+ p result
1673
+ ```
1674
+
1675
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1676
+
1677
+ ##### user_id: `String`<a id="user_id-string"></a>
1678
+ ##### user_secret: `String`<a id="user_secret-string"></a>
1679
+ ##### account_id: `String`<a id="account_id-string"></a>
1680
+ ##### instrument_symbol: `String`<a id="instrument_symbol-string"></a>
1681
+ #### 🔄 Return<a id="🔄-return"></a>
1682
+
1683
+ [CryptocurrencyPairQuote](./lib/snaptrade/models/cryptocurrency_pair_quote.rb)
1684
+
1685
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1686
+
1687
+ `/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote` `GET`
1688
+
1689
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1690
+
1691
+ ---
1692
+
1693
+
1814
1694
  ### `snaptrade.trading.get_order_impact`<a id="snaptradetradingget_order_impact"></a>
1815
1695
 
1816
1696
  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.
@@ -2231,6 +2111,88 @@ before responding to the request.
2231
2111
  ---
2232
2112
 
2233
2113
 
2114
+ ### `snaptrade.trading.place_simple_order`<a id="snaptradetradingplace_simple_order"></a>
2115
+
2116
+ Places an order in the specified account.
2117
+ This endpoint does not compute the impact to the account balance from the order before submitting the order.
2118
+
2119
+
2120
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
2121
+
2122
+ ```ruby
2123
+ result = snaptrade.trading.place_simple_order(
2124
+ instrument: {
2125
+ "symbol" => "AAPL",
2126
+ "type" => "EQUITY",
2127
+ },
2128
+ side: "BUY",
2129
+ type: "MARKET",
2130
+ time_in_force: "GTC",
2131
+ amount: "123.45",
2132
+ user_id: "snaptrade-user-123",
2133
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
2134
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
2135
+ limit_price: "123.45",
2136
+ stop_price: "123.45",
2137
+ post_only: false,
2138
+ expiration_date: "2024-01-01T00:00:00Z",
2139
+ )
2140
+ p result
2141
+ ```
2142
+
2143
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
2144
+
2145
+ ##### instrument: [`TradingInstrument`](./lib/snaptrade/models/trading_instrument.rb)<a id="instrument-tradinginstrumentlibsnaptrademodelstrading_instrumentrb"></a>
2146
+ ##### side: [`ActionStrict`](./lib/snaptrade/models/action_strict.rb)<a id="side-actionstrictlibsnaptrademodelsaction_strictrb"></a>
2147
+ The action describes the intent or side of a trade. This is either `BUY` or
2148
+ `SELL`.
2149
+
2150
+ ##### type: [`SimpleOrderFormType`](./lib/snaptrade/models/simple_order_form_type.rb)<a id="type-simpleorderformtypelibsnaptrademodelssimple_order_form_typerb"></a>
2151
+ The type of order to place.
2152
+
2153
+ ##### time_in_force: [`SimpleOrderFormTimeInForce`](./lib/snaptrade/models/simple_order_form_time_in_force.rb)<a id="time_in_force-simpleorderformtimeinforcelibsnaptrademodelssimple_order_form_time_in_forcerb"></a>
2154
+ The Time in Force type for the order. This field indicates how long the order
2155
+ will remain active before it is executed or expires. - `GTC` - Good Til
2156
+ Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or
2157
+ Kill. The order must be executed in its entirety immediately or be canceled
2158
+ completely. - `IOC` - Immediate Or Cancel. The order must be executed
2159
+ immediately. Any portion of the order that cannot be filled immediately will be
2160
+ canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
2161
+
2162
+ ##### amount: `Float`<a id="amount-float"></a>
2163
+ The amount of the base currency to buy or sell.
2164
+
2165
+ ##### user_id: `String`<a id="user_id-string"></a>
2166
+ ##### user_secret: `String`<a id="user_secret-string"></a>
2167
+ ##### account_id: `String`<a id="account_id-string"></a>
2168
+ ##### limit_price: `Float`<a id="limit_price-float"></a>
2169
+ The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT or
2170
+ TAKE_PROFIT_LIMIT.
2171
+
2172
+ ##### stop_price: `Float`<a id="stop_price-float"></a>
2173
+ The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT,
2174
+ TAKE_PROFIT_MARKET or TAKE_PROFIT_LIMIT.
2175
+
2176
+ ##### post_only: `Boolean`<a id="post_only-boolean"></a>
2177
+ Valid and required only for order type LIMIT. If true orders that would be
2178
+ filled immediately are rejected to avoid incurring TAKER fees.
2179
+
2180
+ ##### expiration_date: `Time`<a id="expiration_date-time"></a>
2181
+ The expiration date of the order. Required if the time_in_force is GTD.
2182
+
2183
+ #### 🔄 Return<a id="🔄-return"></a>
2184
+
2185
+ [OrderUpdatedResponse](./lib/snaptrade/models/order_updated_response.rb)
2186
+
2187
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
2188
+
2189
+ `/accounts/{accountId}/trading/simple` `POST`
2190
+
2191
+ [🔙 **Back to Table of Contents**](#table-of-contents)
2192
+
2193
+ ---
2194
+
2195
+
2234
2196
  ### `snaptrade.trading.preview_simple_order`<a id="snaptradetradingpreview_simple_order"></a>
2235
2197
 
2236
2198
  Previews an order using the specified account.
@@ -2390,6 +2352,44 @@ The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
2390
2352
  ---
2391
2353
 
2392
2354
 
2355
+ ### `snaptrade.trading.search_cryptocurrency_pair_instruments`<a id="snaptradetradingsearch_cryptocurrency_pair_instruments"></a>
2356
+
2357
+ Searches cryptocurrency pairs instruments accessible to the specified account.
2358
+
2359
+
2360
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
2361
+
2362
+ ```ruby
2363
+ result = snaptrade.trading.search_cryptocurrency_pair_instruments(
2364
+ user_id: "snaptrade-user-123",
2365
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
2366
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
2367
+ base: "BTC",
2368
+ quote: "USD",
2369
+ )
2370
+ p result
2371
+ ```
2372
+
2373
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
2374
+
2375
+ ##### user_id: `String`<a id="user_id-string"></a>
2376
+ ##### user_secret: `String`<a id="user_secret-string"></a>
2377
+ ##### account_id: `String`<a id="account_id-string"></a>
2378
+ ##### base: `String`<a id="base-string"></a>
2379
+ ##### quote: `String`<a id="quote-string"></a>
2380
+ #### 🔄 Return<a id="🔄-return"></a>
2381
+
2382
+ [TradingSearchCryptocurrencyPairInstruments200Response](./lib/snaptrade/models/trading_search_cryptocurrency_pair_instruments200_response.rb)
2383
+
2384
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
2385
+
2386
+ `/accounts/{accountId}/trading/instruments/cryptocurrencyPairs` `GET`
2387
+
2388
+ [🔙 **Back to Table of Contents**](#table-of-contents)
2389
+
2390
+ ---
2391
+
2392
+
2393
2393
  ### `snaptrade.transactions_and_reporting.get_activities`<a id="snaptradetransactions_and_reportingget_activities"></a>
2394
2394
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
2395
2395