One spread order
https://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
orderIdstringuuidrequiredThe spread order's
orderId, from the place or the order list.
Query parameters
accountstringmainor 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 butmain, or any port),insufficient_buying_power(withorderIdwhen the order was recorded as rejected),order_rejected(recorded as rejected as it was placed;orderIdpoints to it),contract_expired. - 429
Over a rate limit. Wait
Retry-Afterseconds, then retry. Codes:rate_limited, andstream_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
dataobjectrequiredOne spread order, as every spread order route and the live stream return it. A figure that hasn't happened yet is
null, never0.orderIdstringuuidclientOrderIdstringaccountstringmainstrategystringunderlyingstringpositionEffectstringOPENCLOSEnetEffectstringDEBITCREDITorderTypestringLIMITMARKETtimeInForcestringDAYGTCquantityintegerfilledQuantityintegerlimitPricenumber | nullPer spread.
nullon a market order.averageFillPricenumber | nullThe net per spread it filled at.
nulluntil it fills.realizedPnlnumber | nullDollars a filled close made or lost.
nullon an open, and until a close fills.feesnumber | nullDollars the fill paid.
nullbefore it fills.statusstringUpper case, as on the Spreads ticket in Nexus.
WORKINGFILLEDCANCELLEDREJECTEDEXPIREDcancellablebooleantruewhile it rests.receivedAtstring | nulldate-timemessagestring | nullWhy it was rejected or ended, when there's a reason.
legsobject[]
metaobjectrequiredaccountstringmain
Last updated