You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can also implement the api directly in any other way you wish. Full documentation is maintained here: <ahref="https://1forge.com/forex-data-api">https://1forge.com/forex-data-api</a>
115
-
116
-
### Get specific quotes
117
-
#### Request
118
-
```
119
-
GET https://forex.1forge.com/1.0.1/quotes?pairs=EURUSD,GBPJPY,AUDUSD
120
-
```
121
-
122
-
#### Response
123
-
```javascript
124
-
[
125
-
{
126
-
symbol:"AUDUSD",
127
-
timestamp:1496096387,
128
-
price:0.74392,
129
-
},
130
-
{
131
-
symbol:"EURUSD",
132
-
timestamp:1496096387,
133
-
price:1.11383,
134
-
},
135
-
{
136
-
symbol:"GBPJPY",
137
-
timestamp:1496096387,
138
-
price:142.657,
139
-
}
140
-
]
141
-
```
142
-
143
-
144
-
### Get the symbol list
145
-
#### Request
146
-
```
147
-
GET https://forex.1forge.com/1.0.1/symbols
148
-
```
149
-
150
-
#### Response
151
-
```javascript
152
-
[
153
-
"AUDJPY",
154
-
"AUDUSD",
155
-
"CHFJPY",
156
-
"EURAUD",
157
-
"EURCAD",
158
-
"EURCHF",
159
-
"EURGBP",
160
-
"EURJPY",
161
-
"etc..."
162
-
]
163
-
```
164
-
165
-
166
-
### Convert from one currency to another
167
-
#### Request
168
-
```
169
-
GET https://forex.1forge.com/1.0.1/convert?from=USD&to=EUR&quantity=100
170
-
```
171
-
172
-
#### Response
173
-
```javascript
126
+
use OneForge\ForexQuotes\ForexRequest;
174
127
175
-
{
176
-
value:89.3164183,
177
-
text:"100 USD is worth 89.3164183 EUR",
178
-
timestamp:1497186516
179
-
}
128
+
$client = new ForexDataClient('YOUR_API_KEY');
180
129
181
-
```
130
+
/*
131
+
[quota_used] => 53232,
132
+
[quota_limit] => 100000,
133
+
[quota_remaining] => 46768,
134
+
[hours_until_reset] => 11
135
+
136
+
*/
182
137
183
-
### Get the market status
184
-
#### Request
185
-
```
186
-
GET https://forex.1forge.com/1.0.1/market_status
138
+
$client->quota();
187
139
```
188
140
189
-
#### Response
190
-
```javascript
191
141
192
-
{
193
-
market_is_open:true
194
-
}
195
-
196
-
```
197
142
198
143
## Support and Contact
199
144
Please contact me at contact@1forge.com if you have any questions or requests.
0 commit comments