Preflight REST API Endpoint
資訊
Exchange API calls do not consume Quicknode API credits. If you are on a free trial plan, see hyperliquidapi.com for your URL and fee schedule. To white-label with your own builder code, contact us.
身體參數
動作
物件
必填
載入中...
類型
字串
載入中...
orders
陣列
載入中...
資產
字串
載入中...
side
字串
載入中...
價格
字串
載入中...
大小
字串
載入中...
tif
字串
載入中...
退貨
valid
布林值
載入中...
錯誤
陣列
載入中...
assetInfo
陣列
載入中...
訂單
整數
載入中...
資產
整數
載入中...
名稱
字串
載入中...
szDecimals
整數
載入中...
isSpot
布林值
載入中...
estimatedFee
字串
載入中...
priorityFee
string or null
載入中...
isSpot
布林值
載入中...
請求
1curl -s -X POST https://docs-demo.hype-mainnet.quiknode.pro/hypercore/preflight \2-H "Content-Type: application/json" \3-d '{4"action": {5"type": "order",6"orders": [7{8"資產": "BTC",9"side": "買入",10"price": "100000",11"size": "0.001",12"tif": "ioc"13}14]15}16}'17
1curl -s -X POST https://docs-demo.hype-mainnet.quiknode.pro/hypercore/preflight \2-H "Content-Type: application/json" \3-d '{4"action": {5"type": "order",6"orders": [7{8"資產": "BTC",9"side": "買入",10"price": "100000",11"size": "0.001",12"tif": "ioc"13}14]15}16}'17
1const axios = require('axios');23const 資料 = {4action: {5type: "order",6orders: [7{8asset: "BTC",9side: "buy",10price: "100000",11size: "0.001",12tif: "ioc"13}14]15}16};1718axios.post('https://docs-demo.hype-mainnet.quiknode.pro/hypercore/preflight', data, {19headers: { 'Content-Type': 'application/json' }20})21.接著(回應 => 控制台.log(response.data))22.catchcatch(錯誤 => console.錯誤(錯誤));23
1const axios = require('axios');23const 資料 = {4action: {5type: "order",6orders: [7{8asset: "BTC",9side: "buy",10price: "100000",11size: "0.001",12tif: "ioc"13}14]15}16};1718axios.post('https://docs-demo.hype-mainnet.quiknode.pro/hypercore/preflight', data, {19headers: { 'Content-Type': 'application/json' }20})21.接著(回應 => 控制台.log(response.data))22.catchcatch(錯誤 => console.錯誤(錯誤));23
1匯入 請求2匯入 json34url = "https://docs-demo.hype-mainnet.quiknode.pro/hypercore/preflight"56有效載荷 = json.dumps({7"action": {8"type": "order",9"orders": [10{11"asset": "BTC",12"side": "buy",13"price": "100000",14"size": "0.001",15"tif": "ioc"16}17]18}19})2021標題 = {22「Content-Type」: 'application/json'23}2425回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)2627列印(回應.text)28
1匯入 請求2匯入 json34url = "https://docs-demo.hype-mainnet.quiknode.pro/hypercore/preflight"56有效載荷 = json.dumps({7"action": {8"type": "order",9"orders": [10{11"asset": "BTC",12"side": "buy",13"price": "100000",14"size": "0.001",15"tif": "ioc"16}17]18}19})2021標題 = {22「Content-Type」: 'application/json'23}2425回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)2627列印(回應.text)28
1需要 "uri"2require "json"3需要 "net/http"45url = URI("https://docs-demo.hype-mainnet.quiknode.pro/hypercore/preflight")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{17"asset": "BTC",18"side": "buy",19"price": "100000",20"size": "0.001",21"tif": "ioc"22}23]24}25})2627回應 = https.請求(請求)28puts 回應。read_body29
1需要 "uri"2require "json"3需要 "net/http"45url = URI("https://docs-demo.hype-mainnet.quiknode.pro/hypercore/preflight")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{17"asset": "BTC",18"side": "buy",19"price": "100000",20"size": "0.001",21"tif": "ioc"22}23]24}25})2627回應 = https.請求(請求)28puts 回應。read_body29