Atlendis v2
  • πŸ‘‹Introduction
  • πŸ—žοΈWhitepaper
  • πŸ”“Safety & Audit
  • Protocol
    • 🎨What Sets Atlendis Apart
      • RCL Lending Pools
      • Rate Discovery
      • Non Fungible Positions
    • 🏦Atlendis Borrowers
    • πŸ›£οΈUse Cases
      • Invoice Financing
      • Ramps and Cash Advances
      • Revenue Based Financing
      • Trade Financing
      • Buy Now Pay Later
      • Emerging Market Credit
    • ⚠️Risk Management
  • User manual
    • πŸ§‘Lender
      • πŸ§™Lender Actions
      • ❓Lender FAQ
      • ⏩Tutorial
    • 🏒Borrower
      • πŸ€Έβ€β™‚οΈBorrower Actions
      • 🏦Borrower FAQ
      • πŸ”©Integration
  • Developers
    • πŸ€“Protocol Overview
    • πŸ‘©β€πŸ’»Core concepts
      • Order Book Implementation
      • Position accounting vs. Pool accounting
      • Interests accrual and position accounting granularity
    • πŸ’»Technical integration
      • Deployment procedures
      • Protocol gas consumption
      • Tokens integration considerations
    • πŸ“‘Smart contract interfaces
      • Revolving Credit Line
        • IRevolvingCreditLine
        • IRCLBorrowers
        • IRCLGovernance
        • IRCLLenders
        • IRCLState
      • Roles Manager
        • IRolesManager
        • IStandardRolesManager
      • Error messages
    • ↗️Deployed Contracts
    • πŸ“ˆAtlendis Gateway
  • Governance
    • πŸ§‘β€βš–οΈGovernance
    • πŸ‘›Multisig
  • glossary
    • πŸ§‘β€πŸ«Core concepts
    • πŸ“ŠFrontend Indicators
  • Legal
    • βš–οΈTerms of Use
    • βš–οΈLegal Notice
    • βš–οΈPrivacy Policy
Powered by GitBook
On this page
  1. Developers

Atlendis Gateway

PreviousDeployed ContractsNextGovernance

Last updated 1 year ago

Atlendis has a dedicated GraphQL gateway to expose all relevant states from the protocol's smart contracts. This gateway is hosted on Atlendis' own infrastructure.

Relevant Endpoints

The GraphQL gateway is exposed on the following URL: .

Additionally, users can visit the URL in order to access the playground that contains the full schema documentation and a practical way to perform queries.

How to query the gateway

This practical guide will demonstrate how to query the gateway. It will cover:

  • Querying a lender's positions,

  • Querying a lender's account history,

  • Querying all pools overviews.

Querying a lender's positions

To retrieve all user's positions simply filter the positions overviews by the relevant lender's address

query lenderPositions {
  positionsOverviews(
    lender: "${userAddress}"
    chainId: 137
  ) {
    instanceId
    status
    depositAmount
    borrowedAmount
    earnings
    creationTimestamp
  }
}

Querying a lender's account history

The account summary and history are directly available through the gateway

query account {
  account(
    address: "${userAddress}"
    chainId: 137
  ) {
    address
    lenderSummary {
      positionsCount
      stakedPositionsCount
    }
    lenderTransactions {
      instanceId
      type
      amount
      rate
      transactionHash
    }
  }
}

Querying all pools overviews

All the pools, on Atlendis V1 and V2, are available using the query over the pools overviews

query poolOverviews {
  poolOverviews(chainId: 137) {
    instanceId
    productType
    status
    usdTvl
    permissioned
    token {
      name
      symbol
    }
    currentLoan {
      rate
      repaymentStartDate
      repaymentEndDate
    }
    metadata {
      borrower {
        name
      }
    }
  }
}
πŸ“ˆ
https://atlendis.herokuapp.com/graphql