oanda_api 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +15 -0
- data/CHANGELOG.md +24 -9
- data/Gemfile +2 -3
- data/README.md +11 -9
- data/lib/oanda_api.rb +1 -0
- data/lib/oanda_api/client/client.rb +13 -7
- data/lib/oanda_api/configuration.rb +57 -24
- data/lib/oanda_api/resource/order.rb +5 -6
- data/lib/oanda_api/resource/transaction.rb +3 -4
- data/lib/oanda_api/resource_collection.rb +4 -2
- data/lib/oanda_api/streaming/request.rb +6 -1
- data/lib/oanda_api/throttling/throttling.rb +105 -0
- data/lib/oanda_api/version.rb +1 -1
- data/oanda_api.gemspec +4 -4
- data/spec/fixtures/vcr_cassettes/accounts_get.yml +7 -5
- data/spec/fixtures/vcr_cassettes/accounts_id_get.yml +18 -14
- data/spec/fixtures/vcr_cassettes/calendar_events_period_get.yml +20 -14
- data/spec/fixtures/vcr_cassettes/calendar_instrument_and_period_get.yml +24 -21
- data/spec/fixtures/vcr_cassettes/calendar_period_get.yml +20 -14
- data/spec/fixtures/vcr_cassettes/candles_options_get.yml +12 -10
- data/spec/fixtures/vcr_cassettes/client_helper_accounts.yml +48 -5
- data/spec/fixtures/vcr_cassettes/instrument_EUR_USD.yml +11 -9
- data/spec/fixtures/vcr_cassettes/instrument_USD_JPY.yml +10 -8
- data/spec/fixtures/vcr_cassettes/instruments_get.yml +25 -19
- data/spec/fixtures/vcr_cassettes/instruments_options_get.yml +8 -6
- data/spec/fixtures/vcr_cassettes/order_id_close.yml +159 -313
- data/spec/fixtures/vcr_cassettes/order_id_get.yml +103 -21
- data/spec/fixtures/vcr_cassettes/order_options_create.yml +9 -7
- data/spec/fixtures/vcr_cassettes/order_options_update.yml +62 -20
- data/spec/fixtures/vcr_cassettes/orders_get.yml +46 -137
- data/spec/fixtures/vcr_cassettes/orders_options_get.yml +29 -50
- data/spec/fixtures/vcr_cassettes/positions_get.yml +19 -15
- data/spec/fixtures/vcr_cassettes/positions_instrument_close.yml +35 -27
- data/spec/fixtures/vcr_cassettes/positions_instrument_get.yml +17 -13
- data/spec/fixtures/vcr_cassettes/prices_options_get.yml +12 -10
- data/spec/fixtures/vcr_cassettes/spread_history_get.yml +17 -13
- data/spec/fixtures/vcr_cassettes/spreads_get.yml +17 -13
- data/spec/fixtures/vcr_cassettes/trade_id_close.yml +115 -52
- data/spec/fixtures/vcr_cassettes/trade_id_get.yml +278 -16
- data/spec/fixtures/vcr_cassettes/trade_options_modify.yml +58 -16
- data/spec/fixtures/vcr_cassettes/trades_filter_get.yml +44 -19
- data/spec/fixtures/vcr_cassettes/trades_get.yml +55 -16
- data/spec/fixtures/vcr_cassettes/transaction_id_get.yml +271 -149
- data/spec/fixtures/vcr_cassettes/transactions_options_get.yml +258 -133
- data/spec/fixtures/vcr_cassettes/with_throttling_and_max_requests_per_second.yml +28 -22
- data/spec/fixtures/vcr_cassettes/with_throttling_new_connections.yml +443 -0
- data/spec/fixtures/vcr_cassettes/with_throttling_with_multiple_threads.yml +57 -45
- data/spec/fixtures/vcr_cassettes/without_throttling.yml +91 -71
- data/spec/oanda_api/configuration_spec.rb +31 -0
- data/spec/oanda_api/examples/request_throttling_spec.rb +39 -4
- data/spec/oanda_api/examples/spread_history_spec.rb +3 -3
- data/spec/oanda_api/resource_collection_spec.rb +9 -0
- data/spec/oanda_api/streaming/client_spec.rb +5 -5
- data/spec/oanda_api/streaming/request_spec.rb +23 -8
- data/spec/spec_helper.rb +0 -3
- data/spec/support/client_helper.rb +6 -2
- metadata +13 -12
- data/spec/fixtures/vcr_cassettes/client_helper_account.yml +0 -45
@@ -14,40 +14,44 @@ 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.
|
24
|
+
- openresty/1.9.15.1
|
25
25
|
Date:
|
26
|
-
-
|
26
|
+
- Mon, 08 Jan 2018 18:26:44 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Content-Length:
|
30
|
-
- '
|
30
|
+
- '132'
|
31
31
|
Connection:
|
32
32
|
- keep-alive
|
33
33
|
Vary:
|
34
34
|
- Accept-Encoding
|
35
35
|
- Accept-Encoding
|
36
36
|
- Content-Type
|
37
|
+
Access-Control-Allow-Headers:
|
38
|
+
- Accept, Authorization, Content-Type, Origin, X-Accept-DateTime-Format, X-HTTP-Method-Override
|
39
|
+
Access-Control-Allow-Methods:
|
40
|
+
- GET, OPTIONS
|
41
|
+
Access-Control-Allow-Origin:
|
42
|
+
- "*"
|
37
43
|
Version:
|
38
44
|
- '0.2'
|
39
45
|
X-Catalyst:
|
40
46
|
- '5.90042'
|
41
47
|
Set-Cookie:
|
42
|
-
- opc_id=
|
43
|
-
|
44
|
-
- opc_id=
|
45
|
-
|
46
|
-
Access-Control-Allow-Origin:
|
47
|
-
- "*"
|
48
|
+
- opc_id=7ACD61F4-F4A1-11E7-B2B7-E17000000000; path=/; Expires=Thu, 06-Jan-2028
|
49
|
+
18:26:44 GMT
|
50
|
+
- opc_id=7ACDB636-F4A1-11E7-A332-D9FA8A8AB6B7; path=/; Expires=Thu, 06-Jan-2028
|
51
|
+
18:26:44 GMT
|
48
52
|
body:
|
49
53
|
encoding: UTF-8
|
50
|
-
string: '{"avg":[[
|
54
|
+
string: '{"avg":[[1515430800,2.06],[1515431700,2.21344]],"min":[[1515430800,1.3],[1515431700,1.4]],"max":[[1515430800,3.2],[1515431700,3.2]]}'
|
51
55
|
http_version:
|
52
|
-
recorded_at:
|
53
|
-
recorded_with: VCR
|
56
|
+
recorded_at: Mon, 08 Jan 2018 18:26:55 GMT
|
57
|
+
recorded_with: VCR 4.0.0
|
@@ -14,40 +14,44 @@ 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.
|
24
|
+
- openresty/1.9.15.1
|
25
25
|
Date:
|
26
|
-
-
|
26
|
+
- Mon, 08 Jan 2018 18:26:44 GMT
|
27
27
|
Content-Type:
|
28
28
|
- application/json
|
29
29
|
Content-Length:
|
30
|
-
- '
|
30
|
+
- '132'
|
31
31
|
Connection:
|
32
32
|
- keep-alive
|
33
33
|
Vary:
|
34
34
|
- Accept-Encoding
|
35
35
|
- Accept-Encoding
|
36
36
|
- Content-Type
|
37
|
+
Access-Control-Allow-Headers:
|
38
|
+
- Accept, Authorization, Content-Type, Origin, X-Accept-DateTime-Format, X-HTTP-Method-Override
|
39
|
+
Access-Control-Allow-Methods:
|
40
|
+
- GET, OPTIONS
|
41
|
+
Access-Control-Allow-Origin:
|
42
|
+
- "*"
|
37
43
|
Version:
|
38
44
|
- '0.2'
|
39
45
|
X-Catalyst:
|
40
46
|
- '5.90042'
|
41
47
|
Set-Cookie:
|
42
|
-
- opc_id=
|
43
|
-
|
44
|
-
- opc_id=
|
45
|
-
|
46
|
-
Access-Control-Allow-Origin:
|
47
|
-
- "*"
|
48
|
+
- opc_id=7AB26C82-F4A1-11E7-AE18-ADCD874E8BEC; path=/; Expires=Thu, 06-Jan-2028
|
49
|
+
18:26:44 GMT
|
50
|
+
- opc_id=7AB27394-F4A1-11E7-ABE7-FD5C9D492137; path=/; Expires=Thu, 06-Jan-2028
|
51
|
+
18:26:44 GMT
|
48
52
|
body:
|
49
53
|
encoding: UTF-8
|
50
|
-
string: '{"avg":[[
|
54
|
+
string: '{"avg":[[1515430800,2.06],[1515431700,2.21344]],"min":[[1515430800,1.3],[1515431700,1.4]],"max":[[1515430800,3.2],[1515431700,3.2]]}'
|
51
55
|
http_version:
|
52
|
-
recorded_at:
|
53
|
-
recorded_with: VCR
|
56
|
+
recorded_at: Mon, 08 Jan 2018 18:26:55 GMT
|
57
|
+
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.
|
24
|
+
- openresty/1.9.15.1
|
25
25
|
Date:
|
26
|
-
- Mon,
|
26
|
+
- Mon, 08 Jan 2018 22:23:08 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\" : \"
|
36
|
-
: 113.
|
37
|
+
string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"time\" : \"2018-01-08T22:23:08.000000Z\",\n\t\"price\"
|
38
|
+
: 113.132,\n\t\"tradeOpened\" : {\n\t\t\"id\" : 10903848924,\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,
|
43
|
+
recorded_at: Mon, 08 Jan 2018 22:23:19 GMT
|
42
44
|
- request:
|
43
45
|
method: get
|
44
46
|
uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/trades?instrument=USD_JPY
|
@@ -53,54 +55,77 @@ 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.
|
65
|
+
- openresty/1.9.15.1
|
64
66
|
Date:
|
65
|
-
- Mon,
|
67
|
+
- Mon, 08 Jan 2018 22:23:08 GMT
|
66
68
|
Content-Type:
|
67
69
|
- application/json
|
68
70
|
Content-Length:
|
69
|
-
- '
|
71
|
+
- '2803'
|
70
72
|
Connection:
|
71
73
|
- keep-alive
|
72
74
|
Access-Control-Expose-Headers:
|
73
75
|
- X-Result-Count
|
74
76
|
Etag:
|
75
|
-
- '"
|
77
|
+
- '"475f9305422461069b7ec77570c1035416be818b"'
|
76
78
|
X-Result-Count:
|
77
|
-
- '
|
79
|
+
- '11'
|
80
|
+
Access-Control-Allow-Origin:
|
81
|
+
- "*"
|
78
82
|
body:
|
79
83
|
encoding: UTF-8
|
80
|
-
string: "{\n\t\"trades\" : [\n\t\t{\n\t\t\t\"id\" :
|
84
|
+
string: "{\n\t\"trades\" : [\n\t\t{\n\t\t\t\"id\" : 10903848924,\n\t\t\t\"units\"
|
81
85
|
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
82
|
-
: \"
|
86
|
+
: \"2018-01-08T22:23:08.000000Z\",\n\t\t\t\"price\" : 113.132,\n\t\t\t\"takeProfit\"
|
83
87
|
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
84
|
-
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" :
|
85
|
-
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"
|
86
|
-
: 113.
|
87
|
-
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" :
|
88
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903848922,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
89
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T22:23:08.000000Z\",\n\t\t\t\"price\"
|
90
|
+
: 113.132,\n\t\t\t\"takeProfit\" : 115.132,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
91
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903848921,\n\t\t\t\"units\"
|
88
92
|
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
89
|
-
: \"
|
93
|
+
: \"2018-01-08T22:23:07.000000Z\",\n\t\t\t\"price\" : 113.132,\n\t\t\t\"takeProfit\"
|
90
94
|
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
91
|
-
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" :
|
92
|
-
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"
|
93
|
-
: 113.
|
94
|
-
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" :
|
95
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903848920,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
96
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T22:23:07.000000Z\",\n\t\t\t\"price\"
|
97
|
+
: 113.132,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
98
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903848918,\n\t\t\t\"units\"
|
95
99
|
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
96
|
-
: \"
|
100
|
+
: \"2018-01-08T22:23:07.000000Z\",\n\t\t\t\"price\" : 113.132,\n\t\t\t\"takeProfit\"
|
101
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
102
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628544,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
103
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T18:26:47.000000Z\",\n\t\t\t\"price\"
|
104
|
+
: 113.076,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
105
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628542,\n\t\t\t\"units\"
|
106
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
107
|
+
: \"2018-01-08T18:26:46.000000Z\",\n\t\t\t\"price\" : 113.076,\n\t\t\t\"takeProfit\"
|
108
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
109
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628540,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
110
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T18:26:46.000000Z\",\n\t\t\t\"price\"
|
111
|
+
: 113.076,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
112
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628539,\n\t\t\t\"units\"
|
113
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
114
|
+
: \"2018-01-08T18:26:45.000000Z\",\n\t\t\t\"price\" : 113.076,\n\t\t\t\"takeProfit\"
|
115
|
+
: 115.076,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
116
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628538,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
117
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T18:26:45.000000Z\",\n\t\t\t\"price\"
|
118
|
+
: 113.076,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
119
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628535,\n\t\t\t\"units\"
|
120
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
121
|
+
: \"2018-01-08T18:26:45.000000Z\",\n\t\t\t\"price\" : 113.076,\n\t\t\t\"takeProfit\"
|
97
122
|
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
98
123
|
: 0\n\t\t}\n\t]\n}"
|
99
124
|
http_version:
|
100
|
-
recorded_at: Mon,
|
125
|
+
recorded_at: Mon, 08 Jan 2018 22:23:19 GMT
|
101
126
|
- request:
|
102
127
|
method: delete
|
103
|
-
uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/trades/
|
128
|
+
uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/trades/10903628535
|
104
129
|
body:
|
105
130
|
encoding: US-ASCII
|
106
131
|
string: ''
|
@@ -112,29 +137,30 @@ http_interactions:
|
|
112
137
|
Connection:
|
113
138
|
- keep-alive
|
114
139
|
Keep-Alive:
|
115
|
-
- 30
|
140
|
+
- '30'
|
116
141
|
response:
|
117
142
|
status:
|
118
143
|
code: 200
|
119
144
|
message: OK
|
120
145
|
headers:
|
121
146
|
Server:
|
122
|
-
- openresty/1.
|
147
|
+
- openresty/1.9.15.1
|
123
148
|
Date:
|
124
|
-
- Mon,
|
149
|
+
- Mon, 08 Jan 2018 22:23:08 GMT
|
125
150
|
Content-Type:
|
126
151
|
- application/json
|
127
152
|
Content-Length:
|
128
|
-
- '
|
153
|
+
- '147'
|
129
154
|
Connection:
|
130
155
|
- keep-alive
|
156
|
+
Access-Control-Allow-Origin:
|
157
|
+
- "*"
|
131
158
|
body:
|
132
159
|
encoding: UTF-8
|
133
|
-
string: "{\n\t\"id\" :
|
134
|
-
|
135
|
-
: \"2016-03-14T23:10:16.000000Z\"\n}"
|
160
|
+
string: "{\n\t\"id\" : 10903848926,\n\t\"price\" : 113.11,\n\t\"profit\" : 3.0053,\n\t\"instrument\"
|
161
|
+
: \"USD_JPY\",\n\t\"side\" : \"buy\",\n\t\"time\" : \"2018-01-08T22:23:08.000000Z\"\n}"
|
136
162
|
http_version:
|
137
|
-
recorded_at: Mon,
|
163
|
+
recorded_at: Mon, 08 Jan 2018 22:23:19 GMT
|
138
164
|
- request:
|
139
165
|
method: get
|
140
166
|
uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/trades
|
@@ -149,44 +175,81 @@ http_interactions:
|
|
149
175
|
Connection:
|
150
176
|
- keep-alive
|
151
177
|
Keep-Alive:
|
152
|
-
- 30
|
178
|
+
- '30'
|
153
179
|
response:
|
154
180
|
status:
|
155
181
|
code: 200
|
156
182
|
message: OK
|
157
183
|
headers:
|
158
184
|
Server:
|
159
|
-
- openresty/1.
|
185
|
+
- openresty/1.9.15.1
|
160
186
|
Date:
|
161
|
-
- Mon,
|
187
|
+
- Mon, 08 Jan 2018 22:23:08 GMT
|
162
188
|
Content-Type:
|
163
189
|
- application/json
|
164
190
|
Content-Length:
|
165
|
-
- '
|
191
|
+
- '9601'
|
166
192
|
Connection:
|
167
193
|
- keep-alive
|
168
194
|
Access-Control-Expose-Headers:
|
169
195
|
- X-Result-Count
|
170
196
|
Etag:
|
171
|
-
- '"
|
197
|
+
- '"34f11d2f884113bd26c487687d53ee1808cb57d6"'
|
172
198
|
X-Result-Count:
|
173
|
-
- '
|
199
|
+
- '38'
|
200
|
+
Access-Control-Allow-Origin:
|
201
|
+
- "*"
|
174
202
|
body:
|
175
203
|
encoding: UTF-8
|
176
|
-
string: "{\n\t\"trades\" : [\n\t\t{\n\t\t\t\"id\" :
|
204
|
+
string: "{\n\t\"trades\" : [\n\t\t{\n\t\t\t\"id\" : 10903848924,\n\t\t\t\"units\"
|
205
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
206
|
+
: \"2018-01-08T22:23:08.000000Z\",\n\t\t\t\"price\" : 113.132,\n\t\t\t\"takeProfit\"
|
207
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
208
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903848922,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
209
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T22:23:08.000000Z\",\n\t\t\t\"price\"
|
210
|
+
: 113.132,\n\t\t\t\"takeProfit\" : 115.132,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
211
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903848921,\n\t\t\t\"units\"
|
177
212
|
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
178
|
-
: \"
|
213
|
+
: \"2018-01-08T22:23:07.000000Z\",\n\t\t\t\"price\" : 113.132,\n\t\t\t\"takeProfit\"
|
179
214
|
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
180
|
-
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" :
|
181
|
-
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"
|
182
|
-
: 113.
|
183
|
-
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" :
|
215
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903848920,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
216
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T22:23:07.000000Z\",\n\t\t\t\"price\"
|
217
|
+
: 113.132,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
218
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903848918,\n\t\t\t\"units\"
|
184
219
|
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
185
|
-
: \"
|
220
|
+
: \"2018-01-08T22:23:07.000000Z\",\n\t\t\t\"price\" : 113.132,\n\t\t\t\"takeProfit\"
|
221
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
222
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628544,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
223
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T18:26:47.000000Z\",\n\t\t\t\"price\"
|
224
|
+
: 113.076,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
225
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628542,\n\t\t\t\"units\"
|
226
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
227
|
+
: \"2018-01-08T18:26:46.000000Z\",\n\t\t\t\"price\" : 113.076,\n\t\t\t\"takeProfit\"
|
228
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
229
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628540,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
230
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T18:26:46.000000Z\",\n\t\t\t\"price\"
|
231
|
+
: 113.076,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
232
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628539,\n\t\t\t\"units\"
|
233
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
234
|
+
: \"2018-01-08T18:26:45.000000Z\",\n\t\t\t\"price\" : 113.076,\n\t\t\t\"takeProfit\"
|
235
|
+
: 115.076,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
236
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628538,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
237
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T18:26:45.000000Z\",\n\t\t\t\"price\"
|
238
|
+
: 113.076,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
239
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628488,\n\t\t\t\"units\"
|
240
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
241
|
+
: \"2018-01-08T18:26:30.000000Z\",\n\t\t\t\"price\" : 1.19683,\n\t\t\t\"takeProfit\"
|
242
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
243
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903622510,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
244
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2018-01-08T18:01:10.000000Z\",\n\t\t\t\"price\"
|
245
|
+
: 1.19754,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
246
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903544469,\n\t\t\t\"units\"
|
247
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
248
|
+
: \"2018-01-08T15:08:50.000000Z\",\n\t\t\t\"price\" : 1.1963,\n\t\t\t\"takeProfit\"
|
186
249
|
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
187
|
-
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" :
|
188
|
-
: \"buy\",\n\t\t\t\"instrument\" : \"
|
189
|
-
:
|
250
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903535167,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
251
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2018-01-08T14:56:35.000000Z\",\n\t\t\t\"price\"
|
252
|
+
: 1.19708,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
190
253
|
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173828244,\n\t\t\t\"units\"
|
191
254
|
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
192
255
|
: \"2016-03-14T21:30:16.000000Z\",\n\t\t\t\"price\" : 1.11036,\n\t\t\t\"takeProfit\"
|
@@ -273,5 +336,5 @@ http_interactions:
|
|
273
336
|
: 1.11223,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
274
337
|
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t}\n\t]\n}"
|
275
338
|
http_version:
|
276
|
-
recorded_at: Mon,
|
277
|
-
recorded_with: VCR
|
339
|
+
recorded_at: Mon, 08 Jan 2018 22:23:19 GMT
|
340
|
+
recorded_with: VCR 4.0.0
|
@@ -14,34 +14,36 @@ 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.
|
24
|
+
- openresty/1.9.15.1
|
25
25
|
Date:
|
26
|
-
- Mon,
|
26
|
+
- Mon, 08 Jan 2018 22:23:07 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\" : \"
|
36
|
-
: 113.
|
37
|
+
string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"time\" : \"2018-01-08T22:23:07.000000Z\",\n\t\"price\"
|
38
|
+
: 113.132,\n\t\"tradeOpened\" : {\n\t\t\"id\" : 10903848921,\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,
|
43
|
+
recorded_at: Mon, 08 Jan 2018 22:23:18 GMT
|
42
44
|
- request:
|
43
45
|
method: get
|
44
|
-
uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/trades/
|
46
|
+
uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/trades/10903848921
|
45
47
|
body:
|
46
48
|
encoding: US-ASCII
|
47
49
|
string: ''
|
@@ -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.
|
65
|
+
- openresty/1.9.15.1
|
64
66
|
Date:
|
65
|
-
- Mon,
|
67
|
+
- Mon, 08 Jan 2018 22:23:08 GMT
|
66
68
|
Content-Type:
|
67
69
|
- application/json
|
68
70
|
Content-Length:
|
@@ -70,13 +72,273 @@ http_interactions:
|
|
70
72
|
Connection:
|
71
73
|
- keep-alive
|
72
74
|
Etag:
|
73
|
-
- '"
|
75
|
+
- '"d272f3ec795bc21d7a71669fd7d483cf5cddd071"'
|
76
|
+
Access-Control-Allow-Origin:
|
77
|
+
- "*"
|
74
78
|
body:
|
75
79
|
encoding: UTF-8
|
76
|
-
string: "{\n\t\"id\" :
|
77
|
-
: \"USD_JPY\",\n\t\"time\" : \"
|
78
|
-
: 113.
|
80
|
+
string: "{\n\t\"id\" : 10903848921,\n\t\"units\" : 10000,\n\t\"side\" : \"buy\",\n\t\"instrument\"
|
81
|
+
: \"USD_JPY\",\n\t\"time\" : \"2018-01-08T22:23:07.000000Z\",\n\t\"price\"
|
82
|
+
: 113.132,\n\t\"takeProfit\" : 0,\n\t\"stopLoss\" : 0,\n\t\"trailingStop\"
|
79
83
|
: 0,\n\t\"trailingAmount\" : 0\n}"
|
80
84
|
http_version:
|
81
|
-
recorded_at: Mon,
|
82
|
-
|
85
|
+
recorded_at: Mon, 08 Jan 2018 22:23:19 GMT
|
86
|
+
- request:
|
87
|
+
method: get
|
88
|
+
uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/trades
|
89
|
+
body:
|
90
|
+
encoding: US-ASCII
|
91
|
+
string: ''
|
92
|
+
headers:
|
93
|
+
X-Accept-Datetime-Format:
|
94
|
+
- RFC3339
|
95
|
+
Authorization:
|
96
|
+
- Bearer <OANDA_TESTING_API_TOKEN>
|
97
|
+
Connection:
|
98
|
+
- keep-alive
|
99
|
+
Keep-Alive:
|
100
|
+
- '30'
|
101
|
+
response:
|
102
|
+
status:
|
103
|
+
code: 200
|
104
|
+
message: OK
|
105
|
+
headers:
|
106
|
+
Server:
|
107
|
+
- openresty/1.9.15.1
|
108
|
+
Date:
|
109
|
+
- Mon, 08 Jan 2018 22:23:42 GMT
|
110
|
+
Content-Type:
|
111
|
+
- application/json
|
112
|
+
Content-Length:
|
113
|
+
- '9601'
|
114
|
+
Connection:
|
115
|
+
- keep-alive
|
116
|
+
Access-Control-Expose-Headers:
|
117
|
+
- X-Result-Count
|
118
|
+
Etag:
|
119
|
+
- '"34f11d2f884113bd26c487687d53ee1808cb57d6"'
|
120
|
+
X-Result-Count:
|
121
|
+
- '38'
|
122
|
+
Access-Control-Allow-Origin:
|
123
|
+
- "*"
|
124
|
+
body:
|
125
|
+
encoding: UTF-8
|
126
|
+
string: "{\n\t\"trades\" : [\n\t\t{\n\t\t\t\"id\" : 10903848924,\n\t\t\t\"units\"
|
127
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
128
|
+
: \"2018-01-08T22:23:08.000000Z\",\n\t\t\t\"price\" : 113.132,\n\t\t\t\"takeProfit\"
|
129
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
130
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903848922,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
131
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T22:23:08.000000Z\",\n\t\t\t\"price\"
|
132
|
+
: 113.132,\n\t\t\t\"takeProfit\" : 115.132,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
133
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903848921,\n\t\t\t\"units\"
|
134
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
135
|
+
: \"2018-01-08T22:23:07.000000Z\",\n\t\t\t\"price\" : 113.132,\n\t\t\t\"takeProfit\"
|
136
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
137
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903848920,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
138
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T22:23:07.000000Z\",\n\t\t\t\"price\"
|
139
|
+
: 113.132,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
140
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903848918,\n\t\t\t\"units\"
|
141
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
142
|
+
: \"2018-01-08T22:23:07.000000Z\",\n\t\t\t\"price\" : 113.132,\n\t\t\t\"takeProfit\"
|
143
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
144
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628544,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
145
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T18:26:47.000000Z\",\n\t\t\t\"price\"
|
146
|
+
: 113.076,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
147
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628542,\n\t\t\t\"units\"
|
148
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
149
|
+
: \"2018-01-08T18:26:46.000000Z\",\n\t\t\t\"price\" : 113.076,\n\t\t\t\"takeProfit\"
|
150
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
151
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628540,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
152
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T18:26:46.000000Z\",\n\t\t\t\"price\"
|
153
|
+
: 113.076,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
154
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628539,\n\t\t\t\"units\"
|
155
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\"
|
156
|
+
: \"2018-01-08T18:26:45.000000Z\",\n\t\t\t\"price\" : 113.076,\n\t\t\t\"takeProfit\"
|
157
|
+
: 115.076,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
158
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628538,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
159
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"USD_JPY\",\n\t\t\t\"time\" : \"2018-01-08T18:26:45.000000Z\",\n\t\t\t\"price\"
|
160
|
+
: 113.076,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
161
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903628488,\n\t\t\t\"units\"
|
162
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
163
|
+
: \"2018-01-08T18:26:30.000000Z\",\n\t\t\t\"price\" : 1.19683,\n\t\t\t\"takeProfit\"
|
164
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
165
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903622510,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
166
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2018-01-08T18:01:10.000000Z\",\n\t\t\t\"price\"
|
167
|
+
: 1.19754,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
168
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903544469,\n\t\t\t\"units\"
|
169
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
170
|
+
: \"2018-01-08T15:08:50.000000Z\",\n\t\t\t\"price\" : 1.1963,\n\t\t\t\"takeProfit\"
|
171
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
172
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10903535167,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
173
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2018-01-08T14:56:35.000000Z\",\n\t\t\t\"price\"
|
174
|
+
: 1.19708,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
175
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173828244,\n\t\t\t\"units\"
|
176
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
177
|
+
: \"2016-03-14T21:30:16.000000Z\",\n\t\t\t\"price\" : 1.11036,\n\t\t\t\"takeProfit\"
|
178
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
179
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173825128,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
180
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2016-03-14T21:27:00.000000Z\",\n\t\t\t\"price\"
|
181
|
+
: 1.11036,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
182
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173824136,\n\t\t\t\"units\"
|
183
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
184
|
+
: \"2016-03-14T21:26:09.000000Z\",\n\t\t\t\"price\" : 1.11035,\n\t\t\t\"takeProfit\"
|
185
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
186
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173822567,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
187
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2016-03-14T21:24:47.000000Z\",\n\t\t\t\"price\"
|
188
|
+
: 1.1104,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
189
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173768275,\n\t\t\t\"units\"
|
190
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
191
|
+
: \"2016-03-14T20:57:57.000000Z\",\n\t\t\t\"price\" : 1.1103,\n\t\t\t\"takeProfit\"
|
192
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
193
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173764645,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
194
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2016-03-14T20:56:56.000000Z\",\n\t\t\t\"price\"
|
195
|
+
: 1.11032,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
196
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173700751,\n\t\t\t\"units\"
|
197
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
198
|
+
: \"2016-03-14T20:38:58.000000Z\",\n\t\t\t\"price\" : 1.11053,\n\t\t\t\"takeProfit\"
|
199
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
200
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173616265,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
201
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2016-03-14T20:13:57.000000Z\",\n\t\t\t\"price\"
|
202
|
+
: 1.11003,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
203
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173604531,\n\t\t\t\"units\"
|
204
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
205
|
+
: \"2016-03-14T20:10:56.000000Z\",\n\t\t\t\"price\" : 1.11001,\n\t\t\t\"takeProfit\"
|
206
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
207
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173601254,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
208
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2016-03-14T20:10:12.000000Z\",\n\t\t\t\"price\"
|
209
|
+
: 1.11001,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
210
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173587446,\n\t\t\t\"units\"
|
211
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
212
|
+
: \"2016-03-14T20:02:10.000000Z\",\n\t\t\t\"price\" : 1.10994,\n\t\t\t\"takeProfit\"
|
213
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
214
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173575480,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
215
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2016-03-14T19:56:28.000000Z\",\n\t\t\t\"price\"
|
216
|
+
: 1.1097,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
217
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173562986,\n\t\t\t\"units\"
|
218
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
219
|
+
: \"2016-03-14T19:47:57.000000Z\",\n\t\t\t\"price\" : 1.10961,\n\t\t\t\"takeProfit\"
|
220
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
221
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173517991,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
222
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2016-03-14T19:17:25.000000Z\",\n\t\t\t\"price\"
|
223
|
+
: 1.10995,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
224
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173515980,\n\t\t\t\"units\"
|
225
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
226
|
+
: \"2016-03-14T19:16:17.000000Z\",\n\t\t\t\"price\" : 1.10989,\n\t\t\t\"takeProfit\"
|
227
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
228
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173506383,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
229
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2016-03-14T19:09:36.000000Z\",\n\t\t\t\"price\"
|
230
|
+
: 1.1098,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
231
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173462314,\n\t\t\t\"units\"
|
232
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
233
|
+
: \"2016-03-14T18:45:23.000000Z\",\n\t\t\t\"price\" : 1.1087,\n\t\t\t\"takeProfit\"
|
234
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
235
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173461655,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
236
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2016-03-14T18:45:04.000000Z\",\n\t\t\t\"price\"
|
237
|
+
: 1.10867,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
238
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173457985,\n\t\t\t\"units\"
|
239
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
240
|
+
: \"2016-03-14T18:42:32.000000Z\",\n\t\t\t\"price\" : 1.10849,\n\t\t\t\"takeProfit\"
|
241
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
242
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173448196,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
243
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2016-03-14T18:36:44.000000Z\",\n\t\t\t\"price\"
|
244
|
+
: 1.10852,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
245
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173432940,\n\t\t\t\"units\"
|
246
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
247
|
+
: \"2016-03-14T18:29:36.000000Z\",\n\t\t\t\"price\" : 1.10842,\n\t\t\t\"takeProfit\"
|
248
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
249
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173140830,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
250
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2016-03-14T16:28:11.000000Z\",\n\t\t\t\"price\"
|
251
|
+
: 1.11119,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
252
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173126524,\n\t\t\t\"units\"
|
253
|
+
: 10000,\n\t\t\t\"side\" : \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
254
|
+
: \"2016-03-14T16:23:33.000000Z\",\n\t\t\t\"price\" : 1.11173,\n\t\t\t\"takeProfit\"
|
255
|
+
: 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\" : 0,\n\t\t\t\"trailingAmount\"
|
256
|
+
: 0\n\t\t},\n\t\t{\n\t\t\t\"id\" : 10173100628,\n\t\t\t\"units\" : 10000,\n\t\t\t\"side\"
|
257
|
+
: \"buy\",\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\" : \"2016-03-14T16:14:43.000000Z\",\n\t\t\t\"price\"
|
258
|
+
: 1.11223,\n\t\t\t\"takeProfit\" : 0,\n\t\t\t\"stopLoss\" : 0,\n\t\t\t\"trailingStop\"
|
259
|
+
: 0,\n\t\t\t\"trailingAmount\" : 0\n\t\t}\n\t]\n}"
|
260
|
+
http_version:
|
261
|
+
recorded_at: Mon, 08 Jan 2018 22:23:53 GMT
|
262
|
+
- request:
|
263
|
+
method: get
|
264
|
+
uri: https://api-fxpractice.oanda.com/v1/prices?instruments=EUR_USD
|
265
|
+
body:
|
266
|
+
encoding: US-ASCII
|
267
|
+
string: ''
|
268
|
+
headers:
|
269
|
+
X-Accept-Datetime-Format:
|
270
|
+
- RFC3339
|
271
|
+
Authorization:
|
272
|
+
- Bearer <OANDA_TESTING_API_TOKEN>
|
273
|
+
Connection:
|
274
|
+
- keep-alive
|
275
|
+
Keep-Alive:
|
276
|
+
- '30'
|
277
|
+
response:
|
278
|
+
status:
|
279
|
+
code: 200
|
280
|
+
message: OK
|
281
|
+
headers:
|
282
|
+
Server:
|
283
|
+
- openresty/1.9.15.1
|
284
|
+
Date:
|
285
|
+
- Tue, 09 Jan 2018 16:02:18 GMT
|
286
|
+
Content-Type:
|
287
|
+
- application/json
|
288
|
+
Content-Length:
|
289
|
+
- '139'
|
290
|
+
Connection:
|
291
|
+
- keep-alive
|
292
|
+
Etag:
|
293
|
+
- '"caf2973d938cdd35ff48cf6b0a3d0b58890db296"'
|
294
|
+
Access-Control-Allow-Origin:
|
295
|
+
- "*"
|
296
|
+
body:
|
297
|
+
encoding: UTF-8
|
298
|
+
string: "{\n\t\"prices\" : [\n\t\t{\n\t\t\t\"instrument\" : \"EUR_USD\",\n\t\t\t\"time\"
|
299
|
+
: \"2018-01-09T16:02:18.372811Z\",\n\t\t\t\"bid\" : 1.19304,\n\t\t\t\"ask\"
|
300
|
+
: 1.19317\n\t\t}\n\t]\n}"
|
301
|
+
http_version:
|
302
|
+
recorded_at: Tue, 09 Jan 2018 16:02:32 GMT
|
303
|
+
- request:
|
304
|
+
method: post
|
305
|
+
uri: https://api-fxpractice.oanda.com/v1/accounts/1871900/orders
|
306
|
+
body:
|
307
|
+
encoding: UTF-8
|
308
|
+
string: instrument=USD_JPY&side=buy&type=market&units=10000
|
309
|
+
headers:
|
310
|
+
X-Accept-Datetime-Format:
|
311
|
+
- RFC3339
|
312
|
+
Authorization:
|
313
|
+
- Bearer <OANDA_TESTING_API_TOKEN>
|
314
|
+
Connection:
|
315
|
+
- keep-alive
|
316
|
+
Keep-Alive:
|
317
|
+
- '30'
|
318
|
+
response:
|
319
|
+
status:
|
320
|
+
code: 200
|
321
|
+
message: OK
|
322
|
+
headers:
|
323
|
+
Server:
|
324
|
+
- openresty/1.9.15.1
|
325
|
+
Date:
|
326
|
+
- Tue, 09 Jan 2018 17:56:44 GMT
|
327
|
+
Content-Type:
|
328
|
+
- application/json
|
329
|
+
Content-Length:
|
330
|
+
- '275'
|
331
|
+
Connection:
|
332
|
+
- keep-alive
|
333
|
+
Access-Control-Allow-Origin:
|
334
|
+
- "*"
|
335
|
+
body:
|
336
|
+
encoding: UTF-8
|
337
|
+
string: "{\n\t\"instrument\" : \"USD_JPY\",\n\t\"time\" : \"2018-01-09T17:56:44.000000Z\",\n\t\"price\"
|
338
|
+
: 112.595,\n\t\"tradeOpened\" : {\n\t\t\"id\" : 10904320061,\n\t\t\"units\"
|
339
|
+
: 10000,\n\t\t\"side\" : \"buy\",\n\t\t\"takeProfit\" : 0,\n\t\t\"stopLoss\"
|
340
|
+
: 0,\n\t\t\"trailingStop\" : 0\n\t},\n\t\"tradesClosed\" : [],\n\t\"tradeReduced\"
|
341
|
+
: {}\n}"
|
342
|
+
http_version:
|
343
|
+
recorded_at: Tue, 09 Jan 2018 17:56:58 GMT
|
344
|
+
recorded_with: VCR 4.0.0
|