Trade Info
Get min/max order size and precision for a symbol — the data you need to validate orders before submitting them.
HTTP
| Method | GET |
| Endpoint | /trade/api/v2/tradeInfo |
Request Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
exchange | string | Yes | See Exchange Identifiers. |
symbol | string | No | BASE/QUOTE. If omitted, returns info for all symbols on the exchange. |
Example
- Python
- Java
- Go
- Node.js
import requests
headers, path = sign_request("GET", "/trade/api/v2/tradeInfo",
params={"exchange": "coinswitchx",
"symbol": "BTC/INR"})
response = requests.get(BASE_URL + path, headers=headers)
print(response.json())
HttpResponse<String> resp = client.send(
"GET", "/trade/api/v2/tradeInfo",
Map.of("exchange", "coinswitchx", "symbol", "BTC/INR"), null);
System.out.println(resp.body());
headers, p, err := SignRequest("GET", "/trade/api/v2/tradeInfo", map[string]string{"exchange": "coinswitchx",
"symbol": "BTC/INR"})
if err != nil { panic(err) }
req, _ := http.NewRequest("GET", BaseURL+p, nil)
for k, v := range headers { req.Header.Set(k, v) }
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
const {signRequest, BASE_URL} = require('./reference-client');
const {headers, path} = signRequest('GET', '/trade/api/v2/tradeInfo', {"exchange": "coinswitchx",
"symbol": "BTC/INR"});
const r = await fetch(BASE_URL + path, {
method: 'GET',
headers,
});
console.log(await r.json());
Response
{
"data": {
"coinswitchx": {
"BTC/INR": {
"quote": {
"min": "150",
"max": "2500000"
},
"precision": {
"base": 6,
"quote": 2,
"limit": 0
}
}
}
}
}
Response Parameters
data is keyed by exchange, then by symbol. Each symbol object:
| Field | Type | Description |
|---|---|---|
quote.min | string | Minimum total order value, in quote asset (INR or USDT). Reject orders below this. |
quote.max | string | Maximum total order value, in quote asset. Split larger orders. |
precision.base | integer | Decimal places for quantity. |
precision.quote | integer | Decimal places for price. |
precision.limit | integer | Limit-order precision adjustment. |