Set Deposit Account
Set auto transfer account after deposit. The same function as the setting for Deposit on web GUI
info
- Your funds will be deposited into
FUND
wallet by default. You can set the wallet for auto-transfer after deposit by this API. - Only main UID can access.
tip
HTTP Request
POST /v5/asset/deposit/deposit-to-account
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
accountType | true | string | Account type
|
Response Parameters
Parameter | Type | Comments |
---|---|---|
status | integer | Request result:
|
Request Example
- HTTP
- Python
- Node.js
POST /v5/asset/deposit/deposit-to-account HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1676887913670
X-BAPI-RECV-WINDOW: 50000
Content-Type: application/json
{
"accountType": "CONTRACT"
}
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.set_deposit_account(
accountType="CONTRACT",
))
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.setDepositAccount({
accountType: 'CONTRACT'
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Response Example
{
"retCode": 0,
"retMsg": "success",
"result": {
"status": 1
},
"retExtInfo": {},
"time": 1676887914363
}