forked from gateio/gateapi-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_loan.go
48 lines (46 loc) · 1.87 KB
/
model_loan.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Gate API v4
*
* APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf.
*
* Contact: [email protected]
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package gateapi
// Margin loan details
type Loan struct {
// Loan ID
Id string `json:"id,omitempty"`
// Creation time
CreateTime string `json:"create_time,omitempty"`
// Repay time of the loan. No value will be returned for lending loan
ExpireTime string `json:"expire_time,omitempty"`
// Loan status open - not fully loaned loaned - all loaned out for lending loan; loaned in for borrowing side finished - loan is finished, either being all repaid or cancelled by the lender auto_repaid - automatically repaid by the system
Status string `json:"status,omitempty"`
// Loan side
Side string `json:"side"`
// Loan currency
Currency string `json:"currency"`
// Loan rate. Only rates in [0.0002, 0.002] are supported. Not required in lending. Market rate calculated from recent rates will be used if not set
Rate string `json:"rate,omitempty"`
// Loan amount
Amount string `json:"amount"`
// Loan days
Days int32 `json:"days"`
// Auto renew the loan on expiration
AutoRenew bool `json:"auto_renew,omitempty"`
// Currency pair. Required for borrowing side
CurrencyPair string `json:"currency_pair,omitempty"`
// Amount not lending out
Left string `json:"left,omitempty"`
// Repaid amount
Repaid string `json:"repaid,omitempty"`
// Repaid interest
PaidInterest string `json:"paid_interest,omitempty"`
// Interest not repaid
UnpaidInterest string `json:"unpaid_interest,omitempty"`
// Loan fee rate
FeeRate string `json:"fee_rate,omitempty"`
// Original loan ID if the loan is auto-renewed. Equal to `id` if not
OrigId string `json:"orig_id,omitempty"`
}