Validators

async validators()

Validators function will return some values that will be needed while integrating Borrowing Widget further.

  • token:string - is the token that you will get from the authentication.

const response = await this.newBorrowingService.getValidators(token)

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

{
    "data": {
        "loanRequestValidators": {
            "maxLoanAmount": 10000,
            "minLoanAmount": 100,
            "minLoanTerm": 1,
            "maxLoanTerm": 180,
            "riskFreeRateLogBase": 30,
            "partnerFee": 0
        },
        "collateralCurrencies": [
            {
                "symbol": "BAT",
                "name": "Basic Attention Token",
                "exchangeRate": 0.8263,
                "ethAddress": "0xd5DdfaC8e6430AB594d528E8A0c66e2abf0d69CF",
                "decimalPlaces": 18
            },
            {
                "symbol": "BNT",
                "name": "Bancor",
                "exchangeRate": 2.408,
                "ethAddress": "0x4E72a23F45808b69F88eD6ab39412aB9AE46fDbe",
                "decimalPlaces": 18
            },
            {
                "symbol": "CRO",
                "name": "Crypto.com",
                "exchangeRate": 0.4161,
                "ethAddress": "0x8654c546c916756348482cE0aDCb6eB219011aE5",
                "decimalPlaces": 18
            },
            {
                "symbol": "ENJ",
                "name": "Enjin Coin",
                "exchangeRate": 1.814,
                "ethAddress": "0x8583c097EF9809B9a31f644B20D43DA2973C535E",
                "decimalPlaces": 18
            },
            {
                "symbol": "HT",
                "name": "Huobi",
                "exchangeRate": 8.929,
                "ethAddress": "0x386ab2Bf13cC21D99B65F08372Dc163B035E8477",
                "decimalPlaces": 18
            },
            {
                "symbol": "LINK",
                "name": "ChainLink",
                "exchangeRate": 16.92,
                "ethAddress": "0xea7387F2028C5bAaA45f038E403f793A4842C123",
                "decimalPlaces": 18
            },
            {
                "symbol": "LRC",
                "name": "Loopring",
                "exchangeRate": 0.9569,
                "ethAddress": "0x1AB855eFCc8e3D3EcE93F396Cb5770cbea9f0FbC",
                "decimalPlaces": 18
            },
            {
                "symbol": "MKR",
                "name": "Maker DAO",
                "exchangeRate": 2030.45,
                "ethAddress": "0x88CE6AB900FD995E640B03C21f288504b3451671",
                "decimalPlaces": 18
            },
            {
                "symbol": "NEXO",
                "name": "Nexo",
                "exchangeRate": 1.87,
                "ethAddress": "0xEEb81BF2009435Ee5Ea21Fb066d112ca818fE273",
                "decimalPlaces": 18
            },
            {
                "symbol": "OKB",
                "name": "Okex",
                "exchangeRate": 20.95,
                "ethAddress": "0x7919977840810aaf1F5Cf5BD16f0A00f633f86E0",
                "decimalPlaces": 18
            },
            {
                "symbol": "REP",
                "name": "Augur",
                "exchangeRate": 12.56,
                "ethAddress": "0x586aC4577D7F629335744c03eD3532e5652D9895",
                "decimalPlaces": 18
            },
            {
                "symbol": "UNI",
                "name": "Uniswap",
                "exchangeRate": 10.81,
                "ethAddress": "0x36d44556880620972436E3D159DA4f4a0237B619",
                "decimalPlaces": 18
            },
            {
                "symbol": "ZRX",
                "name": "0x Token",
                "exchangeRate": 0.5354,
                "ethAddress": "0xF3e51064ECB5F839f52C8ee7fE177e929b8E44F1",
                "decimalPlaces": 18
            }
        ],
        "underlyingCurrencies": [
            {
                "symbol": "ETH",
                "name": "Ethereum",
                "exchangeRate": 2551.99,
                "ethAddress": "0x0000000000000000000000000000000000000001",
                "decimalPlaces": 18,
                "riskFreeRate": 0.162
            },
            {
                "symbol": "USDT",
                "name": "USD Tether",
                "exchangeRate": 1,
                "ethAddress": "0x110a13fc3efe6a245b50102d2d79b3e76125ae83",
                "decimalPlaces": 6,
                "riskFreeRate": 4.484
            }
        ],
        "riskRateFees": [
            {
                "rating": 1,
                "marginRate": 0,
                "maxInsurancePremiumRate": 4,
                "platformFee": 0.5
            },
            {
                "rating": 2,
                "marginRate": 0,
                "maxInsurancePremiumRate": 3.8,
                "platformFee": 0.5
            },
            {
                "rating": 3,
                "marginRate": 0,
                "maxInsurancePremiumRate": 3.6,
                "platformFee": 0.5
            },
            {
                "rating": 4,
                "marginRate": 0,
                "maxInsurancePremiumRate": 3.4,
                "platformFee": 0.5
            },
            {
                "rating": 5,
                "marginRate": 0,
                "maxInsurancePremiumRate": 3.2,
                "platformFee": 0.5
            },
            {
                "rating": 6,
                "marginRate": 0,
                "maxInsurancePremiumRate": 3,
                "platformFee": 0.5
            },
            {
                "rating": 7,
                "marginRate": 0,
                "maxInsurancePremiumRate": 2.9,
                "platformFee": 0.5
            },
            {
                "rating": 8,
                "marginRate": 0,
                "maxInsurancePremiumRate": 2.8,
                "platformFee": 0.5
            },
            {
                "rating": 9,
                "marginRate": 0,
                "maxInsurancePremiumRate": 2.7,
                "platformFee": 0.5
            }
        ]
    }
}

Last updated