Connect Portfolio Exchange
Connect an exchange account to your account and create a tracked portfolio
You will get
You will get
- A portfolioId you can use to query portfolio data (value, coins, chart, transactions, defi, snapshot)
- Automatic portfolio creation with visibility set to API
Required
Required
- connectionId: Exchange identifier (e.g., “binance”). Use GET /exchange/support for supported exchanges.
- connectionFields: Exchange API credentials (apiKey, apiSecret, etc.)
Optional
Optional
- name: Custom display name for the portfolio
Authorizations
API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the X-API-KEY request header. Never expose your key in client-side code.
Body
The connectionId for the cryptocurrency exchange platform. Use GET /exchange/support to get the list of supported exchanges.
"binance"
Authentication credentials required to connect to the exchange. This object should contain the fields specified in GET /exchange/support for the given exchange.
{
"apiKey": "your_exchange_api_key_here",
"apiSecret": "your_exchange_api_secret_here"
}Optional display name for the portfolio.
"My Binance Portfolio"
Response
Connect Exchange Portfolio
The unique identifier of the connected portfolio.
"a1b2c3d4e5f6..."
The connectionId used to connect the portfolio.
"ethereum"
"connected" if a new portfolio was created, "existing" if the portfolio already exists.
connected, existing "connected"