GetPlatformList
Gets the exchange accounts added to the account.
Examples
List the added exchange accounts to get the pid used in robot configurations.
python
# api() is the function in the Python example on the signature authentication page
r = api('GetPlatformList')
for p in r['data']['result']['platforms']:
print(p['id'], p['eid'], p['label'])Returns
| Type | Description |
object | On success |
Arguments
| Name | Type | Required | Description |
offset | number | No | Paging offset, 0 by default. |
limit | number | No | Page size; omitted or less than or equal to 0 returns all. |
Attributes
| Name | Type | Description |
all | number | Number of exchange accounts added. |
platforms[].id | number | Exchange account ID, the |
platforms[].eid | string | Exchange ID, used in some configurations and parameters. |
platforms[].label | string | The label set when the account was added. |
platforms[].stocks | array | Common trading pairs. |
Remarks
Example response
json
{
"code": 0,
"data": {
"result": {
"all": 2,
"platforms": [{
"category": "加密货币||Crypto",
"date": "2023-12-07 13:44:52",
"eid": "Binance",
"id": 123,
"label": "Binance",
"logo": "...",
"name": "币安现货|Binance",
"stocks": ["BTC_USDT", "LTC_USDT", "ETH_USDT", "ETC_USDT",
"BTC_TUSD", "ETH_TUSD", "BNB_TUSD"],
"website": "..."
}, {
"category": "通用协议|Custom Protocol",
"date": "2020-11-09 11:23:48",
"eid": "Exchange",
"id": 123,
"label": "XX exchange REST protocol",
"logo": "...",
"name": "通用协议|Custom Protocol",
"stocks": ["BTC_USDT", "ETH_USDT"],
"website": ""
}]
},
"error": null
}
}