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

Merges the given open positions into one position per coin, with the combined amount at the average rate. Positions on hold, already sold or with an open order are left out.

OAuth scope: read About scopes

position_id must be an array with at least 2 position IDs. The response is the same when none of the positions could be merged. Not available for copy bots, exchange arbitrage, market maker and grid bots.

Example request

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

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 PositionMergePOST

FieldTypeRequiredDescription
position_idarray of integerRequired

Response

Example response (illustrative values)

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

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