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
@@ -0,0 +1,443 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api-fxpractice.oanda.com/v1/accounts
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Accept-Datetime-Format:
11
+ - RFC3339
12
+ Authorization:
13
+ - Bearer <OANDA_TESTING_API_TOKEN>
14
+ Connection:
15
+ - keep-alive
16
+ Keep-Alive:
17
+ - '30'
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - openresty/1.9.15.1
25
+ Date:
26
+ - Mon, 08 Jan 2018 18:26:35 GMT
27
+ Content-Type:
28
+ - application/json
29
+ Content-Length:
30
+ - '366'
31
+ Connection:
32
+ - keep-alive
33
+ Etag:
34
+ - '"efb224b14d5e6c03ab1a19a9983274e09d124b20"'
35
+ Access-Control-Allow-Origin:
36
+ - "*"
37
+ body:
38
+ encoding: UTF-8
39
+ string: "{\n\t\"accounts\" : [\n\t\t{\n\t\t\t\"accountId\" : 1871900,\n\t\t\t\"accountName\"
40
+ : \"Primary\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\"
41
+ : 0.05\n\t\t},\n\t\t{\n\t\t\t\"accountId\" : 1401515,\n\t\t\t\"accountName\"
42
+ : \"USD\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\" : 0.1\n\t\t},\n\t\t{\n\t\t\t\"accountId\"
43
+ : 5094848,\n\t\t\t\"accountName\" : \"WTI\",\n\t\t\t\"accountCurrency\" :
44
+ \"CAD\",\n\t\t\t\"marginRate\" : 0.05\n\t\t}\n\t]\n}"
45
+ http_version:
46
+ recorded_at: Mon, 08 Jan 2018 18:26:46 GMT
47
+ - request:
48
+ method: get
49
+ uri: https://api-fxpractice.oanda.com/v1/accounts
50
+ body:
51
+ encoding: US-ASCII
52
+ string: ''
53
+ headers:
54
+ X-Accept-Datetime-Format:
55
+ - RFC3339
56
+ Authorization:
57
+ - Bearer <OANDA_TESTING_API_TOKEN>
58
+ Connection:
59
+ - keep-alive
60
+ Keep-Alive:
61
+ - '30'
62
+ response:
63
+ status:
64
+ code: 200
65
+ message: OK
66
+ headers:
67
+ Server:
68
+ - openresty/1.9.15.1
69
+ Date:
70
+ - Mon, 08 Jan 2018 18:26:36 GMT
71
+ Content-Type:
72
+ - application/json
73
+ Content-Length:
74
+ - '366'
75
+ Connection:
76
+ - keep-alive
77
+ Etag:
78
+ - '"efb224b14d5e6c03ab1a19a9983274e09d124b20"'
79
+ Access-Control-Allow-Origin:
80
+ - "*"
81
+ body:
82
+ encoding: UTF-8
83
+ string: "{\n\t\"accounts\" : [\n\t\t{\n\t\t\t\"accountId\" : 1871900,\n\t\t\t\"accountName\"
84
+ : \"Primary\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\"
85
+ : 0.05\n\t\t},\n\t\t{\n\t\t\t\"accountId\" : 1401515,\n\t\t\t\"accountName\"
86
+ : \"USD\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\" : 0.1\n\t\t},\n\t\t{\n\t\t\t\"accountId\"
87
+ : 5094848,\n\t\t\t\"accountName\" : \"WTI\",\n\t\t\t\"accountCurrency\" :
88
+ \"CAD\",\n\t\t\t\"marginRate\" : 0.05\n\t\t}\n\t]\n}"
89
+ http_version:
90
+ recorded_at: Mon, 08 Jan 2018 18:26:47 GMT
91
+ - request:
92
+ method: get
93
+ uri: https://api-fxpractice.oanda.com/v1/accounts
94
+ body:
95
+ encoding: US-ASCII
96
+ string: ''
97
+ headers:
98
+ X-Accept-Datetime-Format:
99
+ - RFC3339
100
+ Authorization:
101
+ - Bearer <OANDA_TESTING_API_TOKEN>
102
+ Connection:
103
+ - keep-alive
104
+ Keep-Alive:
105
+ - '30'
106
+ response:
107
+ status:
108
+ code: 200
109
+ message: OK
110
+ headers:
111
+ Server:
112
+ - openresty/1.9.15.1
113
+ Date:
114
+ - Mon, 08 Jan 2018 18:26:36 GMT
115
+ Content-Type:
116
+ - application/json
117
+ Content-Length:
118
+ - '366'
119
+ Connection:
120
+ - keep-alive
121
+ Etag:
122
+ - '"efb224b14d5e6c03ab1a19a9983274e09d124b20"'
123
+ Access-Control-Allow-Origin:
124
+ - "*"
125
+ body:
126
+ encoding: UTF-8
127
+ string: "{\n\t\"accounts\" : [\n\t\t{\n\t\t\t\"accountId\" : 1871900,\n\t\t\t\"accountName\"
128
+ : \"Primary\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\"
129
+ : 0.05\n\t\t},\n\t\t{\n\t\t\t\"accountId\" : 1401515,\n\t\t\t\"accountName\"
130
+ : \"USD\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\" : 0.1\n\t\t},\n\t\t{\n\t\t\t\"accountId\"
131
+ : 5094848,\n\t\t\t\"accountName\" : \"WTI\",\n\t\t\t\"accountCurrency\" :
132
+ \"CAD\",\n\t\t\t\"marginRate\" : 0.05\n\t\t}\n\t]\n}"
133
+ http_version:
134
+ recorded_at: Mon, 08 Jan 2018 18:26:47 GMT
135
+ - request:
136
+ method: get
137
+ uri: https://api-fxpractice.oanda.com/v1/accounts
138
+ body:
139
+ encoding: US-ASCII
140
+ string: ''
141
+ headers:
142
+ X-Accept-Datetime-Format:
143
+ - RFC3339
144
+ Authorization:
145
+ - Bearer <OANDA_TESTING_API_TOKEN>
146
+ Connection:
147
+ - keep-alive
148
+ Keep-Alive:
149
+ - '30'
150
+ response:
151
+ status:
152
+ code: 200
153
+ message: OK
154
+ headers:
155
+ Server:
156
+ - openresty/1.9.15.1
157
+ Date:
158
+ - Mon, 08 Jan 2018 18:26:37 GMT
159
+ Content-Type:
160
+ - application/json
161
+ Content-Length:
162
+ - '366'
163
+ Connection:
164
+ - keep-alive
165
+ Etag:
166
+ - '"efb224b14d5e6c03ab1a19a9983274e09d124b20"'
167
+ Access-Control-Allow-Origin:
168
+ - "*"
169
+ body:
170
+ encoding: UTF-8
171
+ string: "{\n\t\"accounts\" : [\n\t\t{\n\t\t\t\"accountId\" : 1871900,\n\t\t\t\"accountName\"
172
+ : \"Primary\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\"
173
+ : 0.05\n\t\t},\n\t\t{\n\t\t\t\"accountId\" : 1401515,\n\t\t\t\"accountName\"
174
+ : \"USD\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\" : 0.1\n\t\t},\n\t\t{\n\t\t\t\"accountId\"
175
+ : 5094848,\n\t\t\t\"accountName\" : \"WTI\",\n\t\t\t\"accountCurrency\" :
176
+ \"CAD\",\n\t\t\t\"marginRate\" : 0.05\n\t\t}\n\t]\n}"
177
+ http_version:
178
+ recorded_at: Mon, 08 Jan 2018 18:26:48 GMT
179
+ - request:
180
+ method: get
181
+ uri: https://api-fxpractice.oanda.com/v1/accounts
182
+ body:
183
+ encoding: US-ASCII
184
+ string: ''
185
+ headers:
186
+ X-Accept-Datetime-Format:
187
+ - RFC3339
188
+ Authorization:
189
+ - Bearer <OANDA_TESTING_API_TOKEN>
190
+ Connection:
191
+ - keep-alive
192
+ Keep-Alive:
193
+ - '30'
194
+ response:
195
+ status:
196
+ code: 200
197
+ message: OK
198
+ headers:
199
+ Server:
200
+ - openresty/1.9.15.1
201
+ Date:
202
+ - Mon, 08 Jan 2018 18:26:37 GMT
203
+ Content-Type:
204
+ - application/json
205
+ Content-Length:
206
+ - '366'
207
+ Connection:
208
+ - keep-alive
209
+ Etag:
210
+ - '"efb224b14d5e6c03ab1a19a9983274e09d124b20"'
211
+ Access-Control-Allow-Origin:
212
+ - "*"
213
+ body:
214
+ encoding: UTF-8
215
+ string: "{\n\t\"accounts\" : [\n\t\t{\n\t\t\t\"accountId\" : 1871900,\n\t\t\t\"accountName\"
216
+ : \"Primary\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\"
217
+ : 0.05\n\t\t},\n\t\t{\n\t\t\t\"accountId\" : 1401515,\n\t\t\t\"accountName\"
218
+ : \"USD\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\" : 0.1\n\t\t},\n\t\t{\n\t\t\t\"accountId\"
219
+ : 5094848,\n\t\t\t\"accountName\" : \"WTI\",\n\t\t\t\"accountCurrency\" :
220
+ \"CAD\",\n\t\t\t\"marginRate\" : 0.05\n\t\t}\n\t]\n}"
221
+ http_version:
222
+ recorded_at: Mon, 08 Jan 2018 18:26:48 GMT
223
+ - request:
224
+ method: get
225
+ uri: https://api-fxpractice.oanda.com/v1/accounts
226
+ body:
227
+ encoding: US-ASCII
228
+ string: ''
229
+ headers:
230
+ X-Accept-Datetime-Format:
231
+ - RFC3339
232
+ Authorization:
233
+ - Bearer <OANDA_TESTING_API_TOKEN>
234
+ Connection:
235
+ - keep-alive
236
+ Keep-Alive:
237
+ - '30'
238
+ response:
239
+ status:
240
+ code: 200
241
+ message: OK
242
+ headers:
243
+ Server:
244
+ - openresty/1.9.15.1
245
+ Date:
246
+ - Mon, 08 Jan 2018 18:26:38 GMT
247
+ Content-Type:
248
+ - application/json
249
+ Content-Length:
250
+ - '366'
251
+ Connection:
252
+ - keep-alive
253
+ Etag:
254
+ - '"efb224b14d5e6c03ab1a19a9983274e09d124b20"'
255
+ Access-Control-Allow-Origin:
256
+ - "*"
257
+ body:
258
+ encoding: UTF-8
259
+ string: "{\n\t\"accounts\" : [\n\t\t{\n\t\t\t\"accountId\" : 1871900,\n\t\t\t\"accountName\"
260
+ : \"Primary\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\"
261
+ : 0.05\n\t\t},\n\t\t{\n\t\t\t\"accountId\" : 1401515,\n\t\t\t\"accountName\"
262
+ : \"USD\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\" : 0.1\n\t\t},\n\t\t{\n\t\t\t\"accountId\"
263
+ : 5094848,\n\t\t\t\"accountName\" : \"WTI\",\n\t\t\t\"accountCurrency\" :
264
+ \"CAD\",\n\t\t\t\"marginRate\" : 0.05\n\t\t}\n\t]\n}"
265
+ http_version:
266
+ recorded_at: Mon, 08 Jan 2018 18:26:49 GMT
267
+ - request:
268
+ method: get
269
+ uri: https://api-fxpractice.oanda.com/v1/accounts
270
+ body:
271
+ encoding: US-ASCII
272
+ string: ''
273
+ headers:
274
+ X-Accept-Datetime-Format:
275
+ - RFC3339
276
+ Authorization:
277
+ - Bearer <OANDA_TESTING_API_TOKEN>
278
+ Connection:
279
+ - keep-alive
280
+ Keep-Alive:
281
+ - '30'
282
+ response:
283
+ status:
284
+ code: 200
285
+ message: OK
286
+ headers:
287
+ Server:
288
+ - openresty/1.9.15.1
289
+ Date:
290
+ - Mon, 08 Jan 2018 18:26:38 GMT
291
+ Content-Type:
292
+ - application/json
293
+ Content-Length:
294
+ - '366'
295
+ Connection:
296
+ - keep-alive
297
+ Etag:
298
+ - '"efb224b14d5e6c03ab1a19a9983274e09d124b20"'
299
+ Access-Control-Allow-Origin:
300
+ - "*"
301
+ body:
302
+ encoding: UTF-8
303
+ string: "{\n\t\"accounts\" : [\n\t\t{\n\t\t\t\"accountId\" : 1871900,\n\t\t\t\"accountName\"
304
+ : \"Primary\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\"
305
+ : 0.05\n\t\t},\n\t\t{\n\t\t\t\"accountId\" : 1401515,\n\t\t\t\"accountName\"
306
+ : \"USD\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\" : 0.1\n\t\t},\n\t\t{\n\t\t\t\"accountId\"
307
+ : 5094848,\n\t\t\t\"accountName\" : \"WTI\",\n\t\t\t\"accountCurrency\" :
308
+ \"CAD\",\n\t\t\t\"marginRate\" : 0.05\n\t\t}\n\t]\n}"
309
+ http_version:
310
+ recorded_at: Mon, 08 Jan 2018 18:26:49 GMT
311
+ - request:
312
+ method: get
313
+ uri: https://api-fxpractice.oanda.com/v1/accounts
314
+ body:
315
+ encoding: US-ASCII
316
+ string: ''
317
+ headers:
318
+ X-Accept-Datetime-Format:
319
+ - RFC3339
320
+ Authorization:
321
+ - Bearer <OANDA_TESTING_API_TOKEN>
322
+ Connection:
323
+ - keep-alive
324
+ Keep-Alive:
325
+ - '30'
326
+ response:
327
+ status:
328
+ code: 200
329
+ message: OK
330
+ headers:
331
+ Server:
332
+ - openresty/1.9.15.1
333
+ Date:
334
+ - Mon, 08 Jan 2018 18:26:39 GMT
335
+ Content-Type:
336
+ - application/json
337
+ Content-Length:
338
+ - '366'
339
+ Connection:
340
+ - keep-alive
341
+ Etag:
342
+ - '"efb224b14d5e6c03ab1a19a9983274e09d124b20"'
343
+ Access-Control-Allow-Origin:
344
+ - "*"
345
+ body:
346
+ encoding: UTF-8
347
+ string: "{\n\t\"accounts\" : [\n\t\t{\n\t\t\t\"accountId\" : 1871900,\n\t\t\t\"accountName\"
348
+ : \"Primary\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\"
349
+ : 0.05\n\t\t},\n\t\t{\n\t\t\t\"accountId\" : 1401515,\n\t\t\t\"accountName\"
350
+ : \"USD\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\" : 0.1\n\t\t},\n\t\t{\n\t\t\t\"accountId\"
351
+ : 5094848,\n\t\t\t\"accountName\" : \"WTI\",\n\t\t\t\"accountCurrency\" :
352
+ \"CAD\",\n\t\t\t\"marginRate\" : 0.05\n\t\t}\n\t]\n}"
353
+ http_version:
354
+ recorded_at: Mon, 08 Jan 2018 18:26:50 GMT
355
+ - request:
356
+ method: get
357
+ uri: https://api-fxpractice.oanda.com/v1/accounts
358
+ body:
359
+ encoding: US-ASCII
360
+ string: ''
361
+ headers:
362
+ X-Accept-Datetime-Format:
363
+ - RFC3339
364
+ Authorization:
365
+ - Bearer <OANDA_TESTING_API_TOKEN>
366
+ Connection:
367
+ - keep-alive
368
+ Keep-Alive:
369
+ - '30'
370
+ response:
371
+ status:
372
+ code: 200
373
+ message: OK
374
+ headers:
375
+ Server:
376
+ - openresty/1.9.15.1
377
+ Date:
378
+ - Mon, 08 Jan 2018 18:26:39 GMT
379
+ Content-Type:
380
+ - application/json
381
+ Content-Length:
382
+ - '366'
383
+ Connection:
384
+ - keep-alive
385
+ Etag:
386
+ - '"efb224b14d5e6c03ab1a19a9983274e09d124b20"'
387
+ Access-Control-Allow-Origin:
388
+ - "*"
389
+ body:
390
+ encoding: UTF-8
391
+ string: "{\n\t\"accounts\" : [\n\t\t{\n\t\t\t\"accountId\" : 1871900,\n\t\t\t\"accountName\"
392
+ : \"Primary\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\"
393
+ : 0.05\n\t\t},\n\t\t{\n\t\t\t\"accountId\" : 1401515,\n\t\t\t\"accountName\"
394
+ : \"USD\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\" : 0.1\n\t\t},\n\t\t{\n\t\t\t\"accountId\"
395
+ : 5094848,\n\t\t\t\"accountName\" : \"WTI\",\n\t\t\t\"accountCurrency\" :
396
+ \"CAD\",\n\t\t\t\"marginRate\" : 0.05\n\t\t}\n\t]\n}"
397
+ http_version:
398
+ recorded_at: Mon, 08 Jan 2018 18:26:50 GMT
399
+ - request:
400
+ method: get
401
+ uri: https://api-fxpractice.oanda.com/v1/accounts
402
+ body:
403
+ encoding: US-ASCII
404
+ string: ''
405
+ headers:
406
+ X-Accept-Datetime-Format:
407
+ - RFC3339
408
+ Authorization:
409
+ - Bearer <OANDA_TESTING_API_TOKEN>
410
+ Connection:
411
+ - keep-alive
412
+ Keep-Alive:
413
+ - '30'
414
+ response:
415
+ status:
416
+ code: 200
417
+ message: OK
418
+ headers:
419
+ Server:
420
+ - openresty/1.9.15.1
421
+ Date:
422
+ - Mon, 08 Jan 2018 18:26:40 GMT
423
+ Content-Type:
424
+ - application/json
425
+ Content-Length:
426
+ - '366'
427
+ Connection:
428
+ - keep-alive
429
+ Etag:
430
+ - '"efb224b14d5e6c03ab1a19a9983274e09d124b20"'
431
+ Access-Control-Allow-Origin:
432
+ - "*"
433
+ body:
434
+ encoding: UTF-8
435
+ string: "{\n\t\"accounts\" : [\n\t\t{\n\t\t\t\"accountId\" : 1871900,\n\t\t\t\"accountName\"
436
+ : \"Primary\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\"
437
+ : 0.05\n\t\t},\n\t\t{\n\t\t\t\"accountId\" : 1401515,\n\t\t\t\"accountName\"
438
+ : \"USD\",\n\t\t\t\"accountCurrency\" : \"USD\",\n\t\t\t\"marginRate\" : 0.1\n\t\t},\n\t\t{\n\t\t\t\"accountId\"
439
+ : 5094848,\n\t\t\t\"accountName\" : \"WTI\",\n\t\t\t\"accountCurrency\" :
440
+ \"CAD\",\n\t\t\t\"marginRate\" : 0.05\n\t\t}\n\t]\n}"
441
+ http_version:
442
+ recorded_at: Mon, 08 Jan 2018 18:26:51 GMT
443
+ 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 16:23:39 GMT
26
+ - Mon, 08 Jan 2018 18:26:41 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
- - '"01b82f3f9c73b53655860ad76ce02ed086b60f0c"'
34
+ - '"f31dec3261edd9030df81dc0ba69fe5a9d4e2fc9"'
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-14T16:23:38.477982Z\",\n\t\t\t\"bid\" : 1.11149,\n\t\t\t\"ask\"
39
- : 1.11162\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]\n}"
40
42
  http_version:
41
- recorded_at: Mon, 14 Mar 2016 16:23:39 GMT
43
+ recorded_at: Mon, 08 Jan 2018 18:26:52 GMT
42
44
  - request:
43
45
  method: get
44
46
  uri: https://api-fxpractice.oanda.com/v1/prices?instruments=EUR_USD
@@ -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 16:23:40 GMT
67
+ - Mon, 08 Jan 2018 18:26:42 GMT
66
68
  Content-Type:
67
69
  - application/json
68
70
  Content-Length:
@@ -70,14 +72,16 @@ http_interactions:
70
72
  Connection:
71
73
  - keep-alive
72
74
  Etag:
73
- - '"01b82f3f9c73b53655860ad76ce02ed086b60f0c"'
75
+ - '"f31dec3261edd9030df81dc0ba69fe5a9d4e2fc9"'
76
+ Access-Control-Allow-Origin:
77
+ - "*"
74
78
  body:
75
79
  encoding: UTF-8
76
80
  string: "{\n\t\"prices\" : [\n\t\t{\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
77
- : \"2016-03-14T16:23:38.477982Z\",\n\t\t\t\"bid\" : 1.11149,\n\t\t\t\"ask\"
78
- : 1.11162\n\t\t}\n\t]\n}"
81
+ : \"2018-01-08T18:26:31.344805Z\",\n\t\t\t\"bid\" : 1.19674,\n\t\t\t\"ask\"
82
+ : 1.19686\n\t\t}\n\t]\n}"
79
83
  http_version:
80
- recorded_at: Mon, 14 Mar 2016 16:23:40 GMT
84
+ recorded_at: Mon, 08 Jan 2018 18:26:52 GMT
81
85
  - request:
82
86
  method: get
83
87
  uri: https://api-fxpractice.oanda.com/v1/prices?instruments=EUR_USD
@@ -92,16 +96,16 @@ http_interactions:
92
96
  Connection:
93
97
  - keep-alive
94
98
  Keep-Alive:
95
- - 30
99
+ - '30'
96
100
  response:
97
101
  status:
98
102
  code: 200
99
103
  message: OK
100
104
  headers:
101
105
  Server:
102
- - openresty/1.7.0.1
106
+ - openresty/1.9.15.1
103
107
  Date:
104
- - Mon, 14 Mar 2016 16:23:40 GMT
108
+ - Mon, 08 Jan 2018 18:26:43 GMT
105
109
  Content-Type:
106
110
  - application/json
107
111
  Content-Length:
@@ -109,14 +113,16 @@ http_interactions:
109
113
  Connection:
110
114
  - keep-alive
111
115
  Etag:
112
- - '"01b82f3f9c73b53655860ad76ce02ed086b60f0c"'
116
+ - '"f31dec3261edd9030df81dc0ba69fe5a9d4e2fc9"'
117
+ Access-Control-Allow-Origin:
118
+ - "*"
113
119
  body:
114
120
  encoding: UTF-8
115
121
  string: "{\n\t\"prices\" : [\n\t\t{\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
116
- : \"2016-03-14T16:23:38.477982Z\",\n\t\t\t\"bid\" : 1.11149,\n\t\t\t\"ask\"
117
- : 1.11162\n\t\t}\n\t]\n}"
122
+ : \"2018-01-08T18:26:31.344805Z\",\n\t\t\t\"bid\" : 1.19674,\n\t\t\t\"ask\"
123
+ : 1.19686\n\t\t}\n\t]\n}"
118
124
  http_version:
119
- recorded_at: Mon, 14 Mar 2016 16:23:40 GMT
125
+ recorded_at: Mon, 08 Jan 2018 18:26:54 GMT
120
126
  - request:
121
127
  method: get
122
128
  uri: https://api-fxpractice.oanda.com/v1/prices?instruments=EUR_USD
@@ -131,16 +137,16 @@ http_interactions:
131
137
  Connection:
132
138
  - keep-alive
133
139
  Keep-Alive:
134
- - 30
140
+ - '30'
135
141
  response:
136
142
  status:
137
143
  code: 200
138
144
  message: OK
139
145
  headers:
140
146
  Server:
141
- - openresty/1.7.0.1
147
+ - openresty/1.9.15.1
142
148
  Date:
143
- - Mon, 14 Mar 2016 16:23:41 GMT
149
+ - Mon, 08 Jan 2018 18:26:43 GMT
144
150
  Content-Type:
145
151
  - application/json
146
152
  Content-Length:
@@ -148,14 +154,16 @@ http_interactions:
148
154
  Connection:
149
155
  - keep-alive
150
156
  Etag:
151
- - '"01b82f3f9c73b53655860ad76ce02ed086b60f0c"'
157
+ - '"f31dec3261edd9030df81dc0ba69fe5a9d4e2fc9"'
158
+ Access-Control-Allow-Origin:
159
+ - "*"
152
160
  body:
153
161
  encoding: UTF-8
154
162
  string: "{\n\t\"prices\" : [\n\t\t{\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
155
- : \"2016-03-14T16:23:38.477982Z\",\n\t\t\t\"bid\" : 1.11149,\n\t\t\t\"ask\"
156
- : 1.11162\n\t\t}\n\t]\n}"
163
+ : \"2018-01-08T18:26:31.344805Z\",\n\t\t\t\"bid\" : 1.19674,\n\t\t\t\"ask\"
164
+ : 1.19686\n\t\t}\n\t]\n}"
157
165
  http_version:
158
- recorded_at: Mon, 14 Mar 2016 16:23:40 GMT
166
+ recorded_at: Mon, 08 Jan 2018 18:26:54 GMT
159
167
  - request:
160
168
  method: get
161
169
  uri: https://api-fxpractice.oanda.com/v1/prices?instruments=EUR_USD
@@ -170,31 +178,33 @@ http_interactions:
170
178
  Connection:
171
179
  - keep-alive
172
180
  Keep-Alive:
173
- - 30
181
+ - '30'
174
182
  response:
175
183
  status:
176
184
  code: 200
177
185
  message: OK
178
186
  headers:
179
187
  Server:
180
- - openresty/1.7.0.1
188
+ - openresty/1.9.15.1
181
189
  Date:
182
- - Mon, 14 Mar 2016 16:23:41 GMT
190
+ - Mon, 08 Jan 2018 18:26:43 GMT
183
191
  Content-Type:
184
192
  - application/json
185
193
  Content-Length:
186
- - '138'
194
+ - '139'
187
195
  Connection:
188
196
  - keep-alive
189
197
  Etag:
190
- - '"e04ddc2bcbd6de4403009d272f707a35bcb871bb"'
198
+ - '"f31dec3261edd9030df81dc0ba69fe5a9d4e2fc9"'
199
+ Access-Control-Allow-Origin:
200
+ - "*"
191
201
  body:
192
202
  encoding: UTF-8
193
203
  string: "{\n\t\"prices\" : [\n\t\t{\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
194
- : \"2016-03-14T16:23:41.519333Z\",\n\t\t\t\"bid\" : 1.11147,\n\t\t\t\"ask\"
195
- : 1.1116\n\t\t}\n\t]\n}"
204
+ : \"2018-01-08T18:26:31.344805Z\",\n\t\t\t\"bid\" : 1.19674,\n\t\t\t\"ask\"
205
+ : 1.19686\n\t\t}\n\t]\n}"
196
206
  http_version:
197
- recorded_at: Mon, 14 Mar 2016 16:23:41 GMT
207
+ recorded_at: Mon, 08 Jan 2018 18:26:54 GMT
198
208
  - request:
199
209
  method: get
200
210
  uri: https://api-fxpractice.oanda.com/v1/prices?instruments=EUR_USD
@@ -209,29 +219,31 @@ http_interactions:
209
219
  Connection:
210
220
  - keep-alive
211
221
  Keep-Alive:
212
- - 30
222
+ - '30'
213
223
  response:
214
224
  status:
215
225
  code: 200
216
226
  message: OK
217
227
  headers:
218
228
  Server:
219
- - openresty/1.7.0.1
229
+ - openresty/1.9.15.1
220
230
  Date:
221
- - Mon, 14 Mar 2016 16:23:42 GMT
231
+ - Mon, 08 Jan 2018 18:26:44 GMT
222
232
  Content-Type:
223
233
  - application/json
224
234
  Content-Length:
225
- - '138'
235
+ - '139'
226
236
  Connection:
227
237
  - keep-alive
228
238
  Etag:
229
- - '"e04ddc2bcbd6de4403009d272f707a35bcb871bb"'
239
+ - '"f31dec3261edd9030df81dc0ba69fe5a9d4e2fc9"'
240
+ Access-Control-Allow-Origin:
241
+ - "*"
230
242
  body:
231
243
  encoding: UTF-8
232
244
  string: "{\n\t\"prices\" : [\n\t\t{\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
233
- : \"2016-03-14T16:23:41.519333Z\",\n\t\t\t\"bid\" : 1.11147,\n\t\t\t\"ask\"
234
- : 1.1116\n\t\t}\n\t]\n}"
245
+ : \"2018-01-08T18:26:31.344805Z\",\n\t\t\t\"bid\" : 1.19674,\n\t\t\t\"ask\"
246
+ : 1.19686\n\t\t}\n\t]\n}"
235
247
  http_version:
236
- recorded_at: Mon, 14 Mar 2016 16:23:41 GMT
237
- recorded_with: VCR 3.0.1
248
+ recorded_at: Mon, 08 Jan 2018 18:26:55 GMT
249
+ recorded_with: VCR 4.0.0