-
-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #419 from SebastianBoehler/master
v2.10.4: add some missing simple earn endpoints
- Loading branch information
Showing
3 changed files
with
194 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
export interface SimpleEarnProductListParams { | ||
asset?: string; | ||
current?: number; | ||
size?: number; | ||
} | ||
|
||
export interface SimpleEarnFlexibleProduct { | ||
asset: string; | ||
latestAnnualInterestRate: string; | ||
tierAnnualPercentageRate: Record<string, number>; | ||
airDropPercentageRate: string; | ||
canPurchase: boolean; | ||
canRedeem: boolean; | ||
isSoldOut: boolean; | ||
hot: boolean; | ||
minPurchaseAmount: string; | ||
productId: string; | ||
subscriptionStartTime: number; | ||
status: string; | ||
} | ||
|
||
export interface SimpleEarnFlexibleProductListResponse { | ||
rows: SimpleEarnFlexibleProduct[]; | ||
total: number; | ||
} | ||
|
||
export interface SimpleEarnLockedProduct { | ||
projectId: string; | ||
detail: { | ||
asset: string; | ||
rewardAsset: string; | ||
duration: number; | ||
renewable: boolean; | ||
isSoldOut: boolean; | ||
apr: string; | ||
status: string; | ||
subscriptionStartTime: number; | ||
extraRewardAsset: string; | ||
extraRewardAPR: string; | ||
}; | ||
quota: { | ||
totalPersonalQuota: string; | ||
minimum: string; | ||
}; | ||
} | ||
|
||
export interface SimpleEarnLockedProductListResponse { | ||
rows: SimpleEarnLockedProduct[]; | ||
total: number; | ||
} | ||
|
||
export interface SimpleEarnSubscribeProductParams { | ||
productId: string; | ||
amount: number; | ||
autoSubscribe?: boolean; | ||
sourceAccount?: 'SPOT' | 'FUND' | 'ALL'; | ||
} | ||
|
||
export interface SimpleEarnSubscribeFlexibleProductResponse { | ||
purchaseId: string; | ||
success: boolean; | ||
} | ||
|
||
export interface SimpleEarnSubscribeLockedProductResponse { | ||
purchaseId: string; | ||
positionId: string; | ||
success: boolean; | ||
} | ||
|
||
export interface SimpleEarnRedeemParams { | ||
positionId: string; | ||
} | ||
|
||
export interface SimpleEarnRedeemResponse { | ||
success: boolean; | ||
redeemId: string; | ||
} | ||
|
||
export interface SimpleEarnFlexibleProductPositionParams { | ||
asset?: string; | ||
productId?: string; | ||
current?: number; | ||
size?: number; | ||
} | ||
|
||
export interface SimpleEarnLockedProductPositionParams { | ||
asset?: string; | ||
productId?: string; | ||
current?: number; | ||
size?: number; | ||
positionId?: string; | ||
} | ||
|
||
export interface SimpleEarnLockedProductPosition { | ||
positionId: string; | ||
projectId: string; | ||
asset: string; | ||
amount: string; | ||
purchaseTime: string; | ||
duration: string; | ||
accrualDays: string; | ||
rewardAsset: string; | ||
APY: string; | ||
isRenewable: boolean; | ||
isAutoRenew: boolean; | ||
redeemDate: string; | ||
} | ||
|
||
export interface SimpleEarnLockedProductPositionResponse { | ||
rows: SimpleEarnLockedProductPosition[]; | ||
total: number; | ||
} | ||
|
||
export interface SimpleEarnAccountResponse { | ||
totalAmountInBTC: string; | ||
totalAmountInUSDT: string; | ||
totalFlexibleAmountInBTC: string; | ||
totalFlexibleAmountInUSDT: string; | ||
totalLockedinBTC: string; | ||
totalLockedinUSDT: string; | ||
} |