Send Outcome 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.
身體參數
動作
物件
必填
載入中...
類型
字串
載入中...
splitOutcome
物件
載入中...
mergeOutcome
物件
載入中...
mergeQuestion
物件
載入中...
negateOutcome
物件
載入中...
非重複數
整數
必填
載入中...
簽名
物件
必填
載入中...
r
字串
載入中...
s
字串
載入中...
v
整數
載入中...
退貨
success
布林值
載入中...
使用者
字串
載入中...
exchangeResponse
物件
載入中...
請求
1curl -s -X POSTmainnet\2-H "Content-Type: application/json" \3-d '{4"action": {5"type": "userOutcome",6"splitOutcome": {7"outcome": 1,8"amount": "10"9}10},11"nonce": 1234567890,12"signature": {13"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",14"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",15"v": 2816}17}'18
1curl -s -X POSTmainnet\2-H "Content-Type: application/json" \3-d '{4"action": {5"type": "userOutcome",6"splitOutcome": {7"outcome": 1,8"amount": "10"9}10},11"nonce": 1234567890,12"signature": {13"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",14"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",15"v": 2816}17}'18
1const axios = require('axios');23const 資料 = {4action: {5type: "userOutcome",6splitOutcome: {7outcome: 1,8amount: "10"9}10},11nonce: 1234567890,12signature: {13r: "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",14s: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",15v: 2816}17};1819axios.post('https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange', data, {20headers: { 'Content-Type': 'application/json' }21})22.接著(回應 => 控制台.log(response.data))23.catchcatch(錯誤 => console.錯誤(錯誤));24
1const axios = require('axios');23const 資料 = {4action: {5type: "userOutcome",6splitOutcome: {7outcome: 1,8amount: "10"9}10},11nonce: 1234567890,12signature: {13r: "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",14s: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",15v: 2816}17};1819axios.post('https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange', data, {20headers: { 'Content-Type': 'application/json' }21})22.接著(回應 => 控制台.log(response.data))23.catchcatch(錯誤 => console.錯誤(錯誤));24
1匯入 請求2匯入 json34網址 = "mainnet"5有效載荷 = json.dumps({6"action": {7"type": "userOutcome",8"splitOutcome": {9"outcome": 1,10"amount": "10"11}12},13"nonce": 1234567890,14"signature": {15"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",16"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",17"v": 2818}19})20headers = { 'Content-Type': 'application/json' }21回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)22列印(回應.text)23
1匯入 請求2匯入 json34網址 = "mainnet"5有效載荷 = json.dumps({6"action": {7"type": "userOutcome",8"splitOutcome": {9"outcome": 1,10"amount": "10"11}12},13"nonce": 1234567890,14"signature": {15"r": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",16"s": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",17"v": 2818}19})20headers = { 'Content-Type': 'application/json' }21回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)22列印(回應.text)23
1需要 "uri"2require "json"3需要 "net/http"45網址 = URI("mainnet")6https = 網::HTTP.new(url.主機, 網址.port)7https.use_ssl = true8請求 = 淨額::HTTP::POST.新增(網址)9請求["Content-Type"] = "application/json"10請求。主體 = JSON.dump({11action: {12type: "userOutcome",13splitOutcome: {14outcome: 1,15amount: "10"16}17},18nonce: 1234567890,19signature: {20r: "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",21s: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",22v: 2823}24})25回應 = https.請求(請求)26puts 回應。read_body27
1需要 "uri"2require "json"3需要 "net/http"45網址 = URI("mainnet")6https = 網::HTTP.new(url.主機, 網址.port)7https.use_ssl = true8請求 = 淨額::HTTP::POST.新增(網址)9請求["Content-Type"] = "application/json"10請求。主體 = JSON.dump({11action: {12type: "userOutcome",13splitOutcome: {14outcome: 1,15amount: "10"16}17},18nonce: 1234567890,19signature: {20r: "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab",21s: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12",22v: 2823}24})25回應 = https.請求(請求)26puts 回應。read_body27