cURL
curl --request GET \
--url 'https://api.fastforex.io/metals/instruments?api_key='import requests
url = "https://api.fastforex.io/metals/instruments?api_key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.fastforex.io/metals/instruments?api_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fastforex.io/metals/instruments?api_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fastforex.io/metals/instruments?api_key="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fastforex.io/metals/instruments?api_key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fastforex.io/metals/instruments?api_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"instruments": {
"XAUAUD": {
"symbol": "XAUAUD",
"alt": "XAU/AUD",
"metal": "XAU",
"name": "Gold",
"category": "precious_metal",
"target": "AUD",
"target_name": "Australian Dollar",
"unit": "oz_t",
"unit_name": "Troy Ounce",
"type": "spot",
"purity": "1000"
},
"XCUUSD": {
"symbol": "XCUUSD",
"alt": "XCU/USD",
"metal": "XCU",
"name": "Copper",
"category": "base_metal",
"grade": "grade_a",
"grade_name": "Grade A",
"grade_min_purity_pct": 99.9935,
"target": "USD",
"target_name": "United States Dollar",
"unit": "metric_tonne",
"unit_name": "Metric Tonne",
"type": "spot"
},
"XAGXAU": {
"symbol": "XAGXAU",
"alt": "XAG/XAU",
"metal": "XAG",
"name": "Silver",
"category": "precious_metal",
"target": "XAU",
"target_name": "Gold",
"type": "ratio"
}
},
"source": "otc_aggregate",
"ms": 12
}Metals
List Metals Instruments
List the tradeable metals instruments, keyed by symbol
GET
/
metals
/
instruments
cURL
curl --request GET \
--url 'https://api.fastforex.io/metals/instruments?api_key='import requests
url = "https://api.fastforex.io/metals/instruments?api_key="
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.fastforex.io/metals/instruments?api_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fastforex.io/metals/instruments?api_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fastforex.io/metals/instruments?api_key="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fastforex.io/metals/instruments?api_key=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fastforex.io/metals/instruments?api_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"instruments": {
"XAUAUD": {
"symbol": "XAUAUD",
"alt": "XAU/AUD",
"metal": "XAU",
"name": "Gold",
"category": "precious_metal",
"target": "AUD",
"target_name": "Australian Dollar",
"unit": "oz_t",
"unit_name": "Troy Ounce",
"type": "spot",
"purity": "1000"
},
"XCUUSD": {
"symbol": "XCUUSD",
"alt": "XCU/USD",
"metal": "XCU",
"name": "Copper",
"category": "base_metal",
"grade": "grade_a",
"grade_name": "Grade A",
"grade_min_purity_pct": 99.9935,
"target": "USD",
"target_name": "United States Dollar",
"unit": "metric_tonne",
"unit_name": "Metric Tonne",
"type": "spot"
},
"XAGXAU": {
"symbol": "XAGXAU",
"alt": "XAG/XAU",
"metal": "XAG",
"name": "Silver",
"category": "precious_metal",
"target": "XAU",
"target_name": "Gold",
"type": "ratio"
}
},
"source": "otc_aggregate",
"ms": 12
}⌘I