Synthesis

Projects

Manage projects, API keys, accounts, and sessions for your integration

POST

Create Project API Key

/api/v1/project/api-key

Generate a new API key pair for your project. The secret key is only shown once — store it securely.

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Body Parameters

namestring

Name for the API key (alphanumeric, hyphens, underscores, max 64 chars)

domainstring

Domain restriction for the key (max 255 chars)

POST/api/v1/project/api-key
curl -X POST "https://synthesis.trade/api/v1/project/api-key" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "name": "production-key",
  "domain": "myapp.com"
}'
201API key created successfully
{
  "success": true,
  "data": {
    "public_key": "pk_abc123...",
    "secret_key": "sk_xyz789..."
  }
}
400Invalid name or domain
{
  "success": false,
  "error": "Invalid name"
}
PUT

Update Project Settings

/api/v1/project/settings

Update project-level settings as a JSON object.

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Body Parameters

settingsobjectrequired

JSON object of settings to update

PUT/api/v1/project/settings
curl -X PUT "https://synthesis.trade/api/v1/project/settings" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "settings": "<object>"
}'
200Settings updated
{
  "success": true,
  "data": {
    "settings": { ... }
  }
}
GET

List Project Accounts

/api/v1/project/account

List all accounts under your project with pagination.

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Query Parameters

limitinteger

Max accounts to return Defaults to 1000

offsetinteger

Offset for pagination Defaults to 0

GET/api/v1/project/account
curl -X GET "https://synthesis.trade/api/v1/project/account" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200List of accounts
{
  "success": true,
  "data": {
    "accounts": [
      {
        "account_id": "01234567-89ab-cdef-0123-456789abcdef",
        "metadata": { ... }
      }
    ]
  }
}
POST

Create Project Account

/api/v1/project/account

Create a new account under your project with optional metadata (max 8KB).

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Body Parameters

metadataobject

Custom metadata for the account (max 8KB JSON)

POST/api/v1/project/account
curl -X POST "https://synthesis.trade/api/v1/project/account" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "metadata": "{ \"user_id\": \"ext_123\", \"plan\": \"pro\" }"
}'
201Account created
{
  "success": true,
  "data": {
    "account_id": "01234567-89ab-cdef-0123-456789abcdef",
    "metadata": { ... }
  }
}
GET

Get Project Account

/api/v1/project/account/{account_id}

Get details of a specific account under your project.

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Path Parameters

account_idstringrequired

The account ID

GET/api/v1/project/account/{account_id}
curl -X GET "https://synthesis.trade/api/v1/project/account/{account_id}" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Account details
{
  "success": true,
  "data": {
    "account_id": "01234567-89ab-cdef-0123-456789abcdef",
    "metadata": { ... }
  }
}
404Account not found
{
  "success": false,
  "error": "Account not found"
}
PUT

Update Account Metadata

/api/v1/project/account/{account_id}/metadata

Update the metadata for a specific account (max 8KB JSON).

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Path Parameters

account_idstringrequired

The account ID

Body Parameters

metadataobjectrequired

New metadata object (max 8KB)

PUT/api/v1/project/account/{account_id}/metadata
curl -X PUT "https://synthesis.trade/api/v1/project/account/{account_id}/metadata" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "metadata": "<object>"
}'
200Metadata updated
{
  "success": true,
  "data": {
    "account_id": "01234567-89ab-cdef-0123-456789abcdef",
    "metadata": { ... }
  }
}
POST

Create Account Session

/api/v1/project/account/{account_id}/session

Create a new session for a project account. Returns a session ID that can be used for authentication.

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Path Parameters

account_idstringrequired

The account ID

POST/api/v1/project/account/{account_id}/session
curl -X POST "https://synthesis.trade/api/v1/project/account/{account_id}/session" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Session created
{
  "success": true,
  "data": {
    "account_id": "01234567-89ab-cdef-0123-456789abcdef",
    "session_id": "sess_abc123...",
    "created_at": "2025-01-15T10:30:00Z",
    "expires_at": "2025-01-22T10:30:00Z"
  }
}
POST

Refresh Account Session

/api/v1/project/account/{account_id}/session/{session_id}/refresh

Refresh an active session, returning a new session ID. The old session is expired.

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Path Parameters

account_idstringrequired

The account ID

session_idstringrequired

The current session ID

POST/api/v1/project/account/{account_id}/session/{session_id}/refresh
curl -X POST "https://synthesis.trade/api/v1/project/account/{account_id}/session/{session_id}/refresh" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Session refreshed
{
  "success": true,
  "data": {
    "session_id": "sess_new456..."
  }
}
POST

Expire Account Session

/api/v1/project/account/{account_id}/session/{session_id}/expire

Expire (invalidate) a specific session for an account.

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Path Parameters

account_idstringrequired

The account ID

session_idstringrequired

The session ID to expire

POST/api/v1/project/account/{account_id}/session/{session_id}/expire
curl -X POST "https://synthesis.trade/api/v1/project/account/{account_id}/session/{session_id}/expire" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Session expired
{
  "success": true,
  "data": {
    "expired": true
  }
}
POST

Expire All Sessions

/api/v1/project/account/{account_id}/sessions/expire-all

Expire all active sessions for a specific account.

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Path Parameters

account_idstringrequired

The account ID

POST/api/v1/project/account/{account_id}/sessions/expire-all
curl -X POST "https://synthesis.trade/api/v1/project/account/{account_id}/sessions/expire-all" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200All sessions expired
{
  "success": true,
  "data": {
    "expired": 3
  }
}
GET

List Account API Keys

/api/v1/project/account/{account_id}/api-key

List all API keys for a specific account.

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Path Parameters

account_idstringrequired

The account ID

GET/api/v1/project/account/{account_id}/api-key
curl -X GET "https://synthesis.trade/api/v1/project/account/{account_id}/api-key" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200List of API keys
{
  "success": true,
  "data": {
    "api_keys": [
      {
        "public_key": "pk_abc123...",
        "name": "my-key",
        "active": true,
        "created_at": "2025-01-15T10:30:00Z",
        "updated_at": "2025-01-15T10:30:00Z"
      }
    ]
  }
}
POST

Create Account API Key

/api/v1/project/account/{account_id}/api-key

Create a new API key pair for a specific account. The secret key is only shown once.

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Path Parameters

account_idstringrequired

The account ID

Body Parameters

namestring

Name for the API key (max 64 chars)

POST/api/v1/project/account/{account_id}/api-key
curl -X POST "https://synthesis.trade/api/v1/project/account/{account_id}/api-key" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{}'
201API key created
{
  "success": true,
  "data": {
    "public_key": "pk_abc123...",
    "secret_key": "sk_xyz789..."
  }
}
DELETE

Delete Account API Key

/api/v1/project/account/{account_id}/api-key/{public_key}

Deactivate an API key for an account. The key will no longer be usable.

X-API-Keystringrequired
Project API Key

Project-scoped API key via X-API-Key header.

Path Parameters

account_idstringrequired

The account ID

public_keystringrequired

The public key to delete

DELETE/api/v1/project/account/{account_id}/api-key/{public_key}
curl -X DELETE "https://synthesis.trade/api/v1/project/account/{account_id}/api-key/{public_key}" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Key deleted
{
  "success": true,
  "data": {
    "deleted": true
  }
}

Account

Manage your account, API keys, and settings

GET

Get Account Session

/api/v1/account/session

Check if the current session is valid and authenticated.

Cookiestringrequired
Session Cookie

Session-based authentication via browser cookie.

GET/api/v1/account/session
curl -X GET "https://synthesis.trade/api/v1/account/session" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Session valid
{
  "success": true,
  "data": {
    "authenticated": true
  }
}
POST

Expire Account Session

/api/v1/account/session/expire

Expire the current session (sign out).

Cookiestringrequired
Session Cookie

Session-based authentication via browser cookie.

POST/api/v1/account/session/expire
curl -X POST "https://synthesis.trade/api/v1/account/session/expire" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Session expired
{
  "success": true,
  "data": {
    "expired": true
  }
}
GET

List API Keys

/api/v1/account/api-key

List all API keys for the authenticated account.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

GET/api/v1/account/api-key
curl -X GET "https://synthesis.trade/api/v1/account/api-key" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200List of API keys
{
  "success": true,
  "data": {
    "api_keys": [
      {
        "public_key": "pk_abc123...",
        "name": "my-key",
        "active": true,
        "created_at": "2025-01-15T10:30:00Z",
        "updated_at": "2025-01-15T10:30:00Z"
      }
    ]
  }
}
POST

Create API Key

/api/v1/account/api-key

Generate a new API key pair for the authenticated account. The secret key is only shown once.

Cookiestringrequired
Session Cookie

Session-based authentication via browser cookie.

Body Parameters

namestring

Name for the key (max 64 chars, alphanumeric/hyphens/underscores)

POST/api/v1/account/api-key
curl -X POST "https://synthesis.trade/api/v1/account/api-key" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "name": "my-bot-key"
}'
201API key created
{
  "success": true,
  "data": {
    "public_key": "pk_abc123...",
    "secret_key": "sk_xyz789..."
  }
}
DELETE

Delete API Key

/api/v1/account/api-key/{public_key}

Deactivate an API key for the authenticated account.

Cookiestringrequired
Session Cookie

Session-based authentication via browser cookie.

Path Parameters

public_keystringrequired

The public key to deactivate

DELETE/api/v1/account/api-key/{public_key}
curl -X DELETE "https://synthesis.trade/api/v1/account/api-key/{public_key}" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Key deleted
{
  "success": true,
  "data": {
    "deleted": true
  }
}

Markets

Browse, search, and get data for prediction markets across venues

GET

List Markets

/api/v1/markets

Get a paginated list of prediction markets from all venues (Polymarket and Kalshi). Supports filtering by venue, price range, tags, and sorting.

Query Parameters

venuestring

Filter by venue: 'polymarket', 'kalshi', or 'all' Defaults to all

sortstring

Sort field: 'volume', 'liquidity', 'created_at', 'ends_at', 'newest' Defaults to volume

orderstring

Sort order: 'ASC' or 'DESC' Defaults to DESC

limitinteger

Max results (1-250) Defaults to 100

offsetinteger

Pagination offset Defaults to 0

min_pricenumber

Minimum market price filter (0.0-1.0)

max_pricenumber

Maximum market price filter (0.0-1.0)

min_ends_atstring

Minimum end date (ISO 8601)

max_ends_atstring

Maximum end date (ISO 8601)

tagsstring

Comma-separated tag filter

rewardsboolean

Filter for markets with rewards only Defaults to false

liveboolean

Filter for live-streaming markets only Defaults to false

bondsboolean

Filter for bond-like markets (high certainty) Defaults to false

marketsboolean

Include sub-markets in response Defaults to true

GET/api/v1/markets
curl -X GET "https://synthesis.trade/api/v1/markets" \
  -H "Content-Type: application/json"
200List of markets
{
  "success": true,
  "data": [
    {
      "venue": "polymarket",
      "event": {
        "event_id": 12345,
        "title": "Will Bitcoin reach $100k by end of 2025?",
        "slug": "will-bitcoin-reach-100k-by-end-of-2025",
        "description": "...",
        "image": "https://...",
        "tags": ["crypto"],
        "active": true,
        "liquidity": 1500000.0,
        "volume": 5000000.0,
        "volume24hr": 250000.0,
        "created_at": "2025-01-01T00:00:00Z",
        "ends_at": "2025-12-31T23:59:59Z"
      },
      "markets": [
        {
          "condition_id": "0xabc...",
          "question": "Will Bitcoin reach $100k?",
          "outcome": "Yes/No",
          "left_price": 0.65,
          "right_price": 0.35,
          "left_token_id": "12345...",
          "right_token_id": "67890...",
          "volume": 5000000.0,
          "active": true
        }
      ]
    }
  ]
}
POST

Get Market Sparklines

/api/v1/markets/sparklines

Get price history sparkline data for multiple markets in a single request. Pass an array of token IDs.

Body Parameters

token_idsstring[]required

Array of token IDs to get sparklines for

POST/api/v1/markets/sparklines
curl -X POST "https://synthesis.trade/api/v1/markets/sparklines" \
  -H "Content-Type: application/json" \
  -d '{
  "token_ids": "[\"12345...\", \"67890...\"]"
}'
200Sparkline data for each token
{
  "success": true,
  "data": {
    "12345...": [0.45, 0.47, 0.52, 0.50, 0.55, 0.60, 0.65],
    "67890...": [0.55, 0.53, 0.48, 0.50, 0.45, 0.40, 0.35]
  }
}
POST

Get Market Prices

/api/v1/markets/prices

Get current prices for multiple markets in a single request.

Body Parameters

token_idsstring[]required

Array of token IDs

POST/api/v1/markets/prices
curl -X POST "https://synthesis.trade/api/v1/markets/prices" \
  -H "Content-Type: application/json" \
  -d '{
  "token_ids": "<string[]>"
}'
200Current prices
{
  "success": true,
  "data": {
    "12345...": 0.65,
    "67890...": 0.35
  }
}
GET

Historical Orderbooks

/api/v1/markets/orderbooks

Get historical orderbook snapshots from ClickHouse. Supports both Polymarket (by token_id) and Kalshi (by market_id) with time-bucketed aggregation.

Query Parameters

venuestringrequired

'polymarket' or 'kalshi'

token_idstring

Polymarket token ID (required when venue=polymarket)

market_idstring

Kalshi market ticker (required when venue=kalshi)

startstring

Start time — unix seconds, unix milliseconds, or ISO 8601. Defaults to first available record.

endstring

End time — same formats as start. Defaults to latest available record.

bucketstring

Time bucket for aggregation: e.g. '30s', '5m', '1h', '1d'. Max 1 day.

pointsinteger

Number of data points to return. Auto-calculates bucket size from time range.

orderstring

'ASC' or 'DESC' Defaults to DESC

limitinteger

Max rows (1-25000) Defaults to 1000

offsetinteger

Pagination offset Defaults to 0

GET/api/v1/markets/orderbooks
curl -X GET "https://synthesis.trade/api/v1/markets/orderbooks" \
  -H "Content-Type: application/json"
200Array of orderbook snapshots
{
  "success": true,
  "data": [
    {
      "condition_id": "0xabc...",
      "token_id": "12345...",
      "bids": { "0.64": 1000, "0.63": 500 },
      "asks": { "0.65": 800, "0.66": 1200 },
      "best_bid": 0.64,
      "best_ask": 0.65,
      "created_at": "2025-01-15T10:30:00Z"
    }
  ]
}
GET

Search Markets

/api/v1/markets/search/{query}

Full-text search across all prediction markets.

Path Parameters

querystringrequired

Search query string

GET/api/v1/markets/search/{query}
curl -X GET "https://synthesis.trade/api/v1/markets/search/{query}" \
  -H "Content-Type: application/json"
200Search results
{
  "success": true,
  "data": [
    {
      "venue": "polymarket",
      "event": { ... },
      "markets": [ ... ]
    }
  ]
}
GET

Get Venue Statistics

/api/v1/markets/statistics

Get aggregate statistics for prediction market venues.

GET/api/v1/markets/statistics
curl -X GET "https://synthesis.trade/api/v1/markets/statistics" \
  -H "Content-Type: application/json"
200Venue statistics
{
  "success": true,
  "data": {
    "polymarket": {
      "total_markets": 1500,
      "active_markets": 800,
      "total_volume": 500000000
    },
    "kalshi": {
      "total_markets": 2000,
      "active_markets": 1200,
      "total_volume": 300000000
    }
  }
}
GET

Get Similar Markets

/api/v1/markets/similar

Find markets similar to a given market using semantic matching.

Query Parameters

market_idstringrequired

The market ID to find similar markets for

limitinteger

Max results Defaults to 10

GET/api/v1/markets/similar
curl -X GET "https://synthesis.trade/api/v1/markets/similar" \
  -H "Content-Type: application/json"
200Similar markets
{
  "success": true,
  "data": [
    {
      "venue": "kalshi",
      "event": { ... },
      "similarity": 0.87
    }
  ]
}
GET

Get Similar Market Pairs

/api/v1/markets/similar-pairs

Find cross-venue market pairs that track the same event.

Query Parameters

limitinteger

Max pairs Defaults to 20

min_similaritynumber

Minimum similarity score (0.0-1.0) Defaults to 0.8

GET/api/v1/markets/similar-pairs
curl -X GET "https://synthesis.trade/api/v1/markets/similar-pairs" \
  -H "Content-Type: application/json"
200Market pairs across venues
{
  "success": true,
  "data": [
    {
      "polymarket": { "event": { ... }, "market": { ... } },
      "kalshi": { "event": { ... }, "market": { ... } },
      "similarity": 0.95,
      "arbitrage": 0.02
    }
  ]
}

Polymarket

Access Polymarket-specific market data, prices, orderbooks, trades, and user data

GET

List Polymarket Markets

/api/v1/polymarket/markets

Get a paginated list of Polymarket events with their sub-markets.

Query Parameters

sortstring

Sort by: 'volume', 'liquidity', 'created_at', 'ends_at' Defaults to volume

orderstring

'ASC' or 'DESC' Defaults to DESC

limitinteger

Max results (1-250) Defaults to 100

offsetinteger

Pagination offset Defaults to 0

GET/api/v1/polymarket/markets
curl -X GET "https://synthesis.trade/api/v1/polymarket/markets" \
  -H "Content-Type: application/json"
200List of Polymarket events
{
  "success": true,
  "data": [
    {
      "event": {
        "event_id": 12345,
        "title": "...",
        "slug": "...",
        "image": "...",
        "volume": 5000000.0,
        "liquidity": 1500000.0,
        "active": true,
        "ends_at": "2025-12-31T23:59:59Z"
      },
      "markets": [ ... ]
    }
  ]
}
GET

Get Market by Slug

/api/v1/polymarket/market/slug/{slug}

Get a Polymarket event and its sub-markets by slug.

Path Parameters

slugstringrequired

Event slug

GET/api/v1/polymarket/market/slug/{slug}
curl -X GET "https://synthesis.trade/api/v1/polymarket/market/slug/{slug}" \
  -H "Content-Type: application/json"
200Event with markets
{
  "success": true,
  "data": {
    "event": { ... },
    "markets": [ ... ]
  }
}
GET

Get Market by Condition ID

/api/v1/polymarket/market/{condition_id}

Get a specific Polymarket market by its condition ID.

Path Parameters

condition_idstringrequired

Polymarket condition ID (0x...)

GET/api/v1/polymarket/market/{condition_id}
curl -X GET "https://synthesis.trade/api/v1/polymarket/market/{condition_id}" \
  -H "Content-Type: application/json"
200Market details
{
  "success": true,
  "data": {
    "event": { ... },
    "market": {
      "condition_id": "0xabc...",
      "question": "...",
      "left_price": 0.65,
      "right_price": 0.35,
      "volume": 5000000.0
    }
  }
}
GET

Get Market Price

/api/v1/polymarket/market/{condition_id}/price

Get the current price for a specific Polymarket market.

Path Parameters

condition_idstringrequired

Polymarket condition ID

GET/api/v1/polymarket/market/{condition_id}/price
curl -X GET "https://synthesis.trade/api/v1/polymarket/market/{condition_id}/price" \
  -H "Content-Type: application/json"
200Current price
{
  "success": true,
  "data": {
    "left_price": 0.65,
    "right_price": 0.35
  }
}
GET

Get Price History

/api/v1/polymarket/market/{condition_id}/price-history

Get historical price data for a Polymarket market.

Path Parameters

condition_idstringrequired

Polymarket condition ID

Query Parameters

intervalstring

Time interval: '1m', '5m', '1h', '1d' Defaults to 1h

fidelityinteger

Data fidelity/resolution

GET/api/v1/polymarket/market/{condition_id}/price-history
curl -X GET "https://synthesis.trade/api/v1/polymarket/market/{condition_id}/price-history" \
  -H "Content-Type: application/json"
200Price history
{
  "success": true,
  "data": [
    {
      "timestamp": "2025-01-15T10:00:00Z",
      "price": 0.65
    }
  ]
}
GET

Get Market Orderbook

/api/v1/polymarket/market/{condition_id}/books

Get the full orderbook for a Polymarket market.

Path Parameters

condition_idstringrequired

Polymarket condition ID

GET/api/v1/polymarket/market/{condition_id}/books
curl -X GET "https://synthesis.trade/api/v1/polymarket/market/{condition_id}/books" \
  -H "Content-Type: application/json"
200Orderbook
{
  "success": true,
  "data": {
    "bids": [[0.64, 1000], [0.63, 500]],
    "asks": [[0.65, 800], [0.66, 1200]],
    "spread": 0.01,
    "mid": 0.645
  }
}
GET

Get Market Trades

/api/v1/polymarket/market/{condition_id}/trades

Get recent trades for a Polymarket market.

Path Parameters

condition_idstringrequired

Polymarket condition ID

GET/api/v1/polymarket/market/{condition_id}/trades
curl -X GET "https://synthesis.trade/api/v1/polymarket/market/{condition_id}/trades" \
  -H "Content-Type: application/json"
200Recent trades
{
  "success": true,
  "data": [
    {
      "id": "trade_123",
      "side": "BUY",
      "price": 0.65,
      "size": 100,
      "timestamp": "2025-01-15T10:30:00Z"
    }
  ]
}
GET

Get Market Holders

/api/v1/polymarket/market/{condition_id}/holders

Get top holders for a Polymarket market.

Path Parameters

condition_idstringrequired

Polymarket condition ID

GET/api/v1/polymarket/market/{condition_id}/holders
curl -X GET "https://synthesis.trade/api/v1/polymarket/market/{condition_id}/holders" \
  -H "Content-Type: application/json"
200Top holders
{
  "success": true,
  "data": [
    {
      "address": "0xabc...",
      "username": "whale_trader",
      "shares": 50000,
      "value": 32500.0
    }
  ]
}
GET

Get Polymarket User

/api/v1/polymarket/user/{address}

Get profile and statistics for a Polymarket user.

Path Parameters

addressstringrequired

Ethereum address of the user

GET/api/v1/polymarket/user/{address}
curl -X GET "https://synthesis.trade/api/v1/polymarket/user/{address}" \
  -H "Content-Type: application/json"
200User profile
{
  "success": true,
  "data": {
    "address": "0xabc...",
    "username": "whale_trader",
    "volume": 1500000.0,
    "pnl": 250000.0,
    "positions_count": 45
  }
}
GET

Get Crypto Price

/api/v1/polymarket/crypto-price

Get the open and close price for a crypto asset over a time range. Used for up/down target price markets. Falls back to Chainlink or cached Redis data when Polymarket API is unavailable.

Query Parameters

symbolstringrequired

Crypto symbol (e.g. 'BTC', 'ETH')

start_timestringrequired

ISO 8601 start time

end_timestringrequired

ISO 8601 end time

variantstring

'hourly', 'five', 'fifteen', or 'thirty' Defaults to hourly

GET/api/v1/polymarket/crypto-price
curl -X GET "https://synthesis.trade/api/v1/polymarket/crypto-price" \
  -H "Content-Type: application/json"
200Crypto price data
{
  "success": true,
  "data": {
    "open_price": 97500.25,
    "close_price": 98100.50,
    "timestamp": 1736899200000,
    "source": "polymarket"
  }
}
GET

Get Leaderboard

/api/v1/polymarket/leaderboard

Get the Polymarket trading leaderboard.

GET/api/v1/polymarket/leaderboard
curl -X GET "https://synthesis.trade/api/v1/polymarket/leaderboard" \
  -H "Content-Type: application/json"
200Leaderboard
{
  "success": true,
  "data": [
    {
      "rank": 1,
      "address": "0xabc...",
      "username": "top_trader",
      "volume": 50000000.0,
      "pnl": 2500000.0
    }
  ]
}

Kalshi

Access Kalshi-specific market data, prices, trades, and user data

GET

List Kalshi Markets

/api/v1/kalshi/markets

Get a paginated list of Kalshi events with their sub-markets.

Query Parameters

sortstring

Sort by: 'volume', 'liquidity', 'created_at', 'ends_at' Defaults to volume

orderstring

'ASC' or 'DESC' Defaults to DESC

limitinteger

Max results (1-250) Defaults to 100

offsetinteger

Pagination offset Defaults to 0

GET/api/v1/kalshi/markets
curl -X GET "https://synthesis.trade/api/v1/kalshi/markets" \
  -H "Content-Type: application/json"
200List of Kalshi events
{
  "success": true,
  "data": [
    {
      "event": {
        "event_id": "KXBTC-25",
        "title": "Bitcoin price on March 7",
        "series_id": "KXBTC",
        "category": "Crypto",
        "volume": 3000000.0,
        "active": true
      },
      "markets": [ ... ]
    }
  ]
}
GET

Get Kalshi Event

/api/v1/kalshi/market/event/{event_id}

Get a Kalshi event by its event ID with all sub-markets.

Path Parameters

event_idstringrequired

Kalshi event ID (e.g., 'KXBTC-25')

Query Parameters

sortstring

Sort sub-markets by field

orderstring

'ASC' or 'DESC'

GET/api/v1/kalshi/market/event/{event_id}
curl -X GET "https://synthesis.trade/api/v1/kalshi/market/event/{event_id}" \
  -H "Content-Type: application/json"
200Event with markets
{
  "success": true,
  "data": {
    "event": { ... },
    "markets": [ ... ]
  }
}
GET

Get Market by Slug

/api/v1/kalshi/market/slug/{slug}

Get a Kalshi event by its slug.

Path Parameters

slugstringrequired

Event slug

GET/api/v1/kalshi/market/slug/{slug}
curl -X GET "https://synthesis.trade/api/v1/kalshi/market/slug/{slug}" \
  -H "Content-Type: application/json"
200Event with markets
{
  "success": true,
  "data": {
    "event": { ... },
    "markets": [ ... ]
  }
}
GET

Get Market

/api/v1/kalshi/market/{market_id}

Get a specific Kalshi market by its market ID.

Path Parameters

market_idstringrequired

Kalshi market ticker

GET/api/v1/kalshi/market/{market_id}
curl -X GET "https://synthesis.trade/api/v1/kalshi/market/{market_id}" \
  -H "Content-Type: application/json"
200Market details
{
  "success": true,
  "data": {
    "event": { ... },
    "market": {
      "market_id": "KXBTC-25-T100000",
      "title": "Bitcoin above $100,000?",
      "left_price": 0.72,
      "right_price": 0.28
    }
  }
}
GET

Get Market Trades

/api/v1/kalshi/market/{market_id}/trades

Get recent trades for a Kalshi market.

Path Parameters

market_idstringrequired

Kalshi market ticker

GET/api/v1/kalshi/market/{market_id}/trades
curl -X GET "https://synthesis.trade/api/v1/kalshi/market/{market_id}/trades" \
  -H "Content-Type: application/json"
200Recent trades
{
  "success": true,
  "data": [ ... ]
}
GET

Get Market Holders

/api/v1/kalshi/market/{market_id}/holders

Get top holders for a Kalshi market.

Path Parameters

market_idstringrequired

Kalshi market ticker

GET/api/v1/kalshi/market/{market_id}/holders
curl -X GET "https://synthesis.trade/api/v1/kalshi/market/{market_id}/holders" \
  -H "Content-Type: application/json"
200Top holders
{
  "success": true,
  "data": [ ... ]
}
GET

Get Market Statistics

/api/v1/kalshi/market/{market_id}/statistics

Get aggregate statistics for a Kalshi market.

Path Parameters

market_idstringrequired

Kalshi market ticker

GET/api/v1/kalshi/market/{market_id}/statistics
curl -X GET "https://synthesis.trade/api/v1/kalshi/market/{market_id}/statistics" \
  -H "Content-Type: application/json"
200Market statistics
{
  "success": true,
  "data": { ... }
}
GET

Get Price History

/api/v1/kalshi/market/{series_id}/{kalshi_id}/price-history

Get historical price data for a Kalshi market.

Path Parameters

series_idstringrequired

Kalshi series ID (e.g., 'KXBTC')

kalshi_idstringrequired

Kalshi market ID

GET/api/v1/kalshi/market/{series_id}/{kalshi_id}/price-history
curl -X GET "https://synthesis.trade/api/v1/kalshi/market/{series_id}/{kalshi_id}/price-history" \
  -H "Content-Type: application/json"
200Price history
{
  "success": true,
  "data": [ ... ]
}
GET

Get Candlesticks

/api/v1/kalshi/market/{series_id}/{kalshi_id}/candlesticks

Get OHLC candlestick data for a Kalshi market.

Path Parameters

series_idstringrequired

Kalshi series ID

kalshi_idstringrequired

Kalshi market ID

Query Parameters

intervalstring

Candlestick interval

GET/api/v1/kalshi/market/{series_id}/{kalshi_id}/candlesticks
curl -X GET "https://synthesis.trade/api/v1/kalshi/market/{series_id}/{kalshi_id}/candlesticks" \
  -H "Content-Type: application/json"
200Candlestick data
{
  "success": true,
  "data": [
    {
      "open": 0.65,
      "high": 0.70,
      "low": 0.62,
      "close": 0.68,
      "volume": 15000,
      "timestamp": "2025-01-15T10:00:00Z"
    }
  ]
}
GET

Get Leaderboard

/api/v1/kalshi/leaderboard

Get the Kalshi trading leaderboard ranked by a given metric.

Query Parameters

metricstring

Ranking metric: 'volume', 'profit', etc. Defaults to volume

limitinteger

Max results (default 100)

sinceinteger

Number of days to look back Defaults to 30

GET/api/v1/kalshi/leaderboard
curl -X GET "https://synthesis.trade/api/v1/kalshi/leaderboard" \
  -H "Content-Type: application/json"
200Leaderboard entries
{
  "success": true,
  "data": { ... }
}
GET

Get User Profile

/api/v1/kalshi/user/{username}

Get a Kalshi user's profile and trading metrics.

Path Parameters

usernamestringrequired

Kalshi username (nickname)

GET/api/v1/kalshi/user/{username}
curl -X GET "https://synthesis.trade/api/v1/kalshi/user/{username}" \
  -H "Content-Type: application/json"
200User profile and metrics
{
  "success": true,
  "data": {
    "profile": { ... },
    "metrics": { ... }
  }
}

Wallets

Manage wallets, place orders, view positions, and handle transfers

GET

List Wallets

/api/v1/wallet

Get all wallets for the authenticated account.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

GET/api/v1/wallet
curl -X GET "https://synthesis.trade/api/v1/wallet" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200List of wallets
{
  "success": true,
  "data": [
    {
      "wallet_id": "wal_abc123",
      "address": "0x742d...",
      "chain_id": "POL",
      "activated": true,
      "created_at": "2025-01-15T10:30:00Z"
    }
  ]
}
POST

Create Wallet

/api/v1/wallet

Create a new managed wallet for trading on prediction markets.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Body Parameters

chain_idstringrequired

Chain: 'POL' (Polygon/Polymarket) or 'SOL' (Solana/Kalshi)

POST/api/v1/wallet
curl -X POST "https://synthesis.trade/api/v1/wallet" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "chain_id": "<string>"
}'
201Wallet created
{
  "success": true,
  "data": {
    "wallet_id": "wal_abc123",
    "address": "0x742d...",
    "chain_id": "POL"
  }
}
GET

Get All Positions

/api/v1/wallet/{wallet_id}/positions

Get all open positions across venues for a wallet.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Wallet ID

GET/api/v1/wallet/{wallet_id}/positions
curl -X GET "https://synthesis.trade/api/v1/wallet/{wallet_id}/positions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Positions across venues
{
  "success": true,
  "data": [
    {
      "venue": "polymarket",
      "market_title": "Will Bitcoin reach $100k?",
      "outcome": "Yes",
      "shares": 500,
      "avg_price": 0.55,
      "current_price": 0.65,
      "pnl": 50.0
    }
  ]
}
GET

Get All Orders

/api/v1/wallet/{wallet_id}/orders

Get all orders across venues for a wallet.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Wallet ID

GET/api/v1/wallet/{wallet_id}/orders
curl -X GET "https://synthesis.trade/api/v1/wallet/{wallet_id}/orders" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Orders across venues
{
  "success": true,
  "data": [
    {
      "order_id": "ord_abc123",
      "side": "BUY",
      "price": 0.65,
      "amount": 100.0,
      "status": "FILLED",
      "created_at": "2025-01-15T10:30:00Z"
    }
  ]
}
GET

Get Wallet Balance

/api/v1/wallet/pol/{wallet_id}/balance

Get the USDC balance for a Polymarket wallet.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Wallet ID

GET/api/v1/wallet/pol/{wallet_id}/balance
curl -X GET "https://synthesis.trade/api/v1/wallet/pol/{wallet_id}/balance" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Wallet balance
{
  "success": true,
  "data": {
    "balance": 1500.50,
    "currency": "USDC"
  }
}
POST

Place Order

/api/v1/wallet/pol/{wallet_id}/order

Place a new order on Polymarket. Supports limit and market orders.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Wallet ID

Body Parameters

token_idstringrequired

Token ID of the outcome to trade

sidestringrequired

'BUY' or 'SELL'

typestringrequired

'LIMIT' or 'MARKET'

pricenumber

Limit price (0.01-0.99), required for LIMIT orders

amountnumberrequired

Amount in USDC to spend

POST/api/v1/wallet/pol/{wallet_id}/order
curl -X POST "https://synthesis.trade/api/v1/wallet/pol/{wallet_id}/order" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "token_id": "<string>",
  "side": "<string>",
  "type": "<string>",
  "price": "0.65",
  "amount": "100"
}'
200Order placed
{
  "success": true,
  "data": {
    "order_id": "ord_abc123",
    "status": "OPEN",
    "side": "BUY",
    "price": 0.65,
    "amount": 100.0,
    "shares": 153.84
  }
}
400Invalid order
{
  "success": false,
  "error": "Insufficient balance"
}
DELETE

Cancel Order

/api/v1/wallet/pol/{wallet_id}/order/{order_id}

Cancel an open order.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Wallet ID

order_idstringrequired

Order ID to cancel

DELETE/api/v1/wallet/pol/{wallet_id}/order/{order_id}
curl -X DELETE "https://synthesis.trade/api/v1/wallet/pol/{wallet_id}/order/{order_id}" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Order cancelled
{
  "success": true,
  "data": {
    "cancelled": true
  }
}
POST

Get Order Quote

/api/v1/wallet/pol/{wallet_id}/order/quote

Get a price quote for an order before placing it. Shows expected fills and costs.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Wallet ID

Body Parameters

token_idstringrequired

Token ID

sidestringrequired

'BUY' or 'SELL'

amountnumberrequired

Amount in USDC

POST/api/v1/wallet/pol/{wallet_id}/order/quote
curl -X POST "https://synthesis.trade/api/v1/wallet/pol/{wallet_id}/order/quote" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "token_id": "<string>",
  "side": "<string>",
  "amount": "<number>"
}'
200Order quote
{
  "success": true,
  "data": {
    "avg_price": 0.652,
    "total_cost": 100.0,
    "expected_shares": 153.37,
    "fee": 0.50
  }
}
DELETE

Cancel All Orders

/api/v1/wallet/pol/{wallet_id}/orders

Cancel all open orders and active stop-losses for a Polymarket wallet.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Wallet ID

DELETE/api/v1/wallet/pol/{wallet_id}/orders
curl -X DELETE "https://synthesis.trade/api/v1/wallet/pol/{wallet_id}/orders" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Cancelled order IDs
{
  "success": true,
  "data": {
    "order_ids": ["ord_abc123", "ord_def456"]
  }
}
POST

Create Stop-Loss

/api/v1/wallet/pol/{wallet_id}/order

Create a stop-loss order that triggers a market sell when price drops to the target. Set type to 'STOPLOSS', side must be 'SELL', and units must be 'SHARES'.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Wallet ID

Body Parameters

token_idstringrequired

Token ID of the outcome

sidestringrequired

Must be 'SELL'

typestringrequired

Must be 'STOPLOSS'

pricenumberrequired

Trigger price (0.01-0.99)

amountnumberrequired

Number of shares to sell

unitsstringrequired

Must be 'SHARES'

POST/api/v1/wallet/pol/{wallet_id}/order
curl -X POST "https://synthesis.trade/api/v1/wallet/pol/{wallet_id}/order" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "token_id": "<string>",
  "side": "<string>",
  "type": "<string>",
  "price": "0.40",
  "amount": "100",
  "units": "<string>"
}'
201Stop-loss created
{
  "success": true,
  "data": {
    "stoploss_id": "01234567-89ab-cdef-0123-456789abcdef"
  }
}
400Invalid parameters
{
  "success": false,
  "error": "Invalid stoploss side or units"
}
POST

Mint (Split) Shares

/api/v1/wallet/pol/{wallet_id}/mint

Split USDC into equal Yes and No shares for a market. Deposits USDC into the conditional token contract and receives both outcome tokens at 50/50.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Wallet ID

Body Parameters

condition_idstringrequired

Market condition ID (0x...)

amountnumberrequired

Amount of USDC to split

POST/api/v1/wallet/pol/{wallet_id}/mint
curl -X POST "https://synthesis.trade/api/v1/wallet/pol/{wallet_id}/mint" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "condition_id": "<string>",
  "amount": "100"
}'
201Shares minted
{
  "success": true,
  "data": {
    "tx_hash": "0xabc123..."
  }
}
400Insufficient balance
{
  "success": false,
  "error": "Insufficient balance"
}
POST

Merge Shares

/api/v1/wallet/pol/{wallet_id}/merge

Merge equal amounts of Yes and No shares back into USDC. The inverse of minting — burns both outcome tokens and returns the underlying collateral.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Wallet ID

Body Parameters

condition_idstringrequired

Market condition ID (0x...)

amountnumberrequired

Amount of shares to merge (must hold equal Yes and No)

POST/api/v1/wallet/pol/{wallet_id}/merge
curl -X POST "https://synthesis.trade/api/v1/wallet/pol/{wallet_id}/merge" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "condition_id": "<string>",
  "amount": "100"
}'
201Shares merged
{
  "success": true,
  "data": {
    "tx_hash": "0xdef456..."
  }
}
400Insufficient shares
{
  "success": false,
  "error": "Insufficient shares balance"
}
POST

Get Kalshi Order Quote

/api/v1/wallet/sol/{wallet_id}/order/quote

Get a price quote for a Kalshi order via DFlow. Returns expected amounts, price impact, and minimum output.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Solana wallet ID

Body Parameters

token_idstringrequired

Kalshi market token ID

sidestringrequired

'BUY' or 'SELL'

amountnumberrequired

Amount in USDC (buy) or shares (sell)

slippageinteger

Slippage tolerance in basis points. Defaults to auto.

POST/api/v1/wallet/sol/{wallet_id}/order/quote
curl -X POST "https://synthesis.trade/api/v1/wallet/sol/{wallet_id}/order/quote" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "token_id": "<string>",
  "side": "<string>",
  "amount": "50",
  "slippage": "100"
}'
200Order quote
{
  "success": true,
  "data": {
    "amount": 50.0,
    "shares": 75.5,
    "min_shares": 74.0,
    "average_price": 0.662,
    "price_impact": "0.5"
  }
}
POST

Place Kalshi Order

/api/v1/wallet/sol/{wallet_id}/order

Place an order on Kalshi via DFlow swap. Market orders only.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Solana wallet ID

Body Parameters

token_idstringrequired

Kalshi market token ID

sidestringrequired

'BUY' or 'SELL'

amountnumberrequired

Amount in USDC (buy) or shares (sell)

slippageinteger

Slippage in basis points. Defaults to auto.

prediction_slippageinteger

Prediction market slippage in basis points

POST/api/v1/wallet/sol/{wallet_id}/order
curl -X POST "https://synthesis.trade/api/v1/wallet/sol/{wallet_id}/order" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "token_id": "<string>",
  "side": "<string>",
  "amount": "50",
  "slippage": "100"
}'
200Order executed
{
  "success": true,
  "data": {
    "order_id": "ord_abc123",
    "tx_hash": "5xYz...",
    "side": "BUY",
    "amount": 50.0,
    "shares": 75.5,
    "price": 0.662,
    "status": "FILLED"
  }
}
403Wallet not verified
{
  "success": false,
  "error": "Wallet verification not complete"
}
GET

Get Kalshi Positions

/api/v1/wallet/sol/{wallet_id}/positions

Get all open positions for a Solana/Kalshi wallet.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Solana wallet ID

GET/api/v1/wallet/sol/{wallet_id}/positions
curl -X GET "https://synthesis.trade/api/v1/wallet/sol/{wallet_id}/positions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Kalshi positions
{
  "success": true,
  "data": [ ... ]
}
GET

Get Kalshi Orders

/api/v1/wallet/sol/{wallet_id}/orders

Get order history for a Solana/Kalshi wallet.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Solana wallet ID

Query Parameters

limitinteger

Max orders Defaults to 100

offsetinteger

Pagination offset Defaults to 0

GET/api/v1/wallet/sol/{wallet_id}/orders
curl -X GET "https://synthesis.trade/api/v1/wallet/sol/{wallet_id}/orders" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Kalshi orders
{
  "success": true,
  "data": [ ... ]
}
POST

Withdraw (Kalshi)

/api/v1/wallet/sol/{wallet_id}/withdraw

Withdraw USDC from a Solana/Kalshi wallet.

X-API-Keystringrequired
API Key

API key authentication via X-API-Key header.

Path Parameters

wallet_idstringrequired

Solana wallet ID

POST/api/v1/wallet/sol/{wallet_id}/withdraw
curl -X POST "https://synthesis.trade/api/v1/wallet/sol/{wallet_id}/withdraw" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
200Withdrawal initiated
{
  "success": true,
  "data": { ... }
}

News

Get market-relevant news with automated market matching

GET

Get News

/api/v1/news

Get recent news articles with matched prediction markets.

Query Parameters

limitinteger

Max articles (1-50) Defaults to 10

offsetinteger

Pagination offset Defaults to 0

GET/api/v1/news
curl -X GET "https://synthesis.trade/api/v1/news" \
  -H "Content-Type: application/json"
200News with market matches
{
  "success": true,
  "data": [
    {
      "news": {
        "news_id": "news_abc123",
        "title": "Federal Reserve announces rate decision",
        "source": "Reuters",
        "description": "...",
        "url": "https://...",
        "published_at": "2025-01-15T10:00:00Z"
      },
      "events": [
        {
          "venue": "polymarket",
          "score": 0.92,
          "event": { ... }
        }
      ]
    }
  ]
}
GET

Get Event News

/api/v1/news/event/{event_id}

Get news articles related to a specific event.

Path Parameters

event_idstringrequired

Event ID to get news for

Query Parameters

limitinteger

Max articles (1-50) Defaults to 10

offsetinteger

Pagination offset Defaults to 0

GET/api/v1/news/event/{event_id}
curl -X GET "https://synthesis.trade/api/v1/news/event/{event_id}" \
  -H "Content-Type: application/json"
200News for event
{
  "success": true,
  "data": [ ... ]
}

WebSockets

Real-time data streams for orderbooks, trades, balances, and chat

GET

Orderbook WebSocket

/api/v1/orderbook/ws

Real-time orderbook updates. Connect via WebSocket, then send a JSON subscribe message. On subscribe, you receive an initial snapshot of current orderbooks, then live delta updates as they change. Supports both Polymarket (numeric token IDs) and Kalshi (string market tickers). Omit markets to subscribe to all markets for a venue. Omit venue and markets to subscribe to everything.

GET/api/v1/orderbook/ws
curl -X GET "https://synthesis.trade/api/v1/orderbook/ws" \
  -H "Content-Type: application/json"
101WebSocket messages
// Connect
ws://synthesis.trade/api/v1/orderbook/ws

// Subscribe to specific markets
{
  "type": "subscribe",
  "venue": "polymarket",
  "markets": ["token_id_1", "token_id_2"]
}

// Subscribe to all Kalshi orderbooks
{
  "type": "subscribe",
  "venue": "kalshi"
}

// Subscribe to everything (all venues)
{
  "type": "subscribe"
}

// Unsubscribe
{
  "type": "unsubscribe"
}

// Initial snapshot response
{
  "success": true,
  "data": {
    "orderbooks": [
      {
        "venue": "polymarket",
        "orderbook": { ... }
      }
    ]
  }
}

// Live update
{
  "venue": "polymarket",
  "orderbook": { ... }
}
GET

Trades WebSocket

/api/v1/trades/ws

Real-time trade feed. Connect via WebSocket, then send a JSON subscribe message. On subscribe, you receive recent historical trades, then live trade events as they happen. Filter by venue and/or specific markets. Use offset to paginate historical trades (returns 100 per page).

GET/api/v1/trades/ws
curl -X GET "https://synthesis.trade/api/v1/trades/ws" \
  -H "Content-Type: application/json"
101WebSocket messages
// Connect
ws://synthesis.trade/api/v1/trades/ws

// Subscribe to specific markets
{
  "type": "subscribe",
  "venue": "polymarket",
  "markets": ["condition_id_1", "condition_id_2"]
}

// Subscribe to all Kalshi trades
{
  "type": "subscribe",
  "venue": "kalshi"
}

// Subscribe to everything
{
  "type": "subscribe"
}

// Paginate historical trades
{
  "type": "subscribe",
  "venue": "kalshi",
  "markets": ["MARKET-ID"],
  "offset": 100
}

// Unsubscribe
{
  "type": "unsubscribe"
}

// Initial trades response
{
  "success": true,
  "data": {
    "trades": [
      {
        "venue": "polymarket",
        "trade": { ... },
        "event": { ... },
        "market": { ... }
      }
    ]
  }
}

// Live trade update
{
  "venue": "kalshi",
  "trade": { ... },
  "event": { ... },
  "market": { ... }
}
GET

Balance WebSocket

/api/v1/balance/ws

Real-time balance updates for wallets. Connect via WebSocket, then subscribe with wallet addresses. On subscribe, you receive current balances, then live updates as balances change. Supports both Polygon (0x...) and Solana addresses. Optionally filter to specific asset IDs per wallet.

GET/api/v1/balance/ws
curl -X GET "https://synthesis.trade/api/v1/balance/ws" \
  -H "Content-Type: application/json"
101WebSocket messages
// Connect
ws://synthesis.trade/api/v1/balance/ws

// Subscribe to wallets
{
  "type": "subscribe",
  "wallets": [
    { "address": "0x742d..." },
    { "address": "So1ana...", "assets": ["token_id_1"] }
  ]
}

// Unsubscribe
{
  "type": "unsubscribe"
}

// Initial balance response
{
  "success": true,
  "data": {
    "wallets": [
      {
        "chain_id": "POL",
        "address": "0x742d...",
        "balances": {
          "token_id_1": 150.5,
          "USDC": 1000.0
        }
      }
    ]
  }
}

// Live balance update
{
  "data": {
    "address": "0x742d...",
    "asset": "token_id_1",
    "balance": 200.0
  }
}
GET

Data WebSocket

/api/v1/data/ws

Multipurpose real-time data feed. Connect via WebSocket, then subscribe to a specific data type. Supports: prices, kalshi_prices, news, holders, holder_counts, sports, signals, movers.

GET/api/v1/data/ws
curl -X GET "https://synthesis.trade/api/v1/data/ws" \
  -H "Content-Type: application/json"
101WebSocket messages
// Connect
ws://synthesis.trade/api/v1/data/ws

// Subscribe to a data type
{
  "type": "subscribe",
  "data_type": "prices",
  "params": { ... },
  "limit": 50,
  "offset": 0
}

// Unsubscribe
{
  "type": "unsubscribe"
}

// Available data_type values:
// "prices" - Polymarket live prices
// "kalshi_prices" - Kalshi live prices
// "news" - Real-time news feed
// "holders" - Holder updates
// "holder_counts" - Batch holder counts
// "sports" - Live sports data
// "signals" - Whale activity signals
// "movers" - Market movers

Sports

Sports data integration with prediction market matching

GET

Get Sports Categories

/api/v1/sports/categories

Get available sports categories and leagues.

GET/api/v1/sports/categories
curl -X GET "https://synthesis.trade/api/v1/sports/categories" \
  -H "Content-Type: application/json"
200Sports categories
{
  "success": true,
  "data": [
    {
      "sport": "basketball",
      "leagues": ["NBA", "NCAAB"]
    },
    {
      "sport": "football",
      "leagues": ["NFL", "NCAAF"]
    }
  ]
}
GET

Get Sports Games

/api/v1/sports/games

Get upcoming and recent sports games with prediction market data.

Query Parameters

sportstring

Filter by sport

leaguestring

Filter by league

GET/api/v1/sports/games
curl -X GET "https://synthesis.trade/api/v1/sports/games" \
  -H "Content-Type: application/json"
200Sports games
{
  "success": true,
  "data": [ ... ]
}
GET

Get Sports Markets

/api/v1/sports/markets

Get prediction markets related to sports events.

GET/api/v1/sports/markets
curl -X GET "https://synthesis.trade/api/v1/sports/markets" \
  -H "Content-Type: application/json"
200Sports markets
{
  "success": true,
  "data": [ ... ]
}