string
required
Unique identifier for a given Organization.
string
required
The wallet address to return positions for.
array
The wallet’s active Earn positions.
Show positions details
Show positions details
curl --request POST \
--url https://api.turnkey.com/public/v1/query/list_earn_positions \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"organizationId": "<string>",
"walletAddress": "<string>"
}'
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().listEarnPositions({
organizationId: "<string> (Unique identifier for a given Organization.)",
walletAddress: "<string> (The wallet address to return positions for.)"
});
{
"positions": [
{
"vaultAddress": "<string>",
"wrapperAddress": "<string>",
"provider": "<EARN_PROVIDER_MORPHO>",
"caip19": "<string>",
"currentValue": "<string>",
"totalDeposited": "<string>",
"totalWithdrawn": "<string>",
"display": {
"currentValueUsd": "<string>",
"totalDepositedUsd": "<string>",
"totalWithdrawnUsd": "<string>",
"currentValueCrypto": "<string>",
"totalDepositedCrypto": "<string>",
"totalWithdrawnCrypto": "<string>"
},
"depositsDisabled": "<boolean>"
}
]
}