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

Splits each of the given open positions into two positions, one holding the given percentage of the amount and one holding the rest. Positions on hold, already sold or with an open order are skipped.

OAuth scope: read manage About scopes

percentage must be above 0 and at most 100; it defaults to 50. When some positions were skipped, data also says how many. Returns an error when no position could be split. Not available for copy bots.

Example request

curl -X POST "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/split" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"position_id":[123456,123457],"percentage":25}'

Parameters

Headers

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

Path parameters

NameTypeRequiredDescription
id string Required Hopper ID.

Request body

JSON, model PositionSplitPOST

FieldTypeRequiredDescription
position_idarray of integerOptional
percentagenumberOptionalBetween 0 and 100.

Response

Example response (illustrative values)

{
    "data": "Positions have been splitted."
}

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