POST https://api.cryptohopper.com/v1/hopper/{id}/template/save

Saves the current config of the hopper as a new template, or overwrites one of your templates when save_as is set.

OAuth scope: read manage About scopes

save_as is the ID of your template to overwrite; leave it out or send 0 for a new template. name and description may be at most 255 characters.

Example request

curl -X POST "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/template/save" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"BTC scalper","description":"Short trades on BTC and ETH","save_as":0}'

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 SaveTemplatePOST

FieldTypeRequiredDescription
save_asnumberOptionalMinimum 0.
namestringOptional
descriptionstringOptional

Response

Example response (illustrative values)

{
    "data": {
        "template_id": 7890,
        "message": "A new template has been saved."
    }
}

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