GET Available borrows

Get all borrowable token and max token amount that MM is able to borrow. The token amount depends on the collateral amount, max leverage, and available token in aqua vault.

get
Query parameters
addressstringRequired

The address of the market maker

Pattern: ^0x[a-fA-F0-9]{40}$
chainstring · enumRequired

Native blockchain name, eg: ethereum, bsc, etc

Example: ethereumPossible values:
Header parameters
apiKeystringRequired

The API key that was assigned to you by Native

Responses
200
Success
application/json
get
GET /lend/v1/lend/mm-available-borrow HTTP/1.1
Host: newapi.native.org
apiKey: text
Accept: */*
{
  "tokenSymbol": "text",
  "inventoryBalanceWei": "text",
  "inventoryBalanceEther": "text",
  "baseShortLimitWei": "text",
  "baseShortLimitEther": "text",
  "maxBorrowAmount": "text",
  "collateralFactor": "text",
  "tokenUsd": 1,
  "maxBorrowAmountEther": 1
}

Market makers can use this data to learn the max size they can quote to construct the orderbook. inventoryBalance indicates the actual balance available in the Vault. baseShortLimit is the conservative amount that MM can quote as short token assuming long token has collateral factor 0. If the long token has higher collateral factor, the limit would be higher, the adjusted amount it baseShortLimit/(1 - longTokenCollateralFactor). For more specific example, refer here.

The actual limit would be Math.min(inventoryBalance, baseShortLimit/(1 - longTokenCollateralFactor))

Example response

{
    "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": {
        "tokenSymbol": "USDC",
        // inventoryBalance: The inventory balance in the Lend Vault
        "inventoryBalanceWei": "201896139137", 
        "inventoryBalanceEther": 201896.139137,
        // baseShortLimit: The conservative amount that MM can quote as short token, assuming long token has collateral factor 0
        "baseShortLimitWei": "9991965330", 
        "baseShortLimitEther": 9991.965330,
        // do not use the collateral for this token itself on the short side, should use the collateral factor of the long token in the pair
        "collateralFactor": 0.8,
        "tokenUsd": 1.0008041129999998
    },
    "0xdac17f958d2ee523a2206206994597c13d831ec7": {
        "tokenSymbol": "USDT",
        "inventoryBalanceWei": "40592895009",
        "inventoryBalanceEther": 40592.895009,
        "baseShortLimitWei": "10012332740",
        "baseShortLimitEther": 10012.332740,
        "collateralFactor": 0.8,
        "tokenUsd": 0.9987682450860701
    },
    "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": {
        "tokenSymbol": "WETH",
        "inventoryBalanceWei": "6123000233052323400",
        "inventoryBalanceEther": 6.123000233052323,
        "baseShortLimitWei": "2914794044523376000",
        "baseShortLimitEther": 2.914794044523376,
        "collateralFactor": 0.8,
        "tokenUsd": 3430.7741292353257
    }
}

Last updated