Nexus/API Reference/Journal and Edge

Your execution quality

GEThttps://app.skylit.ai/api/nexus/v1/journal/execution

What your fills cost you against the quoted midpoint on one of your accounts: the spread you faced at each fill, how far from the mid you filled (positive is worse for you, on buys and sells alike), what that cost in dollars, and that cost as a share of what you won. Getting in and getting out are reported apart. Read only.

Only fills with a bid and ask recorded at fill time can be measured: the averages cover fillsAnalyzed of fillsTotal. With no measured fill, avgSpreadWidth, avgSlippage and totalSlippageCost are null, never 0, and buckets is empty. slippageShareOfGross is null when nothing was won in the range (grossProfit 0). It has no upper limit: a small win beside a costly fill can be several hundred percent, so read it with grossProfit. The cost counts measured fills only while grossProfit counts every winning trade, so with fillsAnalyzed below fillsTotal the share reads low.

range is 7d, 30d (the default), 90d, ytd or all. account is main (your simulated wallet) or agent (your bot's account); port is one of your ports. meta says which account and port were read.

curl -s "https://app.skylit.ai/api/nexus/v1/journal/execution?range=30d&account=agent" \
  -H "Authorization: Bearer $SKYLIT_API_KEY"

Authorization

Authorization: Bearer <your API key>

Required. A missing header returns 401; an invalid, revoked or expired key returns 403.

Query parameters

  • rangestringdefault 30d
    7d30d90dytdall
  • accountstring

    Which of your accounts. Left out, your default account.

    mainagent
  • portstring

    One of your port ids (GET /v1/trading/ports). An account sent beside it must agree with it.

Responses

  • 200

    Your execution quality on that account.

  • 400

    bad_request: range is not one of 7d, 30d, 90d, ytd, all; account is not main or agent, or it does not agree with the port.

  • 401

    Missing or invalid key.

  • 404

    port_not_found: that port is not one of yours. user_not_found: this account has not used Nexus yet.

Response fields

  • dataobjectrequired
    • rangestringrequired
    • fillsAnalyzedintegerrequired

      Fills with a quote recorded at fill time.

    • fillsTotalintegerrequired

      Every fill in the range.

    • avgSpreadWidthnumber | nullrequired

      Ask minus bid at fill time, dollars per share of the contract. null with no measured fill.

    • avgSlippagenumber | nullrequired

      Distance from the mid at fill time, dollars per share of the contract; positive is worse for you. null with no measured fill.

    • totalSlippageCostnumber | nullrequired

      Slippage in dollars (quantity and the 100 multiplier on options). null with no measured fill.

    • grossProfitnumberrequired

      Dollars won on winning trades closed in the range.

    • slippageShareOfGrossnumber | nullrequired

      totalSlippageCost as a percent of grossProfit. null when grossProfit is 0. No upper limit.

    • bucketsobject[]required
  • metaobjectrequired
    • accountstring
      mainagent
    • portstring | null

Last updated

Was this page helpful?