Skip to main content

What the CLI does

The CLI is the fastest way to:
  • create and manage Solana wallets for trading
  • inspect active instruments and options chains
  • get quotes and order book snapshots
  • place and cancel paper-trading orders
  • review balances, positions, and trade history
  • stream live market data in the terminal
Both human-readable table output and machine-readable JSON output are supported on every command. Current mode: Paper trading only. No real money at risk.

Installation

Prerequisites

  • Node.js >= 20.0.0

Install

This installs the joyride CLI and the bundled MCP server. Verify it’s working:

Uninstall

Setup and authentication

First-run setup

The first time you run any command, an interactive setup wizard launches:
Or run the wizard explicitly:

Authentication model

The CLI authenticates to Joyride using a Solana wallet via SIWS (Sign-In with Solana). The SIWS handshake runs over the core trading WebSocket, and the resulting session token (a JWT) is stored locally and reused as a Bearer credential for reads. Your wallet’s private key is encrypted with a passphrase and stored locally as a keystore file. The CLI is login-only. Account creation happens in the web app at joyride.exchange (referral code + terms attestation). Signing in with a wallet that has no Joyride account fails with a clear “sign up at joyride.exchange” message — invite/referral codes are redeemed in the web app, not the CLI. Session lifetime. joyride login mints a session whose lifetime the server sets (from the JWT’s exp claim) — it is not a fixed client-side default. Run joyride auth status at any time to see the wallet and the session’s exact expiry date. On a shared or untrusted machine, run joyride logout when you are done — this deletes the stored token. The CLI resolves wallet credentials in this order:
  1. JOYRIDE_PRIVATE_KEY env var — Base58-encoded private key (bypasses keystore entirely)
  2. Keystore + JOYRIDE_KEYSTORE_PASSWORD env var — decrypts the keystore automatically
  3. Keystore + interactive passphrase prompt — prompts in TTY mode
For scripting and automation, set the env var to avoid interactive prompts:

Config file

Config is saved to ~/.joyride/config.toml:
The [connection] section uses config schema v2. Every service URL derives from a single public origin, so the only value you normally set is http_url (a bare origin — no path). The CLI derives the core trading WebSocket, market-data WebSocket, oracle WebSocket, public API, and query API URLs from it. To override the derived WebSocket endpoints explicitly, add:
Legacy v1 keys (ws_url, gateway_ws_url, gateway_http_url, or an http_url carrying a gateway path) are no longer valid: on load they are reset to the v2 defaults with a one-time notice. You can edit this file directly instead of re-running joyride setup.

Configuration priority

Settings resolve in this order (highest priority first):
  1. CLI flags (--gateway → trading WS, --http → origin, --asset, --output)
  2. Environment variables (JOYRIDE_TRADING_WS_URL, JOYRIDE_MD_WS_URL, JOYRIDE_HTTP_URL, JOYRIDE_PRIVATE_KEY, JOYRIDE_KEYSTORE_PASSWORD)
  3. Config file (~/.joyride/config.toml)
  4. Defaults (origin https://joyride.exchange)
The old env names JOYRIDE_WS_URL / JOYRIDE_GATEWAY_URL are accepted for one release with a deprecation warning; use JOYRIDE_TRADING_WS_URL and JOYRIDE_MD_WS_URL instead.

Instrument ID format

All instrument IDs follow this pattern:
Examples:
  • SOL_USDC-3MAR26-75-C — SOL $75 call expiring Mar 3, 2026
  • SOL_USDC-27FEB26-100-P — SOL $100 put expiring Feb 27, 2026
Use joyride chain SOL to see all available instruments and their valid IDs. Joyride currently offers same-day (0DTE) options. Instruments expire at end of day and refresh daily.

Command reference

Wallet management

joyride wallet create

Generate a new Solana wallet, encrypt it with a passphrase, and save it locally.
The first wallet you create is automatically set as the active wallet.

joyride wallet import

Import a wallet from a Base58-encoded private key.

joyride wallet list

List all wallets in the keystore directory.

joyride wallet show

Show the active wallet address and keystore path.

joyride wallet use <address>

Switch the active wallet.

Market data

joyride chain <asset>

List all options contracts for an asset. Start here to see available instruments.
Transport: HTTP (public API)

joyride quote <instrument>

Get the current best bid, ask, and mid price.
If the book is empty, bid/ask/mid show -. Transport: WebSocket

joyride book <instrument>

Show bid and ask price levels with sizes.
Transport: WebSocket

joyride ticker <instrument>

Reduced ticker: best bid, ask, and last trade, synthesized from the market-data book mirror. Mark, IV, and 24h stats are not available in alpha. Transport: WebSocket (MD)

joyride tickers

Reduced ticker summary across instruments (best bid/ask/last). Transport: WebSocket (MD)

joyride price <asset>

Current spot price for the underlying asset, from the oracle feed.
Transport: WebSocket (oracle)

joyride market-config

Exchange-level settings (tick sizes, contract sizes). Reduced against core: returns decimals and version only.
Removed at core cutover. joyride history (OHLCV candles) and joyride greeks (mark, IV, and option Greeks) are no longer available — the core exchange exposes no public candle or Greeks surface. For one release these commands still print a “removed at core cutover” notice and exit non-zero, then are dropped.

Trading

joyride order place

Place a limit or market order.
Market orders execute immediately at the best available price. If no counterparty exists, the order is cancelled. Transport: WebSocket

joyride order list

List open orders. Query-api currently has no cursor. Table output warns when a non-empty response may have additional rows; JSON returns { orders, complete }, with complete: false for every non-empty response.
Transport: HTTP (query API, Bearer)

joyride order status <orderId>

Check order status with query-api’s exact, account-scoped order_id filter. Terminal-state order history is not available in alpha, so an order id that is not currently open prints a deterministic notice — it may have filled, been cancelled, or expired (check joyride trades) rather than a bare “not found”. Transport: HTTP (query API, Bearer)

joyride order cancel <orderId>

Cancel a specific order.
Transport: WebSocket

joyride order cancel-all

Cancel all open orders.
The command drains server-filtered batches concurrently and reports success only after an empty read proves that no matching open orders remain. Projection lag or a missing core symbol-filter deployment returns an incomplete failure instead of a false success. Transport: HTTP (query API, Bearer) + WebSocket

Account

joyride balance

Available account collateral. Core does not expose locked or total balance fields.
Transport: HTTP (query API, Bearer)

joyride account

Combined balance and positions overview. Transport: HTTP (query API, Bearer)

joyride positions

Open positions (raw quantity and average price).
Mark, PnL, breakeven, and current-value enrichment is not available in alpha — the core query API returns raw positions only, and the --metrics flag has been removed. Transport: HTTP (query API, Bearer)

joyride trades

Trade history. Add --live <instrument> for a real-time feed.
Transport: HTTP (snapshot), WebSocket (live)

MCP server management

joyride mcp install

Configure the Joyride MCP server in an AI client. This is the easiest way to connect Joyride to Claude Code, Cursor, or Codex.
Requires an active session (joyride login). See the MCP Server Guide for full details.

joyride mcp uninstall

Remove the Joyride MCP server from an AI client.
Safe to run even if joyride is not currently configured.

joyride mcp serve

Start the MCP server directly (stdio transport). This is called automatically by AI clients — you typically don’t need to run it yourself.

Live streaming

Two commands support live-updating terminal UIs powered by Ink. Press Ctrl+C to exit.

joyride watch <channel> [argument]

Subscribe to a WebSocket channel and stream events as JSON lines (one event per line) to stdout. Designed for piping into jq, log files, or downstream agents. Reconnects automatically on transient disconnects. Press Ctrl+C to exit.
The gateway-era spot, tickers, and orders channels have been removed. Spot now has its own command (joyride price <asset>), and order events surface through fills. If a private channel is used without an active session, the command exits immediately with a clear error. Run joyride login first. Transport: WebSocket

Output modes

Every command supports two output formats:

Table (default)

Human-readable tables with formatting and colors.

JSON

Machine-readable JSON for scripts, pipes, and AI agents.

Session expiry metadata

When --output json is used and an active session is loaded, object-typed JSON responses are enriched with a _session field containing the absolute session expiry timestamp. Long-running agents can read this to refresh proactively before the session expires (and the next request returns 401).
Notes:
  • Enrichment only applies when output mode is json. Table output is unaffected.
  • Only object-typed JSON payloads are enriched. Array-typed responses (positions, chain, etc.) are left as-is. order list now returns an object so it can include the pagination-safety complete flag and session metadata.
  • If no session is loaded (e.g. before joyride login has run), the _session field is omitted. Treat its absence as a non-error.
  • The previously-considered _session.expiresIn field is intentionally not emitted — use expiresAt and compute the remaining time at read-time to avoid drift between command execution and output consumption.

Global flags

These flags work on every command:

Transport reference

The CLI talks to the core exchange over WebSocket (trading + market data) and HTTP (query/public API), all derived from the single origin in http_url.

WebSocket commands (real-time)

HTTP commands (snapshots)

Production endpoint:
  • Origin: https://joyride.exchange (trading WS /api/client, MD WS /api/md, oracle WS /api/oracle, query/public API under /api)

Troubleshooting

zsh: command not found: joyride

The CLI is not installed or not on your PATH. Run npm install -g joyride-cli and restart your shell.

Setup wizard hangs or won’t accept input

The wizard requires an interactive terminal (TTY). It won’t work when piped or in CI. Run joyride setup directly in your terminal.

iter.next is not a function

Your installed CLI version is out of date. Upgrade to the latest Joyride CLI package or binary provided for the alpha.

Passphrase prompted on every command

Each CLI invocation is a separate process. To avoid repeated prompts, export the passphrase:
Or use JOYRIDE_PRIVATE_KEY to bypass the keystore entirely.

Quote shows all dashes

The order book is empty — no bids or asks are resting. This is normal on a thin paper trading market. Try joyride chain SOL to find instruments with activity.

HTTP commands fail

Check your config:
Verify http_url is correct and the endpoint is running. WebSocket commands will still work without HTTP.

Orders disappear immediately

0DTE options expire at end of day. If instruments have expired, orders may be automatically cancelled. Use joyride chain SOL to check current expiry dates.

Debug mode

Logs all incoming WebSocket message types and payloads to stderr.