Request

Using Interactive Docs

Head over to the run function in the interactive docs. Press the “Try it out” button and copy-paste this request body:

{
  "slug": "price.dex-blended",
  "chainId": 1,
  "blockNumber": "latest",
  "input": {"address" : "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9"}
}

The slug is the unique ID for the model. The input block includes any model-specific parameters. In this case the model only requires one parameter, address, the value is the contract address of the AAVE token.

All models are documented here. In order to find this pricing model, select the “price” category to find all of the available pricing models. In this case, we selected the first one (first as of this writing!) with the slug “price.dex-blended”. This is where we found the required input parameters.

Note that an optional parameter, version, can be used to call a specific version of the model. This should rarely if ever be used. Omitting this parameter guaranties that the most up-to-date version of the model is run.

Using cURL

curl -X 'POST' \
  'https://gateway.credmark.com/v1/model/run' \
  -H 'Authorization: Bearer <API key>' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "slug": "price.dex-blended",
  "chainId": 1,
  "blockNumber": "latest",
  "input": {"address" : "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9"}
}'

Last updated