curl --request POST \
--url https://api.turnkey.com/public/v1/query/get_earn_deposit_status \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"organizationId": "<string>",
"depositRequestId": "<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().getEarnDepositStatus({
organizationId: "<string> (Unique identifier for a given Organization.)",
depositRequestId: "<string> (The deposit_request_id returned by EarnDeposit.)"
});
{
"status": "<PENDING>",
"depositTxHash": "<string>",
"error": "<string>"
}
Queries
Get Earn deposit status
Poll the status of a deposit by its deposit_request_id (for the async/sponsored deposit path).
curl --request POST \
--url https://api.turnkey.com/public/v1/query/get_earn_deposit_status \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"organizationId": "<string>",
"depositRequestId": "<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().getEarnDepositStatus({
organizationId: "<string> (Unique identifier for a given Organization.)",
depositRequestId: "<string> (The deposit_request_id returned by EarnDeposit.)"
});
{
"status": "<PENDING>",
"depositTxHash": "<string>",
"error": "<string>"
}
A successful response returns the following fields:
Was this page helpful?