GetExchangeList
Gets the exchanges the platform supports and the configuration fields each of them needs.
Examples
List the supported exchange IDs and names (summary).
python
# api() is the function in the Python example on the signature authentication page
r = api('GetExchangeList', True)
for e in r['data']['result']['exchanges']:
print(e['eid'], e['name'])Returns
| Type | Description |
object | On success |
Arguments
| Name | Type | Required | Description |
isSummary | bool | Yes |
|
Attributes
| Name | Type | Description |
exchanges[].eid | string | Exchange ID, e.g. |
exchanges[].name | string | Display name, written |
exchanges[].category | string | Category. |
exchanges[].meta | string | Metadata of the exchange's configuration fields (JSON text), returned only when |
exchanges[].stocks | string | Common trading pairs, comma-separated, returned only when |
Remarks
Example response (isSummary false)
json
{
"code": 0,
"data": {
"result": {
"exchanges": [{
"category": "加密货币||Crypto",
"eid": "Futures_Binance",
"id": 74,
"logo": "/upload/asset/d8d84b23e573e9326b99.svg",
"meta": "[...]",
"name": "币安期货|Futures_Binance",
"priority": 200,
"stocks": "BTC_USDT,ETH_USDT,ETH_USD",
"website": "https://accounts.binance.com/zh-TC/register?ref=45110270"
}]
},
"error": null
}
}
meta is JSON text; parsed, it is an array of configuration fields:
json
[
{"desc": "Access Key", "qr": "apiKey", "required": true, "type": "string",
"name": "AccessKey", "label": "Access Key"},
{"encrypt": true, "qr": "secretKey", "name": "SecretKey", "required": true,
"label": "Secret Key", "type": "password", "desc": "Secret Key"}
]
Example response (isSummary true)
json
{
"code": 0,
"data": {
"result": {
"exchanges": [{
"category": "加密货币||Crypto",
"eid": "Futures_Binance",
"id": 74,
"logo": "/upload/asset/d8d84b23e573e9326b99.svg",
"name": "币安期货|Futures_Binance",
"priority": 200,
"website": "https://accounts.binance.com/zh-TC/register?ref=45110270"
}]
},
"error": null
}
}