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

Places a buy or sell order for a coin on the hopper's exchange. A sell without manual set to 1 sells all open positions of that coin; with manual set to 1 and an amount, it sells only that amount.

OAuth scope: read manage trade About scopes

Uses the order rate limit bucket: 1 request per 8 seconds, and the same order_type and coin for the same hopper is refused for 8 seconds. order_type is buy or sell; coin is the currency to buy or sell. Without price the current ticker price is used; without amount a buy uses the bot's configured buy amount. The order is queued and placed on the exchange shortly after the response. Optional buy fields: percentage_profit (or pct_profit), trailing_buy and trailing_buy_percentage, take_profit_levels (up to 10 levels, as an array of {"profit", "share"} objects or the shorthand "1:20,2:20"). iceberg_total_orders (2 or more) splits the order for normal bots.

Example request

curl -X POST "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/order" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"order_type":"buy","coin":"BTC","amount":0.001,"price":65000,"market_order":0,"pct_profit":2.5,"order_trigger":"my-app"}'

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 OrderPOST

FieldTypeRequiredDescription
order_typestringOptional
market_orderintegerOptional
coinstringOptional
pricenumberOptional
amountnumberOptional
order_triggerstringOptional
pct_profitnumberOptional
stop_loss_percentagenumberOptional
trailing_stop_loss_percentagenumberOptional
trailing_arm_percentagenumberOptional
manualnumberOptional

Response

Example response (illustrative values)

{
    "data": "Buy order will be placed at the exchange. Currency: BTC (BTC/USDT) Amount: 0.001 Price: 65000"
}

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