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

Places a DCA buy order for each of the given open positions, priced at the current ask and sized by the hopper's DCA size setting. Optionally creates a trailing stop buy instead of a direct order.

OAuth scope: read manage trade About scopes

dca_mode is merged (default) or individual; individual falls back to merged when the subscription does not include it. market_order 1 places a market order, otherwise a limit order. trailing_buy 1 together with a trailing_buy_percentage above 0 creates a trailing stop buy. The order must fit in the hopper's quote currency balance. Not available for exchange arbitrage, market maker, copy and grid bots.

Example request

curl -X POST "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/dca" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"position_ids":[123456,123457],"market_order":0,"dca_mode":"merged","trailing_buy":1,"trailing_buy_percentage":0.5}'

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 PositionDCAPOST

FieldTypeRequiredDescription
position_idsarray of integerOptional
market_ordernumberOptionalMinimum 0.
dca_modestringOptionalOne of: merged, individual.
trailing_buynumberOptionalMinimum 0.
trailing_buy_percentagenumberOptionalMinimum 0.

Response

Example response (illustrative values)

{
    "data": "DCA order(s) created."
}

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