Nexus/API Reference/Spreads

Your closed and settled spreads

GEThttps://app.skylit.ai/api/nexus/v1/spreads/history

Every spread you closed or that settled at expiry, newest closed first: each leg's open and close price, the realized P&L in dollars and as a percent, why it closed (MEMBER you closed it, DESK the desk closed it for you, EXPIRY it settled) and when. Main account only, as above. Your history is yours to read whenever spreads are open or not.

curl -s "https://app.skylit.ai/api/nexus/v1/spreads/history?limit=50&offset=0" \
  -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

  • limitintegerdefault 50min 1 · max 200

    How many to return, 1 to 200 (more is read as 200).

  • offsetintegerdefault 0min 0

    How many to skip first.

  • accountstring

    main or left out. Spreads are on your main account only.

    main

Responses

  • 200

    Your closed and settled spreads, newest closed first.

  • 400

    bad_request: limit or offset out of range.

  • 401

    Missing or invalid key.

  • 422

    port_unsupported: spreads are on your main account only.

  • 503

    unavailable: spreads are not available on this server right now.

Response fields

  • dataobject[]required
    • spreadIdstringuuid
    • accountstring
      main
    • strategystring
    • underlyingstring
    • netEffectstring
      DEBITCREDIT
    • statusstring

      EXPIRED settled at expiry.

      CLOSEDEXPIRED
    • quantityinteger
    • openPricenumber | null
    • closePricenumber | null
    • closeEffectstring
      DEBITCREDIT
    • realizedPnlnumber | null
    • realizedPnlPercentnumber | null

      Realized P&L as a percent of what the spread was opened for: the debit you paid, or the credit you took in. A credit spread that loses more than its credit reads below -100. Null for a spread whose legs can open for a debit or a credit (a broken wing butterfly, a condor with uneven wings): dollars only.

    • closeReasonstring
      MEMBERDESKEXPIRY
    • openedAtstringdate-time
    • closedAtstringdate-time
    • legsobject[]
  • metaobjectrequired
    • totalinteger

      Every row there is, across all pages.

    • limitinteger
    • offsetinteger

Last updated

Was this page helpful?