Active Coins
List the trading symbols available on a given exchange.
HTTP
| Method | GET |
| Endpoint | /trade/api/v2/coins |
Request Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
exchange | string | Yes | One of coinswitchx, c2c1, c2c2 (case-insensitive). See Exchange Identifiers. |
Example
- Python
- Java
- Go
- Node.js
# sign_request comes from the Reference Client
import requests
headers, path = sign_request("GET", "/trade/api/v2/coins",
params={"exchange": "coinswitchx"})
response = requests.get(BASE_URL + path, headers=headers)
print(response.json())
// CoinswitchClient comes from the Reference Client
HttpResponse<String> resp = client.send(
"GET", "/trade/api/v2/coins",
Map.of("exchange", "coinswitchx"), null);
System.out.println(resp.body());
headers, p, err := SignRequest("GET", "/trade/api/v2/coins", map[string]string{"exchange": "coinswitchx"})
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/coins', {"exchange": "coinswitchx"});
const r = await fetch(BASE_URL + path, {
method: 'GET',
headers,
});
console.log(await r.json());
Response
{
"data": {
"coinswitchx": [
"BAT/INR",
"BNB/INR",
"BTC/INR",
"ETH/INR",
"MATIC/INR"
]
}
}
data is an object keyed by exchange identifier; each value is an array of BASE/QUOTE symbols available on that exchange.