Last Updated: May 13, 2026 Purpose: Quick reference guide for AI agents
- Local:
http://localhost:1317 - Public testnet (SSL):
https://public.testnet.structs.network(standard HTTPS, no port —http://...:1317is local-devnet only and is dead on the public host) - Base Path:
/structs - Local Tendermint RPC:
http://localhost:26657 - Public Tendermint RPC (SSL):
https://public.testnet.structs.network:26657 - Public Tendermint WebSocket:
wss://public.testnet.structs.network:26657/websocket
- Local:
http://localhost:8080 - Public guild webapp (Orbital Hydro):
http://crew.oh.energy - Base Path:
/api
- Local NATS:
nats://localhost:4222 - Local GRASS WebSocket:
ws://localhost:1443 - Public GRASS WebSocket (Orbital Hydro):
ws://crew.oh.energy:1443
Get Player (Consensus):
GET /structs/player/{id}
Get Player (Webapp):
GET /api/player/{player_id}
Get Player Ore Stats:
GET /api/player/{player_id}/ore/stats
Get Player's Planets:
GET /structs/planet_by_player/{playerId}
Get Planet (Consensus):
GET /structs/planet/{id}
Get Planet (Webapp):
GET /api/planet/{planet_id}
Get Planet Shield Health:
GET /api/planet/{planet_id}/shield/health
Get Guild (Consensus):
GET /structs/guild/{id}
Get Guild (Webapp):
GET /api/guild/{guild_id}
Get Guild Member Count:
GET /api/guild/{guild_id}/members/count
Get Guild Power Stats:
GET /api/guild/{guild_id}/power/stats
Get Struct (Consensus):
GET /structs/struct/{id}
Get Struct (Webapp):
GET /api/struct/{struct_id}
Get Struct Type (Consensus):
GET /structs/struct_type/{id}
Note: the
struct_typeLCD query can return gRPCcode 12("Not Implemented") on the deployed testnet build. Fall back to the CLI (structsd query structs struct-type-all) or the Guild Stack PostgreSQL mirror.
Get Structs at a Location (Webapp) (planet or fleet):
GET /api/struct/list/location/{location_id}/page/{page}
Get a Player's Structs (Webapp):
GET /api/struct/player/{player_id}
Submit Transaction:
POST /cosmos/tx/v1beta1/txs
Get Transaction:
GET /cosmos/tx/v1beta1/txs/{hash}
Uniform paginated lists under /api/{entity}[/{filter}]/page/{page}:
GET /api/allocation/source/{source_id}/page/{page}
GET /api/agreement/owner/{owner}
GET /api/permission/object/{object_id}/page/{page}
GET /api/permission-guild-rank/guild/{guild_id}/page/{page}
GET /api/planet-activity/planet/{planet_id}/page/{page}
GET /api/grid/object/{object_id}/page/{page}
GET /api/struct-defender/protected/{protected_struct_id}/page/{page}
GET /api/banned-word/all
GET /api/defusion/validator/{validator_address}/page/{page}
See webapp/ for the full per-entity catalog.
GET /api/setting
GET /api/stat/{metric}/object/{object_key}/range/page/{page}?start_time={unix}&end_time={unix}
{
"success": true,
"data": {...}
}{
"success": false,
"data": null,
"errors": ["Error message"]
}{
"Player": {...}
}{
"code": 2,
"message": "codespace structs code 1900: object not found",
"details": []
}- 200 - Success
- 400 - Bad Request
- 404 - Not Found
- 429 - Rate Limit Exceeded
- 500 - Internal Server Error
- 503 - Service Unavailable
Default Limits:
- Consensus Network: 60 requests/minute
- Web Application: 100 requests/minute
- RPC: 30 requests/minute
Headers:
X-RateLimit-Limit- Maximum requestsX-RateLimit-Remaining- Remaining requestsX-RateLimit-Reset- Reset timestampRetry-After- Seconds to wait (when rate limited)
See: api/rate-limits.md for complete details
500- Internal Server Error503- Service Unavailable429- Rate Limit (with delay)- Network errors
- Timeout errors
400- Bad Request404- Not Found401- Unauthorized (re-authenticate)403- Forbidden
See: api/error-codes.md for complete error catalog
Subject Patterns
- Player Events:
structs.player.>(specific:structs.player.{guild_id}.{player_id}) - Guild Events:
structs.guild.* - Planet Events:
structs.planet.>(specific:structs.planet.{planet_id}.{player_id}, e.g.structs.planet.3-1.*) - Struct Events:
structs.struct.* - Fleet Events:
structs.fleet.* - Grid Attributes:
structs.grid.>(specific:structs.grid.{object_type}.{object_id}.{player_id}) - Inventory:
structs.inventory.> - Global Events:
structs.global
Grid and planet subjects end with the owning
player_id(added 2026-07-07;noPlayerwhen unresolved), and their payloads carry aplayer_idfield. NATS*matches one token,>the rest — a barestructs.planet.*no longer matches.
For untyped chain events (e.g. ugc_moderated) subscribe to wss://public.testnet.structs.network:26657/websocket.
- Consensus:
block - Guild:
guild_consensus,guild_meta,guild_membership - Planet:
raid_status,planet_activity(includesstruct_healthdetails),fleet_arrive,fleet_advance,fleet_depart - Struct:
struct_status,struct_move,struct_attack,struct_block_build_start - Player:
player_consensus
See: protocols/streaming.md for complete documentation
Login (sign LOGIN_GUILD{guildId}ADDRESS{address}DATETIME{unix_timestamp}):
POST /api/auth/login
Body: {"address": "...", "signature": "...", "pubkey": "...", "guild_id": "0-1", "unix_timestamp": "..."}
Response: 200 {"success": true, "errors": {}, "data": null} + Set-Cookie: PHPSESSID
Authenticated Request (session required for all /api/ except /api/auth/*, /api/guild/this, /api/timestamp, /api/setting):
GET /api/reactor/all/page/1
Headers: {"Cookie": "PHPSESSID=..."}
Process:
- Get account info
- Create transaction
- Sign with private key
- Submit transaction
See: protocols/authentication.md for complete documentation
Consensus Network:
GET /structs/player?pagination.limit=10&pagination.offset=0
Response:
{
"Player": [...],
"pagination": {
"next_key": "...",
"total": "100"
}
}GET /api/player/{player_id}GET /structs/planet_by_player/{playerId}
Pattern: Linear Chain
See: examples/workflows/get-player-and-planets.md
GET /api/guild/{guild_id}GET /api/guild/{guild_id}/members/count(parallel)GET /api/guild/{guild_id}/power/stats(parallel)
Pattern: Parallel with Dependency
See: examples/workflows/query-guild-stats.md
GET /api/planet/{planet_id}(initial load)- Subscribe to
structs.planet.{id}.*(streaming)
Pattern: Hybrid (Query + Streaming)
See: examples/workflows/monitor-planet-shield.md
See: examples/workflows/README.md for complete workflow examples
Request Schemas: schemas/requests.md
Response Schemas: schemas/responses.md
Entity Schemas: schemas/entities.md
Error Schemas: schemas/errors.md
Protocols:
protocols/query-protocol.md- Query API protocolprotocols/action-protocol.md- Transaction protocolprotocols/webapp-api-protocol.md- Webapp API protocolprotocols/streaming.md- GRASS/NATS streamingprotocols/authentication.md- Authenticationprotocols/error-handling.md- Error handlingprotocols/testing-protocol.md- Testing
API Documentation:
api/endpoints.md- Complete endpoint catalogapi/endpoints-by-entity.md- Entity-based organizationapi/error-codes.md- Error code catalogapi/rate-limits.md- Rate limitingapi/streaming/- Streaming documentation
Examples:
examples/workflows/- Workflow examplesexamples/errors/- Error examplesexamples/auth/- Authentication examples
Reference:
reference/endpoint-index.md- Endpoint indexreference/action-index.md- Action indexreference/action-quick-reference.md- Action quick referencereference/api-quick-reference.md- This file
- Pagination:
patterns/pagination.md- Handle paginated responses - Caching:
patterns/caching.md- Cache API responses - Polling vs Streaming:
patterns/polling-vs-streaming.md- Choose data access method
- Rate Limiting:
patterns/rate-limiting.md- Handle rate limits - Retry Strategies:
patterns/retry-strategies.md- Retry failed requests
- Workflow Patterns:
patterns/workflow-patterns.md- Multi-step operations - Workflow Examples:
examples/workflows/README.md- Complete examples
- Security:
patterns/security.md- Security best practices
See: patterns/README.md for complete pattern catalog
- Always check response status before processing
- Validate responses against schemas
- Handle errors gracefully with retry logic
- Respect rate limits and use headers
- Cache responses when possible
- Use appropriate authentication for each API
- Test endpoints before production use
- Monitor streaming events for real-time updates
- Use patterns for common scenarios (see Patterns Reference above)
- Follow workflow examples for multi-step operations