GET
https://api.cryptohopper.com/v1/hopper/{id}/position/sync
Compares the hopper's stored exchange balances with its open positions, open orders and reserved funds, and returns coin amounts that no position covers (unsynced) and amounts too small to trade (dust).
OAuth scope:
read About scopes
unsynced and dust are null when empty. On exchanges that support converting dust, an extra exchange object with the convertible assets can be included. Use Sync a position to add an unsynced amount as a position. Not available for exchange arbitrage, market maker, copy and grid bots.
Example request
curl "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/sync" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/sync', {
method: 'GET',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.get(
"https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/sync",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/hopper/HOPPER_ID/position/sync');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'access-token: YOUR_ACCESS_TOKEN',
],
]);
$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. |
Response
{
"data": {
"unsynced": [
{
"pair": "ETHUSDT",
"cur": "ETH",
"amount": 0.25,
"rate": "3120.45000000"
}
],
"dust": null
}
}