Skip to content
The Mog guide

API

Mog has no account API keys. Your wallet is the account, and a session key it grants signs trading instructions. Reads are public. Every write is a signed instruction that the chain checks.

PartUse it toAuth
mog CLITrade, read the account and run strategies from a terminal or an agentSession key on your machine
Info endpoint, POST /indexer/infoRead markets, prices, candles, orders, positions, fills and payoutsNone. Reads are public.
Stream, /indexer/wsFollow prices, fills and order updates liveNone
Relay, POST /submitDeliver signed orders, cancels, closes and top-ups. The relay pays the network fee.The signature in each instruction. Browser requests are accepted only from Mog’s own sites; servers and the CLI send no origin and are accepted.
The chainSend the same signed instructions yourself and pay the network feeThe signature, or the sending wallet

Start with the quick start. The CLI handles keys, signing, units and retries, so it is the simplest client.

Wallet (root)Session key
SignsGranting and revoking session keys, withdrawalsOrders, cancels, closes, top-ups
Can withdrawYesNo. The contract refuses it.
LifetimePermanentExpires. At launch, at most 7 days.

A leaked session key can trade the account’s balance until it expires or the wallet revokes it. It can never move money out. See Session keys.

MainnetTestnet
ChainRobinhood Chain, id 4663Robinhood Chain testnet, id 46630
API hosthttps://api.mog.xyzhttps://api.testnet.mog.xyz
Info endpointhttps://api.mog.xyz/indexer/infohttps://api.testnet.mog.xyz/indexer/info
Streamwss://api.mog.xyz/indexer/wswss://api.testnet.mog.xyz/indexer/ws
CLImog network mainnetthe default
  • Money, prices and ids are decimal strings of whole numbers, so no precision is lost. Prices and most money values carry 18 decimals. Trading-balance units carry 6.
  • Times are Unix milliseconds. Signed deadlines are Unix seconds in chain time.
  • Lists page by cursor: pass the last row’s cursor to get the next page. A page shorter than its limit is the last.
  • Errors: relay refusal codes and CLI exit codes.
  • Permissions: who may call each part of the venue.