API reference · Monitoring

Get the equity curve

GET/v1/bots/{bot_id}/equity

A bot's cumulative realized net P&L by hour or day, and the current marked point.

On this page

Auth. An account token (Authorization: Bearer lb_…) or a signed-in web session. A report-only token (lbr_…) is refused here with 403 scope_denied.

Limits. Counts against your plan's API requests (60, 600 or 3,000 a minute on Free, Builder and Standard).

Parameters

Path parameters

NameTypeRequiredDescription
bot_idstringyesThe bot id (bot_…).

Query parameters

NameTypeRequiredDescription
stepstringnohour or day. Default hour.
sinceintegernoOldest point, ms epoch.
untilintegernoNewest point, ms epoch.

Request

Terminal
curl "https://api.langbot.ai/v1/bots/bot_01M6G72RFQRQ8JGNG8T1447GGP/equity?step=hour" \
  -H "Authorization: Bearer $LANGBOT_API_TOKEN"

Response

200 OK

JSON
{
  "step": "hour",
  "points": [
    {
      "ts": 1793696400000,
      "realized_net": 0.55,
      "fills": 2
    }
  ],
  "marked": {
    "ts": 1793693150761,
    "marked_net": 1.95
  }
}

Each point's ts is the end of its hour or day (never later than now). At most 2,000 points.

Errors

StatuscodeWhen
404not_foundNo bot with that id on your account (or it was deleted).
401auth_requiredNo token was sent.
401token_invalidThe token was not recognised (mistyped, revoked or expired).
422validation_errorA parameter failed validation; detail[].loc names it.
429rate_limitedOver your request budget; wait Retry-After seconds.

Every error body is {"detail": …, "code": "…"}; branch on code. All codes: Errors.