085margin_loan_history - coinexcom/coinex_exchange_api GitHub Wiki
-
Request description: Get loan history of the margin trading account.
-
Request type: GET
-
Signature required: Yes
-
Request Header:
authorization:"xxxx"(32-digit capital letters, see generating method in <API invocation instruction>) -
Request Url:https://api.coinex.com/v1/margin/loan/history
-
Request parameter:
name type required description access_id String Yes access_id tonce Integer Yes Tonce is a timestamp with a positive Interger that represents the number of milliseconds from Unix epoch to the current time. Error between tonce and server time can not exceed plus or minus 60s market String No See<API invocation description·market> status String No status page Integer No Page, start from 1 limit Integer No Amount per page(1-100) -
Return value description:
name type description loan_id Integer loan record ID create_time Integer create timestamp market String See<API invocation description·market> coin_type String coin token name loan_amount String borrow amount unflat_amount String amount and interest need to repay expire_time Integer expire timestamp is_renew Boolean false: close;
true: open;day_rate String daily interest rate status String pass: in loan;
burst: bankrupt;
arrears: in debt;
finish: paid off; -
Example:
# Request
GET https://api.coinex.com/v1/margin/loan/history?access_id=4DA36FFC61334695A66F8D29020EB589&tonce=1513746038205
# Response
{
"code": 0,
"data": [
{
"loan_id": 89,
"create_time": 1515806440,
"market": "BTCUSDT",
"coin_type": "BTC",
"day_rate": "0.0001",
"loan_amount": "1.34216421",
"unflat_amount": "1.00321543",
"expire_time": 1515896440,
"is_renew": false,
"status": "pass",
},
...
],
"message": "Ok"
}