API Documentation

Complete API reference for TokenStake Staking-as-a-Service platform

Quick Links

Authentication

All API requests require authentication using a Bearer token. Include your token in the Authorization header:

Authorization: Bearer YOUR_TOKEN_HERE

Pool Management

Create Pool

POST /api/pools/create

Create a new staking pool with custom parameters.

View example request
{
  "name": "My Staking Pool",
  "description": "A custom staking pool for my token",
  "token": {
    "policy_id": "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6",
    "asset_name": "MyToken",
    "decimals": 6
  },
  "parameters": {
    "minimum_stake": 100,
    "reward_rate": 500,
    "cooldown_period": 604800,
    "pool_fee": 100,
    "auto_compound": false
  },
  "access_control": {
    "type": "open"
  }
}

List Your Pools

GET /api/pools?page=1&per_page=20

Retrieve all pools owned by the authenticated user.

Get Pool Details

GET /api/pools/{pool_id}

Retrieve detailed information about a specific pool.

Pool Creation Wizard

Estimate Deployment Cost

POST /api/pool-wizard/estimate-cost

Calculate deployment costs before creating a pool. No authentication required.

Validate Configuration

POST /api/pool-wizard/validate

Validate pool configuration before deployment.

Create Pool from Wizard

POST /api/pool-wizard/create

Create a pool using wizard configuration data.

Wallet Management

Get Pool Wallet

GET /api/wallets/{pool_id}/wallet

Retrieve wallet information for a pool.

Get Wallet Balance

GET /api/wallets/{pool_id}/wallet/balance

Check current balance of pool wallet.

User Management

Get User Profile

GET /api/users/profile

Retrieve authenticated user's profile.

Get Subscription

GET /api/users/subscription

Retrieve user's subscription and tier information.

Response Codes

Code Description
200 Success
201 Created
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid or missing token
403 Forbidden - Insufficient permissions
404 Not Found
500 Internal Server Error