snaptrade 2.0.87 → 2.0.88

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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +280 -285
  4. data/lib/snaptrade/api/trading_api.rb +653 -0
  5. data/lib/snaptrade/models/cryptocurrency_pair.rb +12 -2
  6. data/lib/snaptrade/models/{crypto_spot_quote.rb → cryptocurrency_pair_quote.rb} +3 -3
  7. data/lib/snaptrade/models/{crypto_spot_order_preview.rb → simple_order_preview.rb} +5 -5
  8. data/lib/snaptrade/models/{crypto_spot_order_preview_estimated_fee.rb → simple_order_preview_estimated_fee.rb} +3 -3
  9. data/lib/snaptrade/models/{crypto_spot_order_request_body_time_in_force.rb → simple_order_request_body_time_in_force.rb} +3 -3
  10. data/lib/snaptrade/models/{trading_crypto_spot_place_order_request.rb → trading_place_simple_order_request.rb} +14 -14
  11. data/lib/snaptrade/models/{trading_crypto_spot_symbols200_response.rb → trading_search_cryptocurrency_pair_instruments200_response.rb} +3 -3
  12. data/lib/snaptrade/version.rb +1 -1
  13. data/lib/snaptrade.rb +6 -10
  14. data/spec/api/trading_api_spec.rb +76 -0
  15. data/spec/models/{crypto_spot_quote_spec.rb → cryptocurrency_pair_quote_spec.rb} +6 -6
  16. data/spec/models/cryptocurrency_pair_spec.rb +6 -0
  17. data/spec/models/{crypto_spot_order_preview_estimated_fee_spec.rb → simple_order_preview_estimated_fee_spec.rb} +6 -6
  18. data/spec/models/{crypto_spot_order_preview_spec.rb → simple_order_preview_spec.rb} +6 -6
  19. data/spec/models/simple_order_request_body_time_in_force_spec.rb +23 -0
  20. data/spec/models/{trading_crypto_spot_place_order_request_spec.rb → trading_place_simple_order_request_spec.rb} +7 -7
  21. data/spec/models/trading_search_cryptocurrency_pair_instruments200_response_spec.rb +29 -0
  22. metadata +20 -26
  23. data/lib/snaptrade/api/crypto_spot_trading_api.rb +0 -698
  24. data/lib/snaptrade/models/trading_crypto_spot_cancel_order_request.rb +0 -222
  25. data/spec/api/crypto_spot_trading_api_spec.rb +0 -107
  26. data/spec/models/crypto_spot_order_request_body_time_in_force_spec.rb +0 -23
  27. data/spec/models/trading_crypto_spot_cancel_order_request_spec.rb +0 -29
  28. data/spec/models/trading_crypto_spot_symbols200_response_spec.rb +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b2590e38f7ba11a0ccb94cbf5cb4cb24e4a2502655b1edfea44f901837b6b0a
4
- data.tar.gz: cfe4b4d60b89e088a9cb8dc2e69e896be576c662be22b7da3a5f9aee657c209f
3
+ metadata.gz: 5288ec81880134f7a7c1345658d4a36bb9bef18cd160a95c98ebf58e945f785e
4
+ data.tar.gz: 91a729976464b2860ff5fb5ae4110e8598e559e28f0c63e0701d633f566dce0c
5
5
  SHA512:
6
- metadata.gz: 4986f689bc118d12c1d0ed5d0c20868534696718af0519b56ea597da9f9001f4b438403e3c20d17c432325e9fd1daefc711867d6c6df9ee1978dd84e56906f22
7
- data.tar.gz: 369e05e50fdf925edb184af4ea00ddc22e138a1123a1f618ddaad84f79351c21bced84065f9e641c85b8d6cc2286af1017d65efa8426b2b4c8c73c5163b703f9
6
+ metadata.gz: b851d08f25987ebb368d69def3c6d155e916aec302a207890aa7dc5bf326ea35dd1f8da15f0606999c008ccf3d104e1b53d5ac14700e89c9aaf243a2e8db68fb
7
+ data.tar.gz: d8d2904f25786de03b11e1b460e97a9ae2a58881481f592ec3eabc789d8b8d207edd8b0f70368832d9744e769677d60aa04a3ff37d8cd867676de6b16b517d3a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.87)
4
+ snaptrade (2.0.88)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
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.87-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.87)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.88-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.88)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -43,11 +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_spot_trading.crypto_spot_cancel_order`](#snaptradecrypto_spot_tradingcrypto_spot_cancel_order)
47
- * [`snaptrade.crypto_spot_trading.crypto_spot_place_order`](#snaptradecrypto_spot_tradingcrypto_spot_place_order)
48
- * [`snaptrade.crypto_spot_trading.crypto_spot_preview_order`](#snaptradecrypto_spot_tradingcrypto_spot_preview_order)
49
- * [`snaptrade.crypto_spot_trading.crypto_spot_quote`](#snaptradecrypto_spot_tradingcrypto_spot_quote)
50
- * [`snaptrade.crypto_spot_trading.crypto_spot_symbols`](#snaptradecrypto_spot_tradingcrypto_spot_symbols)
51
46
  * [`snaptrade.options.get_option_strategy`](#snaptradeoptionsget_option_strategy)
52
47
  * [`snaptrade.options.get_options_chain`](#snaptradeoptionsget_options_chain)
53
48
  * [`snaptrade.options.get_options_strategy_quote`](#snaptradeoptionsget_options_strategy_quote)
@@ -64,13 +59,18 @@ Connect brokerage accounts to your app for live positions and trading
64
59
  * [`snaptrade.reference_data.list_all_currencies`](#snaptradereference_datalist_all_currencies)
65
60
  * [`snaptrade.reference_data.list_all_currencies_rates`](#snaptradereference_datalist_all_currencies_rates)
66
61
  * [`snaptrade.reference_data.symbol_search_user_account`](#snaptradereference_datasymbol_search_user_account)
62
+ * [`snaptrade.trading.cancel_order`](#snaptradetradingcancel_order)
67
63
  * [`snaptrade.trading.cancel_user_account_order`](#snaptradetradingcancel_user_account_order)
64
+ * [`snaptrade.trading.get_cryptocurrency_pair_quote`](#snaptradetradingget_cryptocurrency_pair_quote)
68
65
  * [`snaptrade.trading.get_order_impact`](#snaptradetradingget_order_impact)
69
66
  * [`snaptrade.trading.get_user_account_quotes`](#snaptradetradingget_user_account_quotes)
70
67
  * [`snaptrade.trading.place_bracket_order`](#snaptradetradingplace_bracket_order)
71
68
  * [`snaptrade.trading.place_force_order`](#snaptradetradingplace_force_order)
72
69
  * [`snaptrade.trading.place_order`](#snaptradetradingplace_order)
70
+ * [`snaptrade.trading.place_simple_order`](#snaptradetradingplace_simple_order)
71
+ * [`snaptrade.trading.preview_simple_order`](#snaptradetradingpreview_simple_order)
73
72
  * [`snaptrade.trading.replace_order`](#snaptradetradingreplace_order)
73
+ * [`snaptrade.trading.search_cryptocurrency_pair_instruments`](#snaptradetradingsearch_cryptocurrency_pair_instruments)
74
74
  * [`snaptrade.transactions_and_reporting.get_activities`](#snaptradetransactions_and_reportingget_activities)
75
75
  * [`snaptrade.transactions_and_reporting.get_reporting_custom_range`](#snaptradetransactions_and_reportingget_reporting_custom_range)
76
76
 
@@ -81,7 +81,7 @@ Connect brokerage accounts to your app for live positions and trading
81
81
  Add to Gemfile:
82
82
 
83
83
  ```ruby
84
- gem 'snaptrade', '~> 2.0.87'
84
+ gem 'snaptrade', '~> 2.0.88'
85
85
  ```
86
86
 
87
87
  ## Getting Started<a id="getting-started"></a>
@@ -1046,284 +1046,6 @@ specific users
1046
1046
  ---
1047
1047
 
1048
1048
 
1049
- ### `snaptrade.crypto_spot_trading.crypto_spot_cancel_order`<a id="snaptradecrypto_spot_tradingcrypto_spot_cancel_order"></a>
1050
-
1051
- Cancels a cryptocurrency spot order in the specified account.
1052
-
1053
-
1054
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1055
-
1056
- ```ruby
1057
- result = snaptrade.crypto_spot_trading.crypto_spot_cancel_order(
1058
- brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
1059
- user_id: "snaptrade-user-123",
1060
- user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1061
- account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1062
- )
1063
- p result
1064
- ```
1065
-
1066
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1067
-
1068
- ##### brokerage_order_id: `String`<a id="brokerage_order_id-string"></a>
1069
- Order ID returned by brokerage. This is the unique identifier for the order in
1070
- the brokerage system.
1071
-
1072
- ##### user_id: `String`<a id="user_id-string"></a>
1073
- ##### user_secret: `String`<a id="user_secret-string"></a>
1074
- ##### account_id: `String`<a id="account_id-string"></a>
1075
- #### 🔄 Return<a id="🔄-return"></a>
1076
-
1077
- [OrderUpdatedResponse](./lib/snaptrade/models/order_updated_response.rb)
1078
-
1079
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1080
-
1081
- `/accounts/{accountId}/trading/crypto/spot/cancelOrder` `POST`
1082
-
1083
- [🔙 **Back to Table of Contents**](#table-of-contents)
1084
-
1085
- ---
1086
-
1087
-
1088
- ### `snaptrade.crypto_spot_trading.crypto_spot_place_order`<a id="snaptradecrypto_spot_tradingcrypto_spot_place_order"></a>
1089
-
1090
- Places a spot cryptocurrency order in the specified account.
1091
- This endpoint does not compute the impact to the account balance from the order before submitting the order to the exchange.
1092
-
1093
-
1094
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1095
-
1096
- ```ruby
1097
- result = snaptrade.crypto_spot_trading.crypto_spot_place_order(
1098
- symbol: {
1099
- "base" => "BTC",
1100
- "quote" => "USD",
1101
- },
1102
- side: "BUY",
1103
- type: "MARKET",
1104
- time_in_force: "GTC",
1105
- amount: "123.45",
1106
- user_id: "snaptrade-user-123",
1107
- user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1108
- account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1109
- limit_price: "123.45",
1110
- stop_price: "123.45",
1111
- post_only: false,
1112
- expiration_date: "2024-01-01T00:00:00Z",
1113
- )
1114
- p result
1115
- ```
1116
-
1117
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1118
-
1119
- ##### symbol: [`CryptocurrencyPair`](./lib/snaptrade/models/cryptocurrency_pair.rb)<a id="symbol-cryptocurrencypairlibsnaptrademodelscryptocurrency_pairrb"></a>
1120
- ##### side: [`ActionStrict`](./lib/snaptrade/models/action_strict.rb)<a id="side-actionstrictlibsnaptrademodelsaction_strictrb"></a>
1121
- The action describes the intent or side of a trade. This is either `BUY` or
1122
- `SELL`.
1123
-
1124
- ##### type: [`Type`](./lib/snaptrade/models/type.rb)<a id="type-typelibsnaptrademodelstyperb"></a>
1125
- The type of order to place.
1126
-
1127
- ##### time_in_force: [`CryptoSpotOrderRequestBodyTimeInForce`](./lib/snaptrade/models/crypto_spot_order_request_body_time_in_force.rb)<a id="time_in_force-cryptospotorderrequestbodytimeinforcelibsnaptrademodelscrypto_spot_order_request_body_time_in_forcerb"></a>
1128
- The Time in Force type for the order. This field indicates how long the order
1129
- will remain active before it is executed or expires. - `GTC` - Good Til
1130
- Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or
1131
- Kill. The order must be executed in its entirety immediately or be canceled
1132
- completely. - `IOC` - Immediate Or Cancel. The order must be executed
1133
- immediately. Any portion of the order that cannot be filled immediately will be
1134
- canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
1135
-
1136
- ##### amount: `Float`<a id="amount-float"></a>
1137
- The amount of the base currency to buy or sell.
1138
-
1139
- ##### user_id: `String`<a id="user_id-string"></a>
1140
- ##### user_secret: `String`<a id="user_secret-string"></a>
1141
- ##### account_id: `String`<a id="account_id-string"></a>
1142
- ##### limit_price: `Float`<a id="limit_price-float"></a>
1143
- The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT or
1144
- TAKE_PROFIT_LIMIT.
1145
-
1146
- ##### stop_price: `Float`<a id="stop_price-float"></a>
1147
- The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT,
1148
- TAKE_PROFIT_MARKET or TAKE_PROFIT_LIMIT.
1149
-
1150
- ##### post_only: `Boolean`<a id="post_only-boolean"></a>
1151
- Valid and required only for order type LIMIT. If true orders that would be
1152
- filled immediately are rejected to avoid incurring TAKER fees.
1153
-
1154
- ##### expiration_date: `Time`<a id="expiration_date-time"></a>
1155
- The expiration date of the order. Required if the time_in_force is GTD.
1156
-
1157
- #### 🔄 Return<a id="🔄-return"></a>
1158
-
1159
- [OrderUpdatedResponse](./lib/snaptrade/models/order_updated_response.rb)
1160
-
1161
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1162
-
1163
- `/accounts/{accountId}/trading/crypto/spot/placeOrder` `POST`
1164
-
1165
- [🔙 **Back to Table of Contents**](#table-of-contents)
1166
-
1167
- ---
1168
-
1169
-
1170
- ### `snaptrade.crypto_spot_trading.crypto_spot_preview_order`<a id="snaptradecrypto_spot_tradingcrypto_spot_preview_order"></a>
1171
-
1172
- Previews a cryptocurrency spot order using the specified account.
1173
-
1174
-
1175
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1176
-
1177
- ```ruby
1178
- result = snaptrade.crypto_spot_trading.crypto_spot_preview_order(
1179
- symbol: {
1180
- "base" => "BTC",
1181
- "quote" => "USD",
1182
- },
1183
- side: "BUY",
1184
- type: "MARKET",
1185
- time_in_force: "GTC",
1186
- amount: "123.45",
1187
- user_id: "snaptrade-user-123",
1188
- user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1189
- account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1190
- limit_price: "123.45",
1191
- stop_price: "123.45",
1192
- post_only: false,
1193
- expiration_date: "2024-01-01T00:00:00Z",
1194
- )
1195
- p result
1196
- ```
1197
-
1198
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1199
-
1200
- ##### symbol: [`CryptocurrencyPair`](./lib/snaptrade/models/cryptocurrency_pair.rb)<a id="symbol-cryptocurrencypairlibsnaptrademodelscryptocurrency_pairrb"></a>
1201
- ##### side: [`ActionStrict`](./lib/snaptrade/models/action_strict.rb)<a id="side-actionstrictlibsnaptrademodelsaction_strictrb"></a>
1202
- The action describes the intent or side of a trade. This is either `BUY` or
1203
- `SELL`.
1204
-
1205
- ##### type: [`Type`](./lib/snaptrade/models/type.rb)<a id="type-typelibsnaptrademodelstyperb"></a>
1206
- The type of order to place.
1207
-
1208
- ##### time_in_force: [`CryptoSpotOrderRequestBodyTimeInForce`](./lib/snaptrade/models/crypto_spot_order_request_body_time_in_force.rb)<a id="time_in_force-cryptospotorderrequestbodytimeinforcelibsnaptrademodelscrypto_spot_order_request_body_time_in_forcerb"></a>
1209
- The Time in Force type for the order. This field indicates how long the order
1210
- will remain active before it is executed or expires. - `GTC` - Good Til
1211
- Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or
1212
- Kill. The order must be executed in its entirety immediately or be canceled
1213
- completely. - `IOC` - Immediate Or Cancel. The order must be executed
1214
- immediately. Any portion of the order that cannot be filled immediately will be
1215
- canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
1216
-
1217
- ##### amount: `Float`<a id="amount-float"></a>
1218
- The amount of the base currency to buy or sell.
1219
-
1220
- ##### user_id: `String`<a id="user_id-string"></a>
1221
- ##### user_secret: `String`<a id="user_secret-string"></a>
1222
- ##### account_id: `String`<a id="account_id-string"></a>
1223
- ##### limit_price: `Float`<a id="limit_price-float"></a>
1224
- The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT or
1225
- TAKE_PROFIT_LIMIT.
1226
-
1227
- ##### stop_price: `Float`<a id="stop_price-float"></a>
1228
- The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT,
1229
- TAKE_PROFIT_MARKET or TAKE_PROFIT_LIMIT.
1230
-
1231
- ##### post_only: `Boolean`<a id="post_only-boolean"></a>
1232
- Valid and required only for order type LIMIT. If true orders that would be
1233
- filled immediately are rejected to avoid incurring TAKER fees.
1234
-
1235
- ##### expiration_date: `Time`<a id="expiration_date-time"></a>
1236
- The expiration date of the order. Required if the time_in_force is GTD.
1237
-
1238
- #### 🔄 Return<a id="🔄-return"></a>
1239
-
1240
- [CryptoSpotOrderPreview](./lib/snaptrade/models/crypto_spot_order_preview.rb)
1241
-
1242
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1243
-
1244
- `/accounts/{accountId}/trading/crypto/spot/previewOrder` `POST`
1245
-
1246
- [🔙 **Back to Table of Contents**](#table-of-contents)
1247
-
1248
- ---
1249
-
1250
-
1251
- ### `snaptrade.crypto_spot_trading.crypto_spot_quote`<a id="snaptradecrypto_spot_tradingcrypto_spot_quote"></a>
1252
-
1253
- Gets a quote for the specified account.
1254
-
1255
-
1256
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1257
-
1258
- ```ruby
1259
- result = snaptrade.crypto_spot_trading.crypto_spot_quote(
1260
- user_id: "snaptrade-user-123",
1261
- user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1262
- account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1263
- base: "BTC",
1264
- quote: "USD",
1265
- )
1266
- p result
1267
- ```
1268
-
1269
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1270
-
1271
- ##### user_id: `String`<a id="user_id-string"></a>
1272
- ##### user_secret: `String`<a id="user_secret-string"></a>
1273
- ##### account_id: `String`<a id="account_id-string"></a>
1274
- ##### base: `String`<a id="base-string"></a>
1275
- ##### quote: `String`<a id="quote-string"></a>
1276
- #### 🔄 Return<a id="🔄-return"></a>
1277
-
1278
- [CryptoSpotQuote](./lib/snaptrade/models/crypto_spot_quote.rb)
1279
-
1280
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1281
-
1282
- `/accounts/{accountId}/trading/crypto/spot/quote` `GET`
1283
-
1284
- [🔙 **Back to Table of Contents**](#table-of-contents)
1285
-
1286
- ---
1287
-
1288
-
1289
- ### `snaptrade.crypto_spot_trading.crypto_spot_symbols`<a id="snaptradecrypto_spot_tradingcrypto_spot_symbols"></a>
1290
-
1291
- Searches cryptocurrency spot symbols accessible to the specified account.
1292
-
1293
-
1294
- #### 🛠️ Usage<a id="🛠️-usage"></a>
1295
-
1296
- ```ruby
1297
- result = snaptrade.crypto_spot_trading.crypto_spot_symbols(
1298
- user_id: "snaptrade-user-123",
1299
- user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1300
- account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1301
- base: "BTC",
1302
- quote: "USD",
1303
- )
1304
- p result
1305
- ```
1306
-
1307
- #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1308
-
1309
- ##### user_id: `String`<a id="user_id-string"></a>
1310
- ##### user_secret: `String`<a id="user_secret-string"></a>
1311
- ##### account_id: `String`<a id="account_id-string"></a>
1312
- ##### base: `String`<a id="base-string"></a>
1313
- ##### quote: `String`<a id="quote-string"></a>
1314
- #### 🔄 Return<a id="🔄-return"></a>
1315
-
1316
- [TradingCryptoSpotSymbols200Response](./lib/snaptrade/models/trading_crypto_spot_symbols200_response.rb)
1317
-
1318
- #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1319
-
1320
- `/accounts/{accountId}/trading/crypto/spot/symbols` `GET`
1321
-
1322
- [🔙 **Back to Table of Contents**](#table-of-contents)
1323
-
1324
- ---
1325
-
1326
-
1327
1049
  ### `snaptrade.options.get_option_strategy`<a id="snaptradeoptionsget_option_strategy"></a>
1328
1050
 
1329
1051
  Creates an option strategy object that will be used to place an option strategy order.
@@ -1855,6 +1577,42 @@ The search query for symbols.
1855
1577
  ---
1856
1578
 
1857
1579
 
1580
+ ### `snaptrade.trading.cancel_order`<a id="snaptradetradingcancel_order"></a>
1581
+
1582
+ Cancels an order in the specified account.
1583
+
1584
+
1585
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
1586
+
1587
+ ```ruby
1588
+ result = snaptrade.trading.cancel_order(
1589
+ user_id: "snaptrade-user-123",
1590
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1591
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1592
+ brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
1593
+ )
1594
+ p result
1595
+ ```
1596
+
1597
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1598
+
1599
+ ##### user_id: `String`<a id="user_id-string"></a>
1600
+ ##### user_secret: `String`<a id="user_secret-string"></a>
1601
+ ##### account_id: `String`<a id="account_id-string"></a>
1602
+ ##### brokerage_order_id: `String`<a id="brokerage_order_id-string"></a>
1603
+ #### 🔄 Return<a id="🔄-return"></a>
1604
+
1605
+ [OrderUpdatedResponse](./lib/snaptrade/models/order_updated_response.rb)
1606
+
1607
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1608
+
1609
+ `/accounts/{accountId}/trading/simple/{brokerageOrderId}/cancel` `POST`
1610
+
1611
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1612
+
1613
+ ---
1614
+
1615
+
1858
1616
  ### `snaptrade.trading.cancel_user_account_order`<a id="snaptradetradingcancel_user_account_order"></a>
1859
1617
 
1860
1618
  Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
@@ -1894,6 +1652,42 @@ the brokerage system.
1894
1652
  ---
1895
1653
 
1896
1654
 
1655
+ ### `snaptrade.trading.get_cryptocurrency_pair_quote`<a id="snaptradetradingget_cryptocurrency_pair_quote"></a>
1656
+
1657
+ Gets a quote for the specified account.
1658
+
1659
+
1660
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
1661
+
1662
+ ```ruby
1663
+ result = snaptrade.trading.get_cryptocurrency_pair_quote(
1664
+ user_id: "snaptrade-user-123",
1665
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1666
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1667
+ instrument_symbol: "BTC-USD",
1668
+ )
1669
+ p result
1670
+ ```
1671
+
1672
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1673
+
1674
+ ##### user_id: `String`<a id="user_id-string"></a>
1675
+ ##### user_secret: `String`<a id="user_secret-string"></a>
1676
+ ##### account_id: `String`<a id="account_id-string"></a>
1677
+ ##### instrument_symbol: `String`<a id="instrument_symbol-string"></a>
1678
+ #### 🔄 Return<a id="🔄-return"></a>
1679
+
1680
+ [CryptocurrencyPairQuote](./lib/snaptrade/models/cryptocurrency_pair_quote.rb)
1681
+
1682
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
1683
+
1684
+ `/accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote` `GET`
1685
+
1686
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1687
+
1688
+ ---
1689
+
1690
+
1897
1691
  ### `snaptrade.trading.get_order_impact`<a id="snaptradetradingget_order_impact"></a>
1898
1692
 
1899
1693
  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.
@@ -2238,6 +2032,169 @@ before responding to the request.
2238
2032
  ---
2239
2033
 
2240
2034
 
2035
+ ### `snaptrade.trading.place_simple_order`<a id="snaptradetradingplace_simple_order"></a>
2036
+
2037
+ Places an order in the specified account.
2038
+ This endpoint does not compute the impact to the account balance from the order before submitting the order.
2039
+
2040
+
2041
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
2042
+
2043
+ ```ruby
2044
+ result = snaptrade.trading.place_simple_order(
2045
+ instrument: {
2046
+ "symbol" => "AAPL",
2047
+ "type" => "EQUITY",
2048
+ },
2049
+ side: "BUY",
2050
+ type: "MARKET",
2051
+ time_in_force: "GTC",
2052
+ amount: "123.45",
2053
+ user_id: "snaptrade-user-123",
2054
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
2055
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
2056
+ limit_price: "123.45",
2057
+ stop_price: "123.45",
2058
+ post_only: false,
2059
+ expiration_date: "2024-01-01T00:00:00Z",
2060
+ )
2061
+ p result
2062
+ ```
2063
+
2064
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
2065
+
2066
+ ##### instrument: [`TradingInstrument`](./lib/snaptrade/models/trading_instrument.rb)<a id="instrument-tradinginstrumentlibsnaptrademodelstrading_instrumentrb"></a>
2067
+ ##### side: [`ActionStrict`](./lib/snaptrade/models/action_strict.rb)<a id="side-actionstrictlibsnaptrademodelsaction_strictrb"></a>
2068
+ The action describes the intent or side of a trade. This is either `BUY` or
2069
+ `SELL`.
2070
+
2071
+ ##### type: [`Type`](./lib/snaptrade/models/type.rb)<a id="type-typelibsnaptrademodelstyperb"></a>
2072
+ The type of order to place.
2073
+
2074
+ ##### time_in_force: [`SimpleOrderRequestBodyTimeInForce`](./lib/snaptrade/models/simple_order_request_body_time_in_force.rb)<a id="time_in_force-simpleorderrequestbodytimeinforcelibsnaptrademodelssimple_order_request_body_time_in_forcerb"></a>
2075
+ The Time in Force type for the order. This field indicates how long the order
2076
+ will remain active before it is executed or expires. - `GTC` - Good Til
2077
+ Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or
2078
+ Kill. The order must be executed in its entirety immediately or be canceled
2079
+ completely. - `IOC` - Immediate Or Cancel. The order must be executed
2080
+ immediately. Any portion of the order that cannot be filled immediately will be
2081
+ canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
2082
+
2083
+ ##### amount: `Float`<a id="amount-float"></a>
2084
+ The amount of the base currency to buy or sell.
2085
+
2086
+ ##### user_id: `String`<a id="user_id-string"></a>
2087
+ ##### user_secret: `String`<a id="user_secret-string"></a>
2088
+ ##### account_id: `String`<a id="account_id-string"></a>
2089
+ ##### limit_price: `Float`<a id="limit_price-float"></a>
2090
+ The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT or
2091
+ TAKE_PROFIT_LIMIT.
2092
+
2093
+ ##### stop_price: `Float`<a id="stop_price-float"></a>
2094
+ The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT,
2095
+ TAKE_PROFIT_MARKET or TAKE_PROFIT_LIMIT.
2096
+
2097
+ ##### post_only: `Boolean`<a id="post_only-boolean"></a>
2098
+ Valid and required only for order type LIMIT. If true orders that would be
2099
+ filled immediately are rejected to avoid incurring TAKER fees.
2100
+
2101
+ ##### expiration_date: `Time`<a id="expiration_date-time"></a>
2102
+ The expiration date of the order. Required if the time_in_force is GTD.
2103
+
2104
+ #### 🔄 Return<a id="🔄-return"></a>
2105
+
2106
+ [OrderUpdatedResponse](./lib/snaptrade/models/order_updated_response.rb)
2107
+
2108
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
2109
+
2110
+ `/accounts/{accountId}/trading/simple` `POST`
2111
+
2112
+ [🔙 **Back to Table of Contents**](#table-of-contents)
2113
+
2114
+ ---
2115
+
2116
+
2117
+ ### `snaptrade.trading.preview_simple_order`<a id="snaptradetradingpreview_simple_order"></a>
2118
+
2119
+ Previews an order using the specified account.
2120
+
2121
+
2122
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
2123
+
2124
+ ```ruby
2125
+ result = snaptrade.trading.preview_simple_order(
2126
+ instrument: {
2127
+ "symbol" => "AAPL",
2128
+ "type" => "EQUITY",
2129
+ },
2130
+ side: "BUY",
2131
+ type: "MARKET",
2132
+ time_in_force: "GTC",
2133
+ amount: "123.45",
2134
+ user_id: "snaptrade-user-123",
2135
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
2136
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
2137
+ limit_price: "123.45",
2138
+ stop_price: "123.45",
2139
+ post_only: false,
2140
+ expiration_date: "2024-01-01T00:00:00Z",
2141
+ )
2142
+ p result
2143
+ ```
2144
+
2145
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
2146
+
2147
+ ##### instrument: [`TradingInstrument`](./lib/snaptrade/models/trading_instrument.rb)<a id="instrument-tradinginstrumentlibsnaptrademodelstrading_instrumentrb"></a>
2148
+ ##### side: [`ActionStrict`](./lib/snaptrade/models/action_strict.rb)<a id="side-actionstrictlibsnaptrademodelsaction_strictrb"></a>
2149
+ The action describes the intent or side of a trade. This is either `BUY` or
2150
+ `SELL`.
2151
+
2152
+ ##### type: [`Type`](./lib/snaptrade/models/type.rb)<a id="type-typelibsnaptrademodelstyperb"></a>
2153
+ The type of order to place.
2154
+
2155
+ ##### time_in_force: [`SimpleOrderRequestBodyTimeInForce`](./lib/snaptrade/models/simple_order_request_body_time_in_force.rb)<a id="time_in_force-simpleorderrequestbodytimeinforcelibsnaptrademodelssimple_order_request_body_time_in_forcerb"></a>
2156
+ The Time in Force type for the order. This field indicates how long the order
2157
+ will remain active before it is executed or expires. - `GTC` - Good Til
2158
+ Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or
2159
+ Kill. The order must be executed in its entirety immediately or be canceled
2160
+ completely. - `IOC` - Immediate Or Cancel. The order must be executed
2161
+ immediately. Any portion of the order that cannot be filled immediately will be
2162
+ canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
2163
+
2164
+ ##### amount: `Float`<a id="amount-float"></a>
2165
+ The amount of the base currency to buy or sell.
2166
+
2167
+ ##### user_id: `String`<a id="user_id-string"></a>
2168
+ ##### user_secret: `String`<a id="user_secret-string"></a>
2169
+ ##### account_id: `String`<a id="account_id-string"></a>
2170
+ ##### limit_price: `Float`<a id="limit_price-float"></a>
2171
+ The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT or
2172
+ TAKE_PROFIT_LIMIT.
2173
+
2174
+ ##### stop_price: `Float`<a id="stop_price-float"></a>
2175
+ The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT,
2176
+ TAKE_PROFIT_MARKET or TAKE_PROFIT_LIMIT.
2177
+
2178
+ ##### post_only: `Boolean`<a id="post_only-boolean"></a>
2179
+ Valid and required only for order type LIMIT. If true orders that would be
2180
+ filled immediately are rejected to avoid incurring TAKER fees.
2181
+
2182
+ ##### expiration_date: `Time`<a id="expiration_date-time"></a>
2183
+ The expiration date of the order. Required if the time_in_force is GTD.
2184
+
2185
+ #### 🔄 Return<a id="🔄-return"></a>
2186
+
2187
+ [SimpleOrderPreview](./lib/snaptrade/models/simple_order_preview.rb)
2188
+
2189
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
2190
+
2191
+ `/accounts/{accountId}/trading/simple/preview` `POST`
2192
+
2193
+ [🔙 **Back to Table of Contents**](#table-of-contents)
2194
+
2195
+ ---
2196
+
2197
+
2241
2198
  ### `snaptrade.trading.replace_order`<a id="snaptradetradingreplace_order"></a>
2242
2199
 
2243
2200
  Replaces an existing pending order with a new one. The way this works is brokerage dependent, but usually involves cancelling
@@ -2310,6 +2267,44 @@ The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
2310
2267
  ---
2311
2268
 
2312
2269
 
2270
+ ### `snaptrade.trading.search_cryptocurrency_pair_instruments`<a id="snaptradetradingsearch_cryptocurrency_pair_instruments"></a>
2271
+
2272
+ Searches cryptocurrency pairs instruments accessible to the specified account.
2273
+
2274
+
2275
+ #### 🛠️ Usage<a id="🛠️-usage"></a>
2276
+
2277
+ ```ruby
2278
+ result = snaptrade.trading.search_cryptocurrency_pair_instruments(
2279
+ user_id: "snaptrade-user-123",
2280
+ user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
2281
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
2282
+ base: "BTC",
2283
+ quote: "USD",
2284
+ )
2285
+ p result
2286
+ ```
2287
+
2288
+ #### ⚙️ Parameters<a id="⚙️-parameters"></a>
2289
+
2290
+ ##### user_id: `String`<a id="user_id-string"></a>
2291
+ ##### user_secret: `String`<a id="user_secret-string"></a>
2292
+ ##### account_id: `String`<a id="account_id-string"></a>
2293
+ ##### base: `String`<a id="base-string"></a>
2294
+ ##### quote: `String`<a id="quote-string"></a>
2295
+ #### 🔄 Return<a id="🔄-return"></a>
2296
+
2297
+ [TradingSearchCryptocurrencyPairInstruments200Response](./lib/snaptrade/models/trading_search_cryptocurrency_pair_instruments200_response.rb)
2298
+
2299
+ #### 🌐 Endpoint<a id="🌐-endpoint"></a>
2300
+
2301
+ `/accounts/{accountId}/trading/instruments/cryptocurrencyPairs` `GET`
2302
+
2303
+ [🔙 **Back to Table of Contents**](#table-of-contents)
2304
+
2305
+ ---
2306
+
2307
+
2313
2308
  ### `snaptrade.transactions_and_reporting.get_activities`<a id="snaptradetransactions_and_reportingget_activities"></a>
2314
2309
  ![Deprecated](https://img.shields.io/badge/deprecated-yellow)
2315
2310