帳戶類型間可劃轉的幣種
HTTP 請求
GET /v5/asset/transfer/query-transfer-coin-list
HTTP 請求
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
fromAccountType | true | string | 劃出帳戶類型 |
toAccountType | true | string | 劃入帳戶類型 |
響應參數
參數 | 類型 | 說明 |
---|---|---|
list | array | 幣種數組 |
請求示例
- HTTP
- Python
- Node.js
GET /v5/asset/transfer/query-transfer-coin-list?fromAccountType=UNIFIED&toAccountType=CONTRACT HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672144322595
X-BAPI-RECV-WINDOW: 5000
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.get_transferable_coin(
fromAccountType="UNIFIED",
toAccountType="CONTRACT",
))
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.getTransferableCoinList('UNIFIED', 'CONTRACT')
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "success",
"result": {
"list": [
"BTC",
"ETH"
]
},
"retExtInfo": {},
"time": 1672144322954
}