curl --request POST \
--url https://api.turnkey.com/public/v1/submit/upsert_swap_fixed_rate_limit_config \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPSERT_SWAP_FIXED_RATE_LIMIT_CONFIG",
"timestampMs": "<string> (e.g. 1746736509954)",
"organizationId": "<string> (Your Organization ID)",
"parameters": {
"orgWindowLimitUsd": "<string>",
"subOrgWindowLimitUsd": "<string>",
"windowDurationMinutes": "<string>",
"enabled": "<boolean>"
}
}'
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().upsertSwapFixedRateLimitConfig({
orgWindowLimitUsd: "<string> (Positive USD limit shared by the billing parent and its sub-organizations. At most 18 integer and 12 fractional digits.)",
subOrgWindowLimitUsd: "<string> (Positive USD limit for each sub-organization, no greater than the parent limit.)",
windowDurationMinutes: "<string> (Positive rolling window duration in minutes, at most 153722867.)",
enabled: true // Whether this spending window permits new swaps. True also grants the billing parent's signed permission for the feature. False turns the saved window off, keeps its limits, and removes the permission. Granting or removing the permission needs root quorum.
});
{
"activity": {
"id": "<activity-id>",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPSERT_SWAP_FIXED_RATE_LIMIT_CONFIG",
"organizationId": "<organization-id>",
"timestampMs": "<timestamp> (e.g. 1746736509954)",
"result": {
"activity": {
"id": "<string>",
"organizationId": "<string>",
"status": "<string>",
"type": "<string>",
"intent": {
"upsertSwapFixedRateLimitConfigIntent": {
"orgWindowLimitUsd": "<string>",
"subOrgWindowLimitUsd": "<string>",
"windowDurationMinutes": "<string>",
"enabled": "<boolean>"
}
},
"result": {
"upsertSwapFixedRateLimitConfigResult": {
"organizationId": "<string>"
}
},
"votes": "<array>",
"fingerprint": "<string>",
"canApprove": "<boolean>",
"canReject": "<boolean>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}
}
Activities
Upsert swap fixed rate limits
Replace this feature’s spending window. Requires the billing parent’s signed permission and activity authorization.
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/upsert_swap_fixed_rate_limit_config \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_UPSERT_SWAP_FIXED_RATE_LIMIT_CONFIG",
"timestampMs": "<string> (e.g. 1746736509954)",
"organizationId": "<string> (Your Organization ID)",
"parameters": {
"orgWindowLimitUsd": "<string>",
"subOrgWindowLimitUsd": "<string>",
"windowDurationMinutes": "<string>",
"enabled": "<boolean>"
}
}'
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().upsertSwapFixedRateLimitConfig({
orgWindowLimitUsd: "<string> (Positive USD limit shared by the billing parent and its sub-organizations. At most 18 integer and 12 fractional digits.)",
subOrgWindowLimitUsd: "<string> (Positive USD limit for each sub-organization, no greater than the parent limit.)",
windowDurationMinutes: "<string> (Positive rolling window duration in minutes, at most 153722867.)",
enabled: true // Whether this spending window permits new swaps. True also grants the billing parent's signed permission for the feature. False turns the saved window off, keeps its limits, and removes the permission. Granting or removing the permission needs root quorum.
});
{
"activity": {
"id": "<activity-id>",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_UPSERT_SWAP_FIXED_RATE_LIMIT_CONFIG",
"organizationId": "<organization-id>",
"timestampMs": "<timestamp> (e.g. 1746736509954)",
"result": {
"activity": {
"id": "<string>",
"organizationId": "<string>",
"status": "<string>",
"type": "<string>",
"intent": {
"upsertSwapFixedRateLimitConfigIntent": {
"orgWindowLimitUsd": "<string>",
"subOrgWindowLimitUsd": "<string>",
"windowDurationMinutes": "<string>",
"enabled": "<boolean>"
}
},
"result": {
"upsertSwapFixedRateLimitConfigResult": {
"organizationId": "<string>"
}
},
"votes": "<array>",
"fingerprint": "<string>",
"canApprove": "<boolean>",
"canReject": "<boolean>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}
}
A successful response returns the following fields:
Was this page helpful?