API Reference · v1
Build on the settlement layer for tokenized stocks
One consistent REST API for order management, market data, and onchain settlement. Point your venue at Vigil and every asset settles the same way — atomically, T+0, into self-custody.
Introduction
The Vigil API exposes tokenized equities and ETFs that trade around the clock. Every response is priced against a live reference feed, and every fill settles onchain with delivery-versus-payment finality. Base URL for all requests:
https://api.vigilstocks.xyz| GET | /v1/markets | List every tradable asset and live price |
| POST | /v1/orders | Submit a market or limit order |
| GET | /v1/orders/:id | Fetch an order and its settlement state |
| GET | /v1/positions | Read wallet positions in self-custody |
| POST | /v1/webhooks | Subscribe to fills and settlement events |
Quickstart
Install the SDK and read live markets in a few lines.
curl https://api.vigilstocks.xyz/v1/markets \
-H "Authorization: Bearer $VIGIL_KEY"Tip
Authentication
Authenticate every request with a bearer key. Trading endpoints also require a wallet signature, so assets never leave self-custody — Vigil can route and settle an order, but can never move funds on its own.
Authorization: Bearer vigil_sk_live_...
X-Wallet-Signature: 0x...Keep keys server-side
Markets
List every tradable asset with its live price, 24h change, and class. Markets never close, so the feed is always live. Optionally filter by asset class.
| Field | Type | Description |
|---|---|---|
| class | string? | Filter by equities, etfs, or alternatives |
| limit | number? | Max assets to return (default 100) |
GET /v1/markets -> 200
[
{ "symbol": "NVDA", "price": "224.39", "change": "+3.42%", "class": "equities" },
{ "symbol": "SPY", "price": "773.92", "change": "+0.41%", "class": "etfs" }
]Orders
Submit a market or limit order. The engine validates the token leg and the payment leg before anything moves.
| Field | Type | Description |
|---|---|---|
| symbol | string | Ticker, e.g. TSLA |
| side | enum | BUY or SELL |
| type | enum | MARKET or LIMIT |
| quantity | string | Shares, fractional allowed |
| limit_price | string? | Required when type is LIMIT |
| settlement | enum | ONCHAIN (default) |
curl -X POST https://api.vigilstocks.xyz/v1/orders \
-H "Authorization: Bearer $VIGIL_KEY" \
-H "X-Wallet-Signature: 0x..." \
-d '{
"symbol": "TSLA",
"side": "BUY",
"type": "MARKET",
"quantity": "1.25",
"settlement": "ONCHAIN"
}'Order status
Fetch an order and follow it from acceptance to onchain finality.
GET /v1/orders/ord_9Fq2xK -> 200
{
"id": "ord_9Fq2xK",
"symbol": "TSLA",
"side": "BUY",
"status": "SETTLED",
"filled_price": "327.25",
"finality": "ONCHAIN",
"settled_at": "2026-08-18T09:41:12Z"
}Positions
Read the balances a wallet holds in self-custody. Positions are derived from onchain state, not an internal ledger.
GET /v1/positions -> 200
[
{ "symbol": "TSLA", "quantity": "1.25", "value": "409.06" },
{ "symbol": "SPY", "quantity": "3.00", "value": "2321.76" }
]Settlement
Fills settle atomically onchain: the token leg and the payment leg move together or not at all. Net positions reconcile to custody with deterministic, T+0 finality — there is no T+2 window and no intermediary holding your assets in between.
| Field | Type | Description |
|---|---|---|
| ACCEPTED | status | Order validated, both legs reserved |
| FILLED | status | Matched at a reference price |
| SETTLED | status | Delivery-versus-payment cleared onchain |
Webhooks
Subscribe to fills and settlement events to keep your venue in sync.
{
"event": "order.settled",
"id": "ord_9Fq2xK",
"symbol": "TSLA",
"finality": "ONCHAIN"
}Errors
Vigil uses standard HTTP status codes. Every error returns a machine -readable code and a human message.
| Field | Type | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid bearer key |
| 402 | insufficient_funds | Payment leg cannot be reserved |
| 422 | invalid_order | Order failed validation |
| 429 | rate_limited | Too many requests, slow down |
{
"error": {
"code": "invalid_order",
"message": "quantity must be greater than 0"
}
}Ready to build?
Open the trading app or grab your API keys.