oanda_api 0.9.5 → 0.9.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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +15 -0
  4. data/CHANGELOG.md +24 -9
  5. data/Gemfile +2 -3
  6. data/README.md +11 -9
  7. data/lib/oanda_api.rb +1 -0
  8. data/lib/oanda_api/client/client.rb +13 -7
  9. data/lib/oanda_api/configuration.rb +57 -24
  10. data/lib/oanda_api/resource/order.rb +5 -6
  11. data/lib/oanda_api/resource/transaction.rb +3 -4
  12. data/lib/oanda_api/resource_collection.rb +4 -2
  13. data/lib/oanda_api/streaming/request.rb +6 -1
  14. data/lib/oanda_api/throttling/throttling.rb +105 -0
  15. data/lib/oanda_api/version.rb +1 -1
  16. data/oanda_api.gemspec +4 -4
  17. data/spec/fixtures/vcr_cassettes/accounts_get.yml +7 -5
  18. data/spec/fixtures/vcr_cassettes/accounts_id_get.yml +18 -14
  19. data/spec/fixtures/vcr_cassettes/calendar_events_period_get.yml +20 -14
  20. data/spec/fixtures/vcr_cassettes/calendar_instrument_and_period_get.yml +24 -21
  21. data/spec/fixtures/vcr_cassettes/calendar_period_get.yml +20 -14
  22. data/spec/fixtures/vcr_cassettes/candles_options_get.yml +12 -10
  23. data/spec/fixtures/vcr_cassettes/client_helper_accounts.yml +48 -5
  24. data/spec/fixtures/vcr_cassettes/instrument_EUR_USD.yml +11 -9
  25. data/spec/fixtures/vcr_cassettes/instrument_USD_JPY.yml +10 -8
  26. data/spec/fixtures/vcr_cassettes/instruments_get.yml +25 -19
  27. data/spec/fixtures/vcr_cassettes/instruments_options_get.yml +8 -6
  28. data/spec/fixtures/vcr_cassettes/order_id_close.yml +159 -313
  29. data/spec/fixtures/vcr_cassettes/order_id_get.yml +103 -21
  30. data/spec/fixtures/vcr_cassettes/order_options_create.yml +9 -7
  31. data/spec/fixtures/vcr_cassettes/order_options_update.yml +62 -20
  32. data/spec/fixtures/vcr_cassettes/orders_get.yml +46 -137
  33. data/spec/fixtures/vcr_cassettes/orders_options_get.yml +29 -50
  34. data/spec/fixtures/vcr_cassettes/positions_get.yml +19 -15
  35. data/spec/fixtures/vcr_cassettes/positions_instrument_close.yml +35 -27
  36. data/spec/fixtures/vcr_cassettes/positions_instrument_get.yml +17 -13
  37. data/spec/fixtures/vcr_cassettes/prices_options_get.yml +12 -10
  38. data/spec/fixtures/vcr_cassettes/spread_history_get.yml +17 -13
  39. data/spec/fixtures/vcr_cassettes/spreads_get.yml +17 -13
  40. data/spec/fixtures/vcr_cassettes/trade_id_close.yml +115 -52
  41. data/spec/fixtures/vcr_cassettes/trade_id_get.yml +278 -16
  42. data/spec/fixtures/vcr_cassettes/trade_options_modify.yml +58 -16
  43. data/spec/fixtures/vcr_cassettes/trades_filter_get.yml +44 -19
  44. data/spec/fixtures/vcr_cassettes/trades_get.yml +55 -16
  45. data/spec/fixtures/vcr_cassettes/transaction_id_get.yml +271 -149
  46. data/spec/fixtures/vcr_cassettes/transactions_options_get.yml +258 -133
  47. data/spec/fixtures/vcr_cassettes/with_throttling_and_max_requests_per_second.yml +28 -22
  48. data/spec/fixtures/vcr_cassettes/with_throttling_new_connections.yml +443 -0
  49. data/spec/fixtures/vcr_cassettes/with_throttling_with_multiple_threads.yml +57 -45
  50. data/spec/fixtures/vcr_cassettes/without_throttling.yml +91 -71
  51. data/spec/oanda_api/configuration_spec.rb +31 -0
  52. data/spec/oanda_api/examples/request_throttling_spec.rb +39 -4
  53. data/spec/oanda_api/examples/spread_history_spec.rb +3 -3
  54. data/spec/oanda_api/resource_collection_spec.rb +9 -0
  55. data/spec/oanda_api/streaming/client_spec.rb +5 -5
  56. data/spec/oanda_api/streaming/request_spec.rb +23 -8
  57. data/spec/spec_helper.rb +0 -3
  58. data/spec/support/client_helper.rb +6 -2
  59. metadata +13 -12
  60. data/spec/fixtures/vcr_cassettes/client_helper_account.yml +0 -45
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/orders
6
6
  body:
7
7
  encoding: UTF-8
8
- string: expiry=2016-03-14T22%3A30%3A16%2B00%3A00&instrument=USD_JPY&price=113.673&side=buy&type=limit&units=10000
8
+ string: expiry=2018-01-08T19%3A26%3A42%2B00%3A00&instrument=USD_JPY&price=112.964&side=buy&type=limit&units=10000
9
9
  headers:
10
10
  X-Accept-Datetime-Format:
11
11
  - RFC3339
@@ -14,16 +14,16 @@ http_interactions:
14
14
  Connection:
15
15
  - keep-alive
16
16
  Keep-Alive:
17
- - 30
17
+ - '30'
18
18
  response:
19
19
  status:
20
20
  code: 201
21
21
  message: CREATED
22
22
  headers:
23
23
  Server:
24
- - openresty/1.7.0.1
24
+ - openresty/1.9.15.1
25
25
  Date:
26
- - Mon, 14 Mar 2016 21:30:16 GMT
26
+ - Mon, 08 Jan 2018 18:26:31 GMT
27
27
  Content-Type:
28
28
  - application/json
29
29
  Content-Length:
@@ -31,16 +31,18 @@ http_interactions:
31
31
  Connection:
32
32
  - keep-alive
33
33
  Location:
34
- - https://api-fxpractice.oanda.com/v1/accounts/1871900/orders/10173828251
34
+ - http://api-fxpractice.oanda.com/v1/accounts/1871900/orders/10903628490
35
+ Access-Control-Allow-Origin:
36
+ - "*"
35
37
  body:
36
38
  encoding: UTF-8
37
- string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"time\" : \"2016-03-14T21:30:16.000000Z\",\n\t\"price\"
38
- : 113.673,\n\t\"orderOpened\" : {\n\t\t\"id\" : 10173828251,\n\t\t\"units\"
39
+ string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"time\" : \"2018-01-08T18:26:31.000000Z\",\n\t\"price\"
40
+ : 112.964,\n\t\"orderOpened\" : {\n\t\t\"id\" : 10903628490,\n\t\t\"units\"
39
41
  : 10000,\n\t\t\"side\" : \"buy\",\n\t\t\"takeProfit\" : 0,\n\t\t\"stopLoss\"
40
- : 0,\n\t\t\"expiry\" : \"2016-03-14T22:30:16.000000Z\",\n\t\t\"upperBound\"
42
+ : 0,\n\t\t\"expiry\" : \"2018-01-08T19:26:42.000000Z\",\n\t\t\"upperBound\"
41
43
  : 0,\n\t\t\"lowerBound\" : 0,\n\t\t\"trailingStop\" : 0\n\t}\n}"
42
44
  http_version:
43
- recorded_at: Mon, 14 Mar 2016 21:30:16 GMT
45
+ recorded_at: Mon, 08 Jan 2018 18:26:42 GMT
44
46
  - request:
45
47
  method: get
46
48
  uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/orders?instrument=USD_JPY
@@ -55,66 +57,43 @@ http_interactions:
55
57
  Connection:
56
58
  - keep-alive
57
59
  Keep-Alive:
58
- - 30
60
+ - '30'
59
61
  response:
60
62
  status:
61
63
  code: 200
62
64
  message: OK
63
65
  headers:
64
66
  Server:
65
- - openresty/1.7.0.1
67
+ - openresty/1.9.15.1
66
68
  Date:
67
- - Mon, 14 Mar 2016 21:30:16 GMT
69
+ - Mon, 08 Jan 2018 18:26:31 GMT
68
70
  Content-Type:
69
71
  - application/json
70
72
  Content-Length:
71
- - '2364'
73
+ - '689'
72
74
  Connection:
73
75
  - keep-alive
74
76
  Access-Control-Expose-Headers:
75
77
  - X-Result-Count
76
78
  Etag:
77
- - '"423e273543c08346c70ca836ba731aa1dc94bae5"'
79
+ - '"b37885951eacf8e081809450c54ac1b64c461f85"'
78
80
  X-Result-Count:
79
- - '7'
81
+ - '2'
82
+ Access-Control-Allow-Origin:
83
+ - "*"
80
84
  body:
81
85
  encoding: UTF-8
82
- string: "{\n\t\"orders\" : [\n\t\t{\n\t\t\t\"id\" : 10173828251,\n\t\t\t\"instrument\"
86
+ string: "{\n\t\"orders\" : [\n\t\t{\n\t\t\t\"id\" : 10903628490,\n\t\t\t\"instrument\"
83
87
  : \"USD_JPY\",\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"type\"
84
- : \"limit\",\n\t\t\t\"time\" : \"2016-03-14T21:30:16.000000Z\",\n\t\t\t\"price\"
85
- : 113.673,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"expiry\"
86
- : \"2016-03-14T22:30:16.000000Z\",\n\t\t\t\"upperBound\" : 0,\n\t\t\t\"lowerBound\"
87
- : 0,\n\t\t\t\"trailingStop\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173825142,\n\t\t\t\"instrument\"
88
+ : \"limit\",\n\t\t\t\"time\" : \"2018-01-08T18:26:31.000000Z\",\n\t\t\t\"price\"
89
+ : 112.964,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"expiry\"
90
+ : \"2018-01-08T19:26:42.000000Z\",\n\t\t\t\"upperBound\" : 0,\n\t\t\t\"lowerBound\"
91
+ : 0,\n\t\t\t\"trailingStop\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903622521,\n\t\t\t\"instrument\"
88
92
  : \"USD_JPY\",\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"type\"
89
- : \"limit\",\n\t\t\t\"time\" : \"2016-03-14T21:27:01.000000Z\",\n\t\t\t\"price\"
90
- : 113.673,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"expiry\"
91
- : \"2016-03-14T22:27:01.000000Z\",\n\t\t\t\"upperBound\" : 0,\n\t\t\t\"lowerBound\"
92
- : 0,\n\t\t\t\"trailingStop\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173824146,\n\t\t\t\"instrument\"
93
- : \"USD_JPY\",\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"type\"
94
- : \"limit\",\n\t\t\t\"time\" : \"2016-03-14T21:26:10.000000Z\",\n\t\t\t\"price\"
95
- : 113.673,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"expiry\"
96
- : \"2016-03-14T22:26:09.000000Z\",\n\t\t\t\"upperBound\" : 0,\n\t\t\t\"lowerBound\"
97
- : 0,\n\t\t\t\"trailingStop\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173822590,\n\t\t\t\"instrument\"
98
- : \"USD_JPY\",\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"type\"
99
- : \"limit\",\n\t\t\t\"time\" : \"2016-03-14T21:24:48.000000Z\",\n\t\t\t\"price\"
100
- : 113.665,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"expiry\"
101
- : \"2016-03-14T22:24:48.000000Z\",\n\t\t\t\"upperBound\" : 0,\n\t\t\t\"lowerBound\"
102
- : 0,\n\t\t\t\"trailingStop\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173768333,\n\t\t\t\"instrument\"
103
- : \"USD_JPY\",\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"type\"
104
- : \"limit\",\n\t\t\t\"time\" : \"2016-03-14T20:57:58.000000Z\",\n\t\t\t\"price\"
105
- : 113.695,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"expiry\"
106
- : \"2016-03-14T21:57:58.000000Z\",\n\t\t\t\"upperBound\" : 0,\n\t\t\t\"lowerBound\"
107
- : 0,\n\t\t\t\"trailingStop\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173764680,\n\t\t\t\"instrument\"
108
- : \"USD_JPY\",\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"type\"
109
- : \"limit\",\n\t\t\t\"time\" : \"2016-03-14T20:56:57.000000Z\",\n\t\t\t\"price\"
110
- : 113.695,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"expiry\"
111
- : \"2016-03-14T21:56:56.000000Z\",\n\t\t\t\"upperBound\" : 0,\n\t\t\t\"lowerBound\"
112
- : 0,\n\t\t\t\"trailingStop\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173700793,\n\t\t\t\"instrument\"
113
- : \"USD_JPY\",\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"type\"
114
- : \"limit\",\n\t\t\t\"time\" : \"2016-03-14T20:38:59.000000Z\",\n\t\t\t\"price\"
115
- : 113.686,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"expiry\"
116
- : \"2016-03-14T21:38:59.000000Z\",\n\t\t\t\"upperBound\" : 0,\n\t\t\t\"lowerBound\"
93
+ : \"limit\",\n\t\t\t\"time\" : \"2018-01-08T18:01:11.000000Z\",\n\t\t\t\"price\"
94
+ : 112.981,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"expiry\"
95
+ : \"2018-01-08T19:01:21.000000Z\",\n\t\t\t\"upperBound\" : 0,\n\t\t\t\"lowerBound\"
117
96
  : 0,\n\t\t\t\"trailingStop\" : 0\n\t\t}\n\t]\n}"
118
97
  http_version:
119
- recorded_at: Mon, 14 Mar 2016 21:30:16 GMT
120
- recorded_with: VCR 2.9.3
98
+ recorded_at: Mon, 08 Jan 2018 18:26:42 GMT
99
+ recorded_with: VCR 4.0.0
@@ -14,31 +14,33 @@ http_interactions:
14
14
  Connection:
15
15
  - keep-alive
16
16
  Keep-Alive:
17
- - 30
17
+ - '30'
18
18
  response:
19
19
  status:
20
20
  code: 200
21
21
  message: OK
22
22
  headers:
23
23
  Server:
24
- - openresty/1.7.0.1
24
+ - openresty/1.9.15.1
25
25
  Date:
26
- - Mon, 14 Mar 2016 23:06:51 GMT
26
+ - Mon, 08 Jan 2018 18:26:32 GMT
27
27
  Content-Type:
28
28
  - application/json
29
29
  Content-Length:
30
30
  - '275'
31
31
  Connection:
32
32
  - keep-alive
33
+ Access-Control-Allow-Origin:
34
+ - "*"
33
35
  body:
34
36
  encoding: UTF-8
35
- string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"time\" : \"2016-03-14T23:06:51.000000Z\",\n\t\"price\"
36
- : 113.808,\n\t\"tradeOpened\" : {\n\t\t\"id\" : 10173950011,\n\t\t\"units\"
37
+ string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"time\" : \"2018-01-08T18:26:32.000000Z\",\n\t\"price\"
38
+ : 113.076,\n\t\"tradeOpened\" : {\n\t\t\"id\" : 10903628502,\n\t\t\"units\"
37
39
  : 10000,\n\t\t\"side\" : \"buy\",\n\t\t\"takeProfit\" : 0,\n\t\t\"stopLoss\"
38
40
  : 0,\n\t\t\"trailingStop\" : 0\n\t},\n\t\"tradesClosed\" : [],\n\t\"tradeReduced\"
39
41
  : {}\n}"
40
42
  http_version:
41
- recorded_at: Mon, 14 Mar 2016 23:06:52 GMT
43
+ recorded_at: Mon, 08 Jan 2018 18:26:43 GMT
42
44
  - request:
43
45
  method: get
44
46
  uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/positions
@@ -53,30 +55,32 @@ http_interactions:
53
55
  Connection:
54
56
  - keep-alive
55
57
  Keep-Alive:
56
- - 30
58
+ - '30'
57
59
  response:
58
60
  status:
59
61
  code: 200
60
62
  message: OK
61
63
  headers:
62
64
  Server:
63
- - openresty/1.7.0.1
65
+ - openresty/1.9.15.1
64
66
  Date:
65
- - Mon, 14 Mar 2016 23:06:51 GMT
67
+ - Mon, 08 Jan 2018 18:26:33 GMT
66
68
  Content-Type:
67
69
  - application/json
68
70
  Content-Length:
69
- - '225'
71
+ - '224'
70
72
  Connection:
71
73
  - keep-alive
72
74
  Etag:
73
- - '"49ac24a6a1860af627db2171ba7e6e8e9157d1a6"'
75
+ - '"5cb16ea8a3401e97d3615abc481a0c5e09749991"'
76
+ Access-Control-Allow-Origin:
77
+ - "*"
74
78
  body:
75
79
  encoding: UTF-8
76
80
  string: "{\n\t\"positions\" : [\n\t\t{\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"units\"
77
- : 240000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"avgPrice\" : 1.10998\n\t\t},\n\t\t{\n\t\t\t\"instrument\"
81
+ : 280000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"avgPrice\" : 1.1224\n\t\t},\n\t\t{\n\t\t\t\"instrument\"
78
82
  : \"USD_JPY\",\n\t\t\t\"units\" : 70000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"avgPrice\"
79
- : 113.626\n\t\t}\n\t]\n}"
83
+ : 113.093\n\t\t}\n\t]\n}"
80
84
  http_version:
81
- recorded_at: Mon, 14 Mar 2016 23:06:52 GMT
82
- recorded_with: VCR 2.9.3
85
+ recorded_at: Mon, 08 Jan 2018 18:26:43 GMT
86
+ recorded_with: VCR 4.0.0
@@ -14,31 +14,33 @@ http_interactions:
14
14
  Connection:
15
15
  - keep-alive
16
16
  Keep-Alive:
17
- - 30
17
+ - '30'
18
18
  response:
19
19
  status:
20
20
  code: 200
21
21
  message: OK
22
22
  headers:
23
23
  Server:
24
- - openresty/1.7.0.1
24
+ - openresty/1.9.15.1
25
25
  Date:
26
- - Mon, 14 Mar 2016 23:07:12 GMT
26
+ - Mon, 08 Jan 2018 18:26:33 GMT
27
27
  Content-Type:
28
28
  - application/json
29
29
  Content-Length:
30
30
  - '275'
31
31
  Connection:
32
32
  - keep-alive
33
+ Access-Control-Allow-Origin:
34
+ - "*"
33
35
  body:
34
36
  encoding: UTF-8
35
- string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"time\" : \"2016-03-14T23:07:12.000000Z\",\n\t\"price\"
36
- : 113.808,\n\t\"tradeOpened\" : {\n\t\t\"id\" : 10173950329,\n\t\t\"units\"
37
+ string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"time\" : \"2018-01-08T18:26:33.000000Z\",\n\t\"price\"
38
+ : 113.076,\n\t\"tradeOpened\" : {\n\t\t\"id\" : 10903628505,\n\t\t\"units\"
37
39
  : 10000,\n\t\t\"side\" : \"buy\",\n\t\t\"takeProfit\" : 0,\n\t\t\"stopLoss\"
38
40
  : 0,\n\t\t\"trailingStop\" : 0\n\t},\n\t\"tradesClosed\" : [],\n\t\"tradeReduced\"
39
41
  : {}\n}"
40
42
  http_version:
41
- recorded_at: Mon, 14 Mar 2016 23:07:13 GMT
43
+ recorded_at: Mon, 08 Jan 2018 18:26:44 GMT
42
44
  - request:
43
45
  method: get
44
46
  uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/positions/USD_JPY
@@ -53,16 +55,16 @@ http_interactions:
53
55
  Connection:
54
56
  - keep-alive
55
57
  Keep-Alive:
56
- - 30
58
+ - '30'
57
59
  response:
58
60
  status:
59
61
  code: 200
60
62
  message: OK
61
63
  headers:
62
64
  Server:
63
- - openresty/1.7.0.1
65
+ - openresty/1.9.15.1
64
66
  Date:
65
- - Mon, 14 Mar 2016 23:07:13 GMT
67
+ - Mon, 08 Jan 2018 18:26:33 GMT
66
68
  Content-Type:
67
69
  - application/json
68
70
  Content-Length:
@@ -70,13 +72,15 @@ http_interactions:
70
72
  Connection:
71
73
  - keep-alive
72
74
  Etag:
73
- - '"15aab39b117c6e00dd1b0e27623c3f4f83433ae3"'
75
+ - '"8cade1a35e948b3fe73b44a6c89f770a59a66498"'
76
+ Access-Control-Allow-Origin:
77
+ - "*"
74
78
  body:
75
79
  encoding: UTF-8
76
80
  string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"units\" : 90000,\n\t\"side\"
77
- : \"buy\",\n\t\"avgPrice\" : 113.666\n}"
81
+ : \"buy\",\n\t\"avgPrice\" : 113.089\n}"
78
82
  http_version:
79
- recorded_at: Mon, 14 Mar 2016 23:07:14 GMT
83
+ recorded_at: Mon, 08 Jan 2018 18:26:44 GMT
80
84
  - request:
81
85
  method: delete
82
86
  uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/positions/USD_JPY
@@ -91,28 +95,30 @@ http_interactions:
91
95
  Connection:
92
96
  - keep-alive
93
97
  Keep-Alive:
94
- - 30
98
+ - '30'
95
99
  response:
96
100
  status:
97
101
  code: 200
98
102
  message: OK
99
103
  headers:
100
104
  Server:
101
- - openresty/1.7.0.1
105
+ - openresty/1.9.15.1
102
106
  Date:
103
- - Mon, 14 Mar 2016 23:07:13 GMT
107
+ - Mon, 08 Jan 2018 18:26:33 GMT
104
108
  Content-Type:
105
109
  - application/json
106
110
  Content-Length:
107
- - '355'
111
+ - '356'
108
112
  Connection:
109
113
  - keep-alive
114
+ Access-Control-Allow-Origin:
115
+ - "*"
110
116
  body:
111
117
  encoding: UTF-8
112
- string: "{\n\t\"ids\" : [\n\t\t10173144073,\n\t\t10173950335,\n\t\t10173144214,\n\t\t10173950336,\n\t\t10173144402,\n\t\t10173950337,\n\t\t10173144640,\n\t\t10173950338,\n\t\t10173144902,\n\t\t10173950339,\n\t\t10173145109,\n\t\t10173950340,\n\t\t10173950011,\n\t\t10173950341,\n\t\t10173950020,\n\t\t10173950342,\n\t\t10173950329,\n\t\t10173950343\n\t],\n\t\"instrument\"
113
- : \"USD_JPY\",\n\t\"totalUnits\" : 90000,\n\t\"price\" : 113.79\n}"
118
+ string: "{\n\t\"ids\" : [\n\t\t10903622607,\n\t\t10903628506,\n\t\t10903622611,\n\t\t10903628507,\n\t\t10903622618,\n\t\t10903628508,\n\t\t10903622620,\n\t\t10903628509,\n\t\t10903622625,\n\t\t10903628510,\n\t\t10903622626,\n\t\t10903628511,\n\t\t10903628502,\n\t\t10903628512,\n\t\t10903628503,\n\t\t10903628513,\n\t\t10903628505,\n\t\t10903628514\n\t],\n\t\"instrument\"
119
+ : \"USD_JPY\",\n\t\"totalUnits\" : 90000,\n\t\"price\" : 113.064\n}"
114
120
  http_version:
115
- recorded_at: Mon, 14 Mar 2016 23:07:14 GMT
121
+ recorded_at: Mon, 08 Jan 2018 18:26:44 GMT
116
122
  - request:
117
123
  method: get
118
124
  uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/positions
@@ -127,28 +133,30 @@ http_interactions:
127
133
  Connection:
128
134
  - keep-alive
129
135
  Keep-Alive:
130
- - 30
136
+ - '30'
131
137
  response:
132
138
  status:
133
139
  code: 200
134
140
  message: OK
135
141
  headers:
136
142
  Server:
137
- - openresty/1.7.0.1
143
+ - openresty/1.9.15.1
138
144
  Date:
139
- - Mon, 14 Mar 2016 23:07:13 GMT
145
+ - Mon, 08 Jan 2018 18:26:33 GMT
140
146
  Content-Type:
141
147
  - application/json
142
148
  Content-Length:
143
- - '124'
149
+ - '123'
144
150
  Connection:
145
151
  - keep-alive
146
152
  Etag:
147
- - '"649a0c7f2e066fd94ae3b834ae2557b91aed7dbf"'
153
+ - '"a2e0154b6b5d56267df3c2f2d28d8a0a3d0d8fc2"'
154
+ Access-Control-Allow-Origin:
155
+ - "*"
148
156
  body:
149
157
  encoding: UTF-8
150
158
  string: "{\n\t\"positions\" : [\n\t\t{\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"units\"
151
- : 240000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"avgPrice\" : 1.10998\n\t\t}\n\t]\n}"
159
+ : 280000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"avgPrice\" : 1.1224\n\t\t}\n\t]\n}"
152
160
  http_version:
153
- recorded_at: Mon, 14 Mar 2016 23:07:14 GMT
154
- recorded_with: VCR 2.9.3
161
+ recorded_at: Mon, 08 Jan 2018 18:26:44 GMT
162
+ recorded_with: VCR 4.0.0
@@ -14,31 +14,33 @@ http_interactions:
14
14
  Connection:
15
15
  - keep-alive
16
16
  Keep-Alive:
17
- - 30
17
+ - '30'
18
18
  response:
19
19
  status:
20
20
  code: 200
21
21
  message: OK
22
22
  headers:
23
23
  Server:
24
- - openresty/1.7.0.1
24
+ - openresty/1.9.15.1
25
25
  Date:
26
- - Mon, 14 Mar 2016 23:06:51 GMT
26
+ - Mon, 08 Jan 2018 18:26:33 GMT
27
27
  Content-Type:
28
28
  - application/json
29
29
  Content-Length:
30
30
  - '275'
31
31
  Connection:
32
32
  - keep-alive
33
+ Access-Control-Allow-Origin:
34
+ - "*"
33
35
  body:
34
36
  encoding: UTF-8
35
- string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"time\" : \"2016-03-14T23:06:51.000000Z\",\n\t\"price\"
36
- : 113.808,\n\t\"tradeOpened\" : {\n\t\t\"id\" : 10173950020,\n\t\t\"units\"
37
+ string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"time\" : \"2018-01-08T18:26:33.000000Z\",\n\t\"price\"
38
+ : 113.076,\n\t\"tradeOpened\" : {\n\t\t\"id\" : 10903628503,\n\t\t\"units\"
37
39
  : 10000,\n\t\t\"side\" : \"buy\",\n\t\t\"takeProfit\" : 0,\n\t\t\"stopLoss\"
38
40
  : 0,\n\t\t\"trailingStop\" : 0\n\t},\n\t\"tradesClosed\" : [],\n\t\"tradeReduced\"
39
41
  : {}\n}"
40
42
  http_version:
41
- recorded_at: Mon, 14 Mar 2016 23:06:52 GMT
43
+ recorded_at: Mon, 08 Jan 2018 18:26:44 GMT
42
44
  - request:
43
45
  method: get
44
46
  uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/positions/USD_JPY
@@ -53,16 +55,16 @@ http_interactions:
53
55
  Connection:
54
56
  - keep-alive
55
57
  Keep-Alive:
56
- - 30
58
+ - '30'
57
59
  response:
58
60
  status:
59
61
  code: 200
60
62
  message: OK
61
63
  headers:
62
64
  Server:
63
- - openresty/1.7.0.1
65
+ - openresty/1.9.15.1
64
66
  Date:
65
- - Mon, 14 Mar 2016 23:06:51 GMT
67
+ - Mon, 08 Jan 2018 18:26:33 GMT
66
68
  Content-Type:
67
69
  - application/json
68
70
  Content-Length:
@@ -70,11 +72,13 @@ http_interactions:
70
72
  Connection:
71
73
  - keep-alive
72
74
  Etag:
73
- - '"c4db4750bb723e7c523d935a49d104b6ce3ca9c3"'
75
+ - '"de8884e346ed6cf6f97ceede0f186e8c77a71a50"'
76
+ Access-Control-Allow-Origin:
77
+ - "*"
74
78
  body:
75
79
  encoding: UTF-8
76
80
  string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"units\" : 80000,\n\t\"side\"
77
- : \"buy\",\n\t\"avgPrice\" : 113.648\n}"
81
+ : \"buy\",\n\t\"avgPrice\" : 113.091\n}"
78
82
  http_version:
79
- recorded_at: Mon, 14 Mar 2016 23:06:52 GMT
80
- recorded_with: VCR 2.9.3
83
+ recorded_at: Mon, 08 Jan 2018 18:26:44 GMT
84
+ recorded_with: VCR 4.0.0
@@ -14,16 +14,16 @@ http_interactions:
14
14
  Connection:
15
15
  - keep-alive
16
16
  Keep-Alive:
17
- - 30
17
+ - '30'
18
18
  response:
19
19
  status:
20
20
  code: 200
21
21
  message: OK
22
22
  headers:
23
23
  Server:
24
- - openresty/1.7.0.1
24
+ - openresty/1.9.15.1
25
25
  Date:
26
- - Mon, 14 Mar 2016 23:03:28 GMT
26
+ - Mon, 08 Jan 2018 18:26:34 GMT
27
27
  Content-Type:
28
28
  - application/json
29
29
  Content-Length:
@@ -31,14 +31,16 @@ http_interactions:
31
31
  Connection:
32
32
  - keep-alive
33
33
  Etag:
34
- - '"177bb030c2194c2df4c4f7f8d4f99811bdf01a6f"'
34
+ - '"a0cf5f370a6f3748496539f4f398266a40b82b54"'
35
+ Access-Control-Allow-Origin:
36
+ - "*"
35
37
  body:
36
38
  encoding: UTF-8
37
39
  string: "{\n\t\"prices\" : [\n\t\t{\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
38
- : \"2016-03-14T23:03:07.128564Z\",\n\t\t\t\"bid\" : 1.11027,\n\t\t\t\"ask\"
39
- : 1.11045\n\t\t},\n\t\t{\n\t\t\t\"instrument\" : \"EUR_CAD\",\n\t\t\t\"time\"
40
- : \"2016-03-14T23:03:25.938983Z\",\n\t\t\t\"bid\" : 1.47282,\n\t\t\t\"ask\"
41
- : 1.47319\n\t\t}\n\t]\n}"
40
+ : \"2018-01-08T18:26:31.344805Z\",\n\t\t\t\"bid\" : 1.19674,\n\t\t\t\"ask\"
41
+ : 1.19686\n\t\t},\n\t\t{\n\t\t\t\"instrument\" : \"EUR_CAD\",\n\t\t\t\"time\"
42
+ : \"2018-01-08T18:26:28.478165Z\",\n\t\t\t\"bid\" : 1.48652,\n\t\t\t\"ask\"
43
+ : 1.48673\n\t\t}\n\t]\n}"
42
44
  http_version:
43
- recorded_at: Mon, 14 Mar 2016 23:03:29 GMT
44
- recorded_with: VCR 2.9.3
45
+ recorded_at: Mon, 08 Jan 2018 18:26:44 GMT
46
+ recorded_with: VCR 4.0.0