Quickstart Guide

Go from zero to your first API call in under 5 minutes. This guide walks you through registration, authentication, and fetching real market data.

STEP 1

Register for an API Account

Create your API account by sending a POST request with your email and password. You'll receive an API key immediately in the response. Store it securely — it won't be shown again.

cURL
curl -X POST "https://api.apps.myallies.com/v1/account/register" \
  -H "Content-Type: application/json" \
  -d '{"email":"demo@myallies.com","password":"demo"}'

Save the data.apiKey from the response. You'll use it in every API call.

STEP 2

Search for a Company

Search for companies. Replace YOUR_API_KEY with the API key from Step 1:

cURL
curl -X GET "https://api.apps.myallies.com/v1/company/search?q=apple" \
  -H "X-Api-Key: YOUR_API_KEY"
JavaScript (fetch)
const response = await fetch("https://api.apps.myallies.com/v1/company/search?q=apple", {
  headers: { "X-Api-Key": "YOUR_API_KEY" }
});
const { data } = await response.json();
console.log(data.results);
Python (requests)
import requests

response = requests.get(
    "https://api.apps.myallies.com/v1/company/search",
    params={"q": "apple"},
    headers={"X-Api-Key": "YOUR_API_KEY"}
)
data = response.json()["data"]
print(data["results"])
Expected Response
{
  "success": true,
  "data": {
    "results": [
      { "symbol": "AAPL", "name": "Apple Inc.", "exchange": "NASDAQ", "contractType": "STK" }
    ]
  },
  "meta": { "requestId": "req_v4w5x6", "version": "v1" }
}

STEP 3

Get a Stock Quote

Now let's get a real-time stock quote for Apple. The code is AAPL_NASDAQ (symbol + exchange):

Get Stock Quote
curl -X GET "https://api.apps.myallies.com/v1/market/stocks/AAPL_NASDAQ/quote" \
  -H "X-Api-Key: YOUR_API_KEY"
Response
{
  "success": true,
  "data": {
    "symbol": "AAPL",
    "lastPrice": 178.50,
    "bid": 178.45,
    "ask": 178.55,
    "open": 177.80,
    "high": 179.20,
    "low": 177.15,
    "change": 2.30,
    "changePercent": 1.306,
    "marketSession": "Regular",
    "isHalted": false
  },
  "meta": { "requestId": "req_y7z8a9", "version": "v1" }
}

STEP 4

Explore Options Data

Get the option chain for AAPL_NASDAQ calls:

Get Option Chain
curl -X GET "https://api.apps.myallies.com/v1/options/AAPL_NASDAQ/chain?expiry=260320&right=C" \
  -H "X-Api-Key: YOUR_API_KEY"
Response
{
  "success": true,
  "data": {
    "symbol": "AAPL",
    "expiry": "260320",
    "right": "C",
    "items": [
      { "strike": 170.00, "last": 9.20, "bid": 9.10, "ask": 9.30, "inTheMoney": true },
      { "strike": 180.00, "last": 2.10, "bid": 2.00, "ask": 2.20, "inTheMoney": false }
    ]
  },
  "meta": { "requestId": "req_e4f5g6", "version": "v1" }
}

SDK

Use the JavaScript Client

For a faster integration, use the official JavaScript API client. It provides namespaced methods for every endpoint, built-in error handling, and works in any modern JavaScript environment (browser, Node.js, Deno).

Install & Initialize
import { PublicApiClient } from './api/publicApiClient.js'

const api = new PublicApiClient('YOUR_API_KEY')
Market Data
// Real-time stock quote
const quote = await api.market.getQuote('AAPL_NASDAQ')
console.log(quote.data)  // { symbol, lastPrice, bid, ask, ... }

// Market status and indices
const status = await api.market.getStatus()
const indices = await api.market.getIndices()
Options & Intelligence
// Option chain
const chain = await api.options.getChain('AAPL_NASDAQ', '260320', 'C')

// IV rank and max pain
const ivRank = await api.options.getIvRank('AAPL_NASDAQ')
const maxPain = await api.options.getMaxPain('AAPL_NASDAQ', '260320')

// AI-powered analysis
const analysis = await api.intelligence.getAnalysis('AAPL_NASDAQ')
Supply Chain & Graph
// Supply chain relationships
const suppliers = await api.graph.getSuppliers('AAPL_NASDAQ')
const customers = await api.graph.getCustomers('AAPL_NASDAQ')

// Insider transactions with conviction scoring
const insiders = await api.graph.getScoredInsiders('AAPL_NASDAQ', 90)

// Composite health score
const score = await api.graph.getScore('AAPL_NASDAQ')

// Supply chain cascade impact simulation
const impact = await api.graph.getSupplyChainImpact('AAPL_NASDAQ', 15)
Volatility & Portfolio
// IV surface and term structure
const surface = await api.volatility.getSurface('AAPL_NASDAQ')
const hvIv = await api.volatility.getHvIv('AAPL_NASDAQ')
console.log(hvIv.data)  // { currentIvPercent, windows, premiumSellingOpportunity }

// Portfolio Greeks analysis
const portfolio = await api.portfolio.analyze({
  positions: [
    { symbol: 'AAPL', quantity: 100, avgPrice: 170 },
    { symbol: 'AAPL', quantity: -1, avgPrice: 3.50, optionStrike: 185, optionExpiry: '2026-05-16', optionRight: 'C' }
  ]
})
console.log(portfolio.data)  // { netDelta, netGamma, netTheta, stressTest }
Available Endpoint Groups
api.market          // Quotes, charts, indices, crypto, scanners, technicals
api.company         // Company profiles, search, events, social, sector
api.fundamentals    // PE, EPS, beta, financials, short interest
api.graph           // Supply chain, insiders, institutions, scores
api.options         // Chains, flow, IV rank, max pain, Greeks
api.volatility      // IV surface, term structure, skew, HV/IV, GEX
api.portfolio       // Portfolio Greeks, stress testing, backtesting
api.news            // Top news, breaking, ticker, topics, sentiment
api.calendar        // Economic, earnings, dividends
api.screener        // Presets, custom scans, earnings predictions
api.marketAnalysis  // Sectors, breadth, movers, dark pools
api.hedge           // Hedge suggestions, analysis, strategies
api.intelligence    // AI analysis, risk, catalysts, sentiment
api.alerts          // Price, IV, and volume webhook alerts
api.congressional   // Politician stock trades, top traders
api.fda             // Drug catalysts, PDUFA dates, approvals
api.reference       // Currencies, exchanges, FX rates, holidays
api.localization    // Languages, glossary, regional content
api.account         // Register, login, usage stats

TypeScript support: Run npm run generate:api to generate TypeScript type definitions from the live Swagger spec. This keeps your types in sync with the backend automatically.

Next Steps

Review the full API reference for complete endpoint documentation.

View Full ReferenceContact Support