snaptrade 2.0.37 → 2.0.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +115 -77
  4. data/lib/snaptrade/api/account_information_api.rb +4 -4
  5. data/lib/snaptrade/api/authentication_api.rb +4 -4
  6. data/lib/snaptrade/api/connections_api.rb +70 -52
  7. data/lib/snaptrade/api/options_api.rb +4 -4
  8. data/lib/snaptrade/api/trading_api.rb +106 -106
  9. data/lib/snaptrade/models/account.rb +2 -2
  10. data/lib/snaptrade/models/brokerage.rb +25 -40
  11. data/lib/snaptrade/models/brokerage_authorization.rb +12 -8
  12. data/lib/snaptrade/models/brokerage_authorization_disabled_confirmation.rb +1 -0
  13. data/lib/snaptrade/models/brokerage_authorization_refresh_confirmation.rb +1 -0
  14. data/lib/snaptrade/models/brokerage_type.rb +1 -1
  15. data/lib/snaptrade/models/manual_trade.rb +7 -5
  16. data/lib/snaptrade/models/manual_trade_and_impact.rb +2 -2
  17. data/lib/snaptrade/models/manual_trade_balance.rb +3 -3
  18. data/lib/snaptrade/models/manual_trade_form.rb +52 -25
  19. data/lib/snaptrade/models/manual_trade_impact.rb +260 -0
  20. data/lib/snaptrade/models/manual_trade_symbol.rb +6 -1
  21. data/lib/snaptrade/models/notional_value.rb +1 -1
  22. data/lib/snaptrade/models/options_place_option_strategy_request.rb +2 -2
  23. data/lib/snaptrade/models/symbols_quotes_inner.rb +15 -10
  24. data/lib/snaptrade/models/trading_cancel_user_account_order_request.rb +1 -0
  25. data/lib/snaptrade/models/validated_trade_body.rb +1 -2
  26. data/lib/snaptrade/version.rb +1 -1
  27. data/lib/snaptrade.rb +1 -0
  28. data/spec/api/account_information_api_spec.rb +1 -1
  29. data/spec/api/authentication_api_spec.rb +1 -1
  30. data/spec/api/connections_api_spec.rb +13 -13
  31. data/spec/api/trading_api_spec.rb +15 -15
  32. data/spec/models/brokerage_spec.rb +6 -24
  33. data/spec/models/manual_trade_form_spec.rb +6 -6
  34. data/spec/models/manual_trade_impact_spec.rb +53 -0
  35. data/spec/models/symbols_quotes_inner_spec.rb +3 -3
  36. metadata +5 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88f22af63ef634b29b544f5bbc26cf9b13e9308b6f4ef33dfb560661fd5634f8
4
- data.tar.gz: 86ff19da7e1921510e08601478baf357a1185d3c2637dcc1652844ec538d5a95
3
+ metadata.gz: 5de7a12dd5c2bcd10b37f4960afe06950c1bf6483efde545f9d58cbae981a842
4
+ data.tar.gz: 122df0c22545b0853927396d29c2698242873a686c71f4fda8aacff2bafeefd3
5
5
  SHA512:
6
- metadata.gz: 58e865b388be36ed872dffde28d4e52ecf65b9ac0432438c3ac3882856d6cda10414360a7a1f86b58a8473097ce978525f254a4461fb8f89e15d820def612fd6
7
- data.tar.gz: 40803cf194c7788f5e695f4cb72bb9db2af3afa69a6f98bcec8268ff2af8ce1c008d4414f142f63452658b83b53f6954a831a715572849b69f2697e287ff28a8
6
+ metadata.gz: f4022c9867722010ad4ea8df511108634b2b1501f68e3d3d8879bd1dcafc1091899b9eb775bf0e14db67f7b4d0e296ed32f95bb28e1f27c37265fa2ea6ab7216
7
+ data.tar.gz: e498b92a1f1c008739a54477c497cdf4cb42cb8806dafee45ee505024200067f3868060e645b72ff2fea7bc5459f7ba420cec1c007bac16b1b82d9ed3e9d3258
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (2.0.37)
4
+ snaptrade (2.0.39)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -44,7 +44,7 @@ GEM
44
44
  regexp_parser (2.9.2)
45
45
  reline (0.5.9)
46
46
  io-console (~> 0.5)
47
- rexml (3.3.5)
47
+ rexml (3.3.6)
48
48
  strscan
49
49
  rspec (3.13.0)
50
50
  rspec-core (~> 3.13.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.37-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.37)
9
+ [![npm](https://img.shields.io/badge/gem-v2.0.39-blue)](https://rubygems.org/gems/snaptrade/versions/2.0.39)
10
10
  [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
11
 
12
12
  </div>
@@ -70,7 +70,7 @@ Connect brokerage accounts to your app for live positions and trading
70
70
  Add to Gemfile:
71
71
 
72
72
  ```ruby
73
- gem 'snaptrade', '~> 2.0.37'
73
+ gem 'snaptrade', '~> 2.0.39'
74
74
  ```
75
75
 
76
76
  ## Getting Started<a id="getting-started"></a>
@@ -341,7 +341,7 @@ p result
341
341
 
342
342
  ### `snaptrade.account_information.list_user_accounts`<a id="snaptradeaccount_informationlist_user_accounts"></a>
343
343
 
344
- Returns all brokerage accounts known to SnapTrade for the authenticated user.
344
+ Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
345
345
 
346
346
  The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
347
347
 
@@ -463,7 +463,7 @@ p result
463
463
 
464
464
  ### `snaptrade.authentication.list_snap_trade_users`<a id="snaptradeauthenticationlist_snap_trade_users"></a>
465
465
 
466
- Returns a list of all registered user IDs.
466
+ Returns a list of all registered user IDs. Please note that the response is not currently paginated.
467
467
 
468
468
  #### 🛠️ Usage<a id="🛠️-usage"></a>
469
469
 
@@ -629,13 +629,13 @@ endpoint](/reference/Authentication/Authentication_resetSnapTradeUserSecret).
629
629
 
630
630
  ### `snaptrade.connections.detail_brokerage_authorization`<a id="snaptradeconnectionsdetail_brokerage_authorization"></a>
631
631
 
632
- Returns a single brokerage authorization object for the specified ID.
632
+ Returns a single connection for the specified ID.
633
633
 
634
634
  #### 🛠️ Usage<a id="🛠️-usage"></a>
635
635
 
636
636
  ```ruby
637
637
  result = snaptrade.connections.detail_brokerage_authorization(
638
- authorization_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
638
+ authorization_id: "87b24961-b51e-4db8-9226-f198f6518a89",
639
639
  user_id: "snaptrade-user-123",
640
640
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
641
641
  )
@@ -645,8 +645,6 @@ p result
645
645
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
646
646
 
647
647
  ##### authorization_id: `String`<a id="authorization_id-string"></a>
648
- The ID of a brokerage authorization object.
649
-
650
648
  ##### user_id: `String`<a id="user_id-string"></a>
651
649
  ##### user_secret: `String`<a id="user_secret-string"></a>
652
650
  #### 🔄 Return<a id="🔄-return"></a>
@@ -664,13 +662,17 @@ The ID of a brokerage authorization object.
664
662
 
665
663
  ### `snaptrade.connections.disable_brokerage_authorization`<a id="snaptradeconnectionsdisable_brokerage_authorization"></a>
666
664
 
667
- Manually disable a connection. This should only be used for testing a reconnect flow, and never used on production connections. Will trigger a disconnect as if it happened naturally, and send a CONNECTION_BROKEN webhook for the connection. Please contact us in order to use this endpoint as it is disabled by default.
665
+ Manually force the specified connection to become disabled. This should only be used for testing a reconnect flow, and never used on production connections.
666
+ Will trigger a disconnect as if it happened naturally, and send a [`CONNECTION_BROKEN` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_broken) for the connection.
667
+
668
+ *Please contact us in order to use this endpoint as it is disabled by default.*
669
+
668
670
 
669
671
  #### 🛠️ Usage<a id="🛠️-usage"></a>
670
672
 
671
673
  ```ruby
672
674
  result = snaptrade.connections.disable_brokerage_authorization(
673
- authorization_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
675
+ authorization_id: "87b24961-b51e-4db8-9226-f198f6518a89",
674
676
  user_id: "snaptrade-user-123",
675
677
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
676
678
  )
@@ -680,8 +682,6 @@ p result
680
682
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
681
683
 
682
684
  ##### authorization_id: `String`<a id="authorization_id-string"></a>
683
- The ID of a brokerage authorization object.
684
-
685
685
  ##### user_id: `String`<a id="user_id-string"></a>
686
686
  ##### user_secret: `String`<a id="user_secret-string"></a>
687
687
  #### 🔄 Return<a id="🔄-return"></a>
@@ -699,7 +699,12 @@ The ID of a brokerage authorization object.
699
699
 
700
700
  ### `snaptrade.connections.list_brokerage_authorizations`<a id="snaptradeconnectionslist_brokerage_authorizations"></a>
701
701
 
702
- Returns a list of Brokerage Authorization objects for the user
702
+ Returns a list of all connections for the specified user. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency.
703
+
704
+ A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts.
705
+
706
+ SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one.
707
+
703
708
 
704
709
  #### 🛠️ Usage<a id="🛠️-usage"></a>
705
710
 
@@ -730,13 +735,16 @@ p result
730
735
 
731
736
  ### `snaptrade.connections.refresh_brokerage_authorization`<a id="snaptradeconnectionsrefresh_brokerage_authorization"></a>
732
737
 
733
- Trigger a holdings update for all accounts under this authorization. Updates will be queued asynchronously. ACCOUNT_HOLDINGS_UPDATED webhook will be sent once the sync completes. Please contact support for access as this endpoint is not enabled by default
738
+ Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection.
739
+
740
+ *Please contact support for access as this endpoint is not enabled by default.*
741
+
734
742
 
735
743
  #### 🛠️ Usage<a id="🛠️-usage"></a>
736
744
 
737
745
  ```ruby
738
746
  result = snaptrade.connections.refresh_brokerage_authorization(
739
- authorization_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
747
+ authorization_id: "87b24961-b51e-4db8-9226-f198f6518a89",
740
748
  user_id: "snaptrade-user-123",
741
749
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
742
750
  )
@@ -746,8 +754,6 @@ p result
746
754
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
747
755
 
748
756
  ##### authorization_id: `String`<a id="authorization_id-string"></a>
749
- The ID of a brokerage authorization object.
750
-
751
757
  ##### user_id: `String`<a id="user_id-string"></a>
752
758
  ##### user_secret: `String`<a id="user_secret-string"></a>
753
759
  #### 🔄 Return<a id="🔄-return"></a>
@@ -765,13 +771,13 @@ The ID of a brokerage authorization object.
765
771
 
766
772
  ### `snaptrade.connections.remove_brokerage_authorization`<a id="snaptradeconnectionsremove_brokerage_authorization"></a>
767
773
 
768
- Deletes a specified brokerage authorization given by the ID.
774
+ Deletes the connection specified by the ID. This will also delete all accounts and holdings associated with the connection. This action is irreversible. This endpoint is synchronous, a 204 response indicates that the connection has been successfully deleted.
769
775
 
770
776
  #### 🛠️ Usage<a id="🛠️-usage"></a>
771
777
 
772
778
  ```ruby
773
779
  snaptrade.connections.remove_brokerage_authorization(
774
- authorization_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
780
+ authorization_id: "87b24961-b51e-4db8-9226-f198f6518a89",
775
781
  user_id: "snaptrade-user-123",
776
782
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
777
783
  )
@@ -780,8 +786,6 @@ snaptrade.connections.remove_brokerage_authorization(
780
786
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
781
787
 
782
788
  ##### authorization_id: `String`<a id="authorization_id-string"></a>
783
- The ID of the Authorization to delete.
784
-
785
789
  ##### user_id: `String`<a id="user_id-string"></a>
786
790
  ##### user_secret: `String`<a id="user_secret-string"></a>
787
791
  #### 🌐 Endpoint<a id="🌐-endpoint"></a>
@@ -1003,7 +1007,7 @@ Places the option strategy order and returns the order record received from the
1003
1007
 
1004
1008
  ```ruby
1005
1009
  result = snaptrade.options.place_option_strategy(
1006
- order_type: "Limit",
1010
+ order_type: "Market",
1007
1011
  time_in_force: "FOK",
1008
1012
  user_id: "snaptrade-user-123",
1009
1013
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
@@ -1017,11 +1021,17 @@ p result
1017
1021
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1018
1022
 
1019
1023
  ##### order_type: [`OrderTypeStrict`](./lib/snaptrade/models/order_type_strict.rb)<a id="order_type-ordertypestrictlibsnaptrademodelsorder_type_strictrb"></a>
1020
- Order Type
1024
+ The type of order to place. - For `Limit` and `StopLimit` orders, the `price`
1025
+ field is required. - For `Stop` and `StopLimit` orders, the `stop` field is
1026
+ required.
1021
1027
 
1022
1028
  ##### time_in_force: [`TimeInForceStrict`](./lib/snaptrade/models/time_in_force_strict.rb)<a id="time_in_force-timeinforcestrictlibsnaptrademodelstime_in_force_strictrb"></a>
1023
- Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til
1024
- Canceled
1029
+ The Time in Force type for the order. This field indicates how long the order
1030
+ will remain active before it is executed or expires. Here are the supported
1031
+ values: - `Day` - Day. The order is valid only for the trading day on which it
1032
+ is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed
1033
+ or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety
1034
+ immediately or be canceled completely.
1025
1035
 
1026
1036
  ##### user_id: `String`<a id="user_id-string"></a>
1027
1037
  ##### user_secret: `String`<a id="user_secret-string"></a>
@@ -1358,8 +1368,7 @@ The ID of the account to search for symbols within.
1358
1368
 
1359
1369
  ### `snaptrade.trading.cancel_user_account_order`<a id="snaptradetradingcancel_user_account_order"></a>
1360
1370
 
1361
- Sends a signal to the brokerage to cancel the specified order.
1362
- This will only work if the order has not yet been executed.
1371
+ Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
1363
1372
 
1364
1373
 
1365
1374
  #### 🛠️ Usage<a id="🛠️-usage"></a>
@@ -1369,7 +1378,7 @@ result = snaptrade.trading.cancel_user_account_order(
1369
1378
  user_id: "snaptrade-user-123",
1370
1379
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1371
1380
  account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1372
- brokerage_order_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1381
+ brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
1373
1382
  )
1374
1383
  p result
1375
1384
  ```
@@ -1379,9 +1388,10 @@ p result
1379
1388
  ##### user_id: `String`<a id="user_id-string"></a>
1380
1389
  ##### user_secret: `String`<a id="user_secret-string"></a>
1381
1390
  ##### account_id: `String`<a id="account_id-string"></a>
1382
- The ID of the account to cancel the order in.
1383
-
1384
1391
  ##### brokerage_order_id: `String`<a id="brokerage_order_id-string"></a>
1392
+ Order ID returned by brokerage. This is the unique identifier for the order in
1393
+ the brokerage system.
1394
+
1385
1395
  #### 🔄 Return<a id="🔄-return"></a>
1386
1396
 
1387
1397
  [AccountOrderRecord](./lib/snaptrade/models/account_order_record.rb)
@@ -1397,22 +1407,22 @@ The ID of the account to cancel the order in.
1397
1407
 
1398
1408
  ### `snaptrade.trading.get_order_impact`<a id="snaptradetradingget_order_impact"></a>
1399
1409
 
1400
- Return the trade object and it's impact on the account for the specified order.
1410
+ 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.
1401
1411
 
1402
1412
  #### 🛠️ Usage<a id="🛠️-usage"></a>
1403
1413
 
1404
1414
  ```ruby
1405
1415
  result = snaptrade.trading.get_order_impact(
1416
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1417
+ action: "BUY",
1418
+ universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1419
+ order_type: "Market",
1420
+ time_in_force: "FOK",
1406
1421
  user_id: "snaptrade-user-123",
1407
1422
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1408
- account_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1409
- action: "BUY",
1410
- order_type: "Limit",
1411
1423
  price: 31.33,
1412
1424
  stop: 31.33,
1413
- time_in_force: "FOK",
1414
- units: 3.14,
1415
- universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1425
+ units: 10.5,
1416
1426
  notional_value: None,
1417
1427
  )
1418
1428
  p result
@@ -1420,27 +1430,40 @@ p result
1420
1430
 
1421
1431
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1422
1432
 
1423
- ##### user_id: `String`<a id="user_id-string"></a>
1424
- ##### user_secret: `String`<a id="user_secret-string"></a>
1425
1433
  ##### account_id: `String`<a id="account_id-string"></a>
1434
+ Unique identifier for the connected brokerage account. This is the UUID used to
1435
+ reference the account in SnapTrade.
1436
+
1426
1437
  ##### action: [`ActionStrict`](./lib/snaptrade/models/action_strict.rb)<a id="action-actionstrictlibsnaptrademodelsaction_strictrb"></a>
1427
- Trade Action
1438
+ The action describes the intent or side of a trade. This is either `BUY` or
1439
+ `SELL`
1440
+
1441
+ ##### universal_symbol_id: `String`<a id="universal_symbol_id-string"></a>
1442
+ Unique identifier for the symbol within SnapTrade. This is the ID used to
1443
+ reference the symbol in SnapTrade API calls.
1428
1444
 
1429
1445
  ##### order_type: [`OrderTypeStrict`](./lib/snaptrade/models/order_type_strict.rb)<a id="order_type-ordertypestrictlibsnaptrademodelsorder_type_strictrb"></a>
1430
- Order Type
1446
+ The type of order to place. - For `Limit` and `StopLimit` orders, the `price`
1447
+ field is required. - For `Stop` and `StopLimit` orders, the `stop` field is
1448
+ required.
1431
1449
 
1450
+ ##### time_in_force: [`TimeInForceStrict`](./lib/snaptrade/models/time_in_force_strict.rb)<a id="time_in_force-timeinforcestrictlibsnaptrademodelstime_in_force_strictrb"></a>
1451
+ The Time in Force type for the order. This field indicates how long the order
1452
+ will remain active before it is executed or expires. Here are the supported
1453
+ values: - `Day` - Day. The order is valid only for the trading day on which it
1454
+ is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed
1455
+ or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety
1456
+ immediately or be canceled completely.
1457
+
1458
+ ##### user_id: `String`<a id="user_id-string"></a>
1459
+ ##### user_secret: `String`<a id="user_secret-string"></a>
1432
1460
  ##### price: `Float`<a id="price-float"></a>
1433
- Trade Price if limit or stop limit order
1461
+ The limit price for `Limit` and `StopLimit` orders.
1434
1462
 
1435
1463
  ##### stop: `Float`<a id="stop-float"></a>
1436
- Stop Price. If stop loss or stop limit order, the price to trigger the stop
1437
-
1438
- ##### time_in_force: [`TimeInForceStrict`](./lib/snaptrade/models/time_in_force_strict.rb)<a id="time_in_force-timeinforcestrictlibsnaptrademodelstime_in_force_strictrb"></a>
1439
- Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til
1440
- Canceled
1464
+ The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
1441
1465
 
1442
1466
  ##### units: [`Float`](./lib/snaptrade/models/float.rb)<a id="units-floatlibsnaptrademodelsfloatrb"></a>
1443
- ##### universal_symbol_id: `String`<a id="universal_symbol_id-string"></a>
1444
1467
  ##### notional_value: [`ManualTradeFormNotionalValue`](./lib/snaptrade/models/manual_trade_form_notional_value.rb)<a id="notional_value-manualtradeformnotionalvaluelibsnaptrademodelsmanual_trade_form_notional_valuerb"></a>
1445
1468
  #### 🔄 Return<a id="🔄-return"></a>
1446
1469
 
@@ -1457,7 +1480,7 @@ Canceled
1457
1480
 
1458
1481
  ### `snaptrade.trading.get_user_account_quotes`<a id="snaptradetradingget_user_account_quotes"></a>
1459
1482
 
1460
- Returns quote(s) from the brokerage for the specified symbol(s).
1483
+ Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
1461
1484
 
1462
1485
  #### 🛠️ Usage<a id="🛠️-usage"></a>
1463
1486
 
@@ -1477,13 +1500,12 @@ p result
1477
1500
  ##### user_id: `String`<a id="user_id-string"></a>
1478
1501
  ##### user_secret: `String`<a id="user_secret-string"></a>
1479
1502
  ##### symbols: `String`<a id="symbols-string"></a>
1480
- List of universal_symbol_id or tickers to get quotes for.
1503
+ List of Universal Symbol IDs or tickers to get quotes for.
1481
1504
 
1482
1505
  ##### account_id: `String`<a id="account_id-string"></a>
1483
- The ID of the account to get quotes.
1484
-
1485
1506
  ##### use_ticker: `Boolean`<a id="use_ticker-boolean"></a>
1486
- Should be set to True if providing tickers.
1507
+ Should be set to `True` if `symbols` are comprised of tickers. Defaults to
1508
+ `False` if not provided.
1487
1509
 
1488
1510
  #### 🔄 Return<a id="🔄-return"></a>
1489
1511
 
@@ -1500,22 +1522,25 @@ Should be set to True if providing tickers.
1500
1522
 
1501
1523
  ### `snaptrade.trading.place_force_order`<a id="snaptradetradingplace_force_order"></a>
1502
1524
 
1503
- Places a specified trade in the specified account.
1525
+ Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds.
1526
+
1527
+ This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact).
1528
+
1504
1529
 
1505
1530
  #### 🛠️ Usage<a id="🛠️-usage"></a>
1506
1531
 
1507
1532
  ```ruby
1508
1533
  result = snaptrade.trading.place_force_order(
1534
+ account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
1535
+ action: "BUY",
1536
+ universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1537
+ order_type: "Market",
1538
+ time_in_force: "FOK",
1509
1539
  user_id: "snaptrade-user-123",
1510
1540
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1511
- account_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1512
- action: "BUY",
1513
- order_type: "Limit",
1514
1541
  price: 31.33,
1515
1542
  stop: 31.33,
1516
- time_in_force: "FOK",
1517
- units: 3.14,
1518
- universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1543
+ units: 10.5,
1519
1544
  notional_value: None,
1520
1545
  )
1521
1546
  p result
@@ -1523,27 +1548,40 @@ p result
1523
1548
 
1524
1549
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1525
1550
 
1526
- ##### user_id: `String`<a id="user_id-string"></a>
1527
- ##### user_secret: `String`<a id="user_secret-string"></a>
1528
1551
  ##### account_id: `String`<a id="account_id-string"></a>
1552
+ Unique identifier for the connected brokerage account. This is the UUID used to
1553
+ reference the account in SnapTrade.
1554
+
1529
1555
  ##### action: [`ActionStrict`](./lib/snaptrade/models/action_strict.rb)<a id="action-actionstrictlibsnaptrademodelsaction_strictrb"></a>
1530
- Trade Action
1556
+ The action describes the intent or side of a trade. This is either `BUY` or
1557
+ `SELL`
1558
+
1559
+ ##### universal_symbol_id: `String`<a id="universal_symbol_id-string"></a>
1560
+ Unique identifier for the symbol within SnapTrade. This is the ID used to
1561
+ reference the symbol in SnapTrade API calls.
1531
1562
 
1532
1563
  ##### order_type: [`OrderTypeStrict`](./lib/snaptrade/models/order_type_strict.rb)<a id="order_type-ordertypestrictlibsnaptrademodelsorder_type_strictrb"></a>
1533
- Order Type
1564
+ The type of order to place. - For `Limit` and `StopLimit` orders, the `price`
1565
+ field is required. - For `Stop` and `StopLimit` orders, the `stop` field is
1566
+ required.
1567
+
1568
+ ##### time_in_force: [`TimeInForceStrict`](./lib/snaptrade/models/time_in_force_strict.rb)<a id="time_in_force-timeinforcestrictlibsnaptrademodelstime_in_force_strictrb"></a>
1569
+ The Time in Force type for the order. This field indicates how long the order
1570
+ will remain active before it is executed or expires. Here are the supported
1571
+ values: - `Day` - Day. The order is valid only for the trading day on which it
1572
+ is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed
1573
+ or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety
1574
+ immediately or be canceled completely.
1534
1575
 
1576
+ ##### user_id: `String`<a id="user_id-string"></a>
1577
+ ##### user_secret: `String`<a id="user_secret-string"></a>
1535
1578
  ##### price: `Float`<a id="price-float"></a>
1536
- Trade Price if limit or stop limit order
1579
+ The limit price for `Limit` and `StopLimit` orders.
1537
1580
 
1538
1581
  ##### stop: `Float`<a id="stop-float"></a>
1539
- Stop Price. If stop loss or stop limit order, the price to trigger the stop
1540
-
1541
- ##### time_in_force: [`TimeInForceStrict`](./lib/snaptrade/models/time_in_force_strict.rb)<a id="time_in_force-timeinforcestrictlibsnaptrademodelstime_in_force_strictrb"></a>
1542
- Trade time in force examples: * FOK - Fill Or Kill * Day - Day * GTC - Good Til
1543
- Canceled
1582
+ The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
1544
1583
 
1545
1584
  ##### units: [`Float`](./lib/snaptrade/models/float.rb)<a id="units-floatlibsnaptrademodelsfloatrb"></a>
1546
- ##### universal_symbol_id: `String`<a id="universal_symbol_id-string"></a>
1547
1585
  ##### notional_value: [`ManualTradeFormNotionalValue`](./lib/snaptrade/models/manual_trade_form_notional_value.rb)<a id="notional_value-manualtradeformnotionalvaluelibsnaptrademodelsmanual_trade_form_notional_valuerb"></a>
1548
1586
  #### 🔄 Return<a id="🔄-return"></a>
1549
1587
 
@@ -1560,15 +1598,14 @@ Canceled
1560
1598
 
1561
1599
  ### `snaptrade.trading.place_order`<a id="snaptradetradingplace_order"></a>
1562
1600
 
1563
- Places the specified trade object. This places the order in the account and
1564
- returns the status of the order from the brokerage.
1601
+ Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder).
1565
1602
 
1566
1603
 
1567
1604
  #### 🛠️ Usage<a id="🛠️-usage"></a>
1568
1605
 
1569
1606
  ```ruby
1570
1607
  result = snaptrade.trading.place_order(
1571
- trade_id: "tradeId_example",
1608
+ trade_id: "139e307a-82f7-4402-b39e-4da7baa87758",
1572
1609
  user_id: "snaptrade-user-123",
1573
1610
  user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
1574
1611
  wait_to_confirm: true,
@@ -1579,15 +1616,16 @@ p result
1579
1616
  #### ⚙️ Parameters<a id="⚙️-parameters"></a>
1580
1617
 
1581
1618
  ##### trade_id: `String`<a id="trade_id-string"></a>
1582
- The ID of trade object obtained from trade/impact endpoint
1619
+ Obtained from calling the [check order impact
1620
+ endpoint](/reference/Trading/Trading_getOrderImpact)
1583
1621
 
1584
1622
  ##### user_id: `String`<a id="user_id-string"></a>
1585
1623
  ##### user_secret: `String`<a id="user_secret-string"></a>
1586
1624
  ##### wait_to_confirm: `Boolean`<a id="wait_to_confirm-boolean"></a>
1587
1625
  Optional, defaults to true. Determines if a wait is performed to check on order
1588
1626
  status. If false, latency will be reduced but orders returned will be more
1589
- likely to be of status PENDING as we will not wait to check on the status before
1590
- responding to the request
1627
+ likely to be of status `PENDING` as we will not wait to check on the status
1628
+ before responding to the request.
1591
1629
 
1592
1630
  #### 🔄 Return<a id="🔄-return"></a>
1593
1631
 
@@ -684,7 +684,7 @@ module SnapTrade
684
684
 
685
685
  # List accounts
686
686
  #
687
- # Returns all brokerage accounts known to SnapTrade for the authenticated user.
687
+ # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
688
688
  #
689
689
  # The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
690
690
  #
@@ -698,7 +698,7 @@ module SnapTrade
698
698
 
699
699
  # List accounts
700
700
  #
701
- # Returns all brokerage accounts known to SnapTrade for the authenticated user.
701
+ # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user.
702
702
  #
703
703
  # The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
704
704
  #
@@ -710,7 +710,7 @@ module SnapTrade
710
710
  end
711
711
 
712
712
  # List accounts
713
- # Returns all brokerage accounts known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
713
+ # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
714
714
  # @param user_id [String]
715
715
  # @param user_secret [String]
716
716
  # @param [Hash] opts the optional parameters
@@ -721,7 +721,7 @@ module SnapTrade
721
721
  end
722
722
 
723
723
  # List accounts
724
- # Returns all brokerage accounts known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
724
+ # Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. The data returned here is always cached and refreshed once a day. **If you need real-time data, please use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint**.
725
725
  # @param user_id [String]
726
726
  # @param user_secret [String]
727
727
  # @param [Hash] opts the optional parameters
@@ -105,7 +105,7 @@ module SnapTrade
105
105
 
106
106
  # List all users
107
107
  #
108
- # Returns a list of all registered user IDs.
108
+ # Returns a list of all registered user IDs. Please note that the response is not currently paginated.
109
109
  #
110
110
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
111
111
  def list_snap_trade_users(extra: {})
@@ -115,7 +115,7 @@ module SnapTrade
115
115
 
116
116
  # List all users
117
117
  #
118
- # Returns a list of all registered user IDs.
118
+ # Returns a list of all registered user IDs. Please note that the response is not currently paginated.
119
119
  #
120
120
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
121
121
  def list_snap_trade_users_with_http_info(extra: {})
@@ -123,7 +123,7 @@ module SnapTrade
123
123
  end
124
124
 
125
125
  # List all users
126
- # Returns a list of all registered user IDs.
126
+ # Returns a list of all registered user IDs. Please note that the response is not currently paginated.
127
127
  # @param [Hash] opts the optional parameters
128
128
  # @return [Array<String>]
129
129
  private def list_snap_trade_users_impl(opts = {})
@@ -132,7 +132,7 @@ module SnapTrade
132
132
  end
133
133
 
134
134
  # List all users
135
- # Returns a list of all registered user IDs.
135
+ # Returns a list of all registered user IDs. Please note that the response is not currently paginated.
136
136
  # @param [Hash] opts the optional parameters
137
137
  # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
138
138
  private def list_snap_trade_users_with_http_info_impl(opts = {})