SmartCredit.io
ApplicationTwitterTelegramLinked In
  • SmartCredit.io
  • Fixed-term/Fixed-rate Borrowing/Lending
    • How are loan requests matched?
    • Credit Lines
    • Fixed-Income Funds
    • Fixed Loan Term
    • Fixed Interest Rate
    • Efficient use of Collateral
    • Positions Monitoring System
    • No Bank Run Risks
    • Collaterals
    • Collateral Ratios
    • Liquidations
    • Loss Provision Fund
    • Oracles Integration
    • Fiat On-Ramp/Off-Ramp
    • Borrow/Lend SDK and Widgets
      • Use Cases
      • Borrow/Lend SDK
        • Borrowing SDK
          • Authentication
            • Auth Challenge
            • Authenticate
          • Validators
          • Collateral Ratio
          • Credit Line
            • Get Credit Lines
            • Create Credit Line
          • Loan Request
            • Calculate Collateral Amount
            • Sign Loan Request
            • Create Loan Request
          • View Loans
            • All Loans
            • Single Loan
          • Deposit Collateral
            • Deposit collateral for ETH
            • Deposit Collateral for ERC20
          • View Collateral
            • Locked Collateral
            • Unlocked Collateral
          • Repay Loan
            • Repay ETH Loan
            • Repay ERC20 Loan
          • Terminate Loan
          • Liquidation
            • Liquidation Probability
            • Increase Collateral for ETH
            • Increase Collateral for ERC20
        • Lending SDK
          • Authentication
            • Auth Challenge
            • Authenticate
          • Create FIF
          • Get FIF List
          • Deposit in FIF
            • Deposit ETH
            • Deposit ERC20
          • Withdraw FIF
          • Terminate FIF
      • Borrow/Lend UI Widgets
        • WordPress Integration
          • Borrowing Widget WordPress Plugin
            • Integration
          • Lending Widget WordPress Plugin
            • Integration
        • JS Integration
          • Borrowing Widget Integration
          • Lending Widget Integration
  • Fixed-term/Fixed-rate Leveraged Lido staking
    • Start leveraged staking
    • Regular finishing
    • Early finishing
    • Positions Monitoring
    • Platform Fees
  • How to earn?
    • Earning via Rewards
    • Earning via Fixed-Term/Fixed-Rate
    • Earning via Leverage Lido Staking
  • Staking and Rewards
    • Borrower and Lender Bonus Rewards
    • Staking
    • Gasless Re-staking
    • Integrator Rewards
    • Affiliate Program
  • Security
    • Audits
    • AI-based Crypto Transactions Monitoring
    • Bug Bounties
  • Regulations
    • Peer-to-Pool-to-Peer Business Models
    • Peer-to-Peer Business Models
    • Offering Access to the Securities Products
    • Crypto Transactions Monitoring
  • Roadmap
    • Release 1.0 - Foundation
    • Release 1.1 - Fixed Income Funds
    • Release 1.2 - Credit Lines
    • Release 1.3 - UI & AI
    • Release 1.4 - Fixed Rate Leveraged Lido Staking
    • Release 1.5 - Simple and Advanced Borrowing
    • Release 1.6 - Islamic Banking
  • Our Token
  • Partners
  • Revenue Model
  • FAQs
  • Tutorials
  • Social Media Channels
  • AI-driven Decentral Autonomous Bank
Powered by GitBook
On this page
  1. Fixed-term/Fixed-rate Borrowing/Lending
  2. Borrow/Lend SDK and Widgets
  3. Borrow/Lend SDK
  4. Borrowing SDK
  5. Credit Line

Get Credit Lines

async getCreditLine()

This function will check if the user already has credit lines. We need this function because if the user wants to create a loan which already belongs to a credit line he has already created, he will not need to create another one.

  • token:string – is the token you will get from the authentication

  • ownerAddress:string - is the address of the user

  • sort:string – can be either “ASC” or “DESC”. ASC is ascending order and DESC is descending order.

  • limit:number – the number of the data you want to get

  • offset:number – the number from where you want to start the data

limit and offset are mostly used for pagination. This means that offset most of the time will equal 0 and limit 100.

const response = await this.newBorrowingService.getCreditLines({
    token,
    ownerAddress,
    sort,
    limit,
    offset
})

This is an example of the successful response object of this function:

"creditLines": [
  {
    "contractAddress": "0x3851115bcEf299b3FCC590caeEFB3E8a71e1Df8B"
    "createdAt": "2022-03-21T12:34:45.000Z"
    "ownerAddress": "0x9694e69C2ADE5779677672B55d762d7d5F37E58b"
    "type": "Type C Loan"
    "updatedAt": "2022-03-22T12:50:16.000Z"
  },
  {
    "contractAddress": "0xB874BC19C2139810ccbB59e007D6787550cD04Fe"
    "createdAt": "2022-03-21T12:33:35.000Z"
    "ownerAddress": "0x9694e69C2ADE5779677672B55d762d7d5F37E58b"
    "type": "Type A Loan"
    "updatedAt": "2022-03-22T14:10:16.000Z"
  }
]
PreviousCredit LineNextCreate Credit Line

Last updated 3 years ago