feat(): added Crypto Loan endpoints

This commit is contained in:
Jerko J
2024-10-15 12:34:43 +02:00
parent e019fb40f2
commit 7b7258b009
18 changed files with 566 additions and 4 deletions

View File

@@ -0,0 +1,41 @@
export interface BorrowCryptoLoanParamsV5 {
loanCurrency: string;
loanAmount?: string;
loanTerm?: string;
collateralCurrency: string;
collateralAmount?: string;
}
export interface GetUnpaidLoanOrdersParamsV5 {
orderId?: string;
loanCurrency?: string;
collateralCurrency?: string;
loanTermType?: string;
loanTerm?: string;
limit?: string;
cursor?: string;
}
export interface GetRepaymentHistoryParamsV5 {
orderId?: string;
repayId?: string;
loanCurrency?: string;
limit?: string;
cursor?: string;
}
export interface GetCompletedLoanOrderHistoryParamsV5 {
orderId?: string;
loanCurrency?: string;
collateralCurrency?: string;
limit?: string;
cursor?: string;
}
export interface GetLoanLTVAdjustmentHistoryParamsV5 {
orderId?: string;
adjustId?: string;
collateralCurrency?: string;
limit?: string;
cursor?: string;
}

View File

@@ -0,0 +1,92 @@
export interface CollateralCoinV5 {
collateralAccuracy: number;
currency: string;
initialLTV: string;
liquidationLTV: string;
marginCallLTV: string;
maxLimit: string;
}
export interface VipCollateralCoinListV5 {
list: CollateralCoinV5[];
vipLevel: string;
}
export interface BorrowableCoinV5 {
borrowingAccuracy: number;
currency: string;
flexibleHourlyInterestRate: string;
hourlyInterestRate7D: string;
hourlyInterestRate14D: string;
hourlyInterestRate30D: string;
hourlyInterestRate90D: string;
hourlyInterestRate180D: string;
maxBorrowingAmount: string;
minBorrowingAmount: string;
}
export interface VipBorrowableCoinListV5 {
list: BorrowableCoinV5[];
vipLevel: string;
}
export interface AccountBorrowCollateralLimitV5 {
collateralCurrency: string;
loanCurrency: string;
maxCollateralAmount: string;
maxLoanAmount: string;
minCollateralAmount: string;
minLoanAmount: string;
}
export interface UnpaidLoanOrderV5 {
collateralAmount: string;
collateralCurrency: string;
currentLTV: string;
expirationTime: string;
hourlyInterestRate: string;
loanCurrency: string;
loanTerm: string;
orderId: string;
residualInterest: string;
residualPenaltyInterest: string;
totalDebt: string;
}
export interface RepaymentHistoryV5 {
collateralCurrency: string;
collateralReturn: string;
loanCurrency: string;
loanTerm: string;
orderId: string;
repayAmount: string;
repayId: string;
repayStatus: number;
repayTime: string;
repayType: string;
}
export interface CompletedLoanOrderV5 {
borrowTime: string;
collateralCurrency: string;
expirationTime: string;
hourlyInterestRate: string;
initialCollateralAmount: string;
initialLoanAmount: string;
loanCurrency: string;
loanTerm: string;
orderId: string;
repaidInterest: string;
repaidPenaltyInterest: string;
status: number;
}
export interface LoanLTVAdjustmentHistoryV5 {
collateralCurrency: string;
orderId: string;
adjustId: string;
adjustTime: string;
preLTV: string;
afterLTV: string;
direction: number;
amount: string;
}