credmark.cmf.types.compose.MapBlocksInput

DTO class MapBlocksInput(*, blockNumbers, modelInput=None, modelSlug, modelVersion=None)[source]

Bases: BaseModel

Input for the compose.map-blocks model.

Show JSON schema
{
   "title": "MapBlocksInput",
   "description": "Input for the compose.map-blocks model.",
   "type": "object",
   "properties": {
      "blockNumbers": {
         "title": "Blocknumbers",
         "description": "List of block numbers. The specified model will be run for each block number.",
         "type": "array",
         "items": {
            "type": "integer"
         }
      },
      "modelInput": {
         "title": "Modelinput",
         "description": "Input for the model run at each block number.",
         "anyOf": [
            {
               "type": "object"
            },
            {
               "$ref": "#/definitions/BaseModel"
            },
            {
               "type": "integer"
            },
            {
               "type": "string"
            },
            {
               "type": "number"
            }
         ]
      },
      "modelSlug": {
         "title": "Modelslug",
         "description": "Slug of model to run at each block number.",
         "type": "string"
      },
      "modelVersion": {
         "title": "Modelversion",
         "description": "Optional version of the model to run. Normally you should not set this.",
         "type": "string"
      }
   },
   "required": [
      "blockNumbers",
      "modelSlug"
   ],
   "examples": [
      {
         "modelSlug": "price.quote",
         "modelInput": {
            "base": {
               "address": "0xD533a949740bb3306d119CC777fa900bA034cd52"
            }
         },
         "blockNumbers": [
            14249443,
            14219443,
            14209443
         ]
      }
   ],
   "definitions": {
      "BaseModel": {
         "title": "BaseModel",
         "type": "object",
         "properties": {}
      }
   }
}

Config
  • schema_extra: dict = {‘examples’: [{‘modelSlug’: ‘price.quote’, ‘modelInput’: {‘base’: {‘address’: ‘0xD533a949740bb3306d119CC777fa900bA034cd52’}}, ‘blockNumbers’: [14249443, 14219443, 14209443]}]}

Fields
Parameters
Return type

None

field blockNumbers: List[BlockNumber] [Required]

List of block numbers. The specified model will be run for each block number.

field modelInput: Optional[Union[dict, BaseModel, IntDTO, StrDTO, FloatDTO]] = None

Input for the model run at each block number.

field modelSlug: str [Required]

Slug of model to run at each block number.

field modelVersion: Optional[str] = None

Optional version of the model to run. Normally you should not set this.