Skip to main content
Mithril’s tenancy has three levels:
  • Workspace — your organization. Created automatically on signup.
  • Subaccount — an isolated strategy or client, each with its own attached exchange credentials, positions, and risk limits.
  • Credentials — your Kalshi API key or Polymarket wallet key, attached to a subaccount, envelope-encrypted, used only to sign orders.
Isolating strategies in subaccounts means a runaway bot in one can’t touch the capital or limits of another.

List subaccounts

Most calls take a subaccount_id. Discover yours instead of hardcoding it:
A subaccount (SubaccountView):

Unified balances

GET /v1/subaccounts/{id}/balances returns the full, live balance set in one page — normalized across venues (USDC on Polymarket, USD on Kalshi):
Each balance (BalanceView):

Create a subaccount

POST /v1/subaccounts seeds the standard guardrails by default. Set disable_guardrails: true to opt out of all protection.

Attach exchange credentials

PUT /v1/subaccounts/{id}/credentials. The body depends on the venue — but private_key is always write-only and never returned by any endpoint.
exchange
string
required
polymarket or kalshi.
wallet_address
string
Polymarket: your wallet address (the signing identity).
api_key_id
string
Kalshi: your API key ID; private_key is its PEM-encoded RSA key.
private_key
string
required
Write-only signing secret. Envelope-encrypted at rest, decrypted only in memory to sign an order, never logged, never returned.
Credentials are write-only. Once attached they are never returned by any endpoint — every secret field is redacted in responses.

Next: Market data

Find markets and read the book before you trade.