# Request on-chain purchase parameters Request on-chain purchase parameters. There parameters contain all necessary data to make a purchase on-chain. It includes tx parameters with signatue. Parameters are valid for 4 hours. Endpoint: POST /domains/{domainName}/parameters/purchase Version: 2.0.0 ## Path parameters: - `domainName` (string, required) Example: "beresnev.crypto" ## Request fields (application/json): - `owner` (object, required) - `owner.address` (string, required) Ethereum address Example: "0x1234567890123456789012345678901234567890" - `records` (object, required) Domain crypto records Example: {"crypto.ETH.address":"0x6EC0DEeD30605Bcd19342f3c30201DB263291589","crypto.BTC.address":"bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"} - `currency` (string, required) Purchase cryptocurrency Enum: "MATIC" ## Response 200 fields (application/json): - `domain` (string) Domain name - `availability` (object) - `availability.status` (string) Availability status Enum: "AVAILABLE", "DISALLOWED" - `availability.price` (object) - `availability.price.listPrice` (object, required) - `availability.price.listPrice.usdCents` (number, required) - `availability.price.subTotal` (object, required) - `tx` (object) - `tx.chainId` (number, required) Chain ID - `tx.function` (string, required) Signature of function for execute on-chain - `tx.arguments` (object, required) - `tx.arguments.owner` (string) Domain owner address - `tx.arguments.expiration` (number) Expiration of purchase parameters - `tx.arguments.labels` (array) Domain labels - `tx.arguments.keys` (array) Domain record keys - `tx.arguments.values` (array) Domain record values - `tx.arguments.price` (string) Domain price in defined cryptocurrency (hex format) - `tx.arguments.signature` (string) Signature of purchase parameters - `tx.params` (object, required) - `tx.params.to` (string, required) Target address - `tx.params.data` (string, required) Transaction data. Decoded data for smart contract function call - `tx.params.value` (string, required) Transaction value (hex format) ## Response 400 fields (application/json): - `error` (object, required) - `error.code` (string) Error code Example: "ERROR_CODE" - `error.message` (string) User friendly description of above code Example: "Error code explanation" - `error.field` (string) Estimate error field Example: "some field" - `error.value` (any) Value of error field Example: "some value" - `error.status` (number) Status code of the response Example: 400 - `constraints` (array,null)