Vordium Documentation
The AI Layer for Crypto
Vordium is a high-performance EVM blockchain designed for autonomous AI agents. Sub-135ms block time with VordiumBFT consensus, full EVM compatibility, and native agent support โ everything you need to deploy autonomous strategies on-chain.
Quick Start
Up and running in 60 seconds.
Step 1 โ Install the SDK
pip install vordiumStep 2 โ Create your agent
from vordium import Agent
agent = Agent()
print(agent.address)
# 0x742d35Cc6634C0532925a3b8D4C9D5...
print(agent.balance)
# 100.0 VORDStep 3 โ Get testnet VORD
agent.fund()
# Funded with 100 VORD โ
Step 4 โ Run autonomously
import asyncio
from vordium import Agent
agent = Agent()
async def strategy(agent):
print(f"Block: {agent.block}")
print(f"Balance: {agent.balance} VORD")
asyncio.run(agent.run(strategy=strategy))Installation
Get the Vordium SDK running locally.
Python (recommended)
pip install vordiumVerify installation
vordium status
# Chain: Vordium Chain
# Block: 5,026,000
# Status: ๐ข OnlineFrom source
git clone https://github.com/Vordium/vordium-py
cd vordium-py
pip install -e .Requirements
- Python 3.8+
- pip
AI Agents SDK Overview
Build autonomous agents that live on-chain.
The Vordium SDK is a first-class Python library for building AI agents that interact directly with Vordium Chain. It abstracts wallet management, transaction signing, balance tracking, and async execution โ so you can focus on strategy logic.
What you can build
- Trading agents โ autonomous market-making, arbitrage, momentum strategies.
- AI-driven agents โ LLMs making decisions on-chain via Claude or GPT-4.
- Monitoring bots โ react to block events, balance changes, contract calls.
- Protocol automation โ keeper bots, liquidators, yield optimizers.
Python SDK
Full reference for vordium v0.2.0 โ install with pip install vordium
VordiumClient
from vordium import VordiumClient
client = VordiumClient("0x_your_private_key")Prices & Markets
markets = client.get_markets() # All perp markets with prices
rates = client.get_funding_rates() # Current funding rates
pool = client.get_pool_stats() # VLP pool mark-to-marketPerpetual Trading
# Open a long position
result = client.open_position(
pair_id=1, # ETH=1, BTC=2, BNB=3, SOL=4, ARB=6, AVAX=8
is_long=True,
margin=10.0, # $10 USDC
leverage=5,
)
# Get open positions
positions = client.get_positions()
# Close a position (full or partial)
client.close_position(position_id=1)
client.close_position(position_id=1, close_size=0.005)
# Set take-profit and stop-loss
client.set_tp_sl(
position_id=1,
tp_price=2500.0,
sl_price=2100.0,
)Order Book
book = client.get_orderbook(pair_id=1) # ETH order book
stats = client.get_stats() # Engine health & statsPair IDs
| Symbol | Pair ID | Max Leverage |
|---|---|---|
| ETH | 1 | 50x |
| BTC | 2 | 50x |
| BNB | 3 | 20x |
| SOL | 4 | 20x |
| ARB | 6 | 10x |
| AVAX | 8 | 10x |
JavaScript SDK
Connect to Vordium via ethers.js or the engine REST API.
Direct RPC (ethers.js)
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider(
"https://rpc.vordium.com", 713714, { staticNetwork: true }
);
const block = await provider.getBlockNumber();
console.log("Block:", block);Engine API (REST)
The off-chain matching engine exposes REST endpoints for trading:
const ENGINE = "https://engine.vordex.io";
// Get markets and prices
const markets = await fetch(`${ENGINE}/v1/perp/markets`).then(r => r.json());
// Get positions for a wallet
const positions = await fetch(`${ENGINE}/v1/perp/positions/${address}`).then(r => r.json());
// Get funding rates
const funding = await fetch(`${ENGINE}/v1/funding`).then(r => r.json());
// Get pool mark-to-market value
const pool = await fetch(`${ENGINE}/v1/pool`).then(r => r.json());
// Get engine stats
const stats = await fetch(`${ENGINE}/stats`).then(r => r.json());Open a Perp Position
import { ethers } from "ethers";
const sessionWallet = new ethers.Wallet(SESSION_KEY);
const payload = {
action: "perp_open",
wallet: ownerAddress,
pairId: 1, // ETH
isLong: true,
leverage: 5,
margin: "10.000000", // $10 USDC
};
const signature = await sessionWallet.signMessage(JSON.stringify(payload));
const result = await fetch(`${ENGINE}/v1/perp/open`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ ...payload, signature, sessionWallet: sessionWallet.address }),
}).then(r => r.json());
console.log("Position ID:", result.positionId);CLI Reference
The vordium command.
Initialize agent
vordium initCheck chain status
vordium statusCheck balance
vordium balance
vordium balance 0x...Get testnet VORD
vordium fundSend VORD
vordium send 0xRecipient 10.0Run an agent script
vordium run my_agent.pyInteractive mode
vordiumExamples
Real agent patterns you can copy.
Example 1 โ Hello Vordium
from vordium import Agent, Chain
chain = Chain()
print(f"Block: {chain.block_number:,}")
print(f"Connected: {chain.connected}")
agent = Agent()
print(f"Address: {agent.address}")
print(f"Balance: {agent.balance} VORD")Example 2 โ Autonomous Agent
import asyncio
from vordium import Agent
agent = Agent()
async def my_strategy(agent):
block = agent.block
balance = agent.balance
print(f"Block {block:,} | {balance:.4f} VORD")
# Add your trading logic here
asyncio.run(agent.run(
strategy=my_strategy,
interval=1.0 # Run every second
))Example 3 โ Send VORD
from vordium import Agent
agent = Agent()
print(f"Balance: {agent.balance} VORD")
tx = agent.send(
to="0xRecipient...",
amount=10.0
)
print(f"Sent! TX: {tx}")Example 4 โ Claude AI Agent
Use Claude Opus 4.6 to make live trading decisions.
import asyncio
from anthropic import Anthropic
from vordium import Agent
claude = Anthropic()
agent = Agent()
async def ai_strategy(agent):
response = claude.messages.create(
model="claude-opus-4-6",
max_tokens=200,
messages=[{
"role": "user",
"content": f"""
You are a trading agent on Vordium Chain.
Block: {agent.block}
Balance: {agent.balance} VORD
What should I do? Reply with one word:
BUY, SELL, or HOLD
"""
}]
)
decision = response.content[0].text.strip()
print(f"AI Decision: {decision}")
asyncio.run(agent.run(strategy=ai_strategy))VordiumBFT Consensus
Sub-135ms block time. Instant finality. The fastest EVM chain.
What is VordiumBFT?
VordiumBFT is a custom Byzantine Fault Tolerant consensus engine built for Vordium Chain. It achieves ~135ms block times with single-slot finality โ once a block is produced, it is final. No reorgs. No confirmation waits.
How it works
VordiumBFT uses a streamlined propose-vote-commit pipeline optimized for low-latency environments:
- Block proposer broadcasts a new block
- Validators vote in a single round
- 2/3+ votes = block is committed and final
- No multi-round finality gadget needed
The 2-Validator Architecture
During the current testnet/early mainnet phase, Vordium runs with 2 validators operated by the core team. This enables maximum throughput (~135ms blocks) while maintaining BFT guarantees. The validator set will expand progressively as the network stabilizes.
| Parameter | Value |
|---|---|
| Block Time | ~135ms |
| Finality | Single-slot (instant) |
| Validators | 2 (expanding) |
| Fault Tolerance | BFT (tolerates 1 faulty) |
| EVM Compatibility | Full (Shanghai+) |
Why not Tendermint/CometBFT?
Standard CometBFT achieves ~400ms blocks. VordiumBFT strips unnecessary overhead โ no mempool gossip delay, no prevote/precommit rounds, no separate ABCI layer โ to cut block time by 3x. The tradeoff is a smaller initial validator set, which is acceptable for a trading-focused chain where speed matters more than decentralization in the early phase.
Perpetuals Trading Guide
How to trade perpetual futures on Vordex.
Overview
Vordex perpetual futures are settled on-chain via PerpEngine. The off-chain matching engine handles order matching, TP/SL monitoring, liquidation checks, and funding rate calculation. Settlement happens on Vordium Chain with instant finality.
Available Markets
| Pair | Max Leverage | Maintenance Margin | Taker Fee |
|---|---|---|---|
| ETH/USDC | 50x | 2% | 0.030% |
| BTC/USDC | 50x | 2% | 0.030% |
| BNB/USDC | 20x | 5% | 0.030% |
| SOL/USDC | 20x | 5% | 0.030% |
| ARB/USDC | 10x | 10% | 0.030% |
| AVAX/USDC | 10x | 10% | 0.030% |
How it works
- Deposit USDC to your Vordex vault via the Arbitrum bridge
- Enable trading by creating a session key (signs trades without your main wallet)
- Open a position โ choose pair, leverage (up to 50x), and margin
- Set TP/SL โ the engine monitors prices every second and auto-closes at your targets
- Close โ full or partial close at market price
Funding Rates
Funding is charged hourly using the Hyperliquid/Lighter formula: rate = avgPremium + clamp(interestRate - avgPremium). Base rate: 0.01% per 8 hours. When rate is positive, longs pay shorts. When negative, shorts pay longs. The pool (VLP) is not involved in funding โ it is purely peer-to-peer.
Liquidation
Positions are liquidated when equity falls below the maintenance margin. The liquidation engine checks every block. If a liquidation creates bad debt (loss exceeds margin), ADL (auto-deleveraging) engages to close the most profitable opposing positions.
VLP Pool
The VLP pool acts as counterparty to all trades. Depositors earn when traders lose, and lose when traders win. Pool value is marked-to-market in real time. Deposits have a 1-hour lockup (testnet). The pool's realPoolValue is available at /v1/pool.
Session Keys
Trade without signing every transaction.
What are Session Keys?
Session keys are temporary signing keys that authorize the off-chain engine to execute trades on your behalf. Your main wallet stays safe โ it never signs trade transactions directly. This is the same model used by Hyperliquid.
How it works
- Go to the Portfolio page and click Enable Trading
- Your wallet signs a single on-chain transaction to register a session key
- The session key is stored in your browser (localStorage)
- All subsequent trades are signed by the session key, not your main wallet
- Sessions expire after a set duration (currently 24 hours)
Security
Session keys can only execute trades โ they cannot withdraw funds or transfer ownership. If a session key is compromised, an attacker could only place trades (which are bounded by your vault balance and position limits). You can revoke a session at any time from the Portfolio page.
Contract
SessionManager: 0xCbC7aD19B2dE08d710D498706A14F6c0c4F2b017
// Check if a session is valid
function isValidSession(address owner, address sessionWallet) โ bool
// Register a new session (called by owner wallet)
function createSession(address sessionWallet, uint256 duration)Bridge Guide (Arbitrum)
Move USDC from Arbitrum to Vordium and back.
How Bridging Works
Vordex uses a bridge relayer that watches deposits on the Arbitrum side and mints equivalent BUSDC (Bridged USDC) on Vordium. BUSDC is the trading currency on Vordex โ it has 6 decimals and is pegged 1:1 to USDC.
Deposit (Arbitrum โ Vordium)
- Go to the Portfolio page
- Click Deposit โ this connects to the Arbitrum bridge contract
- Approve and deposit USDC on Arbitrum
- The relayer detects your deposit and credits your Vordex vault within ~30 seconds
- Your BUSDC appears in your vault
freeBalance
Withdraw (Vordium โ Arbitrum)
- Go to Portfolio and click Withdraw
- Enter the amount โ a withdrawal request is submitted on Vordium
- The relayer processes the withdrawal and sends USDC to your wallet on Arbitrum
- Minimum withdrawal: $1 USDC. Withdraw fee: $1 USDC
Contracts
| Contract | Chain | Address |
|---|---|---|
| VordexBridge | Arbitrum | 0x529A982c1f5B05A4515a5bF11efF23daFAE02E4d |
| BUSDC | Vordium | 0x2fC288c5c4ed6E72a2488FFF084B770e6b765d65 |
| VordexVault | Vordium | 0x0b8D2e9B1939a6B3e3FB5d0BA30Eb7E6a71EE0e0 |
Network Information
Everything you need to connect to Vordium Chain.
| Parameter | Value |
|---|---|
| Network Name | Vordium Chain |
| Chain ID | 713714 |
| Token | VORD |
| Decimals | 18 |
| RPC URL | https://rpc.vordium.com |
| WebSocket | wss://ws.vordium.com |
| Explorer | https://vordscan.io |
| Faucet | https://faucet.vordium.com |
| Block Time | ~135ms (VordiumBFT) |
| Finality | Instant |
Add to Wallet
One click to add Vordium Chain to MetaMask.
Manual setup
| Network Name | Vordium Chain |
| RPC URL | https://rpc.vordium.com |
| Chain ID | 713714 |
| Currency Symbol | VORD |
| Block Explorer | https://vordscan.io |
RPC Endpoints
Public endpoints for Vordium Chain.
| Protocol | Endpoint |
|---|---|
| HTTPS | https://rpc.vordium.com |
| WebSocket | wss://ws.vordium.com |
| REST API | https://api.vordex.io |
All endpoints are CORS-enabled and accept standard Ethereum JSON-RPC methods.
Block Explorer
VordScan โ view every transaction on Vordium.
VordScan is a fully-featured block explorer for Vordium Chain. Search by address, transaction hash, block number, or token.
VRC-20 Tokens
Vordium's fungible token standard.
VRC-20 extends ERC-20 with Vordium-specific features including on-chain chain verification.
New functions
chainId() // returns 713714
tokenStandard() // returns "VRC-20"
nativeChain() // returns "Vordium"Deploy a VRC-20
pip install vordium
vordium initDeploy with Foundry
forge create VRC20.sol:VRC20 \
--rpc-url https://rpc.vordium.com \
--private-key $PRIVATE_KEY \
--constructor-args "MyToken" "MTK" 18 1000000VRC-721 NFTs
Non-fungible tokens on Vordium.
tokenStandard() // returns "VRC-721"
chainId() // returns 713714VRC-1155 Multi-Token
Multi-token standard for fungible + non-fungible assets in one contract.
tokenStandard() // returns "VRC-1155"
chainId() // returns 713714Deploy a Contract
Full guide to deploying Solidity contracts on Vordium.
Step 1 โ Install Foundry
curl -L https://foundry.paradigm.xyz | bash
source ~/.bashrc
foundryupStep 2 โ Create an ERC-20
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract MyToken is ERC20 {
constructor() ERC20("My Token", "MTK") {
_mint(msg.sender, 1000000 * 10**18);
}
}Step 3 โ Deploy
forge create MyToken.sol:MyToken \
--rpc-url https://rpc.vordium.com \
--private-key $PRIVATE_KEYStep 4 โ Verify on VordScan
- Open vordscan.io
- Search your contract address
- Submit source for verification
Verify Contract
Publish source code on VordScan.
Open your contract page on vordscan.io, click Verify Contract, paste your Solidity source, select the compiler version, and submit. Verified contracts display source, ABI, and a read/write UI.
RPC API Reference
Standard Ethereum JSON-RPC over HTTPS.
| Endpoint | https://rpc.vordium.com |
| Method | POST |
| Content-Type | application/json |
Get block number
curl -X POST https://rpc.vordium.com \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x155a76"
}Get balance
curl -X POST https://rpc.vordium.com \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0x...", "latest"],
"id": 1
}'Get chain ID
curl -X POST https://rpc.vordium.com \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}'Response: {"result": "0xae3f2"}
Supported methods
eth_chainId
eth_blockNumber
eth_getBalance
eth_sendRawTransaction
eth_getTransactionByHash
eth_getTransactionReceipt
eth_call
eth_estimateGas
eth_gasPrice
net_version
web3_clientVersionWebSocket Guide
Subscribe to real-time chain events.
const ws = new WebSocket("wss://ws.vordium.com");
ws.onopen = () => {
ws.send(JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "eth_subscribe",
params: ["newHeads"]
}));
};
ws.onmessage = (e) => {
const data = JSON.parse(e.data);
console.log("New block:", data);
};Vordex Trading Guide
Trade on the Vordium Chain decentralized exchange.
Vordex is the native DEX on Vordium Chain, featuring an on-chain orderbook with 10 trading pairs and support for AI agent trading.
Getting started
- Connect MetaMask โ visit app.vordex.io and connect your wallet.
- Switch to Vordium Chain โ ensure your wallet is on Chain ID
713714. - Deposit USDC to vault โ you must deposit USDC into the Vault contract before placing orders.
- Place orders โ choose a trading pair and place limit or market orders.
Key details
| Parameter | Value |
|---|---|
| URL | https://app.vordex.io |
| Trading Pairs | 10 (ETH, BTC, BNB, SOL, POL, ARB, OP, AVAX, LINK, UNI) |
| Trading Fee | 0.035% |
| Order Types | Limit, Market |
| Settlement | On-chain via Orderbook contract |
AI agent trading
AI agents can trade programmatically by interacting with the Orderbook contract directly. Deposit USDC to the Vault, then call placeOrder or placeMarketOrder on the Orderbook contract to execute trades.
Vordex API
REST API for market data, trading, and account management.
Base URL: https://api.vordex.io. All endpoints return JSON with { success, data, timestamp }. Query parameter ?network=mainnet|testnet selects the network (default varies by endpoint).
Market Data
GET /health
curl https://api.vordex.io/health{ "status": "ok", "chain": "Vordium", "chainId": 713714 }GET /v1/price/:symbol
Oracle price for a single symbol.
curl https://api.vordex.io/v1/price/ETH{ "symbol": "ETH", "pair": "ETH/USDC", "pairId": 1, "price": "2184.71" }GET /v1/price/all
Oracle prices for all 11 trading pairs. Cached for 3 seconds.
curl https://api.vordex.io/v1/price/allGET /v1/candles/:symbol
OHLCV candlestick data. Intervals: 1m, 3m, 5m, 15m, 30m, 1h, 4h, 1d. Max 500 candles.
curl "https://api.vordex.io/v1/candles/ETH?interval=1h&limit=100"{
"data": [
{ "time": 1775739600, "open": "2183.33", "high": "2186.54", "low": "2158.19", "close": "2165.22", "volume": "16119.36" }
],
"symbol": "ETH", "interval": "1h", "count": 100
}GET /v1/trades/:symbol
Recent on-chain trades from TradeExecuted events. Max 200.
curl "https://api.vordex.io/v1/trades/ETH?network=mainnet&limit=50"{
"data": [
{ "symbol": "ETH", "price": "2184.50", "amount": "0.5", "buyer": "0x...", "seller": "0x...", "buyerIsAgent": true, "txHash": "0x..." }
]
}GET /v1/orderbook/:symbol
Live orderbook with bids and asks. Params: ?network=mainnet&depth=10 (max 50).
curl "https://api.vordex.io/v1/orderbook/ETH?network=mainnet&depth=10"{
"data": {
"symbol": "ETH", "midPrice": "2184.710000",
"bids": [{ "id": "42", "price": "2184.00", "amount": "1.5", "isAgent": false }],
"asks": [{ "id": "43", "price": "2185.00", "amount": "2.0", "isAgent": true }]
}
}Trading
POST /v1/order
Place a signed limit or market order. The API verifies the signature and relays the transaction on-chain.
curl -X POST https://api.vordex.io/v1/order \
-H "Content-Type: application/json" \
-d '{
"symbol": "ETH",
"side": "buy",
"type": "limit",
"price": "2000.0",
"amount": "0.1",
"network": "testnet",
"trader": "0xYourAddress",
"signature": "0xSignedMessage",
"nonce": 1712678400
}'Signature: Sign keccak256(abi.encodePacked(symbol, side, type, price, amount, nonce)) with the trader's private key.
{
"data": { "orderId": "123", "symbol": "ETH", "side": "buy", "price": "2000.0", "amount": "0.1", "status": "open", "txHash": "0x..." }
}POST /v1/order/batch
Place up to 10 orders in a single request. All orders are submitted sequentially on-chain.
curl -X POST https://api.vordex.io/v1/order/batch \
-H "Content-Type: application/json" \
-d '{
"orders": [
{ "symbol": "ETH", "side": "buy", "price": "2000", "amount": "0.1" },
{ "symbol": "BTC", "side": "sell", "price": "72000", "amount": "0.01" }
],
"trader": "0xYourAddress",
"signature": "0xSignedMessage",
"nonce": 1712678400,
"network": "testnet"
}'Signature: Sign keccak256(abi.encodePacked("batch", orderSummary, nonce)) where orderSummary is each order's fields concatenated.
DELETE /v1/order/:orderId
Cancel a specific order by ID. Verifies the signature and that the order belongs to the trader.
curl -X DELETE https://api.vordex.io/v1/order/42 \
-H "Content-Type: application/json" \
-d '{
"trader": "0xYourAddress",
"signature": "0xSignedMessage",
"nonce": 1712678400,
"network": "testnet"
}'Signature: Sign keccak256(abi.encodePacked("cancel", orderId, nonce)).
DELETE /v1/order/cancel-all
Cancel all open orders for a trader. Finds open/partial orders and cancels each on-chain.
curl -X DELETE https://api.vordex.io/v1/order/cancel-all \
-H "Content-Type: application/json" \
-d '{
"trader": "0xYourAddress",
"signature": "0xSignedMessage",
"nonce": 1712678400,
"network": "testnet"
}'Signature: Sign keccak256(abi.encodePacked("cancel-all", nonce)).
{
"data": { "trader": "0x...", "totalOrders": 15, "openOrders": 3, "cancelled": 3, "cancelledIds": ["10", "12", "14"] }
}Account & Orders
GET /v1/account/:address
Vault balances and agent status. Params: ?network=mainnet.
curl "https://api.vordex.io/v1/account/0xYourAddress?network=mainnet"{
"data": { "address": "0x...", "freeBalance": "10000.00", "lockedBalance": "2500.00", "totalBalance": "12500.00", "isAgent": false }
}GET /v1/orders/:address
Last 50 orders for a trader with status, fill amount, and agent flag.
curl "https://api.vordex.io/v1/orders/0xYourAddress?network=mainnet"GET /v1/fills/:address
Recent fill history from TradeExecuted events. Shows buys and sells for the address.
curl "https://api.vordex.io/v1/fills/0xYourAddress?network=mainnet"{
"data": [
{ "symbol": "ETH", "side": "buy", "price": "2184.50", "amount": "0.5", "usdcSettled": "1092.25", "txHash": "0x..." }
]
}Protocol
GET /v1/agents
List all registered AI agents with trade stats.
curl https://api.vordex.io/v1/agentsGET /v1/agents/:address
Check if an address is a registered agent.
curl https://api.vordex.io/v1/agents/0xAgentAddressGET /v1/stats
Protocol-wide statistics: TVL, total orders, agent vs human trade counts.
curl https://api.vordex.io/v1/stats{
"data": { "totalPairs": 11, "totalOrders": 0, "tvl": "500.0", "agentTrades": 0, "humanTrades": 0 }
}GET /v1/leaderboard
Top traders ranked by volume. Params: ?type=agents|all&network=mainnet.
curl "https://api.vordex.io/v1/leaderboard?type=agents"GET /v1/pairs
All available trading pairs with pair IDs.
curl https://api.vordex.io/v1/pairsGET /v1/network
Chain info, block height, and all contract addresses.
curl https://api.vordex.io/v1/networkAll 18 endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Health check |
| GET | /v1/price/:symbol | Oracle price for a symbol |
| GET | /v1/price/all | All oracle prices (cached 3s) |
| GET | /v1/candles/:symbol | OHLCV candles (1m to 1d) |
| GET | /v1/trades/:symbol | Recent on-chain trades |
| GET | /v1/orderbook/:symbol | Live orderbook bids/asks |
| POST | /v1/order | Place a signed order (limit or market) |
| POST | /v1/order/batch | Place up to 10 orders at once |
| DELETE | /v1/order/cancel-all | Cancel all open orders |
| DELETE | /v1/order/:orderId | Cancel a specific order |
| GET | /v1/account/:address | Vault balances + agent status |
| GET | /v1/orders/:address | Trader's order history |
| GET | /v1/fills/:address | Trade fill history |
| GET | /v1/agents | All registered agents |
| GET | /v1/agents/:address | Check if address is agent |
| GET | /v1/stats | Protocol stats (TVL, orders, AI ratio) |
| GET | /v1/leaderboard | Top traders by volume |
| GET | /v1/pairs | Trading pairs with IDs |
| GET | /v1/network | Chain info + contract addresses |
Orderbook
On-chain limit orderbook for Vordex trading pairs.
The Orderbook contract handles all order placement, matching, and settlement on Vordium Chain. Prices are denominated in USDC (6 decimals) and amounts in the token (18 decimals).
Side values
0= Buy1= Sell
Pair IDs
| Pair | ID |
|---|---|
| ETH | 1 |
| BTC | 2 |
| BNB | 3 |
| SOL | 4 |
| POL | 5 |
| ARB | 6 |
| OP | 7 |
| AVAX | 8 |
| LINK | 9 |
| UNI | 10 |
| WVORD | 11 |
Key functions
// Place a limit order
function placeOrder(uint256 pairId, uint8 side, uint256 price, uint256 amount) external returns (uint256 orderId);
// Cancel an existing order
function cancelOrder(uint256 id) external;
// Place a market order with slippage protection
function placeMarketOrder(uint256 pairId, uint8 side, uint256 amount, uint256 worstPrice) external returns (uint256 orderId);
// Read functions
function getOrder(uint256 id) external view returns (Order memory);
function getTraderOrders(address trader) external view returns (uint256[] memory);
function getAvailableLiquidity(uint256 pairId, uint8 side, uint256 worstPrice) external view returns (uint256);
function getPairBids(uint256 pairId) external view returns (Order[] memory);
function getPairAsks(uint256 pairId) external view returns (Order[] memory);Example โ Place a limit buy order
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider("https://rpc.vordium.com");
const signer = new ethers.Wallet("0xYOUR_PRIVATE_KEY", provider);
const orderbook = new ethers.Contract(
"0x206816A711257be4F232c9A03dF70e46B02c046B",
["function placeOrder(uint256,uint8,uint256,uint256) returns (uint256)"],
signer
);
// Buy 1 ETH at $3200 USDC
const pairId = 1; // ETH
const side = 0; // Buy
const price = ethers.parseUnits("3200", 6); // USDC has 6 decimals
const amount = ethers.parseUnits("1", 18); // Token has 18 decimals
const tx = await orderbook.placeOrder(pairId, side, price, amount);
await tx.wait();
console.log("Order placed:", tx.hash);Vault
USDC vault for Vordex trading collateral.
Users must deposit USDC into the Vault before placing orders on the Orderbook. The Vault tracks free and locked balances per user. Locked balance represents funds tied to open orders.
USDC on Vordium uses 6 decimals.
Functions
// Deposit USDC into the vault
function deposit(uint256 amount) external;
// Withdraw free USDC from the vault
function withdraw(uint256 amount) external;
// Emergency withdraw all funds (may cancel open orders)
function emergencyWithdraw() external;
// Read balances
function getFreeBalance(address user) external view returns (uint256);
function getLockedBalance(address user) external view returns (uint256);
function getTotalBalance(address user) external view returns (uint256);Example โ Deposit USDC
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider("https://rpc.vordium.com");
const signer = new ethers.Wallet("0xYOUR_PRIVATE_KEY", provider);
const usdc = new ethers.Contract(
"0xc7fBc4a0A05Ad597C9cFed19e55bb8F5bEFcFD04",
["function approve(address,uint256) returns (bool)"],
signer
);
const vault = new ethers.Contract(
"0x20fE8c302AC2a17132bF6cc9E8FE09c9D8E6904f",
["function deposit(uint256)"],
signer
);
const amount = ethers.parseUnits("10000", 6); // 10,000 USDC
// Approve vault to spend USDC
await (await usdc.approve(vault.target, amount)).wait();
// Deposit into vault
await (await vault.deposit(amount)).wait();
console.log("Deposited 10,000 USDC");Oracle
On-chain price oracle for Vordium trading pairs.
The Oracle contract provides spot prices and TWAP (time-weighted average prices) for all Vordex trading pairs. Prices are sourced from Binance and updated every block.
Functions
// Get the current spot price (18 decimals)
function getSpotPrice(uint256 pairId) external view returns (uint256);
// Get the TWAP over a given period in seconds
function getTWAP(uint256 pairId, uint256 period) external view returns (uint256);Pair IDs are the same as the Orderbook: ETH=1, BTC=2, BNB=3, SOL=4, POL=5, ARB=6, OP=7, AVAX=8, LINK=9, UNI=10, WVORD=11.
Example โ Read ETH price
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider("https://rpc.vordium.com");
const oracle = new ethers.Contract(
"0x33751B43995A5D02E60De66a43D3AD0609eFb83A",
[
"function getSpotPrice(uint256) view returns (uint256)",
"function getTWAP(uint256,uint256) view returns (uint256)"
],
provider
);
// Get ETH spot price (pairId = 1)
const spotPrice = await oracle.getSpotPrice(1);
console.log("ETH price:", ethers.formatUnits(spotPrice, 18));
// Get ETH 1-hour TWAP
const twap = await oracle.getTWAP(1, 3600);
console.log("ETH 1h TWAP:", ethers.formatUnits(twap, 18));Agent Registry
On-chain registry for autonomous AI trading agents.
The Agent Registry contract tracks all registered AI agents on Vordium Chain, including their strategy types, trade counts, and volume.
Agent struct
struct Agent {
uint256 id;
string name;
string strategyType;
address owner;
address agentWallet;
uint256 registeredAt;
bool active;
uint256 totalTrades;
uint256 totalVolume;
}Functions
// Get agent by ID
function getAgent(uint256 id) external view returns (Agent memory);
// Get total number of registered agents
function agentCount() external view returns (uint256);
// Check if an address is an active agent
function isActiveAgent(address addr) external view returns (bool);Example โ Query agents
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider("https://rpc.vordium.com");
const registry = new ethers.Contract(
"0x0EeEeb55d23fEca1115d58cDF82c9f656196123f",
[
"function getAgent(uint256) view returns (tuple(uint256 id, string name, string strategyType, address owner, address agentWallet, uint256 registeredAt, bool active, uint256 totalTrades, uint256 totalVolume))",
"function agentCount() view returns (uint256)",
"function isActiveAgent(address) view returns (bool)"
],
provider
);
const count = await registry.agentCount();
console.log("Total agents:", count.toString());
const agent = await registry.getAgent(1);
console.log("Agent #1:", agent.name, "| Strategy:", agent.strategyType);
console.log("Trades:", agent.totalTrades.toString());Contract Addresses
All deployed contract addresses on Vordium Chain.
Core contracts
| Contract | Address |
|---|---|
| Oracle | 0x33751B43995A5D02E60De66a43D3AD0609eFb83A |
| Orderbook (Mainnet) | 0x206816A711257be4F232c9A03dF70e46B02c046B |
| Orderbook (Testnet) | 0x9f19F936c5a3429c8db2F5579b7cB720c56c59d2 |
| Vault (Mainnet) | 0x20fE8c302AC2a17132bF6cc9E8FE09c9D8E6904f |
| Vault (Testnet) | 0x907Edc2afAA6E33E5054839933310Ff028F22318 |
| USDC | 0xc7fBc4a0A05Ad597C9cFed19e55bb8F5bEFcFD04 |
| Agent Registry | 0x0EeEeb55d23fEca1115d58cDF82c9f656196123f |
| Router | 0x44D1e6A78F8c38a590779b539C907d93109A852 |
| Factory | 0x850f616F7C5E9A78BEA0D2f5b1b62745AF8EBe1a |
Token addresses
| Token | Address |
|---|---|
| ETH | 0xc6ACC756Ee8f5337e9c02a4DFc481712bc91fEDE |
| BTC | 0xdae0C6A846A385250a0054339827175459b58Aa8 |
| BNB | 0x41aae57E48726023504d56D9771333370936Be0f |
| SOL | 0xa31d9E0cF04540A1a5A71A7Ba845f63Ad7964Cc1 |
| POL | 0x06Cc35697D63de9D97B6bc3418A24956872B763e |
| ARB | 0x195089a4680aE5E3472A2a7Eb1Db311253b8f7d0 |
| OP | 0x461E154e990Ab16EA1126B8BE03da218249d571b |
| AVAX | 0x5692a931d658e3000c382B957C1547C3a2a0D0eB |
| LINK | 0xA8633D1c7A09472C8141D795616029B35D13a60C |
| UNI | 0x58A43c8C1aa145b57F913212147Afdb0b0d267d8 |
| USDC | 0xc7fBc4a0A05Ad597C9cFed19e55bb8F5bEFcFD04 |