convert

Per-gram gold price by karat purity

Per-gram XAU price for karats 24 / 22 / 21 / 20 / 18 / 16 / 14 / 10.

Logic: per_gram_24k = spot_xau_usd_per_oz / GRAMS_PER_TROY_OUNCE * fx_rate; per_gram_Nk = per_gram_24k * N/24.

Historical date support is not implemented; omit the param or use /v1/prices/history + do the math client-side.

get/v1/carat

Query parameters

currencystring

Quote currency (default USD).

Quote currency (default USD).

Response

Successful Response

currencystring required
timestampstring required
price_gram_24kstring required

Price value as Decimal (up to 8 decimal places). JSON-serialized as a string by Pydantic to avoid float drift; callers should parse with Decimal(), not float().

price_gram_22kstring required

Price value as Decimal (up to 8 decimal places). JSON-serialized as a string by Pydantic to avoid float drift; callers should parse with Decimal(), not float().

price_gram_21kstring required

Price value as Decimal (up to 8 decimal places). JSON-serialized as a string by Pydantic to avoid float drift; callers should parse with Decimal(), not float().

price_gram_20kstring required

Price value as Decimal (up to 8 decimal places). JSON-serialized as a string by Pydantic to avoid float drift; callers should parse with Decimal(), not float().

price_gram_18kstring required

Price value as Decimal (up to 8 decimal places). JSON-serialized as a string by Pydantic to avoid float drift; callers should parse with Decimal(), not float().

price_gram_16kstring required

Price value as Decimal (up to 8 decimal places). JSON-serialized as a string by Pydantic to avoid float drift; callers should parse with Decimal(), not float().

price_gram_14kstring required

Price value as Decimal (up to 8 decimal places). JSON-serialized as a string by Pydantic to avoid float drift; callers should parse with Decimal(), not float().

price_gram_10kstring required

Price value as Decimal (up to 8 decimal places). JSON-serialized as a string by Pydantic to avoid float drift; callers should parse with Decimal(), not float().

Changes

Changed in 1 of the 8 revisions of this API.818

  • b7c4b36e1fa1818See the full diff
    • the response property message became optional for the status 400

      response-property-became-optional

    • the response property message became optional for the status 401

      response-property-became-optional

    • the response property message became optional for the status 429

      response-property-became-optional

    • the response property message became optional for the status 503

      response-property-became-optional

    • response property message list-of-types was widened by adding types null to media type application/json of response 400

      response-property-list-of-types-widened

    • response property message list-of-types was widened by adding types null to media type application/json of response 401

      response-property-list-of-types-widened

    • response property message list-of-types was widened by adding types null to media type application/json of response 429

      response-property-list-of-types-widened

    • response property message list-of-types was widened by adding types null to media type application/json of response 503

      response-property-list-of-types-widened

    • removed the optional property detail from the response with the 422 status

      response-optional-property-removed

    • the endpoint scheme security ApiKeyAuth was added to the API

      api-security-added

    • the endpoint scheme security BearerAuth was added to the API

      api-security-added

    • added the non-success response with the status 500

      response-non-success-status-added

    • removed the non-success response with the status 403

      response-non-success-status-removed

    • removed the non-success response with the status 404

      response-non-success-status-removed

    • added the required property details to the response with the 422 status

      response-required-property-added

    • added the required property error to the response with the 422 status

      response-required-property-added

    • added the required property message to the response with the 422 status

      response-required-property-added

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog