POST https://api.cryptohopper.com/v1/hopper/{id}/position/sell/{position_id}

Places a sell order for one open position at the current bid, or at the price you send.

OAuth scope: trade About scopes

Uses the order rate limit bucket: 1 request per 8 seconds. The body is optional: price (limit price) and market_order (1 for a market order). If the position already has an open order, data is "Order already placed". Requires an active subscription for the hopper.

Example request

curl -X POST "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/sell/POSITION_ID" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"market_order":1}'

Parameters

Headers

NameTypeRequiredDescription
access-token string Required The OAuth access token of the user.

Path parameters

NameTypeRequiredDescription
position_id string Required Open position ID.
id string Required Hopper ID.

Response

Example response (illustrative values)

{
    "data": "Sell order for position placed."
}

Status codes: 200. Errors return JSON with status, error and message. See How the API works for response codes and rate limits.