Files

2.5 KiB

Perp Prices

Rate limits

  • 1200 requests/min or 200 requests/10secs per IP address. (weight = 2)

{% hint style="info" %} See more details in API Rate limits {% endhint %}

Single Product

Request

{% tabs %} {% tab title="Perp Prices" %} POST [ARCHIVE_ENDPOINT]

Body

{
  "price": {
    "product_id": 2
  }
}

{% endtab %} {% endtabs %}

Request Parameters

ParameterTypeRequiredDescription
product_idnumberYesId of perp product to fetch prices for.

Response

{
  "product_id": 2,
  "index_price_x18": "28180063400000000000000",
  "mark_price_x18": "28492853627394637978665",
  "update_time": "1680734493"
}

Multiple Products

Request

{% tabs %} {% tab title="Perp Prices" %} POST [ARCHIVE_ENDPOINT]

Body

{
  "perp_prices": {
    "product_ids": [2]
  }
}

{% endtab %} {% endtabs %}

Request Parameters

ParameterTypeRequiredDescription
product_idsnumber[]YesIds of perp products to fetch prices for.

Response

{% hint style="info" %} Note: the response is a map of product_id -> perp_prices for each requested product. {% endhint %}

{
  "2": {
    "product_id": 2,
    "index_price_x18": "31483202055051853950444",
    "mark_price_x18": "31514830401018841708801",
    "update_time": "1689281222"
  }
}

Response Fields

Field name Description
product_id Id of the perp product.
index_price_x18 Latest index price of the perp product, multiplied by 10^18.
mark_price_x18 Latest mark price of the perp product, multiplied by 10^18.
update_time Epoch time in seconds the perp prices were last updated at.