Quickstart
Create an agent, get an API key, and send your first order intent.
1. Create an agent
Sign in to the dashboard and create an agent from the Agents page. New agents default to payload mode, so you sign every order yourself — no credentials required to get started.
2. Set a risk policy
Every agent gets a default risk policy on creation. Adjustmax_order_usdc, daily_volume_limit_usdc, and the other limits from the Policies page before sending real orders — the risk engine enforces these on every intent.
3. Send an order intent
POST the intent to /v1/orders/intent with your API key. If the risk engine approves it, you get back an unsigned EIP-712 payload with the builder code already attached.
import { MeridianClient } from "@meridian/sdk";
const client = new MeridianClient({
apiKey: process.env.MERIDIAN_API_KEY!,
baseUrl: process.env.MERIDIAN_API_URL,
});
const { risk_decision, payload } = await client.orders.intent({
market_id: "will-btc-reach-100k",
token_id: "71321045679...",
side: "buy",
type: "limit",
size_usdc: 250,
price: 0.62,
});
if (risk_decision.approved) {
// payload.message contains the EIP-712 order struct, ready to sign
console.log(payload.message.builder); // your configured builder code
} else {
console.log(risk_decision.failures); // every rejection reason, not just the first
}4. Sign and submit
Sign the returned payload with your agent's wallet (EIP-712 typed data), then submit it:
const result = await client.orders.submitSigned({
order_id: payload.order_id,
signature,
signed_payload: payload,
});Rate limits
| Endpoint class | Limit | Applies to |
|---|---|---|
| Data | 10 req/s | Market data, portfolio reads |
| Orders | 2 req/s | Order placement, submission, cancellation |
| x402 | 1 req/s | Anonymous pay-per-call requests |
Exceeding a limit returns 429 with a Retry-After header.