Skip to main content

Documentation Index

Fetch the complete documentation index at: https://hypernode-docs.polynode.dev/llms.txt

Use this file to discover all available pages before exploring further.

All order endpoints require authentication via X-API-Key or X-HL-Private-Key header. See Authentication. All endpoints accept ?network=mainnet (default) or ?network=testnet.

Place a limit order

POST /exchange/order
curl -X POST https://hyper.polynode.dev/exchange/order \
  -H "X-API-Key: hn_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "coin": "BTC",
    "side": "buy",
    "size": 0.001,
    "price": 50000
  }'
Request body:
FieldTypeRequiredDefaultDescription
coinstringYesAsset symbol (e.g., "BTC", "ETH", "SOL")
sidestringYes"buy" or "sell"
sizenumberYesOrder size in base asset
pricenumberYesLimit price
typestringNo"limit""limit" or "trigger"
tifstringNo"Gtc"Time in force: "Gtc", "Ioc", or "Alo"
reduce_onlybooleanNofalseOnly reduce existing position
cloidstringNoClient order ID
trigger_pxnumberNoTrigger price (required when type is "trigger")
is_marketbooleanNotrueExecute at market when triggered
tpslstringNo"tp" (take profit) or "sl" (stop loss)
builder_addressstringNoBuilder fee recipient address
builder_feenumberNo1Builder fee in basis points
Response:
{
  "status": "ok",
  "response": {
    "status": "ok",
    "response": {
      "type": "order",
      "data": {"statuses": [{"resting": {"oid": 123456789}}]}
    }
  }
}

Market open

Open a position at market price with slippage protection. Sends an IOC order at mid price +/- slippage. POST /exchange/market-open
curl -X POST https://hyper.polynode.dev/exchange/market-open \
  -H "X-API-Key: hn_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"coin": "ETH", "side": "buy", "size": 0.1}'
FieldTypeRequiredDefaultDescription
coinstringYesAsset symbol
sidestringYes"buy" or "sell"
sizenumberYesOrder size
slippagenumberNo0.05Max slippage as decimal (0.05 = 5%)
cloidstringNoClient order ID
builder_addressstringNoBuilder fee recipient
builder_feenumberNo1Builder fee (bps)

Market close

Close an existing position at market price. Automatically detects position direction and size. POST /exchange/market-close
curl -X POST https://hyper.polynode.dev/exchange/market-close \
  -H "X-API-Key: hn_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"coin": "ETH"}'
FieldTypeRequiredDefaultDescription
coinstringYesAsset to close
sizenumberNoPartial close size (omit to close entire position)
slippagenumberNo0.05Max slippage as decimal
cloidstringNoClient order ID

Cancel order

Cancel a single order by order ID. DELETE /exchange/order
curl -X DELETE https://hyper.polynode.dev/exchange/order \
  -H "X-API-Key: hn_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"coin": "BTC", "oid": 123456789}'
FieldTypeRequiredDescription
coinstringYesAsset symbol
oidnumberYesOrder ID to cancel

Bulk cancel

Cancel multiple orders at once. Supports both order IDs and client order IDs in a single request. DELETE /exchange/orders
curl -X DELETE https://hyper.polynode.dev/exchange/orders \
  -H "X-API-Key: hn_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cancels": [
      {"coin": "BTC", "oid": 111},
      {"coin": "ETH", "oid": 222}
    ],
    "cloid_cancels": [
      {"coin": "SOL", "cloid": "my-order-1"}
    ]
  }'
FieldTypeRequiredDescription
cancelsarrayNoList of {coin, oid} to cancel by order ID
cloid_cancelsarrayNoList of {coin, cloid} to cancel by client order ID

Modify order

Modify a single resting order. PATCH /exchange/order
curl -X PATCH https://hyper.polynode.dev/exchange/order \
  -H "X-API-Key: hn_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "oid": 123456789,
    "coin": "BTC",
    "side": "buy",
    "size": 0.002,
    "price": 49000
  }'
FieldTypeRequiredDefaultDescription
oidnumberYesOrder ID to modify
coinstringYesAsset symbol
sidestringYes"buy" or "sell"
sizenumberYesNew order size
pricenumberYesNew limit price
tifstringNo"Gtc""Gtc", "Ioc", or "Alo"
reduce_onlybooleanNofalseReduce only
cloidstringNoClient order ID

Batch modify

Modify multiple orders in a single request. PATCH /exchange/orders
curl -X PATCH https://hyper.polynode.dev/exchange/orders \
  -H "X-API-Key: hn_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "modifies": [
      {"oid": 111, "coin": "BTC", "side": "buy", "size": 0.002, "price": 49000},
      {"oid": 222, "coin": "ETH", "side": "sell", "size": 1.0, "price": 4000}
    ]
  }'
Each item in modifies has the same fields as the single modify endpoint.

Update leverage

Change leverage for an asset. Applies to new and existing positions. POST /exchange/update-leverage
curl -X POST https://hyper.polynode.dev/exchange/update-leverage \
  -H "X-API-Key: hn_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"coin": "BTC", "leverage": 10, "is_cross": true}'
FieldTypeRequiredDefaultDescription
coinstringYesAsset symbol
leveragenumberYesLeverage multiplier
is_crossbooleanNotrueCross margin (true) or isolated (false)

Update isolated margin

Add or remove margin from an isolated position. POST /exchange/update-isolated-margin
curl -X POST https://hyper.polynode.dev/exchange/update-isolated-margin \
  -H "X-API-Key: hn_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"coin": "BTC", "amount": 100.0}'
FieldTypeRequiredDescription
coinstringYesAsset symbol
amountnumberYesUSD amount to add (positive) or remove (negative)

Schedule cancel

Dead-man’s switch. All open orders will be cancelled at the specified time unless you reschedule. POST /exchange/schedule-cancel
curl -X POST https://hyper.polynode.dev/exchange/schedule-cancel \
  -H "X-API-Key: hn_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"time_ms": 1774938185046}'
FieldTypeRequiredDescription
time_msnumberYesUnix timestamp in milliseconds when orders should be cancelled