Skip to content

Getting started

This guide walks you through setting up your API key and making your first request to the Vaulto API.

What you can build

With the Vaulto API, you can:

  • Trading bots — Automatically open and close positions based on market conditions
  • Portfolio dashboards — Display real-time valuations and P&L across pre-IPO positions
  • Research tools — Analyze private company data and funding trends
  • Alerts and notifications — Monitor valuation changes and trigger alerts
  • Custom trading interfaces — Build your own UI for pre-IPO trading

Step 1: Get your API key

  1. Go to the Vaulto Dashboard
  2. Sign in or create an account
  3. Navigate to API Keys and click Create Key
  4. Copy your key and store it securely — it won't be shown again

Keep your API key secret

Never expose your API key in client-side code, public repositories, or logs. Use environment variables or a secrets manager.

Step 2: Make your first request

The API uses standard REST conventions. Include your API key in the x-api-key header (or as an apiKey query parameter).

Base URL: https://api.vaulto.ai

Let's fetch the current valuation data for SpaceX:

bash
curl -H "x-api-key: YOUR_KEY" \
  "https://api.vaulto.ai/api/trading/valuation?eventSlug=spacex-ipo"
javascript
const API_KEY = process.env.VAULTO_API_KEY;

const response = await fetch(
  'https://api.vaulto.ai/api/trading/valuation?eventSlug=spacex-ipo',
  {
    headers: { 'x-api-key': API_KEY }
  }
);

const data = await response.json();
console.log('SpaceX implied valuation:', data.valuation);
python
import os
import requests

API_KEY = os.environ.get('VAULTO_API_KEY')

response = requests.get(
    'https://api.vaulto.ai/api/trading/valuation',
    params={'eventSlug': 'spacex-ipo'},
    headers={'x-api-key': API_KEY}
)

data = response.json()
print(f"SpaceX implied valuation: {data['valuation']}")

Example response:

json
{
  "event": {
    "name": "SpaceX IPO Valuation",
    "slug": "spacex-ipo",
    "numBands": 5
  },
  "valuation": {
    "longCost": 0.72,
    "shortCost": 0.38,
    "bestLongReturn": 38.5,
    "worstLongReturn": -28.0
  },
  "bands": [
    { "bandIndex": 0, "label": "$200B+", "price": 0.35 },
    { "bandIndex": 1, "label": "$175-200B", "price": 0.28 }
  ],
  "totalVolume": 1250000.00,
  "timestamp": "2024-01-15T10:30:00Z"
}

What this response tells you:

  • valuation.longCost — Cost per dollar to open a LONG position (betting valuation goes up)
  • valuation.shortCost — Cost per dollar to open a SHORT position (betting valuation goes down)
  • bands — Individual valuation ranges with current market prices

Step 3: Understand the response headers

Every API response includes helpful headers:

HeaderDescription
X-Request-Cost-USDThe cost of this request in USD (e.g., 0.002)
X-Request-IdUnique request ID for debugging and support

Include X-Request-Id in any support requests to help us investigate issues.

Error handling

The API returns consistent error responses:

json
{
  "code": "UNAUTHORIZED",
  "message": "Invalid or missing API key",
  "status": 401,
  "requestId": "req_abc123"
}

Common error codes:

StatusCodeMeaning
401UNAUTHORIZEDInvalid or missing API key
402INSUFFICIENT_BALANCEAccount balance is zero — add funds in the dashboard
429RATE_LIMITEDToo many requests — slow down
404NOT_FOUNDResource doesn't exist

Public vs protected endpoints

Most endpoints require an API key. A few are public:

EndpointAuth required?
GET /api/pricingNo — check current API pricing
GET /api/trading/eventsNo — list available IPO events
GET /api/trading/valuationNo — get event pricing
All other endpointsYes

Next steps

Ready to trade?

Learn more:

API Reference: