API Reference
Rubicon markets are accessible via Hyperliquid's API infrastructure. This page documents how to interact programmatically.
Overview
Rubicon perpetuals trade on Hyperliquid's infrastructure. You interact via Hyperliquid's API:
REST API
https://api.hyperliquid.xyz
WebSocket
wss://api.hyperliquid.xyz/ws
Info API
https://api.hyperliquid.xyz/info
Authentication
Trading operations require signing with your wallet's private key. Read operations are public.
import { ethers } from "ethers";
const wallet = new ethers.Wallet(PRIVATE_KEY);
async function signRequest(action) {
const message = JSON.stringify(action);
const signature = await wallet.signMessage(message);
return { action, signature };
}Market Identifiers
Rubicon markets use Hyperliquid's asset indexing:
SOXX
SOXX-PERP
Check via info endpoint
KODEX
KODEX-PERP
Check via info endpoint
Get Asset Index
REST Endpoints
Get Market Data
Response:
Get User Positions
Place Order
Cancel Order
Common Operations
Get Oracle Price
Get Funding Rate
Get Recent Trades
Error Handling
API errors return:
Common errors:
Invalid signature
Auth failed
Check signing
Insufficient margin
Need more funds
Deposit or reduce size
Price out of bounds
Order too far from mark
Adjust price
Rate limited
Too many requests
Slow down
Rate Limits
Info queries
100/second
Order placement
10/second
Cancellations
100/second
SDKs
JavaScript/TypeScript
Rubicon uses the @nktkas/hyperliquid SDK for all Hyperliquid interactions.
Python
Example: Simple Trading Bot
Next Steps
WebSocket Feeds — Real-time data streaming
HIP-3 Protocol — Understanding the oracle system
Hyperliquid Docs — Full API reference
Last updated