GET
https://api.cryptohopper.com/v1/exchange/{exchange}/markets/{market}/decimals
Returns the price and amount precision (number of decimals) of one market on an exchange. Falls back to 8 and 8 when no precision is stored for the market.
OAuth scope:
read About scopes
Example request
curl "https://api.cryptohopper.com/v1/exchange/EXCHANGE/markets/MARKET/decimals" \
-H "access-token: YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.cryptohopper.com/v1/exchange/EXCHANGE/markets/MARKET/decimals', {
method: 'GET',
headers: {
"access-token": "YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
import requests
response = requests.get(
"https://api.cryptohopper.com/v1/exchange/EXCHANGE/markets/MARKET/decimals",
headers={
"access-token": "YOUR_ACCESS_TOKEN"
},
)
data = response.json()
$ch = curl_init('https://api.cryptohopper.com/v1/exchange/EXCHANGE/markets/MARKET/decimals');
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 |
|---|---|---|---|
exchange |
string | Required | Exchange key as returned by Get available exchanges, for example binance or kucoin. Case insensitive. |
market |
string | Required | Market pair, in the exchange's own pair format as returned by Get available markets, for example BTCUSDT on Binance or BTC/USDT on KuCoin. |
Response
{
"data": {
"price": "2",
"amount": "5"
}
}