# spotDeploy

## POST /exchange

> Deploying HIP-1 and HIP-2 assets:\
> \- Genesis\
> \- Register Hyperliquidity\
> \- Register Spot\
> \- Register Token2\
> \- Set Deployer Trading Fee Share\
> \- User Genesis

```json
{"openapi":"3.1.1","info":{"title":"Hyperliquid API - exchange/spotDeploy","version":"1.0.0"},"tags":[{"name":"spotDeploy"}],"servers":[{"url":"https://api.hyperliquid.xyz","description":"Mainnet"},{"url":"https://api.hyperliquid-testnet.xyz","description":"Testnet"}],"paths":{"/exchange":{"post":{"tags":["spotDeploy"],"description":"Deploying HIP-1 and HIP-2 assets:\n- Genesis\n- Register Hyperliquidity\n- Register Spot\n- Register Token2\n- Set Deployer Trading Fee Share\n- User Genesis","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"anyOf":[{"type":"object","properties":{"type":{"description":"Type of action.","enum":["spotDeploy"]},"registerToken2":{"type":"object","properties":{"spec":{"type":"object","properties":{"name":{"type":"string","description":"Token name."},"szDecimals":{"type":"integer","minimum":0,"description":"Number of decimals for token size."},"weiDecimals":{"type":"integer","minimum":0,"description":"Number of decimals for token amounts in wei."}},"required":["name","szDecimals","weiDecimals"],"description":"Token specifications."},"maxGas":{"type":"integer","minimum":0,"description":"Maximum gas allowed for registration."},"fullName":{"type":"string","description":"Optional full token name."}},"required":["spec","maxGas"],"description":"Register token parameters."}},"required":["type","registerToken2"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["spotDeploy"]},"userGenesis":{"type":"object","properties":{"token":{"type":"integer","minimum":0,"description":"Token identifier."},"userAndWei":{"type":"array","items":{"type":"array","items":[{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"Array of tuples: [user address, genesis amount in wei]."},"existingTokenAndWei":{"type":"array","items":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$"}],"minItems":2},"description":"Array of tuples: [existing token identifier, genesis amount in wei]."},"blacklistUsers":{"type":"array","items":{"type":"array","items":[{"type":"string","pattern":"^0[xX][0-9a-fA-F]+$","minLength":42,"maxLength":42},{"type":"boolean"}],"minItems":2},"description":"Array of tuples: [user address, blacklist status] (`true` for blacklist, `false` to remove existing blacklisted user)."}},"required":["token","userAndWei","existingTokenAndWei"],"description":"User genesis parameters."}},"required":["type","userGenesis"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["spotDeploy"]},"genesis":{"type":"object","properties":{"token":{"type":"integer","minimum":0,"description":"Token identifier."},"maxSupply":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Maximum token supply."},"noHyperliquidity":{"description":"Set hyperliquidity balance to 0.","enum":[true]}},"required":["token","maxSupply"],"description":"Genesis parameters."}},"required":["type","genesis"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["spotDeploy"]},"registerSpot":{"type":"object","properties":{"tokens":{"type":"array","items":[{"type":"integer","minimum":0},{"type":"integer","minimum":0}],"minItems":2,"description":"Tuple containing base and quote token indices."}},"required":["tokens"],"description":"Register spot parameters."}},"required":["type","registerSpot"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["spotDeploy"]},"registerHyperliquidity":{"type":"object","properties":{"spot":{"type":"integer","minimum":0,"description":"Spot index (distinct from base token index)."},"startPx":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Starting price for liquidity seeding."},"orderSz":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?$","description":"Order size as a float (not in wei)."},"nOrders":{"type":"integer","minimum":0,"description":"Total number of orders to place."},"nSeededLevels":{"type":"integer","minimum":0,"description":"Number of levels to seed with USDC."}},"required":["spot","startPx","orderSz","nOrders"],"description":"Register hyperliquidity parameters."}},"required":["type","registerHyperliquidity"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["spotDeploy"]},"setDeployerTradingFeeShare":{"type":"object","properties":{"token":{"type":"integer","minimum":0,"description":"Token identifier."},"share":{"type":"string","pattern":"^[0-9]+(\\.[0-9]+)?%$","description":"The deployer trading fee share. Range is 0% to 100%."}},"required":["token","share"],"description":"Set deployer trading fee share parameters."}},"required":["type","setDeployerTradingFeeShare"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["spotDeploy"]},"enableQuoteToken":{"type":"object","properties":{"token":{"type":"integer","minimum":0,"description":"The token ID to convert to a quote token."}},"required":["token"],"description":"Enable quote token parameters."}},"required":["type","enableQuoteToken"]},{"type":"object","properties":{"type":{"description":"Type of action.","enum":["spotDeploy"]},"enableAlignedQuoteToken":{"type":"object","properties":{"token":{"type":"integer","minimum":0,"description":"Token identifier to enable as aligned quote token."}},"required":["token"],"description":"Enable aligned quote token parameters."}},"required":["type","enableAlignedQuoteToken"]}],"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-1 and HIP-2 assets:\n- Genesis\n- Register Hyperliquidity\n- Register Spot\n- Register Token2\n- Set Deployer Trading Fee Share\n- User Genesis"}}},"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"}}}}}}}}}
```
