GET
/
v0
/
morpho
/
market_position
from compassapisdk import CompassAPISDK, models


with CompassAPISDK(
    api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api_sdk:

    res = compass_api_sdk.morpho.market_position(chain=models.MorphoMarketPositionChain.ETHEREUM_MAINNET, user_address="0xa829B388A3DF7f581cE957a95edbe419dd146d1B", unique_market_key="0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4")

    # Handle response
    print(res)
{
  "borrow_shares": 123,
  "borrow_amount": "<string>",
  "collateral_amount": "<string>",
  "current_loan_to_value": "<string>",
  "liquidation_loan_to_value_threshold": "<string>"
}

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Query Parameters

chain
enum<string>
default:ethereum:mainnet
required

The chain to use.

Available options:
base:mainnet,
ethereum:mainnet,
arbitrum:mainnet
user_address
string
default:0xa829B388A3DF7f581cE957a95edbe419dd146d1B
required
unique_market_key
string
default:0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4
required

Response

200
application/json
Successful Response
borrow_shares
integer
required
borrow_amount
string
required

The amount of the loan token borrowed.

collateral_amount
string
required

The amount of the collateral token supplied.

current_loan_to_value
string
required

The Loan-To-Value ratio measures the proportion of debt relative to collateral value. If this ratio exceeds the 'liquidation_loan_to_value_threshold', the position is liquidatable.

liquidation_loan_to_value_threshold
string
required

Maximum borrowing percentage before liquidation risk. E.g: LLTV of 80% means for a collateral value equivalent of $100, the maximum one can borrow in value is $80. If above like $80.0001, the position is liquidatable.