# perpDeploy

## POST /exchange

> Deploying HIP-3 assets.

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid API - exchange/perpDeploy","version":"1.0.0"},"tags":[{"name":"perpDeploy"}],"servers":[{"url":"https://api.hyperliquid.xyz","description":"Mainnet"},{"url":"https://api.hyperliquid-testnet.xyz","description":"Testnet"}],"paths":{"/exchange":{"post":{"tags":["perpDeploy"],"description":"Deploying HIP-3 assets.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"anyOf":[{"type":"object","properties":{"type":{"description":"Type of action.","enum":["perpDeploy"]},"registerAsset2":{"type":"object","properties":{"maxGas":{"anyOf":[{"type":"integer","minimum":0,"nullable":true}],"description":" Max gas in native token wei. If not provided, then uses current deploy auction price."},"assetRequest":{"type":"object","properties":{"coin":{"type":"string","description":"Coin symbol for the new asset."},"szDecimals":{"type":"integer","minimum":0,"description":"Number of decimal places for size."},"oraclePx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Initial oracle price for the asset."},"marginTableId":{"type":"integer","minimum":0,"description":"Margin table identifier for risk management."},"marginMode":{"enum":["strictIsolated","noCross"],"description":"'strictIsolated' does not allow withdrawing of isolated margin from open position."}},"required":["coin","szDecimals","oraclePx","marginTableId","marginMode"],"description":"Contains new asset listing parameters."},"dex":{"type":"string","description":"Name of the dex."},"schema":{"anyOf":[{"type":"object","properties":{"fullName":{"type":"string","description":"Full name of the dex."},"collateralToken":{"type":"integer","minimum":0,"description":"Collateral token index."},"oracleUpdater":{"anyOf":[{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"nullable":true}],"description":"User to update oracles. If not provided, then deployer is assumed to be oracle updater."}},"required":["fullName","collateralToken","oracleUpdater"],"nullable":true}],"description":"Contains new dex parameters."}},"required":["maxGas","assetRequest","dex","schema"],"description":"Parameters for registering a new perpetual asset (v2)."}},"required":["type","registerAsset2"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["perpDeploy"]},"registerAsset":{"type":"object","properties":{"maxGas":{"anyOf":[{"type":"integer","minimum":0,"nullable":true}],"description":"Max gas in native token wei. If not provided, then uses current deploy auction price."},"assetRequest":{"type":"object","properties":{"coin":{"type":"string","description":"Coin symbol for the new asset."},"szDecimals":{"type":"integer","minimum":0,"description":"Number of decimal places for size."},"oraclePx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Initial oracle price for the asset."},"marginTableId":{"type":"integer","minimum":0,"description":"Margin table identifier for risk management."},"onlyIsolated":{"type":"boolean","description":"Whether the asset can only be traded with isolated margin."}},"required":["coin","szDecimals","oraclePx","marginTableId","onlyIsolated"],"description":"Contains new asset listing parameters."},"dex":{"type":"string","description":"Name of the dex."},"schema":{"anyOf":[{"type":"object","properties":{"fullName":{"type":"string","description":"Full name of the dex."},"collateralToken":{"type":"integer","minimum":0,"description":"Collateral token index."},"oracleUpdater":{"anyOf":[{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"nullable":true}],"description":"User to update oracles. If not provided, then deployer is assumed to be oracle updater."}},"required":["fullName","collateralToken","oracleUpdater"],"nullable":true}],"description":"Contains new dex parameters."}},"required":["maxGas","assetRequest","dex","schema"],"description":"Parameters for registering a new perpetual asset."}},"required":["type","registerAsset"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["perpDeploy"]},"setOracle":{"type":"object","properties":{"dex":{"type":"string","minLength":1,"description":"Name of the dex."},"oraclePxs":{"type":"array","items":{"type":"array","items":[{"type":"string"},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"A list (sorted by key) of asset and oracle prices."},"markPxs":{"type":"array","items":{"type":"array","items":{"type":"array","items":[{"type":"string"},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2}},"description":"An outer list of inner lists (inner list sorted by key) of asset and mark prices."},"externalPerpPxs":{"type":"array","items":{"type":"array","items":[{"type":"string"},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"A list (sorted by key) of asset and external prices which prevent sudden mark price deviations."}},"required":["dex","oraclePxs","markPxs","externalPerpPxs"],"description":"Parameters for setting oracle and mark prices for assets."}},"required":["type","setOracle"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["perpDeploy"]},"setFundingMultipliers":{"type":"array","items":{"type":"array","items":[{"type":"string"},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"A list (sorted by key) of asset and funding multiplier."}},"required":["type","setFundingMultipliers"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["perpDeploy"]},"haltTrading":{"type":"object","properties":{"coin":{"type":"string","description":"Coin symbol for the asset to halt or resume."},"isHalted":{"type":"boolean","description":"Whether trading should be halted (true) or resumed (false)."}},"required":["coin","isHalted"],"description":"Parameters for halting or resuming trading for an asset."}},"required":["type","haltTrading"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["perpDeploy"]},"setMarginTableIds":{"type":"array","items":{"type":"array","items":[{"type":"string"},{"type":"integer","minimum":0}],"minItems":2},"description":"A list (sorted by key) of asset and margin table ids."}},"required":["type","setMarginTableIds"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["perpDeploy"]},"setFeeRecipient":{"type":"object","properties":{"dex":{"type":"string","description":"Name of the DEX."},"feeRecipient":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"Address of the fee recipient."}},"required":["dex","feeRecipient"],"description":"Parameters for setting the fee recipient."}},"required":["type","setFeeRecipient"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["perpDeploy"]},"setOpenInterestCaps":{"type":"array","items":{"type":"array","items":[{"type":"string"},{"type":"integer","minimum":0}],"minItems":2},"description":"A list (sorted by key) of asset and open interest cap notionals."}},"required":["type","setOpenInterestCaps"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["perpDeploy"]},"setSubDeployers":{"type":"object","properties":{"dex":{"type":"string","description":"Name of the DEX."},"subDeployers":{"type":"array","items":{"type":"object","properties":{"variant":{"type":"string","description":"Corresponds to a variant of PerpDeployAction."},"user":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42,"description":"Sub-deployer address."},"allowed":{"type":"boolean","description":"Add or remove the subDeployer from the authorized set for the action variant."}},"required":["variant","user","allowed"]},"description":"A modification to sub-deployer permissions."}},"required":["dex","subDeployers"],"description":"A modification to sub-deployer permissions."}},"required":["type","setSubDeployers"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["perpDeploy"]},"setMarginModes":{"type":"array","items":{"type":"array","items":[{"type":"string"},{"enum":["strictIsolated","noCross"]}],"minItems":2},"description":"A list (sorted by key) of asset and margin modes."}},"required":["type","setMarginModes"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["perpDeploy"]},"setFeeScale":{"type":"object","properties":{"dex":{"type":"string","description":"Name of the dex."},"scale":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Fee scale (between 0.0 and 3.0)."}},"required":["dex","scale"],"description":"Set fee scale."}},"required":["type","setFeeScale"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["perpDeploy"]},"setGrowthModes":{"type":"array","items":{"type":"array","items":[{"type":"string"},{"type":"boolean"}],"minItems":2},"description":"A list (sorted by key) of asset and growth modes."}},"required":["type","setGrowthModes"]}],"description":"Action to perform."},"nonce":{"type":"integer","minimum":0,"description":"Nonce (timestamp in ms) used to prevent replay attacks."},"signature":{"type":"object","properties":{"r":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":66,"maxLength":66,"description":"First 32-byte component."},"s":{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":66,"maxLength":66,"description":"Second 32-byte component."},"v":{"enum":[27,28],"description":"Recovery identifier."}},"required":["r","s","v"],"description":"ECDSA signature components."},"expiresAfter":{"type":"integer","minimum":0,"description":"Expiration time of the action."}},"required":["action","nonce","signature"],"description":"Deploying HIP-3 assets."}}},"required":true},"responses":{"200":{"description":"Successful response without specific data or error response.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"description":"Successful status.","enum":["ok"]},"response":{"type":"object","properties":{"type":{"description":"Type of response.","enum":["default"]}},"required":["type"],"description":"Response details."}},"required":["status","response"],"description":"Successful response without specific data."},{"type":"object","properties":{"status":{"description":"Error status.","enum":["err"]},"response":{"type":"string","description":"Error message."}},"required":["status","response"],"description":"Error response for failed operations."}],"description":"Successful response without specific data or error response."}}}},"422":{"description":"Failed to deserialize the JSON body into the target type","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```
