Native Documentation
  • introduction
    • What is Native
    • About Native V2
    • Benefits for Key Players
  • SOLUTION
    • Native Credit Pool
    • Native Swap Engine
  • CONCEPTS
    • Orderbook
    • Firm Quote Orders
    • Auto Sign Orders
    • Swap Fees
    • Slippage
    • Base and Listed Assets
    • Single-Sided Liquidity Pools
    • Total Available Liquidity
    • Liquidity Pairing
    • Liquidity Bootstrapping
    • Health Ratio
    • Earning Fees and Incentives
    • Credit-Based Swap
      • Collateral Factor
      • PMM Credit
      • Settlement and Liquidation
    • Market-Responsive Pricing
    • Risks
  • USER GUIDE
    • Add Liquidity
    • Pair Liquidity
    • Claim Rewards
    • Swap with Native
  • Build with Native
    • Swap Aggregators
      • Guide
      • FirmQuote Swap APIs
        • GET Orderbook
        • GET Indicative quote
        • GET Firm quote
    • Asset Issuers
      • For Pegged Assets
      • For General Assets
  • Resources
    • Addresses
    • Audits
    • Github
    • System Status
    • Business Source License
    • Media Kit
Powered by GitBook
On this page
  1. Build with Native
  2. Private Market Makers[june]
  3. PMM API

GET Available borrows

Last updated 10 months ago

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
    }
}

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
500
There was an exception with the server
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
}