POST
https://api.cryptohopper.com/v1/hopper/{id}/arbitrage/exchange/cancel
Cancels the open exchange arbitrages listed in arbitrage_ids: their open orders are cancelled on the exchanges and the arbitrages are marked cancelled.
OAuth scope:
read manage About scopes
When only some arbitrages are found, the found ones are cancelled and the message says not all were cancelled.
Example request
curl -X POST "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/arbitrage/exchange/cancel" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"arbitrage_ids":[2397001,2397002]}'
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/arbitrage/exchange/cancel', {
method: 'POST',
headers: {
"access-token": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"arbitrage_ids": [
2397001,
2397002
]
})
});
const data = await response.json();
import requests
response = requests.post(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/arbitrage/exchange/cancel",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
json={
"arbitrage_ids": [
2397001,
2397002
]
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/arbitrage/exchange/cancel');
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([
'arbitrage_ids' => [
2397001,
2397002,
],
]),
]);
$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 |
|---|---|---|---|
id |
string | Required | Hopper ID of an arbitrage bot. |
Response
{
"data": "Selected arbitrage(s) are cancelled."
}