credmark.cmf.types.compose.MapBlockTimeSeriesInput

DTO class MapBlockTimeSeriesInput(*, endTimestamp, interval, count, exclusive=False, modelInput=None, modelSlug, modelVersion=None)[source]

Bases: BaseModel

Input for the compose.map-block-time-series model.

Show JSON schema
{
   "title": "MapBlockTimeSeriesInput",
   "description": "Input for the compose.map-block-time-series model.",
   "type": "object",
   "properties": {
      "endTimestamp": {
         "title": "Endtimestamp",
         "description": "End timestamp of block series, inclusive unless exclusive is True",
         "type": "integer"
      },
      "interval": {
         "title": "Interval",
         "description": "Series interval in seconds",
         "type": "integer"
      },
      "count": {
         "title": "Count",
         "description": "Number of intervals in the series.",
         "type": "integer"
      },
      "exclusive": {
         "title": "Exclusive",
         "description": "If true, blocks are exclusive of end timestamp",
         "default": false,
         "type": "boolean"
      },
      "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": [
      "endTimestamp",
      "interval",
      "count",
      "modelSlug"
   ],
   "examples": [
      {
         "modelSlug": "price.quote",
         "modelInput": {
            "base": {
               "address": "0xD533a949740bb3306d119CC777fa900bA034cd52"
            }
         },
         "endTimestamp": 1645446694,
         "interval": 86400,
         "count": 3,
         "exclusive": true
      }
   ],
   "definitions": {
      "BaseModel": {
         "title": "BaseModel",
         "type": "object",
         "properties": {}
      }
   }
}

Config
  • schema_extra: dict = {‘examples’: [{‘modelSlug’: ‘price.quote’, ‘modelInput’: {‘base’: {‘address’: ‘0xD533a949740bb3306d119CC777fa900bA034cd52’}}, ‘endTimestamp’: 1645446694, ‘interval’: 86400, ‘count’: 3, ‘exclusive’: True}]}

Fields
Parameters
Return type

None

field count: int [Required]

Number of intervals in the series.

field endTimestamp: int [Required]

End timestamp of block series, inclusive unless exclusive is True

field exclusive: Optional[bool] = False

If true, blocks are exclusive of end timestamp

field interval: int [Required]

Series interval in seconds

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.