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/marketsList every tradable asset and live price
POST/v1/ordersSubmit a market or limit order
GET/v1/orders/:idFetch an order and its settlement state
GET/v1/positionsRead wallet positions in self-custody
POST/v1/webhooksSubscribe 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

Every SDK method maps one-to-one to a REST endpoint, so you can move between the SDK and raw HTTP without relearning anything.

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

Secret keys (vigil_sk_live_) must never ship to the browser. Use a publishable key for read-only market data on the client.
GET/v1/markets

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.

FieldTypeDescription
classstring?Filter by equities, etfs, or alternatives
limitnumber?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" }
]
POST/v1/orders

Orders

Submit a market or limit order. The engine validates the token leg and the payment leg before anything moves.

FieldTypeDescription
symbolstringTicker, e.g. TSLA
sideenumBUY or SELL
typeenumMARKET or LIMIT
quantitystringShares, fractional allowed
limit_pricestring?Required when type is LIMIT
settlementenumONCHAIN (default)
POST /v1/orders
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"
  }'
GET/v1/orders/:id

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"
}
GET/v1/positions

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.

FieldTypeDescription
ACCEPTEDstatusOrder validated, both legs reserved
FILLEDstatusMatched at a reference price
SETTLEDstatusDelivery-versus-payment cleared onchain
POST/v1/webhooks

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.

FieldTypeDescription
401unauthorizedMissing or invalid bearer key
402insufficient_fundsPayment leg cannot be reserved
422invalid_orderOrder failed validation
429rate_limitedToo 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.

Open the app