Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2128,6 +2128,9 @@
"reference/hyperliquid-info-spot-pair-deploy-auction-status",
"reference/hyperliquid-info-margin-table",
"reference/hyperliquid-info-aligned-quote-token-info",
"reference/hyperliquid-info-approved-builders",
"reference/hyperliquid-info-perp-concise-annotations",
"reference/hyperliquid-info-settled-outcome",
"reference/hyperliquid-exchange-place-order",
"reference/hyperliquid-exchange-cancel-order",
"reference/hyperliquid-exchange-cancel-order-by-cloid",
Expand All @@ -2142,6 +2145,7 @@
"reference/hyperliquid-exchange-spot-perp-transfer",
"reference/hyperliquid-exchange-twap-order",
"reference/hyperliquid-exchange-twap-cancel",
"reference/hyperliquid-exchange-user-outcome",
"reference/hyperliquid-exchange-approve-agent",
"reference/hyperliquid-exchange-approve-builder-fee",
"reference/hyperliquid-exchange-set-referrer",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
{
"openapi": "3.0.0",
"info": {
"title": "Hyperliquid Exchange API",
"version": "1.0.0",
"description": "API for trading operations on Hyperliquid exchange requiring authentication. ⚠️ WARNING: These endpoints require EIP-712 signatures for authentication. The example values provided will NOT work without proper cryptographic signing. You must implement EIP-712 signing to use these endpoints successfully."
},
"servers": [
{
"url": "https://api.hyperliquid.xyz"
}
],
"paths": {
"/exchange": {
"post": {
"tags": [
"hyperliquid exchange"
],
"summary": "User outcome (split / merge / negate outcome shares)",
"operationId": "userOutcome",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"action": {
"type": "object",
"description": "User outcome action. Provide exactly one of splitOutcome, mergeOutcome, mergeQuestion, or negateOutcome alongside the type.",
"properties": {
"type": {
"type": "string",
"default": "userOutcome",
"enum": [
"userOutcome"
],
"description": "Action type"
},
"splitOutcome": {
"type": "object",
"description": "Split X quote tokens into X Yes and X No shares of an outcome.",
"properties": {
"outcome": {
"type": "integer",
"description": "Outcome identifier."
},
"amount": {
"type": "string",
"description": "Amount of quote tokens to split."
}
}
}
},
"required": [
"type"
]
},
"nonce": {
"type": "integer",
"description": "Current timestamp in milliseconds"
},
"signature": {
"type": "object",
"description": "EIP-712 signature of the action with r, s, v components",
"properties": {
"r": {
"type": "string",
"description": "ECDSA signature r component (hex string)",
"example": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
},
"s": {
"type": "string",
"description": "ECDSA signature s component (hex string)",
"example": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321"
},
"v": {
"type": "integer",
"description": "ECDSA recovery id (27 or 28)",
"example": 27
}
},
"required": [
"r",
"s",
"v"
]
},
"expiresAfter": {
"type": "integer",
"description": "Timestamp in milliseconds after which the request is rejected (optional)"
}
},
"required": [
"action",
"nonce",
"signature"
]
},
"example": {
"action": {
"type": "userOutcome",
"splitOutcome": {
"outcome": 0,
"amount": "1"
}
},
"nonce": 1705234567890,
"signature": {
"r": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"s": "0xfedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321",
"v": 27
}
}
}
}
},
"responses": {
"200": {
"description": "User outcome result",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Request status"
},
"response": {
"type": "object",
"properties": {
"type": {
"type": "string",
"default": "default"
}
}
}
},
"example": {
"status": "ok",
"response": {
"type": "default"
}
}
}
}
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"openapi": "3.0.0",
"info": {
"title": "Hyperliquid Node API",
"version": "1.0.0",
"description": "This is an API for interacting with Chainstack Hyperliquid node."
},
"servers": [
{
"url": "https://hyperliquid-mainnet.core.chainstack.com"
}
],
"paths": {
"/4f8d8f4040bdacd1577bff8058438274/info": {
"post": {
"tags": [
"hyperliquid operations"
],
"summary": "info (approvedBuilders)",
"operationId": "infoApprovedBuilders",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Request type",
"default": "approvedBuilders",
"enum": [
"approvedBuilders"
]
},
"user": {
"type": "string",
"description": "User address in 42-character hexadecimal format.",
"default": "0x1442ad477ded1b0028b57621aa7b6f7eadb8f568"
}
},
"required": [
"type",
"user"
]
}
}
}
},
"responses": {
"200": {
"description": "Array of approved builder addresses",
"content": {
"application/json": {
"schema": {
"type": "array",
"description": "Array of builder addresses the user has approved.",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"openapi": "3.0.0",
"info": {
"title": "Hyperliquid Node API",
"version": "1.0.0",
"description": "This is an API for interacting with Chainstack Hyperliquid node."
},
"servers": [
{
"url": "https://hyperliquid-mainnet.core.chainstack.com"
}
],
"paths": {
"/4f8d8f4040bdacd1577bff8058438274/info": {
"post": {
"tags": [
"hyperliquid operations"
],
"summary": "info (perpConciseAnnotations)",
"operationId": "infoPerpConciseAnnotations",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Request type",
"default": "perpConciseAnnotations",
"enum": [
"perpConciseAnnotations"
]
}
},
"required": [
"type"
]
}
}
}
},
"responses": {
"200": {
"description": "Concise annotations for all perpetual assets",
"content": {
"application/json": {
"schema": {
"type": "array",
"description": "Array of [coin, annotation] tuples. Each annotation has a category and optional displayName and keywords.",
"items": {
"type": "array",
"items": {}
}
}
}
}
}
}
}
}
}
}
Loading