Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Onboard to Orderly Network's omnichain perpetual futures DEX infrastructure, MCP server, and developer SDKs.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: orderly-onboarding3version: 1.0.14description: Agent onboarding for Orderly Network - omnichain perpetual futures infrastructure, MCP server, skills, and developer quickstart5---67# Orderly Network: Agent Onboarding89Orderly is an omnichain orderbook-based trading infrastructure providing perpetual futures liquidity for decentralized exchanges. This skill is your starting point for building on or learning about Orderly Network.1011## When to Use1213- First time encountering Orderly Network14- Setting up AI agent tools for Orderly development15- Understanding the Orderly ecosystem and offerings16- Finding the right skill or resource for your task17- Understanding what tools are available for AI agents1819## What is Orderly Network2021Orderly is a combination of an orderbook-based trading infrastructure and a robust liquidity layer offering perpetual futures orderbooks. Unlike traditional platforms, Orderly doesn't have a front end—it operates at the core of the ecosystem, providing essential services to projects built on top.2223**Key Characteristics:**2425- **Omnichain CLOB**: Shared Central Limit Order Book accessible from all major EVM chains and Solana26- **Backend Infrastructure**: No official front end; builders create DEXes and trading interfaces on top27- **On-chain Settlement**: All trades settle on-chain while maintaining full self-custody28- **Unified Liquidity**: One orderbook serves all integrated front-ends29- **Perpetual Futures**: Trade BTC, ETH, SOL, and more with up to 50x leverage30- **Gasless Trading**: No gas fees once funds are deposited and trading keys activated31- **One-Click Trading**: New trading key pair per session, no further signatures needed3233**Primary Use Cases:**3435| Use Case | Description |36| --------------------- | -------------------------------------------------------------------------- |37| **Builders/DEXes** | Create your own Perps DEX on EVM and Solana with plug-and-play SDKs |38| **Perps Aggregators** | Access Orderly's shared liquidity directly via API or SDK |39| **Trading Desks** | Use APIs for CEX-level trading with low latency orderbook |40| **Trading Bots** | Connect to orderbook for best rates, SL/limit orders, gasless transactions |4142## Key Advantages4344- **Unified Orderbook & Liquidity**: Access all major chains through a single trading infrastructure45- **Quick Development**: Launch a DEX within days using our SDKs46- **Ready-to-Use Liquidity**: Powered by multiple top-tier market makers47- **Revenue Sharing**: Earn a share of generated fees from your platform48- **CEX-Level Performance**: Low latency matching engine with on-chain settlement49- **Self-Custody**: You control your assets and private keys50- **Collaborative Ecosystem**: Join a thriving community of builders5152## Architecture5354Your Application (DEX, Bot, Wallet, Aggregator)5556- Orderly Infrastructure57- **CLOB** — Shared Central Limit Order Book (unified across all chains)58- **Matching Engine** — Low-latency order matching (CEX-level performance)59- **Vault** — On-chain settlement with self-custody60- **Risk Management** — Liquidation engine and position monitoring61- Settlement Networks62- **EVM**: Arbitrum, Optimism, Base, Ethereum, Polygon, Mantle63- **Non-EVM**: Solana6465## Getting Started: AI Agent Tools6667To build on Orderly, **install the MCP server** for the best development experience. It provides 8 powerful tools for documentation search, SDK patterns, contract addresses, workflows, and API reference.6869### MCP Server (Recommended)7071The MCP server provides AI assistants with instant access to Orderly documentation, code patterns, and API references.7273**Quick Install:**7475```bash76npx @orderly.network/mcp-server init --client <client>77```7879**Supported Clients:**8081| Client | Command | Config File |82| ----------- | ------------------- | ---------------------- |83| Claude Code | `--client claude` | `.mcp.json` |84| Cursor | `--client cursor` | `.cursor/mcp.json` |85| VS Code | `--client vscode` | `.vscode/mcp.json` |86| Codex | `--client codex` | `~/.codex/config.toml` |87| OpenCode | `--client opencode` | `.opencode/mcp.json` |8889**Manual Configuration:**9091If automatic setup doesn't work, add this configuration to your AI client:9293**Claude Code** (`.mcp.json`):9495```json96{97"mcpServers": {98"orderly": {99"command": "npx",100"args": ["@orderly.network/mcp-server@latest"]101}102}103}104```105106**Cursor** (`.cursor/mcp.json`):107108```json109{110"mcpServers": {111"orderly": {112"command": "npx",113"args": ["@orderly.network/mcp-server@latest"]114}115}116}117```118119**VS Code** (`.vscode/mcp.json`):120121```json122{123"servers": {124"orderly": {125"command": "npx",126"args": ["@orderly.network/mcp-server@latest"]127}128}129}130```131132**OpenCode** (`.opencode/mcp.json`):133134```json135{136"$schema": "https://opencode.ai/config.json",137"mcp": {138"orderly": {139"type": "local",140"command": ["npx", "@orderly.network/mcp-server@latest"],141"enabled": true142}143}144}145```146147**Codex** (`~/.codex/config.toml`):148149```toml150[mcp_servers.orderly]151command = "npx"152args = ["@orderly.network/mcp-server@latest"]153```154155**What the MCP Server Provides:**156157| Tool | Description |158| -------------------------- | ------------------------------------------------ |159| `search_orderly_docs` | Search Orderly documentation for specific topics |160| `get_sdk_pattern` | Get code examples for SDK v2 hooks and patterns |161| `get_contract_addresses` | Lookup smart contract addresses for any chain |162| `explain_workflow` | Step-by-step guides for common tasks |163| `get_api_info` | REST API and WebSocket endpoint documentation |164| `get_indexer_api_info` | Trading metrics, events, volume statistics |165| `get_component_guide` | React UI component building guides |166| `get_orderly_one_api_info` | DEX creation and management API for Orderly One |167168### Agent Skills169170Install Orderly skills to enhance your AI agent with procedural knowledge for building on Orderly.171172**Install all skills globally (recommended):**173174```bash175npx skills add OrderlyNetwork/skills --all --agent '*' -g176```177178**Install all skills locally:**179180```bash181npx skills add OrderlyNetwork/skills --all182```183184**Install specific skills:**185186```bash187# List available skills188npx skills add OrderlyNetwork/skills --list189190# Install specific skill191npx skills add OrderlyNetwork/skills --skill orderly-trading-orders192193# Install multiple skills194npx skills add OrderlyNetwork/skills --skill orderly-api-authentication --skill orderly-trading-orders195196# Install for specific agent197npx skills add OrderlyNetwork/skills --all --agent claude-code -g198```199200**Global vs Local:**201202- **Global (`-g`)**: Available across all projects, installed to user directory203- **Local**: Project-specific, creates `.skills/` in repo, can be committed to version control204205**Available Skills:**206207| Category | Skill | Description |208| ------------------ | -------------------------------- | --------------------------------------------------- |209| **API / Protocol** | `orderly-api-authentication` | Two-layer auth: EIP-712 (EVM) + Ed25519 (Solana) |210| | `orderly-trading-orders` | Place, manage, cancel orders via REST API or SDK |211| | `orderly-positions-tpsl` | Monitor positions, TP/SL, leverage, PnL |212| | `orderly-websocket-streaming` | Real-time WebSocket for orderbook and executions |213| | `orderly-deposit-withdraw` | Token deposits, withdrawals, cross-chain operations |214| **SDK / React** | `orderly-sdk-react-hooks` | Reference for all React SDK hooks |215| | `orderly-ui-components` | Pre-built React UI components |216| | `orderly-sdk-install-dependency` | Install Orderly SDK packages |217| | `orderly-sdk-dex-architecture` | Complete DEX project structure and setup |218| | `orderly-sdk-page-components` | Pre-built page components |219| | `orderly-sdk-theming` | CSS variable theming and customization |220| | `orderly-sdk-trading-workflows` | End-to-end trading flows |221| **Platform** | `orderly-sdk-wallet-connection` | Wallet integration for EVM and Solana |222| | `orderly-sdk-debugging` | Debug/troubleshoot SDK errors |223| | `orderly-one-dex` | Create/manage custom DEX with Orderly One API |224225## For Builders (SDK & DEX Development)226227Build custom trading interfaces using Orderly's React SDK v2.228229### Fastest Way to Get Started230231Fork the **[DEX Template](https://github.com/OrderlyNetwork/dex-template)** to get a working DEX in minutes.2322331. Fork the repository to your GitHub account2342. Configure `.env` with your broker ID and name2353. Customize your theme with **orderly-sdk-theming** (CSS variables and color tokens)2364. Deploy to your preferred hosting platform237238This template uses the **components SDK** — pre-built page components that work out of the box with less customization. For full control over individual components, use the MCP server and load SDK skills (especially **orderly-sdk-react-hooks** and **orderly-sdk-ui-components**) for hooks-level development.239240**Core SDK Packages:**241242```bash243# Full DEX setup244npm install @orderly.network/react-app \245@orderly.network/trading \246@orderly.network/portfolio \247@orderly.network/markets \248@orderly.network/wallet-connector \249@orderly.network/i18n250251# Required: EVM wallet support252npm install @web3-onboard/injected-wallets @web3-onboard/walletconnect253254# Required: Solana wallet support255npm install @solana/wallet-adapter-base @solana/wallet-adapter-wallets256```257258**Key Components Available:**259260- `OrderEntry` - Order placement form261- `Orderbook` - Market depth display262- `PositionsView` - Position management table263- `TradingPage` - Full trading page264- `Portfolio` - User portfolio dashboard265- `ConnectWalletButton` - Wallet connection UI266267**Orderly One (White-Label DEX):**268269Launch your own branded perpetuals DEX without building from scratch. Orderly One provides a turnkey solution with:270271- Custom domain and branding272- Fee revenue sharing after paying graduation fee273- Full trading infrastructure274- Custom theme275276**Load these skills for SDK development:**277278- **orderly-sdk-install-dependency** - Package installation guide279- **orderly-sdk-dex-architecture** - Project structure and providers280- **orderly-sdk-wallet-connection** - Wallet integration281- **orderly-sdk-trading-workflows** - Complete trading flows282- **orderly-sdk-theming** - Customization guide283284## For API / Bot Developers285286Integrate directly with Orderly's REST API and WebSocket streams.287288**API Base URLs:**289290| Network | URL |291| ------- | --------------------------------- |292| Mainnet | `https://api.orderly.org` |293| Testnet | `https://testnet-api.orderly.org` |294295**WebSocket URLs:**296297| Network | URL |298| ------- | --------------------------------- |299| Mainnet | `wss://ws.orderly.org/ws` |300| Testnet | `wss://testnet-ws.orderly.org/ws` |301302**Authentication:**303304- Ed25519 key pair generation for API signing305- EIP-712 wallet signatures for EVM accounts306- Ed25519 message signing for Solana accounts307308**Symbol Format:**309310```311PERP_<TOKEN>_USDC312```313314Examples: `PERP_ETH_USDC`, `PERP_BTC_USDC`, `PERP_SOL_USDC`315316**Key Endpoints:**317318- `POST /v1/order` - Place order319- `GET /v1/positions` - Get positions320- `GET /v1/orders` - Get orders321- `GET /v1/orderbook/{symbol}` - Orderbook snapshot322- `GET /v1/public/futures` - Market info323324**Load these skills for API development:**325326- **orderly-api-authentication** - Complete auth setup327- **orderly-trading-orders** - Order management328- **orderly-positions-tpsl** - Position management329- **orderly-websocket-streaming** - Real-time data330331## Orderly CLI332333A terminal trading tool (`@orderly.network/cli`) wrapping the full Orderly REST API. **AI-safe**: keys in OS keychain, signing internal, agents only see results. `orderly --help` covers everything.334335**Install & Quick Start (Testnet):**336337```bash338npm install -g @orderly.network/cli339orderly wallet-create --type EVM --network testnet340orderly wallet-register --broker-id demo --network testnet341orderly faucet-usdc <address> --chain-id 421614 --network testnet342orderly wallet-add-key --network testnet343orderly auth-list --network testnet344orderly order-place PERP_ETH_USDC BUY MARKET 0.01 --account <id> --network testnet345```346347**Note:** `--account` is required for authenticated commands (get IDs via `auth-list`). Hex IDs must be shell-quoted. Default network is testnet — pass `--network mainnet` for production. Linux requires `libsecret`.348349### Broker IDs350351- **`demo`** — For testing, development, and personal use. No setup required.352- **Custom** — Go to [dex.orderly.network](https://dex.orderly.network), select **"Custom API integration"**. Costs **$10**, requires manual browser interaction (cannot be done via CLI or agent).353354## Supported Chains355356Orderly supports multiple EVM and non-EVM chains. To get the current list of supported networks with their chain IDs, vault addresses, and RPC endpoints:357358```359GET https://api.orderly.org/v1/public/chain_info360```361362This endpoint returns all mainnet and testnet chains currently supported by Orderly, including Arbitrum, Optimism, Base, Ethereum, Polygon, Mantle, Solana, Sei, Avalanche, BSC, Abstract, and more.363364## $ORDER Token365366The $ORDER token is central to the Orderly ecosystem:367368- **Maximum Supply:** 1,000,000,000 tokens369- **Staking:** Stake $ORDER to earn VALOR and protocol revenue share370- **VALOR:** Non-transferable metric measuring staking position; redeemable for esORDER rewards371- **Revenue Sharing:** 30% of protocol net fees distributed to stakers372- **Governance:** Stakers participate in protocol governance decisions373- **esORDER:** Escrowed ORDER for rewards with vesting mechanics374375**Token Contracts:**376377| Network | Address |378| ---------------- | ---------------------------------------------- |379| Ethereum (ERC20) | `0xABD4C63d2616A5201454168269031355f4764337` |380| EVM Chains (OFT) | `0x4E200fE2f3eFb977d5fd9c430A41531FB04d97B8` |381| Solana | `ABt79MkRXUsoHuV2CVQT32YMXQhTparKFjmidQxgiQ6E` |382383For full tokenomics details, visit: https://orderly.network/docs/introduction/tokenomics384385## Key Links386387| Resource | URL | Notes |388| --------------------- | ---------------------------------------------------------------------- | ---------------------------------------------- |389| Documentation | https://orderly.network/docs | |390| SDK Repository | https://github.com/orderlynetwork/js-sdk | |391| DEX Template | https://github.com/OrderlyNetwork/dex-template | Fastest start, uses components SDK |392| MCP Server (npm) | https://www.npmjs.com/package/@orderly.network/mcp-server |393| CLI (npm) | https://www.npmjs.com/package/@orderly.network/cli |394| Skills (npm) | https://www.npmjs.com/package/@orderly.network/skills |395| Skills.sh | https://skills.sh |396| DEX Dashboard | https://dex.orderly.network |397| Orderly App | https://app.orderly.network |398| Discord | https://discord.gg/OrderlyNetwork |399| Twitter | https://twitter.com/OrderlyNetwork |400401## Recommended Next Steps402403**If you're building a DEX:**4044051. Fork the **[DEX Template](https://github.com/OrderlyNetwork/dex-template)** for the fastest start4062. Install MCP server: `npx @orderly.network/mcp-server init`4073. Configure your broker settings in `.env` and customize your theme4084. For more control, load **orderly-sdk-install-dependency** and **orderly-sdk-dex-architecture** to build from scratch4095. Set up wallet connection with **orderly-sdk-wallet-connection**410411**If you're building trading bots or API integrations:**4124131. Load **orderly-api-authentication** first4142. Install MCP server for API reference4153. Load **orderly-trading-orders** and **orderly-websocket-streaming**416417**If you want to trade from the terminal or use the CLI:**4184191. Install the CLI: `npm install -g @orderly.network/cli`4202. Run `orderly --help` to see all commands4213. Follow the testnet quick start (6 commands, see Orderly CLI section above)4224. Use `--broker-id demo` for testing, or get a custom broker ID at [dex.orderly.network](https://dex.orderly.network) ($10, manual browser interaction required)423424**If you're launching a white-label DEX:**4254261. Install MCP server for Orderly One API tools: `npx @orderly.network/mcp-server init`4272. Load **orderly-one-dex** skill for DEX creation and management workflows4283. Load **orderly-sdk-theming** skill to understand theme structure for API updates429430**If you're troubleshooting:**4314321. Load **orderly-sdk-debugging**4332. Use MCP server to search documentation434435**For testing:**436437- Use Testnet environment for development438- Request testnet USDC from the faucet: `POST /v1/faucet/usdc` (testnet only)439- Each account can use faucet up to 3 times440441## Common Issues442443### "Where do I start building?"444445**For a quick DEX**: Fork the [DEX Template](https://github.com/OrderlyNetwork/dex-template), configure `.env`, and deploy. Uses pre-built components — fastest path.446447**For more control**: Install the MCP server first: `npx @orderly.network/mcp-server init --client <your-client>`, then load SDK skills like **orderly-sdk-react-hooks** and **orderly-sdk-dex-architecture** to build with the hooks SDK.448449Then ask: "How do I connect to Orderly Network?" or load **orderly-sdk-wallet-connection**.450451### "What's the difference between MCP server and Skills?"452453- **MCP Server**: Runtime tools for your AI assistant (documentation search, pattern lookup, API reference)454- **Skills**: Procedural knowledge embedded in your context (how-to guides, code examples, best practices)455456Use both for the best experience.457458### "How do I test without real funds?"459460Use the Testnet environment:461462- API: `https://testnet-api.orderly.org`463- WebSocket: `wss://testnet-ws.orderly.org/ws`464- Get test USDC: `POST https://testnet-operator-evm.orderly.org/v1/faucet/usdc`465466### "Do I need to handle authentication manually?"467468The SDK handles authentication automatically. For API-only integration, load **orderly-api-authentication** for the complete auth flow.469470### "How do I get a custom broker ID?"471472Go to [dex.orderly.network](https://dex.orderly.network), select the **"Custom API integration"** option, and follow the steps. It costs **$10**. This requires manual browser interaction and cannot be done via CLI or agent. For testing and development, use `--broker-id demo` — no setup needed.473474## Related Skills475476### API / Protocol477478- **orderly-api-authentication** - Complete authentication setup479- **orderly-trading-orders** - Order management480- **orderly-positions-tpsl** - Position and risk management481- **orderly-websocket-streaming** - Real-time data streaming482- **orderly-deposit-withdraw** - Asset management483484### SDK / React485486- **orderly-sdk-react-hooks** - React hooks reference487- **orderly-ui-components** - Pre-built UI components488- **orderly-sdk-install-dependency** - SDK installation489- **orderly-sdk-dex-architecture** - DEX architecture490- **orderly-sdk-page-components** - Page components491- **orderly-sdk-theming** - Theming guide492- **orderly-sdk-trading-workflows** - Trading workflows493494### Platform495496- **orderly-sdk-wallet-connection** - Wallet integration497- **orderly-sdk-debugging** - Debugging guide498- **orderly-one-dex** - Orderly One DEX management499