For developers

The desk over HTTP

Everything the console shows is an endpoint: the book, the analysis, the market, the alerts, the advisor itself as a stream. Advice only — nothing here places an order.

OpenAPI documentImport it into Postman, or generate a client.

Authentication

Create a personal API key on your account page (Account & security → API keys). Send it as a bearer token. A read key may only GET; a full key may also write. Keys are shown once and can be revoked at any time. /dashboard/security

curl -H 'Authorization: Bearer bab_…' https://www.bilenabi.com/api/portfolio

Turkish answers: send x-atlas-locale: tr on /api/chat.

Limits and manners

Requests are rate-limited per account (a few hundred a minute on reads; the advisor counts against your token allowance). Prices are real but delayed on equities; the answer is information, not investment advice. Do not build anything that pretends to trade.

The book

Holdings, cash, books, the journal, paper positions and the dividend run-rate.

GET/api/portfolioread

The tracked book valued live: holdings with P&L, allocation, risk report, ideas, alerts and the track record.

bookquery · string
One named book; omit for the whole account (consolidated per symbol).
curl -H 'Authorization: Bearer bab_…' https://www.bilenabi.com/api/portfolio
GET/api/booksread

Named books with their size; ?book=Name adds that book's rows.

POST/api/booksfull

Open a book ({name}) or move a position between books ({symbol, from, to, quantity?}).

namebody · string
New book's name (create).
symbolbody · string
Position to move.
frombody · string
Source book, Main when omitted.
tobody · string
Target book.
quantitybody · number
Part of the position; whole when omitted.
GET/api/tradesread

The journal and the realised report.

symbolquery · string
One name.
yearquery · number
Calendar year.
fromquery · string
ISO day.
toquery · string
ISO day.
POST/api/tradesfull

Record a buy or sell the user made; the book and cash move with it.

symbolbody · string · required
Ticker.
sidebody · string · required
buy | sell
quantitybody · number · required
Units.
pricebody · number · required
In the instrument's currency.
atbody · string
2026-09-09 or 09.09.2026; today when omitted.
feebody · number
Commission.
notebody · string
Free text; #tags feed the journal's setups.
bookbody · string
Named book.
adjustCashbody · boolean
false leaves cash untouched.
curl -X POST -H 'Authorization: Bearer bab_…' -H 'content-type: application/json' -d '{"symbol":"THYAO","side":"buy","quantity":100,"price":290}' https://www.bilenabi.com/api/trades
GET/api/trades/taxread

The year's FIFO lots in lira with indexation where the producer-price series allows. Not tax advice.

yearquery · number
Calendar year.
GET/api/paperread

Paper positions, open and closed, graded at the live quote.

POST/api/paperfull

Open a paper position ({symbol, quantity, price?, side?, note?}).

symbolbody · string · required
Ticker.
quantitybody · number · required
Units.
GET/api/dividendsread

Dividend income run-rate per name and the ex-dates ahead.

bookquery · string
One named book.
daysquery · number
Calendar horizon, default 90.

Analysis

Risk, correlation, the efficient frontier, stress scenarios, the journal's patterns.

GET/api/trades/analyticsread

Round trips, win rate, payoff, expectancy, breakdowns by setup and habit, behaviour notes.

GET/api/correlationread

Correlation matrix of the book's names (or ?symbols=A,B), pairs and clusters.

symbolsquery · string
Comma-separated tickers.
watchlistquery · boolean
1 adds the watchlist.
lookbackquery · number
Sessions, 40–750.
GET/api/optimiseread

The capped long-only efficient frontier, the book's point, and the rebalance plans (straight and tax-aware).

objectivequery · string
max-sharpe | min-variance | target-risk | target-return
maxWeightPctquery · number
Cap per name, default 35.
GET/api/stressread

The preset scenarios on the book; factor shocks as query parameters (?SPY=-15&USDTRY=20) for a custom one.

GET/api/scenariosread

The scenario library: presets, dated episodes (model and actual replay) and saved scenarios.

POST/api/scenariosfull

Save a scenario ({name, shocks}).

namebody · string · required
Its name.
shocksbody · object · required
Percent moves per factor (SPY, XU100, USDTRY, EURUSD, GBPUSD, BTC, GLD, TLT).

Market

Quotes, history since 2010, the sector map, rotation, earnings season, the corporate calendar.

GET/api/marketread

Live quotes for the universe in use, feed status, headlines and the macro calendar.

GET/api/historyread

Daily, weekly or monthly bars since 2010 with period statistics.

symbolquery · string · required
Ticker.
fromquery · string
ISO day.
toquery · string
ISO day.
intervalquery · string
day | week | month
curl -H 'Authorization: Bearer bab_…' 'https://www.bilenabi.com/api/history?symbol=SPY&from=2020-01-01&to=2020-12-31&interval=week'
GET/api/market/heatread

Sector medians over 1, 5 and 30 sessions and the exchange's indices.

marketquery · string
BIST | US | EU
GET/api/market/rotationread

Sectors against the benchmark as a relative-rotation reading.

marketquery · string
BIST | US | EU
GET/api/market/earningsread

Earnings season on the book's names: reported, reaction, next date and its source.

GET/api/screenread

Screen the universe with structured filters (market, returns, volatility, range, fundamentals).

Alerts and notifications

Armed levels the watchdog checks every 30 seconds.

GET/api/alertsread

Armed and triggered alerts.

POST/api/alertsfull

Arm an alert ({symbol, kind, threshold}).

symbolbody · string · required
Ticker.
kindbody · string · required
price_above | price_below | pct_move | trailing_stop | volume_spike | event_ahead …
thresholdbody · number · required
Level, percent or days by kind.
GET/api/notificationsread

What the desk sent: alerts, drift notices, earnings-ahead notes.

The advisor

The same tool-using analyst the console talks to, as a stream.

POST/api/chatfull

Ask the advisor. Server-sent events: text, tool_call, tool_result, narration, done. Send x-atlas-locale: tr for Turkish.

messagesbody · array · required
[{role: 'user', text}] — the prior exchange when continuing a thread.
threadIdbody · string
Continue a stored thread.
curl -N -X POST -H 'Authorization: Bearer bab_…' -H 'content-type: application/json' -H 'x-atlas-locale: tr' -d '{"messages":[{"role":"user","text":"Portföyümü incele"}]}' https://www.bilenabi.com/api/chat

Exports

Tables as CSV or .xlsx, and the whole account as JSON.

GET/api/exportread

A table as a file.

kindquery · string · required
holdings | journal | tax | prices | dividends
formatquery · string
csv | xlsx
sepquery · string
; for Turkish Excel
symbolquery · string
prices: the name
GET/api/account/exportread

Everything the service holds about the account, as one JSON file.