credmark.cmf.types.price.PriceWithQuote
- DTO class PriceWithQuote(*, price=0.0, src=None, quoteAddress)[source]
Bases:
Price
Show JSON schema
{ "title": "PriceWithQuote", "type": "object", "properties": { "price": { "title": "Price", "description": "Value of one Token", "default": 0.0, "type": "number" }, "src": { "title": "Src", "description": "Source", "type": "string" }, "quoteAddress": { "title": "Quoteaddress", "description": "The address of quoted currency", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "format": "evm-address" } }, "required": [ "quoteAddress" ], "examples": [ { "price": 4.2, "quoteAddress": "0x0000000000000000000000000000000000000348" }, { "price": 4.2, "src": "uniswap-v3", "quoteAddress": "0x0000000000000000000000000000000000000348" } ] }
- Config
schema_extra: dict = {‘examples’: [{‘price’: 4.2, ‘quoteAddress’: ‘0x0000000000000000000000000000000000000348’}, {‘price’: 4.2, ‘src’: ‘uniswap-v3’, ‘quoteAddress’: ‘0x0000000000000000000000000000000000000348’}]}
- Fields
- Parameters
- Return type
None
- field quoteAddress: Address [Required]
The address of quoted currency
- Constraints
type = string
pattern = ^0x[a-fA-F0-9]{40}$
format = evm-address
- cross(other)[source]
- Parameters
other (PriceWithQuote) –