Send Outcome Action REST API Endpoint
資訊
Exchange API calls do not consume Quicknode API credits. Transactions through this endpoint are appended with a builder fee. See hyperliquidapi.com for a full breakdown. To white-label with your own builder code, contact us.
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
整數
載入中...
退貨
成功
布林值
載入中...
user
字串
載入中...
exchangeResponse
物件
載入中...
請求
1curl -s -X POST https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange \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 POST https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange \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 data = {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.then(response => console.log(response.data))23.catch(error => console.error(error));24
1const axios = require('axios');23const data = {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.then(response => console.log(response.data))23.catch(error => console.error(error));24
1匯入 請求2import json34url = "https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange"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匯入 請求2import json34url = "https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange"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"45url = URI("https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange")6https = 網::HTTP.new(url.主機, url.port)7https.use_ssl = true8請求 = 淨::HTTP::POST.new(網址)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.請求(請求)26將回應。read_body27
1需要 "uri"2require "json"3需要 "net/http"45url = URI("https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange")6https = 網::HTTP.new(url.主機, url.port)7https.use_ssl = true8請求 = 淨::HTTP::POST.new(網址)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.請求(請求)26將回應。read_body27