Skip to main content

API Contracts

Virae API keys let external tools call supported application routes as an authenticated app user.

This page describes the practical route families to validate when building scripts, agents, or integrations.

Authentication model

Use the API key created in the web terminal's Settings -> API Keys area.

An API key authenticates supported app routes. It does not replace wallet authority, Turnkey recovery authority, or the signed-in web session used to manage the keys themselves.

Route validation rule

Validate every route your integration needs before depending on it.

Virae has multiple product surfaces and some route families are intentionally narrower than the web UI. A route working for one product area does not mean every product exposes the same behavior.

Common user route families

Useful route families include:

AreaWhat to validate
Accountcurrent authenticated user, linked identity, account readiness
API keyskey creation and revocation are managed from signed-in web, not by another API key
Trade readinesswhether the account can trade a specific venue and product
Fee quoteexpected base fee, commission, settlement rail, and fee collector availability
Order submitsupported venue, outcome token, order type, amount, slippage, source attribution
Open positionscurrent account positions by venue or product scope
Open ordersoutstanding orders and cancelability
Claimsclaimable resolved positions and claim submission status
Activitytrade, funding, claim, and fee history
Copy tradingtask creation, task state, executions, and stop behavior
Rewardsreward summary, ledger, boxes, gift codes, referrals
Notificationsaccount notifications and read state

Trade workflow contract

A trading integration should usually follow this sequence:

  1. confirm the authenticated user
  2. check readiness for the venue and product
  3. request a fee quote or trade preview when available
  4. submit the order with explicit product context
  5. watch order, position, and activity state after submission
  6. handle claim or settlement separately when the market resolves

Do not assume order submission means every later fee, claim, rebate, or settlement step has already finished.

Source attribution

Virae can distinguish different order entry surfaces, such as web, the Polymarket Bot, the Crypto Bot, and Mini App flows.

Integrations should preserve the intended source attribution when a supported route expects it. This helps users and operators understand where an order came from.

Error handling

Treat readiness and fee-related failures as useful state, not only as transport errors.

Common reasons a request can fail or be blocked include:

  • missing account setup
  • missing venue credentials
  • insufficient balance on the required rail
  • stale or unavailable market data
  • unsupported product route
  • expired or revoked API key
  • fee settlement or recovery requirement