Obtain a list of all currently available materials. The response shows only materials (e.g. Gold) and contains all the data available in assets endpoint, plus some specific data available only for materials.

HTTP Request:

GET /available/materials

Example of successful response:

{
  "success": true,
  "data": {
    "count": 2,
    "list": [
      {
        "code": "XAG",
        "name": "Silver Ounce",
        "decimalPlaces": 2,
        "symbol": "Ag",
        "ounces": "1",
        "grams": "28.349523125"
      },
      {
        "code": "XAU",
        "name": "Gold Ounce",
        "decimalPlaces": 2,
        "symbol": "Au",
        "ounces": "1",
        "grams": "28.349523125"
      }
    ]
  }
}
FieldTypeDescription
“success”BooleanHTTP Request is successful, if it’s false you have to handle the error
“data”Object
“data”, “count”IntegerLength of the result list
“data”, “list”ArrayResult list
“data”, “list”, <element>, “code”StringListing code of the material
“data”, “list”, <element>, “name”StringName of the material
“data”, “list”, <element>, “decimalPlaces”IntegerMinimum subunit of the material
“data”, “list”, <element>, “symbol”StringGraphic symbol of the material
“data”, “list”, <element>, “ounces”Decimal stringWeight in ounces of the material
“data”, “list”, <element>, “grams”Decimal stringWeight in grams of the material

⚠️ The decimal values are passed as strings to avoid loss of precision during the data transfer and JSON decode. You could parse them into a floating point value, but we advise you to use something like BigInteger.