Nexus/API Reference/Spreads

One spread order

GEThttps://app.skylit.ai/api/nexus/v1/spreads/orders/{orderId}

One of your spread orders, whatever its status. Someone else's id answers 404 order_not_found, as an unknown one does.

curl -s "https://app.skylit.ai/api/nexus/v1/spreads/orders/7da49596-592e-48ff-b257-e39109e1fd62" \
  -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.

Path parameters

  • orderIdstringuuidrequired

    The spread order's orderId, from the place or the order list.

Query parameters

  • accountstring

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

    main

Responses

  • 200

    The order.

  • 401

    No key, or a key that isn't valid. Codes: missing_api_key, invalid_api_key.

  • 404

    Not on your account. Codes: order_not_found (no spread order of yours with that id), spread_not_found (no open spread of yours with that id).

  • 422

    Read fine, but the account says no. Codes: port_unsupported (any account but main, or any port), insufficient_buying_power (with orderId when the order was recorded as rejected), order_rejected (recorded as rejected as it was placed; orderId points to it), contract_expired.

  • 429

    Over a rate limit. Wait Retry-After seconds, then retry. Codes: rate_limited, and stream_limit_reached (too many live streams open: 3 per key, 6 per account).

  • 500

    Something went wrong on our side. If you sent a clientOrderId, retry with the same one. Code: internal_error.

  • 503

    Try again in a moment. Codes: no_live_quote (a leg, or the underlying, has no live quote; quotes older than 15 s never fill), unavailable (spreads aren't on this server, or a check couldn't be read).

Response fields

  • dataobjectrequired

    One spread order, as every spread order route and the live stream return it. A figure that hasn't happened yet is null, never 0.

    • orderIdstringuuid
    • clientOrderIdstring
    • accountstring
      main
    • strategystring
    • underlyingstring
    • positionEffectstring
      OPENCLOSE
    • netEffectstring
      DEBITCREDIT
    • orderTypestring
      LIMITMARKET
    • timeInForcestring
      DAYGTC
    • quantityinteger
    • filledQuantityinteger
    • limitPricenumber | null

      Per spread. null on a market order.

    • averageFillPricenumber | null

      The net per spread it filled at. null until it fills.

    • realizedPnlnumber | null

      Dollars a filled close made or lost. null on an open, and until a close fills.

    • feesnumber | null

      Dollars the fill paid. null before it fills.

    • statusstring

      Upper case, as on the Spreads ticket in Nexus.

      WORKINGFILLEDCANCELLEDREJECTEDEXPIRED
    • cancellableboolean

      true while it rests.

    • receivedAtstring | nulldate-time
    • messagestring | null

      Why it was rejected or ended, when there's a reason.

    • legsobject[]
  • metaobjectrequired
    • accountstring
      main

Last updated

Was this page helpful?