Create Internal Transfer
Create the internal transfer between different account types under the same UID.
tip
- Please refer to transferable coin list API to find out more.
HTTP Request
POST /v5/asset/transfer/inter-transfer
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
transferId | true | string | UUID. Please manually generate a UUID |
coin | true | string | Coin, uppercase only |
amount | true | string | Amount |
fromAccountType | true | string | From account type |
toAccountType | true | string | To account type |
Response Parameters
Parameter | Type | Comments |
---|---|---|
transferId | string | UUID |
status | string | Transfer status STATUS_UNKNOWN SUCCESS PENDING FAILED |
Request Example
- HTTP
- Python
- Node.js
POST v5/asset/transfer/inter-transfer HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1670986690556
X-BAPI-RECV-WINDOW: 50000
X-BAPI-SIGN: XXXXX
Content-Type: application/json
{
"transferId": "42c0cfb0-6bca-c242-bc76-4e6df6cbcb16",
"coin": "BTC",
"amount": "0.05",
"fromAccountType": "UNIFIED",
"toAccountType": "CONTRACT"
}
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.create_internal_transfer(
transferId="42c0cfb0-6bca-c242-bc76-4e6df6cbcb16",
coin="BTC",
amount="0.05",
fromAccountType="UNIFIED",
toAccountType="CONTRACT",
))
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.createInternalTransfer(
'42c0cfb0-6bca-c242-bc76-4e6df6cbcb16',
'BTC',
'0.05',
'UNIFIED',
'CONTRACT',
)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Response Example
{
"retCode": 0,
"retMsg": "success",
"result": {
"transferId": "42c0cfb0-6bca-c242-bc76-4e6df6cbab16",
"status": "SUCCESS"
},
"retExtInfo": {},
"time": 1670986962783
}