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
Available options:
ethereum:mainnet,
base:mainnet
user_address
string
default:0xa829B388A3DF7f581cE957a95edbe419dd146d1B
required

The user address of the desired market position.

unique_market_key
string
default:0xe7399fdebc318d76dfec7356caafcf8cd4b91287e139a3ec423f09aeeb656fc4
required

The key that uniquely identifies the market. This can be found using the 'Get Markets' endpoint.

Response

200
application/json

Successful Response

The response is of type object.