over.computer
Trade on prediction markets through the over.computer API.
Use this when the operator says things like:
- - check markets
- place an order / buy / sell
- approve funds
- show my positions
- list my orders
Getting started
If OVER_API_KEY is not set, help the operator register:
Option A — agent-initiated:
- 1. Call the link endpoint (no auth required) to obtain a registration URL:
CODEBLOCK0
This returns { "configId": "<uuid>", "url": "<registration_url>" }.
- 2. Give the operator the
url and ask them to open it, connect their wallet on over.computer, and copy the API key shown after setup. - Once the operator provides the key, store it as
OVER_API_KEY.
Option B — operator-initiated:
- 1. The operator goes to https://over.computer directly, registers, and obtains an API key.
- The operator gives the key to you.
Authentication
All endpoints under /myriad/* and /agent/* require the header:
CODEBLOCK1
Get your config
Retrieve your agent’s configuration from the operator (same auth as Myriad routes):
CODEBLOCK2
Returns: { "prompt": "...", "label": "..." } (either field may be null if unset).
- -
prompt — trading instructions from the operator; follow them as your directive. label — your agent’s display name.
Guardrails (position limits, trade limits, allowed markets, etc.) are enforced server-side and are not exposed on this endpoint. If an order violates a guardrail, the execute endpoint will reject it with a clear reason.
Browse markets
List open markets:
CODEBLOCK3
Query parameters: limit (number), page (number), state (string, default open).
Get details for a specific market:
CODEBLOCK4
Place an order
CODEBLOCK5
Body fields:
- -
idempotency_key (string, required) — unique key to prevent duplicate orders - INLINECODE15 (number, required)
- INLINECODE16 (number, required)
- INLINECODE17 (
"BUY" | "SELL", required) - INLINECODE20 (number, required) — order size in token units
- INLINECODE21 (number, optional)
A duplicate idempotency_key returns HTTP 400 with the existing order.
Check positions
CODEBLOCK6
Order history
CODEBLOCK7
Config guardrails
The operator's config may restrict what the agent can do:
- - allowedmarkets — whitelist of permitted market IDs
- maxordersize — maximum USD value per order
- maxtradesperday — daily trade limit
When a request violates a guardrail the API returns an error with a clear reason, for example:
- - INLINECODE23
- INLINECODE24
- INLINECODE25
When this happens:
- 1. Do not retry the request.
- Tell the operator the exact rejection reason.
- Ask the operator to update their config at https://over.computer — only humans can change config settings.
Error reference
- -
400 — Bad request or duplicate INLINECODE27 - INLINECODE28 — Missing or invalid API key
- INLINECODE29 — Agent has no associated user or no config found
- INLINECODE30 — Resource not found
- INLINECODE31 — Server error (includes guardrail rejections wrapped in order execution)
If execution cannot proceed due to missing credentials or API errors, inform the operator and stop. Do not retry failed requests without operator confirmation.
over.computer
通过 over.computer API 在预测市场进行交易。
当操作者说出以下内容时使用此功能:
- - 查看市场
- 下单 / 买入 / 卖出
- 批准资金
- 显示我的持仓
- 列出我的订单
快速开始
如果未设置 OVERAPIKEY,请帮助操作者注册:
选项 A — 代理主动发起:
- 1. 调用链接端点(无需认证)以获取注册 URL:
bash
curl -s --request GET \
--url https://over-computer-validator-1002664526717.europe-north2.run.app/config/link
返回 { configId: , url: }。
- 2. 将 url 提供给操作者,请他们打开链接,在 over.computer 上连接钱包,并复制设置后显示的 API 密钥。
- 操作者提供密钥后,将其存储为 OVERAPIKEY。
选项 B — 操作者主动发起:
- 1. 操作者直接访问 https://over.computer,注册并获取 API 密钥。
- 操作者将密钥提供给您。
认证
所有 /myriad/ 和 /agent/ 下的端点都需要以下请求头:
Authorization: Bearer $OVERAPIKEY
获取配置
从操作者处检索您的代理配置(与 Myriad 路由相同的认证方式):
bash
curl -s --request GET \
--url https://over-computer-validator-1002664526717.europe-north2.run.app/agent/config \
--header Authorization: Bearer $OVERAPIKEY
返回:{ prompt: ..., label: ... }(如果未设置,任一字段可能为 null)。
- - prompt — 来自操作者的交易指令;请将其作为您的操作指南。
- label — 您代理的显示名称。
防护规则(持仓限制、交易限制、允许的市场等)在服务端强制执行,不会在此端点暴露。如果订单违反防护规则,执行端点将返回明确的拒绝原因。
浏览市场
列出开放市场:
bash
curl -s --request GET \
--url https://over-computer-validator-1002664526717.europe-north2.run.app/myriad/markets?state=open&limit=10&page=1 \
--header Authorization: Bearer $OVERAPIKEY
查询参数:limit(数字)、page(数字)、state(字符串,默认为 open)。
获取特定市场的详细信息:
bash
curl -s --request GET \
--url https://over-computer-validator-1002664526717.europe-north2.run.app/myriad/markets/{slug} \
--header Authorization: Bearer $OVERAPIKEY
下单
bash
curl -s --request POST \
--url https://over-computer-validator-1002664526717.europe-north2.run.app/myriad/order/execute \
--header Authorization: Bearer $OVERAPIKEY \
--header Content-Type: application/json \
--data {
idempotency_key: unique-key-per-order,
order: {
market_id: 123,
outcome_id: 0,
side: BUY,
size: 50,
slippage: 0.05
}
}
请求体字段:
- - idempotencykey(字符串,必填)— 唯一键,防止重复下单
- order.marketid(数字,必填)
- order.outcome_id(数字,必填)
- order.side(BUY | SELL,必填)
- order.size(数字,必填)— 以代币单位计量的订单大小
- order.slippage(数字,可选)
重复的 idempotency_key 将返回 HTTP 400 及现有订单信息。
查看持仓
bash
curl -s --request GET \
--url https://over-computer-validator-1002664526717.europe-north2.run.app/myriad/order/positions \
--header Authorization: Bearer $OVERAPIKEY
订单历史
bash
curl -s --request GET \
--url https://over-computer-validator-1002664526717.europe-north2.run.app/myriad/order/list \
--header Authorization: Bearer $OVERAPIKEY
配置防护规则
操作者的配置可能限制代理的操作:
- - allowedmarkets — 允许的市场 ID 白名单
- maxordersize — 每笔订单的最大美元价值
- maxtradesperday — 每日交易限制
当请求违反防护规则时,API 会返回错误及明确原因,例如:
- - 市场 456 不在允许的市场列表中
- 订单大小 200 * 价格 1 超过最大允许值 100
- 每日交易次数 10 超过最大允许值 5
发生这种情况时:
- 1. 不要重试请求。
- 将确切的拒绝原因告知操作者。
- 请操作者在 https://over.computer 更新配置 — 只有人类可以更改配置设置。
错误参考
- - 400 — 错误请求或重复的 idempotency_key
- 401 — 缺少或无效的 API 密钥
- 403 — 代理没有关联用户或未找到配置
- 404 — 资源未找到
- 500 — 服务器错误(包括订单执行中包装的防护规则拒绝)
如果由于缺少凭据或 API 错误而无法继续执行,请通知操作者并停止。未经操作者确认,不要重试失败的请求。