Send User-Signed Action REST API Endpoint
信息
Exchange API 调用不会消耗Quicknode 积分。通过此endpoint 交易endpoint 附加构建商费用。详细明细请参见hyperliquidapi.com。如需使用您自己的构建商代码进行白标,请联系我们。
This endpoint is not a drop-in replacement for Hyperliquid's native /exchange endpoint. See the Exchange API Overview for key differences.
身体参数
动作
对象
必填
正在加载...
类型
字符串
正在加载...
hyperliquidChain
字符串
正在加载...
signatureChainId
字符串
正在加载...
非重复值
整数
必填
正在加载...
签名
对象
必填
正在加载...
r
字符串
正在加载...
s
字符串
正在加载...
v
整数
正在加载...
退货
success
布尔型
正在加载...
用户
字符串
正在加载...
exchangeResponse
对象
正在加载...
请求
1curl -s -X POSTmainnet\2-H "Content-Type: application/json" \3-d '{4"action": {5"type": "usdSend",6"destination": "0x0000000000000000000000000000000000000001",7"amount": "1.0",8"hyperliquidChain": "Mainnet",9"signatureChainId": "0xa4b1",10"time": 123456789000011},12"nonce": 1234567890000,13"signature": {14"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",15"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",16"v": 2817}18}'19
1curl -s -X POSTmainnet\2-H "Content-Type: application/json" \3-d '{4"action": {5"type": "usdSend",6"destination": "0x0000000000000000000000000000000000000001",7"amount": "1.0",8"hyperliquidChain": "Mainnet",9"signatureChainId": "0xa4b1",10"time": 123456789000011},12"nonce": 1234567890000,13"signature": {14"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",15"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",16"v": 2817}18}'19
1const axios = require('axios');23const 数据 = {4action: {5type: "usdSend",6destination: "0x0000000000000000000000000000000000000001",7amount: "1.0",8hyperliquidChain: "Mainnet",9signatureChainId: "0xa4b1",10time: 123456789000011},12nonce: 1234567890000,13signature: {14r: "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",15s: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",16v: 2817}18};1920axios.post('https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange', data, {21headers: { 'Content-Type': 'application/json' }22})23.然后(响应 => 控制台.log(响应.data))24.catch(error => 控制台.error(error));25
1const axios = require('axios');23const 数据 = {4action: {5type: "usdSend",6destination: "0x0000000000000000000000000000000000000001",7amount: "1.0",8hyperliquidChain: "Mainnet",9signatureChainId: "0xa4b1",10time: 123456789000011},12nonce: 1234567890000,13signature: {14r: "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",15s: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",16v: 2817}18};1920axios.post('https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange', data, {21headers: { 'Content-Type': 'application/json' }22})23.然后(响应 => 控制台.log(响应.data))24.catch(error => 控制台.error(error));25
1导入 请求2导入 json34url = "mainnet"56有效载荷 = json.dumps({7"action": {8"type": "usdSend",9"destination": "0x0000000000000000000000000000000000000001",10"amount": "1.0",11"hyperliquidChain": "Mainnet",12"signatureChainId": "0xa4b1",13"time": 123456789000014},15"nonce": 1234567890000,16"signature": {17"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",18"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",19"v": 2820}21})2223headers = { 'Content-Type': 'application/json' }24回复 = 请求.请求("POST", url, headers=headers, 数据=有效载荷)25打印(响应.text)26
1导入 请求2导入 json34url = "mainnet"56有效载荷 = json.dumps({7"action": {8"type": "usdSend",9"destination": "0x0000000000000000000000000000000000000001",10"amount": "1.0",11"hyperliquidChain": "Mainnet",12"signatureChainId": "0xa4b1",13"time": 123456789000014},15"nonce": 1234567890000,16"signature": {17"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",18"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",19"v": 2820}21})2223headers = { 'Content-Type': 'application/json' }24回复 = 请求.请求("POST", url, headers=headers, 数据=有效载荷)25打印(响应.text)26
1require "uri"2require "json"3require "net/http"45url = URI("mainnet")6https = Net::HTTP.new(url.主机, url.端口)7https.use_ssl = true8请求 = Net::HTTP::POST.new(网址)9请求["Content-Type"] = "application/json"10请求.请求正文 = JSON.dump({11"action": {12"type": "usdSend",13"destination": "0x0000000000000000000000000000000000000001",14"amount": "1.0",15"hyperliquidChain": "Mainnet",16"signatureChainId": "0xa4b1",17"time": 123456789000018},19"nonce": 1234567890000,20"signature": {21"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",22"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",23"v": 2824}25})26回复 = https.请求(请求)27返回响应.read_body28
1require "uri"2require "json"3require "net/http"45url = URI("mainnet")6https = Net::HTTP.new(url.主机, url.端口)7https.use_ssl = true8请求 = Net::HTTP::POST.new(网址)9请求["Content-Type"] = "application/json"10请求.请求正文 = JSON.dump({11"action": {12"type": "usdSend",13"destination": "0x0000000000000000000000000000000000000001",14"amount": "1.0",15"hyperliquidChain": "Mainnet",16"signatureChainId": "0xa4b1",17"time": 123456789000018},19"nonce": 1234567890000,20"signature": {21"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",22"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",23"v": 2824}25})26回复 = https.请求(请求)27返回响应.read_body28