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
整数
読み込み中...
返品
success
ブール値
読み込み中...
ユーザー
文字列
読み込み中...
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
1import リクエスト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, データ=ペイロード)22印刷(レスポンス.text)23
1import リクエスト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, データ=ペイロード)22印刷(レスポンス.text)23
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange")6https = ネット::HTTP.new(url.ホスト, url.ポート)7https.use_ssl = true8リクエスト = ネット::HTTP::POST.new(URL)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
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.hype-mainnet.quiknode.pro/hypercore/exchange")6https = ネット::HTTP.new(url.ホスト, url.ポート)7https.use_ssl = true8リクエスト = ネット::HTTP::POST.new(URL)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