v1.0 API

SecondaryDAO API

Programmatic access to real estate token trading, portfolio data, distributions, and market information.

Quick Start

Get trading in 3 steps.

1. Create an API Key

Log into SecondaryDAO, go to Profile → API Keys tab. Choose scopes (permissions) and optionally restrict to a specific wallet. Save your secret immediately — it's shown once.

2. Authenticate Requests

Send three headers with every request:
X-SD-KEY — your key ID
X-SD-SECRET — your secret
X-SD-TIMESTAMP — Unix ms (within 30s of server time)

3. Start Trading

Browse properties, check order books, place buy/sell orders, track your portfolio, and claim distribution earnings — all via API.

# Browse properties (public, no auth needed) curl https://api.secondarydao.com/api/properties # Check your holdings (auth required) curl -H "X-SD-KEY: sd_live_a1b2c3d4e5f6" \ -H "X-SD-SECRET: your96charsecret..." \ -H "X-SD-TIMESTAMP: $(date +%s000)" \ https://api.secondarydao.com/api/portfolio/holdings?walletAddress=0xYourWallet

Authentication

API key + secret + timestamp on every authenticated request.

HeaderValueDescription
X-SD-KEYsd_live_a1b2c3d4e5f6Your API key ID
X-SD-SECRET<96-char hex>Your API secret (never share)
X-SD-TIMESTAMP1709500000000Unix ms, must be within 30s of server time

Scopes

Choose what your key can access when you create it.

ScopeAccess
market:readBrowse properties, trading status, token stats
portfolio:readView holdings, distributions, performance, income
orders:readView open orders and order history
orders:writeCreate and cancel buy/sell orders
trading:executeExecute gasless token purchases
distributions:readUnclaimed earnings, claim proofs, claim history
buyout:readView buyout offers, positions, requirements

Wallet Scoping

When creating a key, you can restrict it to a specific wallet or allow access to all wallets on your account. Wallet-scoped keys can only read/write data for that wallet.

Rate Limits

CategoryLimitWindow
General API calls300 requests1 minute
Order creation30 requests1 minute
Trade execution10 requests1 minute

Rate limit info returned in RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset headers.

API Endpoints

Complete endpoint reference. Public endpoints need no auth.

Public (No Auth)

MethodEndpointDescription
GET/api/propertiesList all properties with market data
GET/api/explorer/propertiesExplorer view with contract addresses
GET/api/trading-status/status/:propertyIdCheck if property is trading
GET/api/order-book/book/:propertyIdOrder book depth
GET/api/merkle/proof/:addressMerkle proof for on-chain purchases
GET/api/token-stats/total-supplyTotal token supply across properties
GET/api/buyout/active-offers/:propertyIdActive buyout offers

Portfolio AUTH

MethodEndpointScopeDescription
GET/api/portfolio/holdingsportfolio:readToken holdings for a wallet
GET/api/portfolio/summaryportfolio:readPortfolio summary
GET/api/portfolio/distributionsportfolio:readDistribution payments received
GET/api/portfolio/performanceportfolio:readPerformance chart data
GET/api/portfolio/tradesportfolio:readTrade history
GET/api/portfolio/incomeportfolio:readRental income breakdown

Orders & Trading AUTH

MethodEndpointScopeDescription
GET/api/trading/ordersorders:readList all orders
GET/api/order-book/my-ordersorders:readYour open orders
POST/api/order-book/createorders:writeCreate buy or sell order
POST/api/token-purchase/gaslesstrading:executeGasless token purchase (IPS)

Distributions AUTH

MethodEndpointScopeDescription
GET/api/distributions/unclaimed/:walletdistributions:readUnclaimed earnings
GET/api/distributions/claim-data/:walletdistributions:readMerkle proofs for claiming
GET/api/distributions/history/:walletdistributions:readClaim history
POST/api/distributions/record-claimdistributions:readRecord on-chain claim

Buyouts AUTH

MethodEndpointScopeDescription
GET/api/buyout/check-approval/:propertyIdbuyout:readCheck if approved for buyout
GET/api/buyout/offer-requirements/:propertyIdbuyout:readRequirements for buyout offer
GET/api/buyout/my-position/:propertyIdbuyout:readYour token position

View the full guide for request/response examples, field descriptions, and advanced features.

Code Examples

Copy-paste ready examples in Python and JavaScript.

Python

import requests, time KEY_ID = 'sd_live_a1b2c3d4e5f6' SECRET = 'your96charsecret...' BASE = 'https://api.secondarydao.com' headers = { 'X-SD-KEY': KEY_ID, 'X-SD-SECRET': SECRET, 'X-SD-TIMESTAMP': str(int(time.time() * 1000)) } # Get your holdings r = requests.get(f'{BASE}/api/portfolio/holdings', params={'walletAddress': '0xYourWallet'}, headers=headers) print(r.json()) # Place a limit buy order r = requests.post(f'{BASE}/api/order-book/create', json={ 'propertyId': '64abc...', 'orderType': 'buy', 'executionType': 'limit', 'tokenAmount': 5, 'pricePerToken': 1950, 'walletAddress': '0xYourWallet' }, headers=headers) print(r.json())

JavaScript (Node.js)

const axios = require('axios'); const client = axios.create({ baseURL: 'https://api.secondarydao.com', headers: { 'X-SD-KEY': 'sd_live_a1b2c3d4e5f6', 'X-SD-SECRET': 'your96charsecret...', 'X-SD-TIMESTAMP': String(Date.now()) } }); // Get holdings const { data } = await client.get('/api/portfolio/holdings', { params: { walletAddress: '0xYourWallet' } }); console.log(data); // Place a buy order const order = await client.post('/api/order-book/create', { propertyId: '64abc...', orderType: 'buy', executionType: 'limit', tokenAmount: 5, pricePerToken: 1950, walletAddress: '0xYourWallet' }); console.log(order.data);