ig_markets 0.5 → 0.6

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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -8
  3. data/README.md +40 -10
  4. data/lib/ig_markets.rb +3 -1
  5. data/lib/ig_markets/cli/commands/activities_command.rb +9 -7
  6. data/lib/ig_markets/cli/commands/orders_command.rb +8 -11
  7. data/lib/ig_markets/cli/commands/positions_command.rb +9 -7
  8. data/lib/ig_markets/cli/commands/prices_command.rb +66 -0
  9. data/lib/ig_markets/cli/commands/search_command.rb +19 -2
  10. data/lib/ig_markets/cli/commands/sprints_command.rb +2 -2
  11. data/lib/ig_markets/cli/config_file.rb +1 -1
  12. data/lib/ig_markets/cli/main.rb +25 -16
  13. data/lib/ig_markets/cli/tables/accounts_table.rb +10 -0
  14. data/lib/ig_markets/cli/tables/historical_price_result_snapshots_table.rb +25 -0
  15. data/lib/ig_markets/cli/tables/table.rb +2 -2
  16. data/lib/ig_markets/client_sentiment.rb +3 -1
  17. data/lib/ig_markets/dealing_platform.rb +49 -14
  18. data/lib/ig_markets/dealing_platform/account_methods.rb +13 -5
  19. data/lib/ig_markets/dealing_platform/client_sentiment_methods.rb +2 -4
  20. data/lib/ig_markets/dealing_platform/market_methods.rb +14 -6
  21. data/lib/ig_markets/dealing_platform/position_methods.rb +7 -7
  22. data/lib/ig_markets/dealing_platform/sprint_market_position_methods.rb +16 -2
  23. data/lib/ig_markets/dealing_platform/watchlist_methods.rb +4 -2
  24. data/lib/ig_markets/dealing_platform/working_order_methods.rb +2 -4
  25. data/lib/ig_markets/format.rb +10 -0
  26. data/lib/ig_markets/historical_price_result.rb +1 -1
  27. data/lib/ig_markets/instrument.rb +10 -10
  28. data/lib/ig_markets/market.rb +3 -3
  29. data/lib/ig_markets/model.rb +17 -25
  30. data/lib/ig_markets/model/typecasters.rb +20 -13
  31. data/lib/ig_markets/payload_formatter.rb +1 -1
  32. data/lib/ig_markets/position.rb +1 -1
  33. data/lib/ig_markets/session.rb +8 -8
  34. data/lib/ig_markets/sprint_market_position.rb +2 -2
  35. data/lib/ig_markets/transaction.rb +1 -1
  36. data/lib/ig_markets/version.rb +1 -1
  37. data/lib/ig_markets/watchlist.rb +6 -4
  38. data/lib/ig_markets/working_order.rb +2 -2
  39. metadata +4 -2
@@ -26,7 +26,7 @@ module IGMarkets
26
26
  # @return [String] The deal reference of the deletion operation. Use {DealingPlatform#deal_confirmation} to check
27
27
  # the result of the working order deletion.
28
28
  def delete
29
- @dealing_platform.session.delete("workingorders/otc/#{deal_id}", {}, API_V1).fetch(:deal_reference)
29
+ @dealing_platform.session.delete("workingorders/otc/#{deal_id}", {}).fetch(:deal_reference)
30
30
  end
31
31
 
32
32
  # Updates this working order. No attributes are mandatory, and any attributes not specified will be kept at the
@@ -51,7 +51,7 @@ module IGMarkets
51
51
 
52
52
  payload = PayloadFormatter.format WorkingOrderUpdateAttributes.new new_attributes
53
53
 
54
- @dealing_platform.session.put("workingorders/otc/#{deal_id}", payload, API_V1).fetch(:deal_reference)
54
+ @dealing_platform.session.put("workingorders/otc/#{deal_id}", payload).fetch(:deal_reference)
55
55
  end
56
56
 
57
57
  # Internal model used by {#update}.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ig_markets
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.5'
4
+ version: '0.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Viney
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-23 00:00:00.000000000 Z
11
+ date: 2016-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -200,6 +200,7 @@ files:
200
200
  - lib/ig_markets/cli/commands/confirmation_command.rb
201
201
  - lib/ig_markets/cli/commands/orders_command.rb
202
202
  - lib/ig_markets/cli/commands/positions_command.rb
203
+ - lib/ig_markets/cli/commands/prices_command.rb
203
204
  - lib/ig_markets/cli/commands/search_command.rb
204
205
  - lib/ig_markets/cli/commands/sentiment_command.rb
205
206
  - lib/ig_markets/cli/commands/sprints_command.rb
@@ -210,6 +211,7 @@ files:
210
211
  - lib/ig_markets/cli/tables/accounts_table.rb
211
212
  - lib/ig_markets/cli/tables/activities_table.rb
212
213
  - lib/ig_markets/cli/tables/client_sentiments_table.rb
214
+ - lib/ig_markets/cli/tables/historical_price_result_snapshots_table.rb
213
215
  - lib/ig_markets/cli/tables/market_overviews_table.rb
214
216
  - lib/ig_markets/cli/tables/positions_table.rb
215
217
  - lib/ig_markets/cli/tables/sprint_market_positions_table.rb