{"$id":"https://cowswap.exchange/schemas/app-data/v0.10.0.json","$schema":"http://json-schema.org/draft-07/schema","description":"Metadata JSON document for adding information to orders.","required":["version","metadata"],"title":"AppData Root Schema","type":"object","additionalProperties":false,"properties":{"version":{"readOnly":true,"default":"0.10.0","$id":"#/definitions/version","description":"Semantic versioning of document.","examples":["1.0.0","1.2.3"],"title":"Version","type":"string"},"appCode":{"$id":"#/properties/appCode","description":"The code identifying the CLI, UI, service generating the order.","examples":["CoW Swap"],"title":"App Code","type":"string"},"environment":{"$id":"#/properties/environment","description":"Environment from which the order came from.","title":"Environment","type":"string","examples":["production","development","staging","ens"]},"metadata":{"$id":"#/properties/metadata","default":{},"description":"Each metadata will specify one aspect of the order.","required":[],"title":"Metadata","type":"object","additionalProperties":false,"properties":{"signer":{"$id":"#signer/v0.1.0.json","$schema":"http://json-schema.org/draft-07/schema","title":"Signer","description":"The address of the trader who signs the CoW Swap order. This field should normally be omitted; it is recommended to use it if the signer is a smart-contract wallet using EIP-1271 signatures.","pattern":"^0x[a-fA-F0-9]{40}$","examples":["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],"type":"string"},"referrer":{"$id":"#referrer/v0.2.0.json","$schema":"http://json-schema.org/draft-07/schema","required":["address"],"title":"Referrer","type":"object","additionalProperties":false,"properties":{"address":{"title":"Referrer address","$id":"#/definitions/ethereumAddress","pattern":"^0x[a-fA-F0-9]{40}$","examples":["0xb6BAd41ae76A11D10f7b0E664C5007b908bC77C9"],"type":"string"}}},"utm":{"$id":"#utm/v0.2.0.json","$schema":"http://json-schema.org/draft-07/schema","required":[],"title":"UTM Codes","type":"object","additionalProperties":false,"properties":{"utmSource":{"$id":"#/properties/utmSource","title":"UTM Source","type":"string","examples":["twitter"],"description":"Tracks in which medium the traffic originated from (twitter, facebook, etc.)"},"utmMedium":{"$id":"#/properties/utmMedium","title":"UTM Medium","type":"string","examples":["email"],"description":"Tracks in which medium the traffic originated from (mail, CPC, social, etc.)"},"utmCampaign":{"$id":"#/properties/utmCampagin","title":"UTM Campaign","type":"string","examples":["everyone-loves-cows-2023"],"description":"Track the performance of a specific campaign"},"utmContent":{"$id":"#/properties/utmContent","title":"UTM Content","type":"string","examples":["big-fat-button"],"description":"Track which link was clicked"},"utmTerm":{"$id":"#/properties/utmTem","title":"UTM Keyword Term","type":"string","examples":["coincidence+of+wants"],"description":"Track which keyword term a website visitor came from"}}},"quote":{"$id":"#quote/v0.3.0.json","$schema":"http://json-schema.org/draft-07/schema","required":["slippageBips"],"title":"Quote","type":"object","additionalProperties":false,"properties":{"slippageBips":{"$id":"#/properties/slippageBips","title":"Slippage Bips","description":"Slippage tolerance that was applied to the order to get the limit price. Expressed in Basis Points (BPS)","examples":["5","10","20","100"],"pattern":"^\\d+(\\.\\d+)?$","type":"string"}}},"orderClass":{"$id":"#orderClass/v0.3.0.json","$schema":"http://json-schema.org/draft-07/schema","required":["orderClass"],"title":"Order class","type":"object","additionalProperties":false,"properties":{"orderClass":{"$id":"#/definitions/orderClass","description":"Indicator of the order class.","examples":["market","limit","liquidity","twap"],"title":"Order class","type":"string","enum":["market","limit","liquidity","twap"]}}},"hooks":{"$id":"#hooks/v0.1.0.json","$schema":"http://json-schema.org/draft-07/schema","default":{},"required":[],"title":"Order interaction hooks","description":"Optional Pre and Post order interaction hooks attached to a single order","type":"object","additionalProperties":false,"properties":{"version":{"$ref":"#/properties/version","readOnly":true,"default":"0.1.0"},"pre":{"$id":"#/properties/hooks/pre","title":"Pre-Hooks","description":"CoW Hooks to call before an order executes","type":"array","items":{"$id":"#hook/v0.1.0.json","$schema":"http://json-schema.org/draft-07/schema","required":["target","callData","gasLimit"],"title":"CoW Hook","type":"object","additionalProperties":false,"properties":{"target":{"$ref":"#/properties/metadata/properties/referrer/properties/address","title":"Hook Target","description":"The contract to call for the hook"},"callData":{"$id":"#/properties/callData","title":"Hook CallData","description":"The calldata to use when calling the hook","type":"string","pattern":"^0x[a-fA-F0-9]*$","examples":["0x","0x01020304"]},"gasLimit":{"title":"Hook Gas Limit","description":"The gas limit (in gas units) for the hook","$id":"#/definitions/bigNumber","pattern":"^\\d+$","examples":["90741097240912730913","0","75891372"],"type":"string"}}}},"post":{"$id":"#/properties/hooks/post","title":"Post-Hooks","description":"CoW Hooks to call after an order executes","type":"array","items":{"$ref":"#/properties/metadata/properties/hooks/properties/pre/items"}}}}}}}}