Skip to main content

Deposit Funds

Lending funds to Bybit asset pool

info
  • normal & UMA account: deduct funds from Spot wallet
  • UTA account: deduct funds from Unified wallet

HTTP Request

POST /v5/lending/purchase

Request Parameters

ParameterRequiredTypeComments
cointruestringCoin name
quantitytruestringDeposit quantity
serialNofalsestringCustomised ID. If not passed, system will create one by default

Response Parameters

ParameterTypeComments
coinstringCoin name
createdTimestringCreated timestamp (ms)
orderIdstringOrder ID
quantitystringDeposit quantity
serialNostringSerial No
statusstringOrder status. 0: Initial, 1: Processing, 2: Success, 10: Failed
updatedTimestringUpdated timestamp (ms)

Request Example

POST /v5/lending/purchase HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1682046368938
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"coin": "USDC",
"quantity": "20.00005",
"serialNo": "test-00007"
}

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"coin": "USDC",
"createdTime": "1682046369112",
"orderId": "1403501100816928256",
"quantity": "20.00005",
"serialNo": "test-00007",
"status": "0",
"updatedTime": "1682046369112"
},
"retExtInfo": {},
"time": 1682046369120
}