POST
https://api.cryptohopper.com/v1/hopper/{id}/position/dca/{position_id}
Places a DCA buy order for one open position, priced at the current ask and sized by the hopper's DCA size setting.
OAuth scope:
read manage trade About scopes
The body is optional and takes the same fields as DCA positions (market_order, dca_mode, trailing_buy, trailing_buy_percentage). If the body contains position_ids, those positions are used instead of the path position. 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/POSITION_ID" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"market_order":0,"dca_mode":"individual"}'
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/dca/POSITION_ID', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"market_order": 0,
"dca_mode": "individual"
})
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/dca/POSITION_ID",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"market_order": 0,
"dca_mode": "individual"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/dca/POSITION_ID');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'market_order' => 0,
'dca_mode' => 'individual',
]),
]);
$data = json_decode(curl_exec($ch), true);
Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
access-token |
string | Required | The OAuth access token of the user. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
position_id |
string | Required | Open position ID. |
id |
string | Required | Hopper ID. |
Response
{
"data": "DCA order(s) created."
}