---
title: "Sell Cargo"
method: POST
path: "/my/ships/{shipSymbol}/sell"
tags: ["Fleet"]
---

# Sell Cargo

`POST /my/ships/{shipSymbol}/sell`

## Request

- Base URL: `https://api.spacetraders.io/v2`
- URL: `https://api.spacetraders.io/v2/my/ships/{shipSymbol}/sell`
- Auth: HTTP bearer

Sell cargo in your ship to a market that trades this cargo. The ship must be docked in a waypoint that has the `Marketplace` trait in order to use this function.

## Path parameters

- `shipSymbol` string, required

## Request body

- object
  - `symbol` TradeSymbolJson, required (unresolved $ref)
  - `units` integer, required: Amounts of units to sell of the selected good.

## Response `201`

Cargo was successfully sold.

- object
  - `data` object, required
    - `agent` AgentJson, required (unresolved $ref)
    - `cargo` ShipCargoJson, required (unresolved $ref)
    - `transaction` MarketTransactionJson, required (unresolved $ref)

## Changes

> 50 revisions in range; 2 not diffed.

- **2025-02-06** `a4500b4e7ef1`: 1 breaking
  - added the new path request parameter `shipSymbol`
- **2023-06-09** `01114438ccb4`: 1 breaking
  - the `symbol` request property type changed from `string` to no type
- **2023-06-09** `735393b679c5`: 2 info
  - api tag `Fleet` added
  - api tag `fleet` removed
- **2023-05-23** `252df2c2fc84`: 1 info
  - endpoint added
- **2023-05-20** `86f8c56c4690`: 1 breaking, 1 warning, 2 info
  - the `symbol` request property type changed from no type to `string`
  - deleted the `path` request parameter `shipSymbol`
  - api tag `fleet` added
  - api tag `Fleet` removed

[Operation history](https://skmtc.dev/spacetradersapi/apis/spacetraders-api/changes/my/ships/:shipSymbol/sell/post.md)

---

[API](https://skmtc.dev/spacetradersapi/apis/spacetraders-api.md) - [All operations](https://skmtc.dev/spacetradersapi/apis/spacetraders-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spacetradersapi/apis/spacetraders-api/revisions/197cf9b9a2b6?raw)
