Skip to main content

Repay

Covers: Margin trade (Classic Account)

HTTP Request

POST /v5/spot-cross-margin-trade/repay

Request Parameters

ParameterRequiredTypeComments
cointruestringCoin name
qtyfalsestringAmount to repay
  • qty is required when completeRepayment=0
  • qty is invalid when completeRepayment=1
completeRepaymentfalseintegerWhether to pay off all debts. 0(default): false, 1: true

Response Parameters

ParameterTypeComments
repayIdstringRepayment transaction ID

Request Example

POST /v5/spot-cross-margin-trade/repay HTTP/1.1
Host: api-testnet.bybit.com
Content-Type: application/json
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1677751944347
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
Content-Length: 66

{
"coin": "ETH",
"qty": null,
"completeRepayment": 1
}

Response Example

{
"retCode": 0,
"retMsg": "success",
"result": {
"repayId": "19070"
},
"retExtInfo": {},
"time": 1677751941219
}