Send Order 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.
身體參數
動作
物件
必填
載入中...
類型
字串
載入中...
orders
陣列
載入中...
a
整數
載入中...
b
布林值
載入中...
p
字串
載入中...
s
字串
載入中...
r
布林值
載入中...
t
物件
載入中...
上限
物件
載入中...
tif
字串
載入中...
grouping
string or object
載入中...
非重複數
整數
必填
載入中...
簽名
物件
必填
載入中...
r
字串
載入中...
s
字串
載入中...
v
整數
載入中...
vaultAddress
字串
載入中...
expiresAfter
整數
載入中...
slippage
數字
載入中...
priorityFee
integer or string
載入中...
退貨
success
布林值
載入中...
使用者
字串
載入中...
exchangeResponse
物件
載入中...
orders
陣列
載入中...
請求
1curl -s -X POSTmainnet\2-H "Content-Type: application/json" \3-d '{4"action": {5"type": "order",6"orders": [{7"a": 0,8"b": true,9"p": "100000",10"s": "0.001",11"r": false,12"t": {"limit": {"tif": "Ioc"}}13}],14"grouping": "na"15},16"nonce": 1234567890,17"signature": {18"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",19"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",20"v": 2821}22}'23
1curl -s -X POSTmainnet\2-H "Content-Type: application/json" \3-d '{4"action": {5"type": "order",6"orders": [{7"a": 0,8"b": true,9"p": "100000",10"s": "0.001",11"r": false,12"t": {"limit": {"tif": "Ioc"}}13}],14"grouping": "na"15},16"nonce": 1234567890,17"signature": {18"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",19"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",20"v": 2821}22}'23
1const axios = require('axios');23const 資料 = {4action: {5type: "order",6orders: [{7a: 0,8b: true,9p: "100000",10s: "0.001",11r: false,12t: { limit: { tif: "Ioc" } }13}],14grouping: "na"15},16nonce: 1234567890,17signature: {18r: "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",19s: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",20v: 2821}22};2324axios.post('https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange', data, {25headers: { 'Content-Type': 'application/json' }26})27.接著(回應 => 控制台.log(response.data))28.catchcatch(錯誤 => console.錯誤(錯誤));29
1const axios = require('axios');23const 資料 = {4action: {5type: "order",6orders: [{7a: 0,8b: true,9p: "100000",10s: "0.001",11r: false,12t: { limit: { tif: "Ioc" } }13}],14grouping: "na"15},16nonce: 1234567890,17signature: {18r: "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",19s: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",20v: 2821}22};2324axios.post('https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange', data, {25headers: { 'Content-Type': 'application/json' }26})27.接著(回應 => 控制台.log(response.data))28.catchcatch(錯誤 => console.錯誤(錯誤));29
1匯入 請求2匯入 json34網址 = "mainnet"56有效載荷 = json.dumps({7"action": {8"type": "order",9"orders": [{10"a": 0,11"b": True,12"p": "100000",13"s": "0.001",14"r": False,15"t": {"limit": {"tif": "Ioc"}}16}],17"grouping": "na"18},19"nonce": 1234567890,20"signature": {21"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",22"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",23"v": 2824}25})2627標題 = {28「Content-Type」: 'application/json'29}3031回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)3233列印(回應.text)34
1匯入 請求2匯入 json34網址 = "mainnet"56有效載荷 = json.dumps({7"action": {8"type": "order",9"orders": [{10"a": 0,11"b": True,12"p": "100000",13"s": "0.001",14"r": False,15"t": {"limit": {"tif": "Ioc"}}16}],17"grouping": "na"18},19"nonce": 1234567890,20"signature": {21"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",22"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",23"v": 2824}25})2627標題 = {28「Content-Type」: 'application/json'29}3031回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)3233列印(回應.text)34
1需要 "uri"2require "json"3需要 "net/http"45網址 = URI("mainnet")67https = 網::HTTP.new(url.主機, 網址.port)8https.use_ssl = true910請求 = 淨額::HTTP::POST.新增(網址)11請求["Content-Type"] = "application/json"12請求。主體 = JSON.dump({13"action": {14"type": "order",15"orders": [{16"a": 0,17"b": true,18"p": "100000",19"s": "0.001",20"r": false,21"t": {"limit": {"tif": "Ioc"}}22}],23"grouping": "na"24},25"nonce": 1234567890,26"signature": {27"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",28"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",29"v": 2830}31})3233回應 = https.請求(請求)34puts 回應。read_body35
1需要 "uri"2require "json"3需要 "net/http"45網址 = URI("mainnet")67https = 網::HTTP.new(url.主機, 網址.port)8https.use_ssl = true910請求 = 淨額::HTTP::POST.新增(網址)11請求["Content-Type"] = "application/json"12請求。主體 = JSON.dump({13"action": {14"type": "order",15"orders": [{16"a": 0,17"b": true,18"p": "100000",19"s": "0.001",20"r": false,21"t": {"limit": {"tif": "Ioc"}}22}],23"grouping": "na"24},25"nonce": 1234567890,26"signature": {27"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",28"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",29"v": 2830}31})3233回應 = https.請求(請求)34puts 回應。read_body35