snaptrade 1.8.0 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (293) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +10 -10
  3. data/Gemfile.lock +11 -13
  4. data/README.md +218 -218
  5. data/docs/APIStatusApi.md +57 -57
  6. data/docs/AccountInformationApi.md +535 -535
  7. data/docs/AuthenticationApi.md +314 -314
  8. data/docs/ConnectionsApi.md +265 -265
  9. data/docs/ErrorLogsApi.md +68 -68
  10. data/docs/OptionsApi.md +378 -378
  11. data/docs/ReferenceDataApi.md +595 -595
  12. data/docs/TradingApi.md +478 -478
  13. data/docs/TransactionsAndReportingApi.md +183 -183
  14. data/lib/snaptrade/api/account_information_api.rb +801 -801
  15. data/lib/snaptrade/api/api_status_api.rb +98 -98
  16. data/lib/snaptrade/api/authentication_api.rb +481 -481
  17. data/lib/snaptrade/api/connections_api.rb +398 -398
  18. data/lib/snaptrade/api/error_logs_api.rb +112 -112
  19. data/lib/snaptrade/api/options_api.rb +591 -591
  20. data/lib/snaptrade/api/reference_data_api.rb +894 -894
  21. data/lib/snaptrade/api/trading_api.rb +741 -741
  22. data/lib/snaptrade/api/transactions_and_reporting_api.rb +283 -283
  23. data/lib/snaptrade/api_client.rb +427 -427
  24. data/lib/snaptrade/api_client_custom.rb +32 -32
  25. data/lib/snaptrade/api_error.rb +6 -6
  26. data/lib/snaptrade/configuration.rb +334 -334
  27. data/lib/snaptrade/models/account.rb +6 -6
  28. data/lib/snaptrade/models/account_holdings.rb +251 -251
  29. data/lib/snaptrade/models/account_holdings_account.rb +263 -263
  30. data/lib/snaptrade/models/account_order_record.rb +6 -6
  31. data/lib/snaptrade/models/account_order_record_status.rb +6 -6
  32. data/lib/snaptrade/models/account_simple.rb +6 -6
  33. data/lib/snaptrade/models/account_sync_status.rb +6 -6
  34. data/lib/snaptrade/models/action.rb +6 -6
  35. data/lib/snaptrade/models/auth_type.rb +6 -6
  36. data/lib/snaptrade/models/authentication_login_snap_trade_user200_response.rb +6 -6
  37. data/lib/snaptrade/models/balance.rb +6 -6
  38. data/lib/snaptrade/models/brokerage.rb +6 -6
  39. data/lib/snaptrade/models/brokerage_authorization.rb +6 -6
  40. data/lib/snaptrade/models/brokerage_authorization_type.rb +6 -6
  41. data/lib/snaptrade/models/brokerage_authorization_type_read_only.rb +6 -6
  42. data/lib/snaptrade/models/brokerage_authorization_type_read_only_brokerage.rb +6 -6
  43. data/lib/snaptrade/models/brokerage_authorization_type_read_only_type.rb +6 -6
  44. data/lib/snaptrade/models/brokerage_authorization_type_type.rb +6 -6
  45. data/lib/snaptrade/models/brokerage_symbol.rb +6 -6
  46. data/lib/snaptrade/models/brokerage_type.rb +6 -6
  47. data/lib/snaptrade/models/calculated_trade.rb +6 -6
  48. data/lib/snaptrade/models/cash_restriction.rb +6 -6
  49. data/lib/snaptrade/models/connection_type.rb +6 -6
  50. data/lib/snaptrade/models/connections_session_events200_response_inner.rb +6 -6
  51. data/lib/snaptrade/models/currency.rb +6 -6
  52. data/lib/snaptrade/models/delete_user_response.rb +6 -6
  53. data/lib/snaptrade/models/dividend_at_date.rb +6 -6
  54. data/lib/snaptrade/models/encrypted_response.rb +6 -6
  55. data/lib/snaptrade/models/encrypted_response_encrypted_message_data.rb +6 -6
  56. data/lib/snaptrade/models/exchange.rb +6 -6
  57. data/lib/snaptrade/models/exchange_rate_pairs.rb +6 -6
  58. data/lib/snaptrade/models/excluded_asset.rb +6 -6
  59. data/lib/snaptrade/models/jwt.rb +6 -6
  60. data/lib/snaptrade/models/login_redirect_uri.rb +6 -6
  61. data/lib/snaptrade/models/manual_trade.rb +6 -6
  62. data/lib/snaptrade/models/manual_trade_and_impact.rb +6 -6
  63. data/lib/snaptrade/models/manual_trade_balance.rb +6 -6
  64. data/lib/snaptrade/models/manual_trade_form.rb +6 -6
  65. data/lib/snaptrade/models/manual_trade_symbol.rb +6 -6
  66. data/lib/snaptrade/models/model400_failed_request_response.rb +6 -6
  67. data/lib/snaptrade/models/model401_failed_request_response.rb +6 -6
  68. data/lib/snaptrade/models/model403_failed_request_response.rb +6 -6
  69. data/lib/snaptrade/models/model404_failed_request_response.rb +6 -6
  70. data/lib/snaptrade/models/model_asset_class.rb +6 -6
  71. data/lib/snaptrade/models/model_asset_class_details.rb +6 -6
  72. data/lib/snaptrade/models/model_asset_class_target.rb +6 -6
  73. data/lib/snaptrade/models/model_portfolio.rb +6 -6
  74. data/lib/snaptrade/models/model_portfolio_asset_class.rb +6 -6
  75. data/lib/snaptrade/models/model_portfolio_details.rb +6 -6
  76. data/lib/snaptrade/models/model_portfolio_security.rb +6 -6
  77. data/lib/snaptrade/models/model_type.rb +6 -6
  78. data/lib/snaptrade/models/monthly_dividends.rb +6 -6
  79. data/lib/snaptrade/models/net_contributions.rb +6 -6
  80. data/lib/snaptrade/models/net_dividend.rb +6 -6
  81. data/lib/snaptrade/models/option_chain_inner.rb +6 -6
  82. data/lib/snaptrade/models/option_chain_inner_chain_per_root_inner.rb +6 -6
  83. data/lib/snaptrade/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner.rb +6 -6
  84. data/lib/snaptrade/models/option_leg.rb +6 -6
  85. data/lib/snaptrade/models/option_leg_action.rb +6 -6
  86. data/lib/snaptrade/models/option_strategy.rb +6 -6
  87. data/lib/snaptrade/models/option_strategy_legs_inner.rb +6 -6
  88. data/lib/snaptrade/models/options_get_option_strategy_request.rb +6 -6
  89. data/lib/snaptrade/models/options_holdings.rb +6 -6
  90. data/lib/snaptrade/models/options_place_option_strategy_request.rb +6 -6
  91. data/lib/snaptrade/models/options_position.rb +6 -6
  92. data/lib/snaptrade/models/options_symbol.rb +6 -6
  93. data/lib/snaptrade/models/order_strategy_execute_body_order_type.rb +6 -6
  94. data/lib/snaptrade/models/order_strategy_execute_body_time_in_force.rb +6 -6
  95. data/lib/snaptrade/models/order_type.rb +6 -6
  96. data/lib/snaptrade/models/partner_data.rb +6 -6
  97. data/lib/snaptrade/models/past_value.rb +6 -6
  98. data/lib/snaptrade/models/performance_custom.rb +6 -6
  99. data/lib/snaptrade/models/portfolio_group.rb +6 -6
  100. data/lib/snaptrade/models/portfolio_group_info.rb +6 -6
  101. data/lib/snaptrade/models/portfolio_group_position.rb +6 -6
  102. data/lib/snaptrade/models/portfolio_group_settings.rb +6 -6
  103. data/lib/snaptrade/models/position.rb +6 -6
  104. data/lib/snaptrade/models/position_symbol.rb +6 -6
  105. data/lib/snaptrade/models/redirect_tokenand_pin.rb +6 -6
  106. data/lib/snaptrade/models/security_type.rb +6 -6
  107. data/lib/snaptrade/models/session_event.rb +6 -6
  108. data/lib/snaptrade/models/session_event_type.rb +6 -6
  109. data/lib/snaptrade/models/snap_trade_api_disclaimer_accept_status.rb +6 -6
  110. data/lib/snaptrade/models/snap_trade_holdings_account.rb +6 -6
  111. data/lib/snaptrade/models/snap_trade_holdings_account_account_id.rb +6 -6
  112. data/lib/snaptrade/models/snap_trade_holdings_total_value.rb +6 -6
  113. data/lib/snaptrade/models/snap_trade_login_user_request_body.rb +6 -6
  114. data/lib/snaptrade/models/snap_trade_register_user_request_body.rb +6 -6
  115. data/lib/snaptrade/models/state.rb +6 -6
  116. data/lib/snaptrade/models/status.rb +6 -6
  117. data/lib/snaptrade/models/strategy_impact.rb +6 -6
  118. data/lib/snaptrade/models/strategy_impact_legs_inner.rb +6 -6
  119. data/lib/snaptrade/models/strategy_order_place.rb +6 -6
  120. data/lib/snaptrade/models/strategy_order_place_orders_inner.rb +6 -6
  121. data/lib/snaptrade/models/strategy_order_place_orders_inner_legs_inner.rb +6 -6
  122. data/lib/snaptrade/models/strategy_order_record.rb +6 -6
  123. data/lib/snaptrade/models/strategy_order_record_order_type.rb +6 -6
  124. data/lib/snaptrade/models/strategy_order_record_status.rb +6 -6
  125. data/lib/snaptrade/models/strategy_order_record_time_in_force.rb +6 -6
  126. data/lib/snaptrade/models/strategy_quotes.rb +6 -6
  127. data/lib/snaptrade/models/strategy_quotes_greek.rb +6 -6
  128. data/lib/snaptrade/models/strategy_type.rb +6 -6
  129. data/lib/snaptrade/models/sub_period_return_rate.rb +6 -6
  130. data/lib/snaptrade/models/symbol.rb +6 -6
  131. data/lib/snaptrade/models/symbol_query.rb +6 -6
  132. data/lib/snaptrade/models/symbols_quotes_inner.rb +6 -6
  133. data/lib/snaptrade/models/target_asset.rb +6 -6
  134. data/lib/snaptrade/models/time_in_force.rb +6 -6
  135. data/lib/snaptrade/models/trade.rb +6 -6
  136. data/lib/snaptrade/models/trade_action.rb +6 -6
  137. data/lib/snaptrade/models/trade_execution_status.rb +6 -6
  138. data/lib/snaptrade/models/trade_execution_status_action.rb +6 -6
  139. data/lib/snaptrade/models/trade_impact.rb +6 -6
  140. data/lib/snaptrade/models/trading_cancel_user_account_order_request.rb +6 -6
  141. data/lib/snaptrade/models/trading_place_oco_order_request.rb +6 -6
  142. data/lib/snaptrade/models/transactions_status.rb +6 -6
  143. data/lib/snaptrade/models/type.rb +6 -6
  144. data/lib/snaptrade/models/underlying_symbol.rb +6 -6
  145. data/lib/snaptrade/models/universal_activity.rb +6 -6
  146. data/lib/snaptrade/models/universal_symbol.rb +6 -6
  147. data/lib/snaptrade/models/universal_symbol_ticker.rb +6 -6
  148. data/lib/snaptrade/models/us_exchange.rb +6 -6
  149. data/lib/snaptrade/models/user_error_log.rb +6 -6
  150. data/lib/snaptrade/models/user_i_dand_secret.rb +6 -6
  151. data/lib/snaptrade/models/user_settings.rb +6 -6
  152. data/lib/snaptrade/version.rb +13 -13
  153. data/lib/snaptrade.rb +211 -211
  154. data/snaptrade.gemspec +41 -41
  155. data/spec/api/account_information_api_spec.rb +135 -135
  156. data/spec/api/api_status_api_spec.rb +42 -42
  157. data/spec/api/authentication_api_spec.rb +88 -88
  158. data/spec/api/connections_api_spec.rb +82 -82
  159. data/spec/api/error_logs_api_spec.rb +43 -43
  160. data/spec/api/options_api_spec.rb +101 -101
  161. data/spec/api/reference_data_api_spec.rb +150 -150
  162. data/spec/api/trading_api_spec.rb +112 -112
  163. data/spec/api/transactions_and_reporting_api_spec.rb +67 -67
  164. data/spec/api_client_spec.rb +193 -193
  165. data/spec/configuration_spec.rb +6 -6
  166. data/spec/getting_started_spec.rb +108 -108
  167. data/spec/models/account_holdings_account_spec.rb +54 -54
  168. data/spec/models/account_holdings_spec.rb +48 -48
  169. data/spec/models/account_order_record_spec.rb +132 -132
  170. data/spec/models/account_order_record_status_spec.rb +24 -24
  171. data/spec/models/account_simple_spec.rb +48 -48
  172. data/spec/models/account_spec.rb +84 -84
  173. data/spec/models/account_sync_status_spec.rb +30 -30
  174. data/spec/models/action_spec.rb +24 -24
  175. data/spec/models/auth_type_spec.rb +24 -24
  176. data/spec/models/authentication_login_snap_trade_user200_response_spec.rb +27 -27
  177. data/spec/models/balance_spec.rb +36 -36
  178. data/spec/models/brokerage_authorization_spec.rb +78 -78
  179. data/spec/models/brokerage_authorization_type_read_only_brokerage_spec.rb +42 -42
  180. data/spec/models/brokerage_authorization_type_read_only_spec.rb +48 -48
  181. data/spec/models/brokerage_authorization_type_read_only_type_spec.rb +24 -24
  182. data/spec/models/brokerage_authorization_type_spec.rb +30 -30
  183. data/spec/models/brokerage_authorization_type_type_spec.rb +24 -24
  184. data/spec/models/brokerage_spec.rb +132 -132
  185. data/spec/models/brokerage_symbol_spec.rb +54 -54
  186. data/spec/models/brokerage_type_spec.rb +36 -36
  187. data/spec/models/calculated_trade_spec.rb +36 -36
  188. data/spec/models/cash_restriction_spec.rb +54 -54
  189. data/spec/models/connection_type_spec.rb +24 -24
  190. data/spec/models/connections_session_events200_response_inner_spec.rb +66 -66
  191. data/spec/models/currency_spec.rb +42 -42
  192. data/spec/models/delete_user_response_spec.rb +36 -36
  193. data/spec/models/dividend_at_date_spec.rb +42 -42
  194. data/spec/models/encrypted_response_encrypted_message_data_spec.rb +42 -42
  195. data/spec/models/encrypted_response_spec.rb +36 -36
  196. data/spec/models/exchange_rate_pairs_spec.rb +42 -42
  197. data/spec/models/exchange_spec.rb +72 -72
  198. data/spec/models/excluded_asset_spec.rb +30 -30
  199. data/spec/models/jwt_spec.rb +30 -30
  200. data/spec/models/login_redirect_uri_spec.rb +36 -36
  201. data/spec/models/manual_trade_and_impact_spec.rb +42 -42
  202. data/spec/models/manual_trade_balance_spec.rb +42 -42
  203. data/spec/models/manual_trade_form_spec.rb +72 -72
  204. data/spec/models/manual_trade_spec.rb +72 -72
  205. data/spec/models/manual_trade_symbol_spec.rb +60 -60
  206. data/spec/models/model400_failed_request_response_spec.rb +36 -36
  207. data/spec/models/model401_failed_request_response_spec.rb +36 -36
  208. data/spec/models/model403_failed_request_response_spec.rb +36 -36
  209. data/spec/models/model404_failed_request_response_spec.rb +36 -36
  210. data/spec/models/model_asset_class_details_spec.rb +36 -36
  211. data/spec/models/model_asset_class_spec.rb +36 -36
  212. data/spec/models/model_asset_class_target_spec.rb +30 -30
  213. data/spec/models/model_portfolio_asset_class_spec.rb +36 -36
  214. data/spec/models/model_portfolio_details_spec.rb +42 -42
  215. data/spec/models/model_portfolio_security_spec.rb +36 -36
  216. data/spec/models/model_portfolio_spec.rb +42 -42
  217. data/spec/models/model_type_spec.rb +24 -24
  218. data/spec/models/monthly_dividends_spec.rb +36 -36
  219. data/spec/models/net_contributions_spec.rb +42 -42
  220. data/spec/models/net_dividend_spec.rb +42 -42
  221. data/spec/models/option_chain_inner_chain_per_root_inner_chain_per_strike_price_inner_spec.rb +42 -42
  222. data/spec/models/option_chain_inner_chain_per_root_inner_spec.rb +42 -42
  223. data/spec/models/option_chain_inner_spec.rb +54 -54
  224. data/spec/models/option_leg_action_spec.rb +24 -24
  225. data/spec/models/option_leg_spec.rb +42 -42
  226. data/spec/models/option_strategy_legs_inner_spec.rb +48 -48
  227. data/spec/models/option_strategy_spec.rb +54 -54
  228. data/spec/models/options_get_option_strategy_request_spec.rb +42 -42
  229. data/spec/models/options_holdings_spec.rb +60 -60
  230. data/spec/models/options_place_option_strategy_request_spec.rb +42 -42
  231. data/spec/models/options_position_spec.rb +66 -66
  232. data/spec/models/options_symbol_spec.rb +90 -90
  233. data/spec/models/order_strategy_execute_body_order_type_spec.rb +24 -24
  234. data/spec/models/order_strategy_execute_body_time_in_force_spec.rb +24 -24
  235. data/spec/models/order_type_spec.rb +24 -24
  236. data/spec/models/partner_data_spec.rb +96 -96
  237. data/spec/models/past_value_spec.rb +42 -42
  238. data/spec/models/performance_custom_spec.rb +138 -138
  239. data/spec/models/portfolio_group_info_spec.rb +90 -90
  240. data/spec/models/portfolio_group_position_spec.rb +42 -42
  241. data/spec/models/portfolio_group_settings_spec.rb +54 -54
  242. data/spec/models/portfolio_group_spec.rb +36 -36
  243. data/spec/models/position_spec.rb +60 -60
  244. data/spec/models/position_symbol_spec.rb +60 -60
  245. data/spec/models/redirect_tokenand_pin_spec.rb +36 -36
  246. data/spec/models/security_type_spec.rb +48 -48
  247. data/spec/models/session_event_spec.rb +66 -66
  248. data/spec/models/session_event_type_spec.rb +24 -24
  249. data/spec/models/snap_trade_api_disclaimer_accept_status_spec.rb +36 -36
  250. data/spec/models/snap_trade_holdings_account_account_id_spec.rb +78 -78
  251. data/spec/models/snap_trade_holdings_account_spec.rb +72 -72
  252. data/spec/models/snap_trade_holdings_total_value_spec.rb +36 -36
  253. data/spec/models/snap_trade_login_user_request_body_spec.rb +54 -54
  254. data/spec/models/snap_trade_register_user_request_body_spec.rb +36 -36
  255. data/spec/models/state_spec.rb +24 -24
  256. data/spec/models/status_spec.rb +42 -42
  257. data/spec/models/strategy_impact_legs_inner_spec.rb +66 -66
  258. data/spec/models/strategy_impact_spec.rb +90 -90
  259. data/spec/models/strategy_order_place_orders_inner_legs_inner_spec.rb +66 -66
  260. data/spec/models/strategy_order_place_orders_inner_spec.rb +282 -282
  261. data/spec/models/strategy_order_place_spec.rb +36 -36
  262. data/spec/models/strategy_order_record_order_type_spec.rb +24 -24
  263. data/spec/models/strategy_order_record_spec.rb +90 -90
  264. data/spec/models/strategy_order_record_status_spec.rb +24 -24
  265. data/spec/models/strategy_order_record_time_in_force_spec.rb +24 -24
  266. data/spec/models/strategy_quotes_greek_spec.rb +54 -54
  267. data/spec/models/strategy_quotes_spec.rb +60 -60
  268. data/spec/models/strategy_type_spec.rb +24 -24
  269. data/spec/models/sub_period_return_rate_spec.rb +42 -42
  270. data/spec/models/symbol_query_spec.rb +30 -30
  271. data/spec/models/symbol_spec.rb +66 -66
  272. data/spec/models/symbols_quotes_inner_spec.rb +60 -60
  273. data/spec/models/target_asset_spec.rb +60 -60
  274. data/spec/models/time_in_force_spec.rb +24 -24
  275. data/spec/models/trade_action_spec.rb +24 -24
  276. data/spec/models/trade_execution_status_action_spec.rb +24 -24
  277. data/spec/models/trade_execution_status_spec.rb +78 -78
  278. data/spec/models/trade_impact_spec.rb +54 -54
  279. data/spec/models/trade_spec.rb +72 -72
  280. data/spec/models/trading_cancel_user_account_order_request_spec.rb +30 -30
  281. data/spec/models/trading_place_oco_order_request_spec.rb +36 -36
  282. data/spec/models/transactions_status_spec.rb +36 -36
  283. data/spec/models/type_spec.rb +24 -24
  284. data/spec/models/underlying_symbol_spec.rb +66 -66
  285. data/spec/models/universal_activity_spec.rb +120 -120
  286. data/spec/models/universal_symbol_spec.rb +72 -72
  287. data/spec/models/universal_symbol_ticker_spec.rb +72 -72
  288. data/spec/models/us_exchange_spec.rb +78 -78
  289. data/spec/models/user_error_log_spec.rb +60 -60
  290. data/spec/models/user_i_dand_secret_spec.rb +36 -36
  291. data/spec/models/user_settings_spec.rb +84 -84
  292. data/spec/spec_helper.rb +6 -6
  293. metadata +113 -113
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7de265c737a8f7a60294e0231735d77a53169b497fca444ff21ac3746ac7c0b0
4
- data.tar.gz: 5fc20fab828985f97ab24c8423d33197cffe449c4f781f3fc13500fd3874c3ad
3
+ metadata.gz: e9cfe431fd52adac8613ffb6b6c0ac9f099b875aa7995c44dc45f4e64eac2ca8
4
+ data.tar.gz: 2b42cdfe6a0a081d859353101de245045724b0e6f6afdd3108643f608c2fbbd8
5
5
  SHA512:
6
- metadata.gz: 67f73c00593fd9f4dde552241c4a11596ba137bf36e3533b4b3676b1fe02a9377932c56ae23249022f18d28739d8abff07025a759bbec5397f98c9028684cca9
7
- data.tar.gz: ec986b383e4e5ca5b317e7f4c32957bef07f930b4cb71957bef24878055c353bd2863986ad5513fe00a6f8a1582d11af455058169fcb6149655342344e7fb126
6
+ metadata.gz: 65717c6345160fbfd306fc7ab6c9e4a00fec8ee1185dbeb3a26da5556975a05e9bb0d6efbd88d74e898ef0a1742711e50161bc80d2afb703f1fe1d28465706f2
7
+ data.tar.gz: 10b451314143cbe8e22ae4164675fe88afa4ee83c5119469627f366f7ac72a7fd8afe60ebb96bea329fc655104dbd15e7b3c28f3fa73aea083191bbab0733333
data/Gemfile CHANGED
@@ -1,10 +1,10 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- group :development, :test do
6
- gem "rake", "~> 13.0.1"
7
- gem "pry-byebug"
8
- gem "rubocop", "~> 1.12.1"
9
- gem "debug", "~> 1.8"
10
- end
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem "rake", "~> 13.0.1"
7
+ gem "pry-byebug"
8
+ gem "rubocop", "~> 1.12.1"
9
+ gem "debug", "~> 1.8"
10
+ end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snaptrade (1.8.0)
4
+ snaptrade (1.10.0)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -22,25 +22,23 @@ GEM
22
22
  multipart-post (~> 2)
23
23
  faraday-net_http (3.0.2)
24
24
  io-console (0.6.0)
25
- irb (1.7.3)
26
- reline (>= 0.3.6)
25
+ irb (1.6.4)
26
+ reline (>= 0.3.0)
27
27
  method_source (1.0.0)
28
28
  multipart-post (2.3.0)
29
29
  parallel (1.23.0)
30
- parser (3.2.2.3)
30
+ parser (3.2.2.1)
31
31
  ast (~> 2.4.1)
32
- racc
33
32
  pry (0.14.2)
34
33
  coderay (~> 1.1)
35
34
  method_source (~> 1.0)
36
35
  pry-byebug (3.10.1)
37
36
  byebug (~> 11.0)
38
37
  pry (>= 0.13, < 0.15)
39
- racc (1.7.1)
40
38
  rainbow (3.1.1)
41
39
  rake (13.0.6)
42
- regexp_parser (2.8.1)
43
- reline (0.3.6)
40
+ regexp_parser (2.8.0)
41
+ reline (0.3.4)
44
42
  io-console (~> 0.5)
45
43
  rexml (3.2.5)
46
44
  rspec (3.12.0)
@@ -52,10 +50,10 @@ GEM
52
50
  rspec-expectations (3.12.3)
53
51
  diff-lcs (>= 1.2.0, < 2.0)
54
52
  rspec-support (~> 3.12.0)
55
- rspec-mocks (3.12.6)
53
+ rspec-mocks (3.12.5)
56
54
  diff-lcs (>= 1.2.0, < 2.0)
57
55
  rspec-support (~> 3.12.0)
58
- rspec-support (3.12.1)
56
+ rspec-support (3.12.0)
59
57
  rubocop (1.12.1)
60
58
  parallel (~> 1.10)
61
59
  parser (>= 3.0.0.0)
@@ -65,14 +63,14 @@ GEM
65
63
  rubocop-ast (>= 1.2.0, < 2.0)
66
64
  ruby-progressbar (~> 1.7)
67
65
  unicode-display_width (>= 1.4.0, < 3.0)
68
- rubocop-ast (1.29.0)
66
+ rubocop-ast (1.28.1)
69
67
  parser (>= 3.2.1.0)
70
68
  ruby-progressbar (1.13.0)
71
69
  ruby2_keywords (0.0.5)
72
70
  unicode-display_width (2.4.2)
73
71
 
74
72
  PLATFORMS
75
- x64-mingw-ucrt
73
+ arm64-darwin-21
76
74
 
77
75
  DEPENDENCIES
78
76
  debug (~> 1.8)
@@ -83,4 +81,4 @@ DEPENDENCIES
83
81
  snaptrade!
84
82
 
85
83
  BUNDLED WITH
86
- 2.4.16
84
+ 2.3.7
data/README.md CHANGED
@@ -1,218 +1,218 @@
1
- # snaptrade
2
-
3
- Connect brokerage accounts to your app for live positions and trading
4
-
5
- For more information, please visit [https://snaptrade.com/](https://snaptrade.com/)
6
-
7
- ## Installation
8
-
9
- Add to Gemfile:
10
-
11
- ```ruby
12
- gem 'snaptrade', '~> 1.8.0'
13
- ```
14
-
15
- ## Getting Started
16
-
17
- ```ruby
18
- require 'snaptrade'
19
-
20
- SnapTrade.client_id = "YOUR_CLIENT_ID"
21
- SnapTrade.consumer_key = "YOUR_CONSUMER_KEY"
22
-
23
- user_id = "John.doe@snaptrade.com"
24
- user_secret = "USERSECRET123"
25
- brokerage_authorizations = "917c8734-8470-4a3e-a18f-57c3f2ee6631"
26
-
27
- begin
28
- # List all accounts for the user, plus balances and positions for each account.
29
- result = SnapTrade::AccountInformation.get_all_user_holdings(
30
- user_id: user_id,
31
- user_secret: user_secret,
32
- brokerage_authorizations: brokerage_authorizations,
33
- )
34
- p result
35
- rescue SnapTrade::ApiError => e
36
- puts "Exception when calling SnapTrade::AccountInformation.get_all_user_holdings: #{e}"
37
- end
38
- ```
39
-
40
- ## Documentation for API Endpoints
41
-
42
- All URIs are relative to *https://api.snaptrade.com/api/v1*
43
-
44
- Class | Method | HTTP request | Description
45
- ------------ | ------------- | ------------- | -------------
46
- *SnapTrade::AccountInformationApi* | [**get_all_user_holdings**](docs/AccountInformationApi.md#get_all_user_holdings) | **GET** /holdings | List all accounts for the user, plus balances and positions for each account.
47
- *SnapTrade::AccountInformationApi* | [**get_user_account_balance**](docs/AccountInformationApi.md#get_user_account_balance) | **GET** /accounts/{accountId}/balances | Get all cash balances of an investment account
48
- *SnapTrade::AccountInformationApi* | [**get_user_account_details**](docs/AccountInformationApi.md#get_user_account_details) | **GET** /accounts/{accountId} | Return details of a specific investment account
49
- *SnapTrade::AccountInformationApi* | [**get_user_account_orders**](docs/AccountInformationApi.md#get_user_account_orders) | **GET** /accounts/{accountId}/orders | Get all history of orders placed in account
50
- *SnapTrade::AccountInformationApi* | [**get_user_account_positions**](docs/AccountInformationApi.md#get_user_account_positions) | **GET** /accounts/{accountId}/positions | Get all positions of an investment account
51
- *SnapTrade::AccountInformationApi* | [**get_user_holdings**](docs/AccountInformationApi.md#get_user_holdings) | **GET** /accounts/{accountId}/holdings | List balances, positions and orders for the specified account.
52
- *SnapTrade::AccountInformationApi* | [**list_user_accounts**](docs/AccountInformationApi.md#list_user_accounts) | **GET** /accounts | List all investment accounts for the user
53
- *SnapTrade::AccountInformationApi* | [**update_user_account**](docs/AccountInformationApi.md#update_user_account) | **PUT** /accounts/{accountId} | Update details of an investment account
54
- *SnapTrade::APIStatusApi* | [**check**](docs/APIStatusApi.md#check) | **GET** / | Get API Status
55
- *SnapTrade::AuthenticationApi* | [**delete_snap_trade_user**](docs/AuthenticationApi.md#delete_snap_trade_user) | **DELETE** /snapTrade/deleteUser | Delete user from SnapTrade, disabling all brokerage authorizations and permanently deleting all data associated with the user
56
- *SnapTrade::AuthenticationApi* | [**get_user_jwt**](docs/AuthenticationApi.md#get_user_jwt) | **GET** /snapTrade/encryptedJWT | Obtains an encrypted JWT tokens that should be decrypted on a user's local device
57
- *SnapTrade::AuthenticationApi* | [**list_snap_trade_users**](docs/AuthenticationApi.md#list_snap_trade_users) | **GET** /snapTrade/listUsers | Get a list of all SnapTrade users you've registered on our platform
58
- *SnapTrade::AuthenticationApi* | [**login_snap_trade_user**](docs/AuthenticationApi.md#login_snap_trade_user) | **POST** /snapTrade/login | Generate a redirect URI to securely login a user to the SnapTrade Connection Portal
59
- *SnapTrade::AuthenticationApi* | [**register_snap_trade_user**](docs/AuthenticationApi.md#register_snap_trade_user) | **POST** /snapTrade/registerUser | Register user with SnapTrade in order to create secure brokerage authorizations
60
- *SnapTrade::ConnectionsApi* | [**detail_brokerage_authorization**](docs/ConnectionsApi.md#detail_brokerage_authorization) | **GET** /authorizations/{authorizationId} | Get detail of a specific brokerage authorizations for the user
61
- *SnapTrade::ConnectionsApi* | [**list_brokerage_authorizations**](docs/ConnectionsApi.md#list_brokerage_authorizations) | **GET** /authorizations | List all brokerage authorizations for the user
62
- *SnapTrade::ConnectionsApi* | [**remove_brokerage_authorization**](docs/ConnectionsApi.md#remove_brokerage_authorization) | **DELETE** /authorizations/{authorizationId} | Remove a brokerage authorization.
63
- *SnapTrade::ConnectionsApi* | [**session_events**](docs/ConnectionsApi.md#session_events) | **GET** /sessionEvents | List all session events for the partner
64
- *SnapTrade::ErrorLogsApi* | [**list_user_errors**](docs/ErrorLogsApi.md#list_user_errors) | **GET** /snapTrade/listUserErrors | Retrieve error logs on behalf of your SnapTrade users
65
- *SnapTrade::OptionsApi* | [**get_option_strategy**](docs/OptionsApi.md#get_option_strategy) | **POST** /accounts/{accountId}/optionStrategy | Creates an option strategy object that will be used to place an option strategy order
66
- *SnapTrade::OptionsApi* | [**get_options_chain**](docs/OptionsApi.md#get_options_chain) | **GET** /accounts/{accountId}/optionsChain | Get the options chain
67
- *SnapTrade::OptionsApi* | [**get_options_strategy_quote**](docs/OptionsApi.md#get_options_strategy_quote) | **GET** /accounts/{accountId}/optionStrategy/{optionStrategyId} | Get latest market data of option strategy
68
- *SnapTrade::OptionsApi* | [**list_option_holdings**](docs/OptionsApi.md#list_option_holdings) | **GET** /accounts/{accountId}/options | Get the options holdings in the account
69
- *SnapTrade::OptionsApi* | [**place_option_strategy**](docs/OptionsApi.md#place_option_strategy) | **POST** /accounts/{accountId}/optionStrategy/{optionStrategyId}/execute | Place an option strategy order on the brokerage
70
- *SnapTrade::ReferenceDataApi* | [**get_currency_exchange_rate_pair**](docs/ReferenceDataApi.md#get_currency_exchange_rate_pair) | **GET** /currencies/rates/{currencyPair} | Return the exchange rate of a currency pair
71
- *SnapTrade::ReferenceDataApi* | [**get_partner_info**](docs/ReferenceDataApi.md#get_partner_info) | **GET** /snapTrade/partners | Get metadata related to Snaptrade partner
72
- *SnapTrade::ReferenceDataApi* | [**get_security_types**](docs/ReferenceDataApi.md#get_security_types) | **GET** /securityTypes | List of all security types.
73
- *SnapTrade::ReferenceDataApi* | [**get_stock_exchanges**](docs/ReferenceDataApi.md#get_stock_exchanges) | **GET** /exchanges | Return list of stock exchanges on Passiv and their suffixes
74
- *SnapTrade::ReferenceDataApi* | [**get_symbols**](docs/ReferenceDataApi.md#get_symbols) | **POST** /symbols | Search for symbols
75
- *SnapTrade::ReferenceDataApi* | [**get_symbols_by_ticker**](docs/ReferenceDataApi.md#get_symbols_by_ticker) | **GET** /symbols/{ticker} | Get details of a symbol by the ticker
76
- *SnapTrade::ReferenceDataApi* | [**list_all_brokerage_authorization_type**](docs/ReferenceDataApi.md#list_all_brokerage_authorization_type) | **GET** /brokerageAuthorizationTypes | List of all brokerage authorization types
77
- *SnapTrade::ReferenceDataApi* | [**list_all_brokerages**](docs/ReferenceDataApi.md#list_all_brokerages) | **GET** /brokerages | List of all brokerages.
78
- *SnapTrade::ReferenceDataApi* | [**list_all_currencies**](docs/ReferenceDataApi.md#list_all_currencies) | **GET** /currencies | List of all supported currencies
79
- *SnapTrade::ReferenceDataApi* | [**list_all_currencies_rates**](docs/ReferenceDataApi.md#list_all_currencies_rates) | **GET** /currencies/rates | Return the exchange rates of all supported currencies
80
- *SnapTrade::ReferenceDataApi* | [**symbol_search_user_account**](docs/ReferenceDataApi.md#symbol_search_user_account) | **POST** /accounts/{accountId}/symbols | Search for symbols that are supported by a brokerage account using a substring
81
- *SnapTrade::TradingApi* | [**cancel_user_account_order**](docs/TradingApi.md#cancel_user_account_order) | **POST** /accounts/{accountId}/orders/cancel | Cancel open order in account
82
- *SnapTrade::TradingApi* | [**get_order_impact**](docs/TradingApi.md#get_order_impact) | **POST** /trade/impact | Check impact of trades on account.
83
- *SnapTrade::TradingApi* | [**get_user_account_quotes**](docs/TradingApi.md#get_user_account_quotes) | **GET** /accounts/{accountId}/quotes | Get symbol quotes
84
- *SnapTrade::TradingApi* | [**place_force_order**](docs/TradingApi.md#place_force_order) | **POST** /trade/place | Place a trade with NO validation.
85
- *SnapTrade::TradingApi* | [**place_oco_order**](docs/TradingApi.md#place_oco_order) | **POST** /trade/oco | Place a OCO (One Cancels Other) order
86
- *SnapTrade::TradingApi* | [**place_order**](docs/TradingApi.md#place_order) | **POST** /trade/{tradeId} | Place order
87
- *SnapTrade::TransactionsAndReportingApi* | [**get_activities**](docs/TransactionsAndReportingApi.md#get_activities) | **GET** /activities | Get transaction history for a user
88
- *SnapTrade::TransactionsAndReportingApi* | [**get_reporting_custom_range**](docs/TransactionsAndReportingApi.md#get_reporting_custom_range) | **GET** /performance/custom | Get performance information for a specific timeframe
89
-
90
-
91
- ## Documentation for Models
92
-
93
- - [SnapTrade::Account](docs/Account.md)
94
- - [SnapTrade::AccountHoldings](docs/AccountHoldings.md)
95
- - [SnapTrade::AccountHoldingsAccount](docs/AccountHoldingsAccount.md)
96
- - [SnapTrade::AccountOrderRecord](docs/AccountOrderRecord.md)
97
- - [SnapTrade::AccountOrderRecordStatus](docs/AccountOrderRecordStatus.md)
98
- - [SnapTrade::AccountSimple](docs/AccountSimple.md)
99
- - [SnapTrade::AccountSyncStatus](docs/AccountSyncStatus.md)
100
- - [SnapTrade::Action](docs/Action.md)
101
- - [SnapTrade::AuthType](docs/AuthType.md)
102
- - [SnapTrade::AuthenticationLoginSnapTradeUser200Response](docs/AuthenticationLoginSnapTradeUser200Response.md)
103
- - [SnapTrade::Balance](docs/Balance.md)
104
- - [SnapTrade::Brokerage](docs/Brokerage.md)
105
- - [SnapTrade::BrokerageAuthorization](docs/BrokerageAuthorization.md)
106
- - [SnapTrade::BrokerageAuthorizationType](docs/BrokerageAuthorizationType.md)
107
- - [SnapTrade::BrokerageAuthorizationTypeReadOnly](docs/BrokerageAuthorizationTypeReadOnly.md)
108
- - [SnapTrade::BrokerageAuthorizationTypeReadOnlyBrokerage](docs/BrokerageAuthorizationTypeReadOnlyBrokerage.md)
109
- - [SnapTrade::BrokerageAuthorizationTypeReadOnlyType](docs/BrokerageAuthorizationTypeReadOnlyType.md)
110
- - [SnapTrade::BrokerageAuthorizationTypeType](docs/BrokerageAuthorizationTypeType.md)
111
- - [SnapTrade::BrokerageSymbol](docs/BrokerageSymbol.md)
112
- - [SnapTrade::BrokerageType](docs/BrokerageType.md)
113
- - [SnapTrade::CalculatedTrade](docs/CalculatedTrade.md)
114
- - [SnapTrade::CashRestriction](docs/CashRestriction.md)
115
- - [SnapTrade::ConnectionType](docs/ConnectionType.md)
116
- - [SnapTrade::ConnectionsSessionEvents200ResponseInner](docs/ConnectionsSessionEvents200ResponseInner.md)
117
- - [SnapTrade::Currency](docs/Currency.md)
118
- - [SnapTrade::DeleteUserResponse](docs/DeleteUserResponse.md)
119
- - [SnapTrade::DividendAtDate](docs/DividendAtDate.md)
120
- - [SnapTrade::EncryptedResponse](docs/EncryptedResponse.md)
121
- - [SnapTrade::EncryptedResponseEncryptedMessageData](docs/EncryptedResponseEncryptedMessageData.md)
122
- - [SnapTrade::Exchange](docs/Exchange.md)
123
- - [SnapTrade::ExchangeRatePairs](docs/ExchangeRatePairs.md)
124
- - [SnapTrade::ExcludedAsset](docs/ExcludedAsset.md)
125
- - [SnapTrade::JWT](docs/JWT.md)
126
- - [SnapTrade::LoginRedirectURI](docs/LoginRedirectURI.md)
127
- - [SnapTrade::ManualTrade](docs/ManualTrade.md)
128
- - [SnapTrade::ManualTradeAndImpact](docs/ManualTradeAndImpact.md)
129
- - [SnapTrade::ManualTradeBalance](docs/ManualTradeBalance.md)
130
- - [SnapTrade::ManualTradeForm](docs/ManualTradeForm.md)
131
- - [SnapTrade::ManualTradeSymbol](docs/ManualTradeSymbol.md)
132
- - [SnapTrade::Model400FailedRequestResponse](docs/Model400FailedRequestResponse.md)
133
- - [SnapTrade::Model401FailedRequestResponse](docs/Model401FailedRequestResponse.md)
134
- - [SnapTrade::Model403FailedRequestResponse](docs/Model403FailedRequestResponse.md)
135
- - [SnapTrade::Model404FailedRequestResponse](docs/Model404FailedRequestResponse.md)
136
- - [SnapTrade::ModelAssetClass](docs/ModelAssetClass.md)
137
- - [SnapTrade::ModelAssetClassDetails](docs/ModelAssetClassDetails.md)
138
- - [SnapTrade::ModelAssetClassTarget](docs/ModelAssetClassTarget.md)
139
- - [SnapTrade::ModelPortfolio](docs/ModelPortfolio.md)
140
- - [SnapTrade::ModelPortfolioAssetClass](docs/ModelPortfolioAssetClass.md)
141
- - [SnapTrade::ModelPortfolioDetails](docs/ModelPortfolioDetails.md)
142
- - [SnapTrade::ModelPortfolioSecurity](docs/ModelPortfolioSecurity.md)
143
- - [SnapTrade::ModelType](docs/ModelType.md)
144
- - [SnapTrade::MonthlyDividends](docs/MonthlyDividends.md)
145
- - [SnapTrade::NetContributions](docs/NetContributions.md)
146
- - [SnapTrade::NetDividend](docs/NetDividend.md)
147
- - [SnapTrade::OptionChainInner](docs/OptionChainInner.md)
148
- - [SnapTrade::OptionChainInnerChainPerRootInner](docs/OptionChainInnerChainPerRootInner.md)
149
- - [SnapTrade::OptionChainInnerChainPerRootInnerChainPerStrikePriceInner](docs/OptionChainInnerChainPerRootInnerChainPerStrikePriceInner.md)
150
- - [SnapTrade::OptionLeg](docs/OptionLeg.md)
151
- - [SnapTrade::OptionLegAction](docs/OptionLegAction.md)
152
- - [SnapTrade::OptionStrategy](docs/OptionStrategy.md)
153
- - [SnapTrade::OptionStrategyLegsInner](docs/OptionStrategyLegsInner.md)
154
- - [SnapTrade::OptionsGetOptionStrategyRequest](docs/OptionsGetOptionStrategyRequest.md)
155
- - [SnapTrade::OptionsHoldings](docs/OptionsHoldings.md)
156
- - [SnapTrade::OptionsPlaceOptionStrategyRequest](docs/OptionsPlaceOptionStrategyRequest.md)
157
- - [SnapTrade::OptionsPosition](docs/OptionsPosition.md)
158
- - [SnapTrade::OptionsSymbol](docs/OptionsSymbol.md)
159
- - [SnapTrade::OrderStrategyExecuteBodyOrderType](docs/OrderStrategyExecuteBodyOrderType.md)
160
- - [SnapTrade::OrderStrategyExecuteBodyTimeInForce](docs/OrderStrategyExecuteBodyTimeInForce.md)
161
- - [SnapTrade::OrderType](docs/OrderType.md)
162
- - [SnapTrade::PartnerData](docs/PartnerData.md)
163
- - [SnapTrade::PastValue](docs/PastValue.md)
164
- - [SnapTrade::PerformanceCustom](docs/PerformanceCustom.md)
165
- - [SnapTrade::PortfolioGroup](docs/PortfolioGroup.md)
166
- - [SnapTrade::PortfolioGroupInfo](docs/PortfolioGroupInfo.md)
167
- - [SnapTrade::PortfolioGroupPosition](docs/PortfolioGroupPosition.md)
168
- - [SnapTrade::PortfolioGroupSettings](docs/PortfolioGroupSettings.md)
169
- - [SnapTrade::Position](docs/Position.md)
170
- - [SnapTrade::PositionSymbol](docs/PositionSymbol.md)
171
- - [SnapTrade::RedirectTokenandPin](docs/RedirectTokenandPin.md)
172
- - [SnapTrade::SecurityType](docs/SecurityType.md)
173
- - [SnapTrade::SessionEvent](docs/SessionEvent.md)
174
- - [SnapTrade::SessionEventType](docs/SessionEventType.md)
175
- - [SnapTrade::SnapTradeAPIDisclaimerAcceptStatus](docs/SnapTradeAPIDisclaimerAcceptStatus.md)
176
- - [SnapTrade::SnapTradeHoldingsAccount](docs/SnapTradeHoldingsAccount.md)
177
- - [SnapTrade::SnapTradeHoldingsAccountAccountId](docs/SnapTradeHoldingsAccountAccountId.md)
178
- - [SnapTrade::SnapTradeHoldingsTotalValue](docs/SnapTradeHoldingsTotalValue.md)
179
- - [SnapTrade::SnapTradeLoginUserRequestBody](docs/SnapTradeLoginUserRequestBody.md)
180
- - [SnapTrade::SnapTradeRegisterUserRequestBody](docs/SnapTradeRegisterUserRequestBody.md)
181
- - [SnapTrade::State](docs/State.md)
182
- - [SnapTrade::Status](docs/Status.md)
183
- - [SnapTrade::StrategyImpact](docs/StrategyImpact.md)
184
- - [SnapTrade::StrategyImpactLegsInner](docs/StrategyImpactLegsInner.md)
185
- - [SnapTrade::StrategyOrderPlace](docs/StrategyOrderPlace.md)
186
- - [SnapTrade::StrategyOrderPlaceOrdersInner](docs/StrategyOrderPlaceOrdersInner.md)
187
- - [SnapTrade::StrategyOrderPlaceOrdersInnerLegsInner](docs/StrategyOrderPlaceOrdersInnerLegsInner.md)
188
- - [SnapTrade::StrategyOrderRecord](docs/StrategyOrderRecord.md)
189
- - [SnapTrade::StrategyOrderRecordOrderType](docs/StrategyOrderRecordOrderType.md)
190
- - [SnapTrade::StrategyOrderRecordStatus](docs/StrategyOrderRecordStatus.md)
191
- - [SnapTrade::StrategyOrderRecordTimeInForce](docs/StrategyOrderRecordTimeInForce.md)
192
- - [SnapTrade::StrategyQuotes](docs/StrategyQuotes.md)
193
- - [SnapTrade::StrategyQuotesGreek](docs/StrategyQuotesGreek.md)
194
- - [SnapTrade::StrategyType](docs/StrategyType.md)
195
- - [SnapTrade::SubPeriodReturnRate](docs/SubPeriodReturnRate.md)
196
- - [SnapTrade::Symbol](docs/Symbol.md)
197
- - [SnapTrade::SymbolQuery](docs/SymbolQuery.md)
198
- - [SnapTrade::SymbolsQuotesInner](docs/SymbolsQuotesInner.md)
199
- - [SnapTrade::TargetAsset](docs/TargetAsset.md)
200
- - [SnapTrade::TimeInForce](docs/TimeInForce.md)
201
- - [SnapTrade::Trade](docs/Trade.md)
202
- - [SnapTrade::TradeAction](docs/TradeAction.md)
203
- - [SnapTrade::TradeExecutionStatus](docs/TradeExecutionStatus.md)
204
- - [SnapTrade::TradeExecutionStatusAction](docs/TradeExecutionStatusAction.md)
205
- - [SnapTrade::TradeImpact](docs/TradeImpact.md)
206
- - [SnapTrade::TradingCancelUserAccountOrderRequest](docs/TradingCancelUserAccountOrderRequest.md)
207
- - [SnapTrade::TradingPlaceOCOOrderRequest](docs/TradingPlaceOCOOrderRequest.md)
208
- - [SnapTrade::TransactionsStatus](docs/TransactionsStatus.md)
209
- - [SnapTrade::Type](docs/Type.md)
210
- - [SnapTrade::USExchange](docs/USExchange.md)
211
- - [SnapTrade::UnderlyingSymbol](docs/UnderlyingSymbol.md)
212
- - [SnapTrade::UniversalActivity](docs/UniversalActivity.md)
213
- - [SnapTrade::UniversalSymbol](docs/UniversalSymbol.md)
214
- - [SnapTrade::UniversalSymbolTicker](docs/UniversalSymbolTicker.md)
215
- - [SnapTrade::UserErrorLog](docs/UserErrorLog.md)
216
- - [SnapTrade::UserIDandSecret](docs/UserIDandSecret.md)
217
- - [SnapTrade::UserSettings](docs/UserSettings.md)
218
-
1
+ # snaptrade
2
+
3
+ Connect brokerage accounts to your app for live positions and trading
4
+
5
+ For more information, please visit [https://snaptrade.com/](https://snaptrade.com/)
6
+
7
+ ## Installation
8
+
9
+ Add to Gemfile:
10
+
11
+ ```ruby
12
+ gem 'snaptrade', '~> 1.10.0'
13
+ ```
14
+
15
+ ## Getting Started
16
+
17
+ ```ruby
18
+ require 'snaptrade'
19
+
20
+ SnapTrade.client_id = "YOUR_CLIENT_ID"
21
+ SnapTrade.consumer_key = "YOUR_CONSUMER_KEY"
22
+
23
+ user_id = "John.doe@snaptrade.com"
24
+ user_secret = "USERSECRET123"
25
+ brokerage_authorizations = "917c8734-8470-4a3e-a18f-57c3f2ee6631"
26
+
27
+ begin
28
+ # List all accounts for the user, plus balances, positions, and orders for each account.
29
+ result = SnapTrade::AccountInformation.get_all_user_holdings(
30
+ user_id: user_id,
31
+ user_secret: user_secret,
32
+ brokerage_authorizations: brokerage_authorizations,
33
+ )
34
+ p result
35
+ rescue SnapTrade::ApiError => e
36
+ puts "Exception when calling SnapTrade::AccountInformation.get_all_user_holdings: #{e}"
37
+ end
38
+ ```
39
+
40
+ ## Documentation for API Endpoints
41
+
42
+ All URIs are relative to *https://api.snaptrade.com/api/v1*
43
+
44
+ Class | Method | HTTP request | Description
45
+ ------------ | ------------- | ------------- | -------------
46
+ *SnapTrade::AccountInformationApi* | [**get_all_user_holdings**](docs/AccountInformationApi.md#get_all_user_holdings) | **GET** /holdings | List all accounts for the user, plus balances, positions, and orders for each account.
47
+ *SnapTrade::AccountInformationApi* | [**get_user_account_balance**](docs/AccountInformationApi.md#get_user_account_balance) | **GET** /accounts/{accountId}/balances | List account balances
48
+ *SnapTrade::AccountInformationApi* | [**get_user_account_details**](docs/AccountInformationApi.md#get_user_account_details) | **GET** /accounts/{accountId} | Return details of a specific investment account
49
+ *SnapTrade::AccountInformationApi* | [**get_user_account_orders**](docs/AccountInformationApi.md#get_user_account_orders) | **GET** /accounts/{accountId}/orders | Get all history of orders placed in account
50
+ *SnapTrade::AccountInformationApi* | [**get_user_account_positions**](docs/AccountInformationApi.md#get_user_account_positions) | **GET** /accounts/{accountId}/positions | List account positions
51
+ *SnapTrade::AccountInformationApi* | [**get_user_holdings**](docs/AccountInformationApi.md#get_user_holdings) | **GET** /accounts/{accountId}/holdings | List balances, positions and orders for the specified account.
52
+ *SnapTrade::AccountInformationApi* | [**list_user_accounts**](docs/AccountInformationApi.md#list_user_accounts) | **GET** /accounts | List accounts
53
+ *SnapTrade::AccountInformationApi* | [**update_user_account**](docs/AccountInformationApi.md#update_user_account) | **PUT** /accounts/{accountId} | Update details of an investment account
54
+ *SnapTrade::APIStatusApi* | [**check**](docs/APIStatusApi.md#check) | **GET** / | Get API Status
55
+ *SnapTrade::AuthenticationApi* | [**delete_snap_trade_user**](docs/AuthenticationApi.md#delete_snap_trade_user) | **DELETE** /snapTrade/deleteUser | Delete SnapTrade user
56
+ *SnapTrade::AuthenticationApi* | [**get_user_jwt**](docs/AuthenticationApi.md#get_user_jwt) | **GET** /snapTrade/encryptedJWT | Generate encrypted JWT token
57
+ *SnapTrade::AuthenticationApi* | [**list_snap_trade_users**](docs/AuthenticationApi.md#list_snap_trade_users) | **GET** /snapTrade/listUsers | List SnapTrade users
58
+ *SnapTrade::AuthenticationApi* | [**login_snap_trade_user**](docs/AuthenticationApi.md#login_snap_trade_user) | **POST** /snapTrade/login | Login user & generate connection link
59
+ *SnapTrade::AuthenticationApi* | [**register_snap_trade_user**](docs/AuthenticationApi.md#register_snap_trade_user) | **POST** /snapTrade/registerUser | Create SnapTrade user
60
+ *SnapTrade::ConnectionsApi* | [**detail_brokerage_authorization**](docs/ConnectionsApi.md#detail_brokerage_authorization) | **GET** /authorizations/{authorizationId} | Get detail of a specific brokerage authorizations for the user
61
+ *SnapTrade::ConnectionsApi* | [**list_brokerage_authorizations**](docs/ConnectionsApi.md#list_brokerage_authorizations) | **GET** /authorizations | List all brokerage authorizations for the user
62
+ *SnapTrade::ConnectionsApi* | [**remove_brokerage_authorization**](docs/ConnectionsApi.md#remove_brokerage_authorization) | **DELETE** /authorizations/{authorizationId} | Remove a brokerage authorization.
63
+ *SnapTrade::ConnectionsApi* | [**session_events**](docs/ConnectionsApi.md#session_events) | **GET** /sessionEvents | List all session events for the partner
64
+ *SnapTrade::ErrorLogsApi* | [**list_user_errors**](docs/ErrorLogsApi.md#list_user_errors) | **GET** /snapTrade/listUserErrors | Retrieve error logs on behalf of your SnapTrade users
65
+ *SnapTrade::OptionsApi* | [**get_option_strategy**](docs/OptionsApi.md#get_option_strategy) | **POST** /accounts/{accountId}/optionStrategy | Creates an option strategy object that will be used to place an option strategy order
66
+ *SnapTrade::OptionsApi* | [**get_options_chain**](docs/OptionsApi.md#get_options_chain) | **GET** /accounts/{accountId}/optionsChain | Get the options chain
67
+ *SnapTrade::OptionsApi* | [**get_options_strategy_quote**](docs/OptionsApi.md#get_options_strategy_quote) | **GET** /accounts/{accountId}/optionStrategy/{optionStrategyId} | Get latest market data of option strategy
68
+ *SnapTrade::OptionsApi* | [**list_option_holdings**](docs/OptionsApi.md#list_option_holdings) | **GET** /accounts/{accountId}/options | Get the options holdings in the account
69
+ *SnapTrade::OptionsApi* | [**place_option_strategy**](docs/OptionsApi.md#place_option_strategy) | **POST** /accounts/{accountId}/optionStrategy/{optionStrategyId}/execute | Place an option strategy order on the brokerage
70
+ *SnapTrade::ReferenceDataApi* | [**get_currency_exchange_rate_pair**](docs/ReferenceDataApi.md#get_currency_exchange_rate_pair) | **GET** /currencies/rates/{currencyPair} | Return the exchange rate of a currency pair
71
+ *SnapTrade::ReferenceDataApi* | [**get_partner_info**](docs/ReferenceDataApi.md#get_partner_info) | **GET** /snapTrade/partners | Get metadata related to Snaptrade partner
72
+ *SnapTrade::ReferenceDataApi* | [**get_security_types**](docs/ReferenceDataApi.md#get_security_types) | **GET** /securityTypes | List of all security types.
73
+ *SnapTrade::ReferenceDataApi* | [**get_stock_exchanges**](docs/ReferenceDataApi.md#get_stock_exchanges) | **GET** /exchanges | List exchanges
74
+ *SnapTrade::ReferenceDataApi* | [**get_symbols**](docs/ReferenceDataApi.md#get_symbols) | **POST** /symbols | Search for symbols
75
+ *SnapTrade::ReferenceDataApi* | [**get_symbols_by_ticker**](docs/ReferenceDataApi.md#get_symbols_by_ticker) | **GET** /symbols/{ticker} | Get details of a symbol by the ticker
76
+ *SnapTrade::ReferenceDataApi* | [**list_all_brokerage_authorization_type**](docs/ReferenceDataApi.md#list_all_brokerage_authorization_type) | **GET** /brokerageAuthorizationTypes | List of all brokerage authorization types
77
+ *SnapTrade::ReferenceDataApi* | [**list_all_brokerages**](docs/ReferenceDataApi.md#list_all_brokerages) | **GET** /brokerages | List brokerages
78
+ *SnapTrade::ReferenceDataApi* | [**list_all_currencies**](docs/ReferenceDataApi.md#list_all_currencies) | **GET** /currencies | List currencies
79
+ *SnapTrade::ReferenceDataApi* | [**list_all_currencies_rates**](docs/ReferenceDataApi.md#list_all_currencies_rates) | **GET** /currencies/rates | List currency exchange rates
80
+ *SnapTrade::ReferenceDataApi* | [**symbol_search_user_account**](docs/ReferenceDataApi.md#symbol_search_user_account) | **POST** /accounts/{accountId}/symbols | Search for symbols available in an account
81
+ *SnapTrade::TradingApi* | [**cancel_user_account_order**](docs/TradingApi.md#cancel_user_account_order) | **POST** /accounts/{accountId}/orders/cancel | Cancel open order in account
82
+ *SnapTrade::TradingApi* | [**get_order_impact**](docs/TradingApi.md#get_order_impact) | **POST** /trade/impact | Check impact of trades on account.
83
+ *SnapTrade::TradingApi* | [**get_user_account_quotes**](docs/TradingApi.md#get_user_account_quotes) | **GET** /accounts/{accountId}/quotes | Get symbol quotes
84
+ *SnapTrade::TradingApi* | [**place_force_order**](docs/TradingApi.md#place_force_order) | **POST** /trade/place | Place a trade with NO validation.
85
+ *SnapTrade::TradingApi* | [**place_oco_order**](docs/TradingApi.md#place_oco_order) | **POST** /trade/oco | Place a OCO (One Cancels Other) order
86
+ *SnapTrade::TradingApi* | [**place_order**](docs/TradingApi.md#place_order) | **POST** /trade/{tradeId} | Place order
87
+ *SnapTrade::TransactionsAndReportingApi* | [**get_activities**](docs/TransactionsAndReportingApi.md#get_activities) | **GET** /activities | Get transaction history for a user
88
+ *SnapTrade::TransactionsAndReportingApi* | [**get_reporting_custom_range**](docs/TransactionsAndReportingApi.md#get_reporting_custom_range) | **GET** /performance/custom | Get performance information for a specific timeframe
89
+
90
+
91
+ ## Documentation for Models
92
+
93
+ - [SnapTrade::Account](docs/Account.md)
94
+ - [SnapTrade::AccountHoldings](docs/AccountHoldings.md)
95
+ - [SnapTrade::AccountHoldingsAccount](docs/AccountHoldingsAccount.md)
96
+ - [SnapTrade::AccountOrderRecord](docs/AccountOrderRecord.md)
97
+ - [SnapTrade::AccountOrderRecordStatus](docs/AccountOrderRecordStatus.md)
98
+ - [SnapTrade::AccountSimple](docs/AccountSimple.md)
99
+ - [SnapTrade::AccountSyncStatus](docs/AccountSyncStatus.md)
100
+ - [SnapTrade::Action](docs/Action.md)
101
+ - [SnapTrade::AuthType](docs/AuthType.md)
102
+ - [SnapTrade::AuthenticationLoginSnapTradeUser200Response](docs/AuthenticationLoginSnapTradeUser200Response.md)
103
+ - [SnapTrade::Balance](docs/Balance.md)
104
+ - [SnapTrade::Brokerage](docs/Brokerage.md)
105
+ - [SnapTrade::BrokerageAuthorization](docs/BrokerageAuthorization.md)
106
+ - [SnapTrade::BrokerageAuthorizationType](docs/BrokerageAuthorizationType.md)
107
+ - [SnapTrade::BrokerageAuthorizationTypeReadOnly](docs/BrokerageAuthorizationTypeReadOnly.md)
108
+ - [SnapTrade::BrokerageAuthorizationTypeReadOnlyBrokerage](docs/BrokerageAuthorizationTypeReadOnlyBrokerage.md)
109
+ - [SnapTrade::BrokerageAuthorizationTypeReadOnlyType](docs/BrokerageAuthorizationTypeReadOnlyType.md)
110
+ - [SnapTrade::BrokerageAuthorizationTypeType](docs/BrokerageAuthorizationTypeType.md)
111
+ - [SnapTrade::BrokerageSymbol](docs/BrokerageSymbol.md)
112
+ - [SnapTrade::BrokerageType](docs/BrokerageType.md)
113
+ - [SnapTrade::CalculatedTrade](docs/CalculatedTrade.md)
114
+ - [SnapTrade::CashRestriction](docs/CashRestriction.md)
115
+ - [SnapTrade::ConnectionType](docs/ConnectionType.md)
116
+ - [SnapTrade::ConnectionsSessionEvents200ResponseInner](docs/ConnectionsSessionEvents200ResponseInner.md)
117
+ - [SnapTrade::Currency](docs/Currency.md)
118
+ - [SnapTrade::DeleteUserResponse](docs/DeleteUserResponse.md)
119
+ - [SnapTrade::DividendAtDate](docs/DividendAtDate.md)
120
+ - [SnapTrade::EncryptedResponse](docs/EncryptedResponse.md)
121
+ - [SnapTrade::EncryptedResponseEncryptedMessageData](docs/EncryptedResponseEncryptedMessageData.md)
122
+ - [SnapTrade::Exchange](docs/Exchange.md)
123
+ - [SnapTrade::ExchangeRatePairs](docs/ExchangeRatePairs.md)
124
+ - [SnapTrade::ExcludedAsset](docs/ExcludedAsset.md)
125
+ - [SnapTrade::JWT](docs/JWT.md)
126
+ - [SnapTrade::LoginRedirectURI](docs/LoginRedirectURI.md)
127
+ - [SnapTrade::ManualTrade](docs/ManualTrade.md)
128
+ - [SnapTrade::ManualTradeAndImpact](docs/ManualTradeAndImpact.md)
129
+ - [SnapTrade::ManualTradeBalance](docs/ManualTradeBalance.md)
130
+ - [SnapTrade::ManualTradeForm](docs/ManualTradeForm.md)
131
+ - [SnapTrade::ManualTradeSymbol](docs/ManualTradeSymbol.md)
132
+ - [SnapTrade::Model400FailedRequestResponse](docs/Model400FailedRequestResponse.md)
133
+ - [SnapTrade::Model401FailedRequestResponse](docs/Model401FailedRequestResponse.md)
134
+ - [SnapTrade::Model403FailedRequestResponse](docs/Model403FailedRequestResponse.md)
135
+ - [SnapTrade::Model404FailedRequestResponse](docs/Model404FailedRequestResponse.md)
136
+ - [SnapTrade::ModelAssetClass](docs/ModelAssetClass.md)
137
+ - [SnapTrade::ModelAssetClassDetails](docs/ModelAssetClassDetails.md)
138
+ - [SnapTrade::ModelAssetClassTarget](docs/ModelAssetClassTarget.md)
139
+ - [SnapTrade::ModelPortfolio](docs/ModelPortfolio.md)
140
+ - [SnapTrade::ModelPortfolioAssetClass](docs/ModelPortfolioAssetClass.md)
141
+ - [SnapTrade::ModelPortfolioDetails](docs/ModelPortfolioDetails.md)
142
+ - [SnapTrade::ModelPortfolioSecurity](docs/ModelPortfolioSecurity.md)
143
+ - [SnapTrade::ModelType](docs/ModelType.md)
144
+ - [SnapTrade::MonthlyDividends](docs/MonthlyDividends.md)
145
+ - [SnapTrade::NetContributions](docs/NetContributions.md)
146
+ - [SnapTrade::NetDividend](docs/NetDividend.md)
147
+ - [SnapTrade::OptionChainInner](docs/OptionChainInner.md)
148
+ - [SnapTrade::OptionChainInnerChainPerRootInner](docs/OptionChainInnerChainPerRootInner.md)
149
+ - [SnapTrade::OptionChainInnerChainPerRootInnerChainPerStrikePriceInner](docs/OptionChainInnerChainPerRootInnerChainPerStrikePriceInner.md)
150
+ - [SnapTrade::OptionLeg](docs/OptionLeg.md)
151
+ - [SnapTrade::OptionLegAction](docs/OptionLegAction.md)
152
+ - [SnapTrade::OptionStrategy](docs/OptionStrategy.md)
153
+ - [SnapTrade::OptionStrategyLegsInner](docs/OptionStrategyLegsInner.md)
154
+ - [SnapTrade::OptionsGetOptionStrategyRequest](docs/OptionsGetOptionStrategyRequest.md)
155
+ - [SnapTrade::OptionsHoldings](docs/OptionsHoldings.md)
156
+ - [SnapTrade::OptionsPlaceOptionStrategyRequest](docs/OptionsPlaceOptionStrategyRequest.md)
157
+ - [SnapTrade::OptionsPosition](docs/OptionsPosition.md)
158
+ - [SnapTrade::OptionsSymbol](docs/OptionsSymbol.md)
159
+ - [SnapTrade::OrderStrategyExecuteBodyOrderType](docs/OrderStrategyExecuteBodyOrderType.md)
160
+ - [SnapTrade::OrderStrategyExecuteBodyTimeInForce](docs/OrderStrategyExecuteBodyTimeInForce.md)
161
+ - [SnapTrade::OrderType](docs/OrderType.md)
162
+ - [SnapTrade::PartnerData](docs/PartnerData.md)
163
+ - [SnapTrade::PastValue](docs/PastValue.md)
164
+ - [SnapTrade::PerformanceCustom](docs/PerformanceCustom.md)
165
+ - [SnapTrade::PortfolioGroup](docs/PortfolioGroup.md)
166
+ - [SnapTrade::PortfolioGroupInfo](docs/PortfolioGroupInfo.md)
167
+ - [SnapTrade::PortfolioGroupPosition](docs/PortfolioGroupPosition.md)
168
+ - [SnapTrade::PortfolioGroupSettings](docs/PortfolioGroupSettings.md)
169
+ - [SnapTrade::Position](docs/Position.md)
170
+ - [SnapTrade::PositionSymbol](docs/PositionSymbol.md)
171
+ - [SnapTrade::RedirectTokenandPin](docs/RedirectTokenandPin.md)
172
+ - [SnapTrade::SecurityType](docs/SecurityType.md)
173
+ - [SnapTrade::SessionEvent](docs/SessionEvent.md)
174
+ - [SnapTrade::SessionEventType](docs/SessionEventType.md)
175
+ - [SnapTrade::SnapTradeAPIDisclaimerAcceptStatus](docs/SnapTradeAPIDisclaimerAcceptStatus.md)
176
+ - [SnapTrade::SnapTradeHoldingsAccount](docs/SnapTradeHoldingsAccount.md)
177
+ - [SnapTrade::SnapTradeHoldingsAccountAccountId](docs/SnapTradeHoldingsAccountAccountId.md)
178
+ - [SnapTrade::SnapTradeHoldingsTotalValue](docs/SnapTradeHoldingsTotalValue.md)
179
+ - [SnapTrade::SnapTradeLoginUserRequestBody](docs/SnapTradeLoginUserRequestBody.md)
180
+ - [SnapTrade::SnapTradeRegisterUserRequestBody](docs/SnapTradeRegisterUserRequestBody.md)
181
+ - [SnapTrade::State](docs/State.md)
182
+ - [SnapTrade::Status](docs/Status.md)
183
+ - [SnapTrade::StrategyImpact](docs/StrategyImpact.md)
184
+ - [SnapTrade::StrategyImpactLegsInner](docs/StrategyImpactLegsInner.md)
185
+ - [SnapTrade::StrategyOrderPlace](docs/StrategyOrderPlace.md)
186
+ - [SnapTrade::StrategyOrderPlaceOrdersInner](docs/StrategyOrderPlaceOrdersInner.md)
187
+ - [SnapTrade::StrategyOrderPlaceOrdersInnerLegsInner](docs/StrategyOrderPlaceOrdersInnerLegsInner.md)
188
+ - [SnapTrade::StrategyOrderRecord](docs/StrategyOrderRecord.md)
189
+ - [SnapTrade::StrategyOrderRecordOrderType](docs/StrategyOrderRecordOrderType.md)
190
+ - [SnapTrade::StrategyOrderRecordStatus](docs/StrategyOrderRecordStatus.md)
191
+ - [SnapTrade::StrategyOrderRecordTimeInForce](docs/StrategyOrderRecordTimeInForce.md)
192
+ - [SnapTrade::StrategyQuotes](docs/StrategyQuotes.md)
193
+ - [SnapTrade::StrategyQuotesGreek](docs/StrategyQuotesGreek.md)
194
+ - [SnapTrade::StrategyType](docs/StrategyType.md)
195
+ - [SnapTrade::SubPeriodReturnRate](docs/SubPeriodReturnRate.md)
196
+ - [SnapTrade::Symbol](docs/Symbol.md)
197
+ - [SnapTrade::SymbolQuery](docs/SymbolQuery.md)
198
+ - [SnapTrade::SymbolsQuotesInner](docs/SymbolsQuotesInner.md)
199
+ - [SnapTrade::TargetAsset](docs/TargetAsset.md)
200
+ - [SnapTrade::TimeInForce](docs/TimeInForce.md)
201
+ - [SnapTrade::Trade](docs/Trade.md)
202
+ - [SnapTrade::TradeAction](docs/TradeAction.md)
203
+ - [SnapTrade::TradeExecutionStatus](docs/TradeExecutionStatus.md)
204
+ - [SnapTrade::TradeExecutionStatusAction](docs/TradeExecutionStatusAction.md)
205
+ - [SnapTrade::TradeImpact](docs/TradeImpact.md)
206
+ - [SnapTrade::TradingCancelUserAccountOrderRequest](docs/TradingCancelUserAccountOrderRequest.md)
207
+ - [SnapTrade::TradingPlaceOCOOrderRequest](docs/TradingPlaceOCOOrderRequest.md)
208
+ - [SnapTrade::TransactionsStatus](docs/TransactionsStatus.md)
209
+ - [SnapTrade::Type](docs/Type.md)
210
+ - [SnapTrade::USExchange](docs/USExchange.md)
211
+ - [SnapTrade::UnderlyingSymbol](docs/UnderlyingSymbol.md)
212
+ - [SnapTrade::UniversalActivity](docs/UniversalActivity.md)
213
+ - [SnapTrade::UniversalSymbol](docs/UniversalSymbol.md)
214
+ - [SnapTrade::UniversalSymbolTicker](docs/UniversalSymbolTicker.md)
215
+ - [SnapTrade::UserErrorLog](docs/UserErrorLog.md)
216
+ - [SnapTrade::UserIDandSecret](docs/UserIDandSecret.md)
217
+ - [SnapTrade::UserSettings](docs/UserSettings.md)
218
+