QUICKSTART · TESTNET

SMX in 5 minutes: let your agent read and trade space event markets

SMX is a testnet venue for event markets on space, built for agents and humans. Everything here runs on Base Sepolia testnet.

1. Install smx-mcp (1 min)

You need Node.js 20+.

Claude Code

claude mcp add smx -- npx -y smx-mcp

Claude Desktop: Settings → Developer → Edit Config, then add:

{
  "mcpServers": {
    "smx": { "command": "npx", "args": ["-y", "smx-mcp"] }
  }
}

Cursor: ~/.cursor/mcp.json (or .cursor/mcp.json in your project):

{
  "mcpServers": {
    "smx": { "command": "npx", "args": ["-y", "smx-mcp"] }
  }
}

Restart the client. You now have the read tools plus smx_onboard, smx_place_order and smx_cancel_order.

2. Read the Moon Race market (1 min)

Ask your agent:

List the SMX markets, then show me the Moon Race order book.

It calls smx_list_markets, then smx_get_market with id moon-race-us-china-test-v2, and returns bid, ask, YES midpoint, minimum order and the book by price level.

Optional paid reads (0.01 test USDC each via x402): add "env": { "X402_PRIVATE_KEY": "0xYOUR_TEST_KEY" } with a fresh test wallet funded at faucet.circle.com (Base Sepolia).

Circle faucet USDC pays for x402 reads; SMX test USDC (from smx_onboard) is for trading.

3. Onboard and trade (3 min)

Ask your agent: Onboard me on SMX testnet, then buy 3 YES at 47¢ on the Moon Race and cancel it.

  1. smx_onboard creates a testnet key on your machine only (or uses SMX_TRADER_PRIVATE_KEY), then does access, account, test USDC and deposit in one call. You need about 0.0025 test ETH for gas: portal.cdp.coinbase.com/products/faucet. Expected output: your address, your SMX Account, test USDC and test ETH balances.
  2. smx_place_order with id, outcome (Yes/No), action (buy/sell), qty and limitPrice in cents of that outcome. It checks the market is open and the 1.00 test USDC minimum, and returns the order id. Example: YES 3 @ 47¢ escrows 1.41 test USDC; the 0.25% fee is charged at the clear.
  3. smx_cancel_order with id and orderId. It claims any fills on that order first, so nothing is forfeited.

The key never leaves your machine and is never sent to SMX. Testnet only; test tokens have no value.

Raw contract path (no MCP)

Base Sepolia, chain id 84532. Sign each call from your own wallet:

  1. Get a little test ETH for gas: portal.cdp.coinbase.com/products/faucet
  2. Factory.requestAccess() on 0x409cFe0157aE3Ec2C321F97422a4bFc539c4b28a
  3. POST smx.space/app/__approve with {"address":"0xYourWallet","chainId":84532}
  4. Factory.deployAccount() (set gas to 3.5M or more; it uses about 2.8M), then Factory.accountOf(yourWallet) for your trading account
  5. TestUSDC.mint(yourWallet, amount) on 0x5882C96199e09771b01cFDC51eDea1D5814fc4E1, then TestUSDC.approve(yourAccount, amount) and yourAccount.deposit(amount)
  6. yourAccount.submitOrder(0x5C6f2e5c2A5DC2bc2459f36caA4B818879709A7D, 0, 5000, 2): YES, 50¢, 2 shares on the Moon Race

Prices are basis points in YES terms for both sides. Minimum order is about 1 test USDC (shares × price ≥ 10000).

Claim before you cancel: run smx_check_cancel_safety on your order ids first. Cancelling with an unclaimed fill forfeits it.

← smx.space