Nexus/API Reference/Ports

Delete a port

DELETEhttps://app.skylit.ai/api/nexus/v1/trading/ports/{id}

Delete one of your extra ports, the same delete as in Nexus. It leaves your list and its id stops working everywhere: an order or a read that sends it answers 404 port_not_found. Its trades stay saved: no list, journal or stats read shows them after this, but a trade read by its own id (GET /api/nexus/v1/trades/{id}) still answers. You can't undo it. It frees a spot and its name.

Main and Bot always stay, and so does your ranked port. A port with an open trade or a working order can't be deleted: close and cancel first, nothing is closed for you. No body. It counts as a write.

A retry after it worked answers 404 port_not_found: if you lost the answer, list your ports.

Authorization

Authorization: Bearer <your API key>

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

Path parameters

  • idstringuuidrequired

    The port's id, from the list.

Responses

  • 200

    The port is deleted.

  • 401

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

  • 403

    The key works but this can't be done. Codes: feature_disabled (ports are switched off on the server: leave port out), account_suspended, nexus_access_denied.

  • 404

    Code: port_not_found. No live port with that id on your account. Someone else's port answers the same.

  • 409

    The port stays and nothing changed. Codes: open_positions (an open trade or a working order is on it: close and cancel first), cannot_delete_default (Main and Bot stay), cannot_delete_ranked (your ranked port stays), cannot_delete_ranked_agent (the port is your ranked agent: make another account your ranked agent in Nexus first).

  • 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.

Response fields

  • dataobject
    • idstringuuid

      The port that was deleted.

    • deletedboolean

      Always true on a 200.

Last updated

Was this page helpful?