Idempotency ensures that an API request produces the same result regardless of how many times it is sent. This is particularly important for operations that modify state, like creating accounts or signing transactions, where duplicate requests could cause unintended side effects.
How it works
The CDP APIs support idempotency through the X-Idempotency-Key header. When you include an idempotency key with a request, the API responds as follows:
Processes the request as normal if it’s the first use of the key within the last 24 hours
Returns the exact same response as the first request if the same request is retried with the same key
Returns an error if the same key is used with different request parameters
This mechanism ensures that temporary issues like network failures don’t result in duplicate operations.
Using idempotency keys
Header format
The X-Idempotency-Key header must be a valid UUID v4 string. For example:
Each unique request must use a new UUID v4. The API strictly enforces the UUID v4 format requirement and will reject any other format. Here’s how to generate a valid UUID v4 in different languages:
import { v4 as uuidv4 } from 'uuid';// Generate a new idempotency keyconst idempotencyKey = uuidv4();
import { v4 as uuidv4 } from 'uuid';// Generate a new idempotency keyconst idempotencyKey = uuidv4();
import uuid// Generate a new idempotency keyidempotency_key = str(uuid.uuid4())
import "github.com/google/uuid"// Generate a new idempotency keyidempotencyKey := uuid.New().String()
require 'securerandom'// Generate a new idempotency keyidempotency_key = SecureRandom.uuid
// Using PHP's built-in UUID generator (PHP 7.4+)$idempotencyKey = uuid_create(UUID_TYPE_RANDOM);// Alternative using ramsey/uuid packageuse Ramsey\Uuid\Uuid;$idempotencyKey = Uuid::uuid4()->toString();
import java.util.UUID;// Generate a new idempotency keyString idempotencyKey = UUID.randomUUID().toString();
using System;using System.Net.Http;using System.Threading.Tasks;public class IdempotentRequest{ public static async Task<T> MakeIdempotentRequest<T>( string url, object data, int maxRetries = 3) { var idempotencyKey = Guid.NewGuid().ToString(); var retries = 0; using var client = new HttpClient(); while (retries < maxRetries) { try { var request = new HttpRequestMessage(HttpMethod.Post, url); request.Headers.Add("X-Idempotency-Key", idempotencyKey); request.Content = new StringContent( JsonSerializer.Serialize(data), Encoding.UTF8, "application/json" ); var response = await client.SendAsync(request); if (response.IsSuccessStatusCode) { var content = await response.Content.ReadAsStringAsync(); return JsonSerializer.Deserialize<T>(content); } if (response.StatusCode == HttpStatusCode.UnprocessableEntity) { var error = await JsonSerializer.DeserializeAsync<ErrorResponse>( await response.Content.ReadAsStreamAsync() ); if (error?.ErrorType == "idempotency_error") { throw new Exception("Idempotency key conflict"); } } } catch (Exception e) { retries++; if (retries == maxRetries) throw; // Exponential backoff await Task.Delay(TimeSpan.FromSeconds(Math.Pow(2, retries))); } } throw new Exception("Max retries exceeded"); }}
Supported endpoints
You can identify endpoints that support idempotency by looking for the X-Idempotency-Key parameter in the documentation for the related endpoint. When present, this optional header parameter indicates that the endpoint supports idempotent requests.For example, in the Create EVM account endpoint documentation, you’ll see a field that allows you to pass the X-Idempotency-Key header.
Generally, all POST endpoints that modify state (like creating accounts or signing transactions) support idempotency.
Error handling
Invalid idempotency key format
If you provide an idempotency key that is not a valid UUID v4, the API will reject the request:
{ "errorType": "invalid_request", "errorMessage": "parameter \"X-Idempotency-Key\" in header has an error: must be a valid UUID v4 format (e.g., 8e03978e-40d5-43e8-bc93-6894a57f9324)"}
Idempotency key conflict
This occurs when you use the same idempotency key with different request parameters:
{ "errorType": "idempotency_error", "errorMessage": "Idempotency key '8e03978e-40d5-43e8-bc93-6894a57f9324' was already used with a different request payload. Please try again with a new idempotency key."}
Already processing
This error occurs in certain highly-concurrent scenarios whereby you send multiple requests within a short period with the same idempotency key. Note that under normal circumstances, sending the same request with the same idempotency
key within a 24-hour period will return the same response as the first request.
{ "errorType": "already_exists", "errorMessage": "Another request with the same idempotency key is currently processing."}
Usage constraints
Idempotency keys are subject to the following limitations:
Keys must be valid UUID v4 strings
Keys should be unique within a 24-hour window
Duplicate requests with the same key count towards your API rate limits
Security considerations
While idempotency keys aren’t sensitive like API keys, we recommend following these security practices:
Use cryptographically secure UUID v4 generators
Don’t use sequential or predictable keys (only UUID v4 format is accepted)
Don’t reuse keys across different operations
Store keys securely if you need to reference them later
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Coinbase Developer Documentation","colors":{"primary":"#004cec","light":"#578BFA","dark":"#0052FF"},"logo":{"light":"https://mintcdn.com/coinbase-cloud/FjMSMQIg--bQwlYn/logos/wordmark-light.svg?fit=max\u0026auto=format\u0026n=FjMSMQIg--bQwlYn\u0026q=85\u0026s=78661b6fd3ff79c8e85642f839addf7b","dark":"https://mintcdn.com/coinbase-cloud/FjMSMQIg--bQwlYn/logos/wordmark-dark.svg?fit=max\u0026auto=format\u0026n=FjMSMQIg--bQwlYn\u0026q=85\u0026s=17f840e89bfa295e97c077233c387b08"},"favicon":"https://mintcdn.com/coinbase-cloud/tALq8dhStAfj8UeL/favicon.png?fit=max\u0026auto=format\u0026n=tALq8dhStAfj8UeL\u0026q=85\u0026s=d608f59dd7dc00335f483ed6edf75491","appearance":{"default":"light"},"navbar":{"links":[{"icon":"discord","href":"https://discord.com/invite/cdp","label":"Get help"}],"primary":{"type":"button","label":"Dev portal","href":"https://portal.cdp.coinbase.com/"}},"footer":{"socials":{"x":"https://x.com/coinbasedev","github":"https://github.com/coinbase","linkedin":"https://www.linkedin.com/company/coinbasedeveloperplatform"},"links":[{"items":[{"label":"Join CDP Discord","href":"https://discord.com/invite/cdp"},{"label":"Status","href":"https://cdpstatus.coinbase.com/"},{"label":"Privacy Policy","href":"https://www.coinbase.com/legal/privacy"}]}]},"seo":{"indexing":"all"},"fonts":{"heading":{"family":"CoinbaseSans","source":"https://mintlify-assets.b-cdn.net/fonts/CoinbaseSans-Regular.woff2","format":"woff2"},"body":{"family":"CoinbaseSans","source":"https://mintlify-assets.b-cdn.net/fonts/CoinbaseSans-Regular.woff2","format":"woff2"}},"integrations":{"amplitude":{"apiKey":"6cf69a22c0014f7608dd967f605ba0e7"},"ga4":{"measurementId":"G-1X60WF4D7F"}},"contextual":{"options":["copy","view","mcp","cursor","vscode","chatgpt","claude","perplexity"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"coinbase-cloud","hasAudioNarration":false,"actualSubdomain":"coinbase-cloud","customDomains":["docs.cloud.coinbase.com"],"gitSource":{"type":"github","owner":"coinbase","repo":"cdp-docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae92a020a94bfe43457974f:success","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"SDKs","count":827},{"language":"default","tag":"CRYPTO INFRASTRUCTURE","count":816},{"language":"default","tag":"CDP SDKs","count":812},{"language":"default","tag":"Frontend","count":792},{"language":"default","tag":"API Reference","count":711},{"language":"default","tag":"REST API","count":550},{"language":"default","tag":"Docs","count":484},{"language":"default","tag":"@coinbase/cdp-core","count":312},{"language":"default","tag":"Type Aliases","count":309},{"language":"default","tag":"@coinbase/cdp-react","count":303}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"dropdowns.css","content":".nav-dropdown-content{width:var(--radix-dropdown-menu-trigger-width)}[data-dropdown-item=\"CDP Payments API\"]{display:none}[data-dropdown-item=\"Payment Acceptance\"]{display:none}.nav-dropdown-item[data-dropdown-item=\"CDP Payments API\"]>.nav-dropdown-item-text-container>.nav-dropdown-item-title::after{content:\"Alpha\"!important;background-color:#004cec1a;color:#0052ff;font-size:0.75rem;font-weight:600;padding:2px 8px;border-radius:12px;margin-left:8px}"},{"filePath":"style.css","content":"@font-face{font-family:\"Coinbase Text Medium\";src:url(\"https://mintlify-assets.b-cdn.net/fonts/coinbase/Coinbase_Text-Medium-web-1.32.woff2\")\n format(\"woff2\");font-weight:500;font-style:normal}.dark li[id=\"topbar-cta-button\"]>a>span{background-color:#578bf9!important}.dark li[id=\"topbar-cta-button\"]>a>div>svg{color:#101521!important}.dark li[id=\"topbar-cta-button\"]>a>div>span{color:#101521!important}div[data-callout-type=\"info\"]{background-color:#f5f8fe!important;color:#0052fe!important;border-color:#ccdcfe!important}div[data-callout-type=\"info\"]>div>svg{color:white!important}div[data-callout-type=\"info\"]>div>svg>path{fill:#0052fe!important}.dark div[data-callout-type=\"info\"]{background-color:#001133!important;color:#578bf9!important;border-color:#2c406c!important}.dark div[data-callout-type=\"info\"]>div>svg>path{fill:#578bf9!important}div[data-callout-type=\"note\"]{background-color:rgba(250, 250, 250, 0.5)!important;color:#578bf9!important;border-color:rgba(113, 113, 122, 0.2)!important}div[data-callout-type=\"note\"]>div>svg{color:white!important}div[data-callout-type=\"note\"]>div>ul>li{color:#18181b!important}.dark div[data-callout-type=\"note\"]>div>ul>li{color:#e4e4e7!important}div[data-callout-type=\"note\"]>div>svg>path{fill:#0052fe!important}.dark div[data-callout-type=\"note\"]{background-color:rgba(113, 113, 122, 0.1)!important;color:#578bf9!important;border-color:rgba(113, 113, 122, 0.3)!important}.dark div[data-callout-type=\"note\"]>div>svg>path{fill:#578bf9!important}.dark div[data-callout-type=\"note\"]>div>p{color:#e4e4e7!important}div[data-callout-type=\"note\"]>div>p{color:#18181b!important}#\\/{display:none}h1,h2,span{letter-spacing:0.02em!important}h5:not(#sidebar-title),h6{font-weight:600!important;margin-top:1rem!important;margin-bottom:0.5rem!important}.nav-section-header{font-size:0.7rem!important;font-weight:600!important;text-transform:uppercase!important;letter-spacing:0.05em!important;color:#6b7280!important;padding:12px 8px 4px 8px!important;margin-bottom:4px!important}.nav-section-header.with-divider{border-top:1px solid #e5e7eb!important;margin-top:8px!important}.dark .nav-section-header{color:#9ca3af!important}.dark .nav-section-header.with-divider{border-top-color:rgba(255, 255, 255, 0.1)!important}.version-option:hover{background-color:#f1f5f9!important}.dark .version-option:hover{background-color:#4b5563!important}li[data-group-tag=\"v1\"][data-title=\"Server Wallet\"]{display:none!important}body.url-contains-v1 li[data-group-tag=\"v1\"][data-title=\"Server Wallet\"]{display:block!important}li[data-group-tag=\"v2\"][data-title=\"Server Wallet\"]{display:block!important}body.url-contains-v1 li[data-group-tag=\"v2\"][data-title=\"Server Wallet\"]{display:none!important}.nav-tag-pill-text[data-nav-tag=\"v1\"]{cursor:pointer!important;user-select:none!important;display:flex!important;align-items:center!important;padding:2px 8px!important}.nav-tag-pill-text[data-nav-tag=\"v2\"]{cursor:pointer!important;user-select:none!important;display:flex!important;align-items:center!important;padding:2px 8px!important}.nav-tag-pill-text[data-nav-tag=\"v1\"]::after,.nav-tag-pill-text[data-nav-tag=\"v2\"]::after{color:#004cec!important;content:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23004cec' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\");margin-left:4px;padding-top:4px;opacity:0.6}#footer>div{padding-top:5rem!important;padding-bottom:4rem!important}.tab-container>ul{margin-bottom:1rem!important}.code-block{margin-top:0px!important}button[data-component-part=\"tab-button\"]{font-size:1rem!important}@media (min-width: 1024px){div[id=\"content-container\"]{padding-left:4rem!important;padding-right:1rem!important}#sidebar-content,#navbar .hidden.lg\\:flex{display:flex!important}}#sidebar-title{font-family:\"Coinbase Text Medium\", sans-serif!important;color:#111827!important;font-size:0.8rem!important;font-weight:500!important}.dark #sidebar-title{font-family:\"Coinbase Text Medium\", sans-serif!important;color:#e5e7eb!important;font-size:0.8rem!important;font-weight:500!important}img[data-component-part=\"card-image\"]{height:12rem;object-fit:cover}.home-demo-cards img[data-component-part=\"card-image\"],.learn-demo-cards img[data-component-part=\"card-image\"]{height:8rem}.frame img,[class*=\"Frame\"] img{border-radius:8px;overflow:hidden}.custom-card-group h1,.custom-card-group h2,.custom-card-group h3,.custom-card-group h4,.custom-card-group h5,.custom-card-group h6{margin-top:0!important;margin-bottom:0!important;font-size:inherit!important;font-weight:inherit!important;line-height:inherit!important}.custom-card-group a,.custom-card-group a:hover,.custom-card-group a:visited,.custom-card-group a:active{text-decoration:none!important;text-decoration-line:none!important}.custom-card-group img{margin-top:0!important;margin-bottom:0!important}.fix-table table{table-layout:fixed!important;width:100%!important}.fix-table table th:first-child,.fix-table table td:first-child{width:60px!important;white-space:nowrap!important}.fix-table table th:nth-child(3),.fix-table table td:nth-child(3){width:130px!important;white-space:nowrap!important}.fix-table table th:nth-child(4),.fix-table table td:nth-child(4){width:50px!important;white-space:nowrap!important}"},{"filePath":"supported-networks.css","content":".network-support-table{width:100%;max-width:100%;overflow-x:auto;margin-bottom:1.5rem;-webkit-overflow-scrolling:touch}.network-support-table table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;border-radius:8px;border:1px solid #e5e7eb}[data-theme=\"dark\"] .network-support-table table,.dark .network-support-table table{border:1px solid #374151}.evm-table table th:nth-child(1),.evm-table table td:nth-child(1){width:35%}.evm-table table th:nth-child(2),.evm-table table td:nth-child(2),.evm-table table th:nth-child(3),.evm-table table td:nth-child(3),.evm-table table th:nth-child(4),.evm-table table td:nth-child(4),.evm-table table th:nth-child(5),.evm-table table td:nth-child(5){width:9%}.evm-table table th:last-child,.evm-table table td:last-child{width:29%}.non-evm-table table th:nth-child(1),.non-evm-table table td:nth-child(1){width:57.5%}.non-evm-table table th:nth-child(2),.non-evm-table table td:nth-child(2){width:6.75%}.non-evm-table table th:nth-child(3),.non-evm-table table td:nth-child(3){width:6.75%}.non-evm-table table th:last-child,.non-evm-table table td:last-child{width:29%}.network-support-table table td:nth-child(n+2):not(:last-child){text-align:center}.network-support-table table tbody tr:has(.category-header){background-color:#f3f4f6!important;border-top:2px solid #e5e7eb!important}.network-support-table table tbody tr:has(.category-header) td{padding:2px 12px!important;font-weight:600!important;border:none!important;color:#111827!important;line-height:20px!important;height:24px!important}.network-support-table table tbody tr:has(.category-header) td:empty{visibility:hidden}[data-theme=\"dark\"] .network-support-table table tbody tr:has(.category-header),.dark .network-support-table table tbody tr:has(.category-header){background-color:#374151!important;border-top:2px solid #374151!important}[data-theme=\"dark\"] .network-support-table table tbody tr:has(.category-header) td,.dark .network-support-table table tbody tr:has(.category-header) td{color:#f3f4f6!important}.network-support-table table tbody tr:has(.category-header)+tr td{padding-top:4px}.network-support-table table tbody tr:has(.category-header)+tr{border-top:none}.network-support-table table tbody tr:has(.category-header):not(:first-child){border-top:3px solid #e5e7eb}[data-theme=\"dark\"] .network-support-table table tbody tr:has(.category-header):not(:first-child),.dark .network-support-table table tbody tr:has(.category-header):not(:first-child){border-top:3px solid #374151}.network-support-table table tbody tr:not(:has(.category-header)):hover{background-color:rgba(0, 0, 0, 0.02)}[data-theme=\"dark\"] .network-support-table table tbody tr:not(:has(.category-header)):hover,.dark .network-support-table table tbody tr:not(:has(.category-header)):hover{background-color:rgba(255, 255, 255, 0.05)}.network-support-table table thead th{font-weight:600;background-color:#f9fafb;border-bottom:2px solid #e5e7eb;text-align:left!important}.network-support-table table thead th:first-child{border-top-left-radius:8px}.network-support-table table thead th:last-child{border-top-right-radius:8px}.network-support-table table tbody tr:last-child td:first-child{border-bottom-left-radius:8px}.network-support-table table tbody tr:last-child td:last-child{border-bottom-right-radius:8px}[data-theme=\"dark\"] .network-support-table table thead th,.dark .network-support-table table thead th{background-color:#1f2937;border-bottom:2px solid #374151;text-align:left!important}.network-support-table table td,.network-support-table table th{padding:8px 12px}.network-support-table tbody tr:has(td:first-child img) td,.network-support-table tbody tr:has(td:first-child>img+strong) td{padding-top:0!important;padding-bottom:0!important;height:24px!important;max-height:24px!important;overflow:hidden!important;vertical-align:middle!important;display:table-cell!important}.network-support-table table tbody tr:has(.category-header) td:first-child{text-align:center;font-size:14px;letter-spacing:0.5px;text-transform:uppercase}.category-header{display:block;width:100%}.network-support-table td:first-child strong:only-child{display:block;text-transform:uppercase;letter-spacing:0.5px;font-weight:700}.network-support-table tr:has(td:first-child>strong:only-child){background-color:#e5e7eb!important;border-top:2px solid #e5e7eb!important;height:24px!important;max-height:24px!important}.network-support-table tr:has(td:first-child>svg+strong),.network-support-table tr:has(td:first-child svg),.network-support-table tr:has(td:first-child>img+strong),.network-support-table tr:has(td:first-child img){background-color:#e5e7eb!important;border-top:2px solid #e5e7eb!important;height:24px!important;max-height:24px!important}.network-support-table tr:has(td:first-child>strong:only-child) td,.network-support-table tr:has(td:first-child>svg+strong) td,.network-support-table tr:has(td:first-child svg) td,.network-support-table tr:has(td:first-child>img+strong) td,.network-support-table tr:has(td:first-child img) td{padding:2px 12px!important;color:#374151!important;font-size:12px!important;line-height:20px!important;height:24px!important}.network-support-table tr:has(td:first-child>strong:only-child) td:first-child,.network-support-table tr:has(td:first-child>svg+strong) td:first-child,.network-support-table tr:has(td:first-child svg) td:first-child,.network-support-table tr:has(td:first-child>img+strong) td:first-child,.network-support-table tr:has(td:first-child img) td:first-child{font-size:12px!important;color:#374151!important;text-transform:uppercase!important;letter-spacing:0.8px!important;font-weight:600!important}[data-theme=\"dark\"] .network-support-table tr:has(td:first-child>strong:only-child),[data-theme=\"dark\"] .network-support-table tr:has(td:first-child>svg+strong),[data-theme=\"dark\"] .network-support-table tr:has(td:first-child svg),[data-theme=\"dark\"] .network-support-table tr:has(td:first-child>img+strong),[data-theme=\"dark\"] .network-support-table tr:has(td:first-child img),.dark .network-support-table tr:has(td:first-child>strong:only-child),.dark .network-support-table tr:has(td:first-child>svg+strong),.dark .network-support-table tr:has(td:first-child svg),.dark .network-support-table tr:has(td:first-child>img+strong),.dark .network-support-table tr:has(td:first-child img){background-color:#1f2937!important;border-top:2px solid #374151!important}[data-theme=\"dark\"] .network-support-table tr:has(td:first-child>strong:only-child) td:first-child,[data-theme=\"dark\"] .network-support-table tr:has(td:first-child>svg+strong) td:first-child,[data-theme=\"dark\"] .network-support-table tr:has(td:first-child svg) td:first-child,.dark .network-support-table tr:has(td:first-child>strong:only-child) td:first-child,.dark .network-support-table tr:has(td:first-child>svg+strong) td:first-child,.dark .network-support-table tr:has(td:first-child svg) td:first-child{color:#e5e7eb!important}.network-support-table tbody tr:first-child:has(td:first-child>strong:only-child),.network-support-table tbody tr:first-child:has(td:first-child>svg+strong),.network-support-table tbody tr:first-child:has(td:first-child svg){border-top:none!important}.network-support-table tr:has(td:first-child a){background-color:transparent!important}.network-support-table tr:has(td:first-child>img+strong) img,.network-support-table tr:has(td:first-child img) img{width:14px!important;height:14px!important;vertical-align:middle!important;margin-right:4px!important;margin-top:0!important;margin-bottom:0!important}.network-support-table tbody tr:has(td:first-child img){height:24px!important;max-height:24px!important;line-height:24px!important}.network-support-table.evm-table tbody tr:nth-child(1):has(td:first-child:has(strong)),.network-support-table.evm-table tbody tr:nth-child(4):has(td:first-child:has(strong)),.network-support-table.evm-table tbody tr:nth-child(8):has(td:first-child:has(strong)),.network-support-table.evm-table tbody tr:nth-child(10):has(td:first-child:has(strong)),.network-support-table.evm-table tbody tr:nth-child(14):has(td:first-child:has(strong)),.network-support-table.evm-table tbody tr:nth-child(20):has(td:first-child:has(strong)),.network-support-table.evm-table tbody tr:nth-child(22):has(td:first-child:has(strong)),.network-support-table.evm-table tbody tr:nth-child(24):has(td:first-child:has(strong)){background-color:#e5e7eb!important}"}],"page":{"pagePath":"api-reference/v2/idempotency","slug":"/api-reference/v2/idempotency","pageMetadata":{"title":"Idempotency","description":null,"href":"/api-reference/v2/idempotency"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Idempotency ensures that an API request produces the same result regardless of how many times it is sent. This is particularly important for operations that modify state, like creating accounts or signing transactions, where duplicate requests could cause unintended side effects.`}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.p,{children:[`The CDP APIs support idempotency through the `,_jsx(_components.code,{children:`X-Idempotency-Key`}),` header. When you include an idempotency key with a request, the API responds as follows:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Processes the request as normal if it’s the first use of the key within the last 24 hours`}),`\n`,_jsx(_components.li,{children:`Returns the exact same response as the first request if the same request is retried with the same key`}),`\n`,_jsx(_components.li,{children:`Returns an error if the same key is used with different request parameters`}),`\n`]}),`\n`,_jsx(_components.p,{children:`This mechanism ensures that temporary issues like network failures don’t result in duplicate operations.`}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`using-idempotency-keys`,children:`Using idempotency keys`}),`\n`,_jsx(Heading,{level:`3`,id:`header-format`,children:`Header format`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`X-Idempotency-Key`}),` header must be a valid UUID v4 string. For example:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`X-Idempotency-Key: 8e03978e-40d5-43e8-bc93-6894a57f9324`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`generating-keys`,children:`Generating keys`}),`\n`,_jsx(_components.p,{children:`Each unique request must use a new UUID v4. The API strictly enforces the UUID v4 format requirement and will reject any other format. Here’s how to generate a valid UUID v4 in different languages:`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`TypeScript`,lines:`true`,wrap:`true`,numberOfLines:`4`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`v4`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` uuidv4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'uuid'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Generate a new idempotency key`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` uuidv4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,lines:`true`,wrap:`true`,numberOfLines:`4`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`v4`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` uuidv4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'uuid'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Generate a new idempotency key`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` uuidv4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,lines:`true`,wrap:`true`,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` uuid`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`//`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Generate a new idempotency key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`idempotency_key `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(uuid.uuid4())`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Go`,lines:`true`,wrap:`true`,numberOfLines:`4`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#CE9178`},children:`github.com/google/uuid`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Generate a new idempotency key`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` uuid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`New`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Ruby`,lines:`true`,wrap:`true`,numberOfLines:`4`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`require`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'securerandom'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`//`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` Generate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` a `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` idempotency key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`idempotency_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` SecureRandom`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`uuid`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`PHP`,lines:`true`,wrap:`true`,numberOfLines:`6`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Using PHP's built-in UUID generator (PHP 7.4+)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` uuid_create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`UUID_TYPE_RANDOM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Alternative using ramsey/uuid package`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`use`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` Ramsey\\\\Uuid\\\\`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`Uuid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Uuid`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`uuid4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Java`,lines:`true`,wrap:`true`,numberOfLines:`4`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` java.util.UUID;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Generate a new idempotency key`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` UUID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`randomUUID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`C++`,lines:`true`,wrap:`true`,expandable:`true`,numberOfLines:`12`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \u003cuuid/uuid.h>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \u003cstring>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`std`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` generateIdempotencyKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` uuid_t`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` uuid;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` char`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` uuid_str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`37`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` uuid_generate_random`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(uuid);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` uuid_unparse_lower`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(uuid, uuid_str);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` std`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(uuid_str);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`C#`,lines:`true`,wrap:`true`,expandable:`true`,numberOfLines:`4`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Generate a new idempotency key`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`string`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Guid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`NewGuid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best practices`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Generate new keys`}),`: Always generate a new UUID v4 for each unique request.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Store keys`}),`: Keep track of idempotency keys and their responses for retry scenarios.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Key lifetime`}),`: Keys should be unique within a rolling 24-hour timeframe.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Retry logic`}),`: Implement exponential backoff when retrying failed requests:`]}),`\n`]}),`\n`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`TypeScript`,lines:`true`,wrap:`true`,expandable:`true`,numberOfLines:`40`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`40`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`v4`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` uuidv4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'uuid'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` makeIdempotentRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`T`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` unknown`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`T`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` uuidv4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` maxRetries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` idempotencyKey`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 422`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`errorType`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"idempotency_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Idempotency key conflict\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`++`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Exponential backoff`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`resolve`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setTimeout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`resolve`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`pow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Max retries exceeded\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,lines:`true`,wrap:`true`,expandable:`true`,numberOfLines:`39`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`39`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`v4`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` uuidv4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'uuid'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` makeIdempotentRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` uuidv4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` maxRetries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` idempotencyKey`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 422`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`errorType`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"idempotency_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Idempotency key conflict\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`++`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Exponential backoff`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Promise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`resolve`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setTimeout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`resolve`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`pow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,lines:`true`,wrap:`true`,expandable:`true`,numberOfLines:`32`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`32`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` uuid`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` typing `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Any, Dict`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` make_idempotent_request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: Dict[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any]) -> Dict[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, Any]:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` idempotency_key `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(uuid.uuid4())`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` max_retries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` max_retries:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` url,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: idempotency_key},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.ok:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.status_code `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 422`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` error `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` error.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"errorType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"idempotency_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ValueError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Idempotency key conflict\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Exception`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` max_retries:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Exponential backoff`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time.sleep(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` **`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retries)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Go`,lines:`true`,wrap:`true`,expandable:`true`,numberOfLines:`39`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`39`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#CE9178`},children:`encoding/json`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#CE9178`},children:`fmt`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#CE9178`},children:`github.com/google/uuid`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#CE9178`},children:`time`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` makeIdempotentRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` interface`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{}) (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`http`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` uuid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`New`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`++`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` requestBody`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`_`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Marshal`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`_`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` http`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`NewRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bytes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`NewBuffer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`requestBody`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Header`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Set`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`idempotencyKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`http`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` resp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Do`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` resp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`StatusCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` http`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`StatusOK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` resp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`nil`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` resp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` resp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`StatusCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 422`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` errorResp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` struct`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ErrorType`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:' `json:\"errorType\"`'})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`NewDecoder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`resp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Decode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`errorResp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` errorResp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ErrorType`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"idempotency_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fmt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Errorf`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"idempotency key conflict\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Exponential backoff`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` time`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Sleep`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`time`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Second`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` time`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Duration`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fmt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Errorf`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"max retries exceeded\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Ruby`,lines:`true`,wrap:`true`,expandable:`true`,numberOfLines:`30`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`30`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`require`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'securerandom'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` make_idempotent_request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` idempotency_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` SecureRandom`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`uuid`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` max_retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` max_retries`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` begin`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` HTTP`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-Idempotency-Key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` => idempotency_key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(url, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`json:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` data)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`success?`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`code`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 422`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`to_s`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` raise`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Idempotency key conflict'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` error[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'errorType'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'idempotency_error'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` end`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` rescue`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` StandardError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` => e`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` raise`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` max_retries`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Exponential backoff`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` sleep`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` **`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retries)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` retry`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` end`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` end`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`end`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`PHP`,lines:`true`,wrap:`true`,expandable:`true`,numberOfLines:`37`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`37`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` makeIdempotentRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` uuid_create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`UUID_TYPE_RANDOM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $maxRetries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $maxRetries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` GuzzleHttp\\\\`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`Client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'headers'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'X-Idempotency-Key'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $idempotencyKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $data`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getStatusCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`===`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` json_decode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getBody`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(), `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`GuzzleHttp\\\\Exception\\\\`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`ClientException`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$e`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getStatusCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`===`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 422`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` json_decode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$e`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getBody`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(), `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'errorType'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'idempotency_error'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Exception`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Idempotency key conflict'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`++`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $maxRetries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Exponential backoff`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` sleep`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`pow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$retries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Exception`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Max retries exceeded'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Java`,lines:`true`,wrap:`true`,expandable:`true`,numberOfLines:`48`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`48`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` java.util.UUID;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` IdempotentRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` static`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`T`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`T`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` makeIdempotentRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`Object`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`Class`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`T`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`responseType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` throws`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` Exception`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` UUID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`randomUUID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` int`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` int`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (retries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` maxRetries) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` HttpClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` HttpClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`newHttpClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` HttpRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` request`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` HttpRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`newBuilder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`uri`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`URI`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(url))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`header`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, idempotencyKey)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`HttpRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`BodyPublishers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ofString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` ObjectMapper`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`writeValueAsString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(data)))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`build`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` HttpResponse`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` request, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`HttpResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`BodyHandlers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ofString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`statusCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` ObjectMapper`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`readValue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(), responseType);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`statusCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 422`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` JsonNode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` ObjectMapper`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`readTree`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"idempotency_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`equals`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"errorType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`asText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Exception`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Idempotency key conflict\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`Exception`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`++`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (retries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` maxRetries) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Exponential backoff`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Thread`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sleep`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`long`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`pow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, retries) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Exception`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Max retries exceeded\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`C++`,lines:`true`,wrap:`true`,expandable:`true`,numberOfLines:`60`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`60`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \u003ccpprest/http_client.h>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \u003cuuid/uuid.h>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` namespace`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` web`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`http`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` namespace`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` web`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`http`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` IdempotentRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` static`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` pplx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`task`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`makeIdempotentRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` data`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` string idempotencyKey `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` generateUuid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` int`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` maxRetries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` int`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (retries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` maxRetries) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` http_client `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(url);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` http_request `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`methods`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::POST);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`add`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, idempotencyKey);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`set_body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(data);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(request)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`http_response`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`status_code`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`extract_json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` `})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`status_code`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 422`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` auto`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` error `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`extract_json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"errorType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`as_string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"idempotency_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` std`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`runtime_error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Idempotency key conflict\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` std`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`runtime_error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Request failed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` std`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::exception`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`++`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (retries `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` maxRetries) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Exponential backoff`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` std`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`this_thread`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sleep_for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` std`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`chrono`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`seconds`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`static_cast`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`int`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`pow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, retries)))`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` std`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`runtime_error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Max retries exceeded\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`private:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` static`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` generateUuid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` uuid_t`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` uuid;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` char`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` uuid_str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`37`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` uuid_generate_random`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(uuid);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` uuid_unparse_lower`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(uuid, uuid_str);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(uuid_str);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`C#`,lines:`true`,wrap:`true`,expandable:`true`,numberOfLines:`61`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`61`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Net`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Http`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Threading`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Tasks`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` IdempotentRequest`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` static`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Task`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`T`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`MakeIdempotentRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`T`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` string`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` object`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` int`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` idempotencyKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Guid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`NewGuid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` using`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` HttpClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` request`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` HttpRequestMessage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`HttpMethod`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Add`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"X-Idempotency-Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`idempotencyKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` StringContent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` JsonSerializer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Serialize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Encoding`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`UTF8`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`SendAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`IsSuccessStatusCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ReadAsStringAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` JsonSerializer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Deserialize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`T`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`StatusCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` HttpStatusCode`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`UnprocessableEntity`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` JsonSerializer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`DeserializeAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ErrorResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ReadAsStreamAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ErrorType`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"idempotency_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Exception`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Idempotency key conflict\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Exception`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`++`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retries`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Exponential backoff`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Task`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Delay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TimeSpan`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`FromSeconds`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Pow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retries`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Exception`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Max retries exceeded\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`supported-endpoints`,children:`Supported endpoints`}),`\n`,_jsxs(_components.p,{children:[`You can identify endpoints that support idempotency by looking for the `,_jsx(_components.code,{children:`X-Idempotency-Key`}),` parameter in the documentation for the related endpoint. When present, this optional header parameter indicates that the endpoint supports idempotent requests.`]}),`\n`,_jsxs(_components.p,{children:[`For example, in the `,_jsx(_components.a,{href:`/api-reference/v2/rest-api/evm-accounts/create-evm-account`,children:`Create EVM account`}),` endpoint documentation, you’ll see a field that allows you to pass the `,_jsx(_components.code,{children:`X-Idempotency-Key`}),` header.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Generally, all `,_jsx(_components.code,{children:`POST`}),` endpoints that modify state (like creating accounts or signing transactions) support idempotency.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`error-handling`,children:`Error handling`}),`\n`,_jsx(Heading,{level:`3`,id:`invalid-idempotency-key-format`,children:`Invalid idempotency key format`}),`\n`,_jsx(_components.p,{children:`If you provide an idempotency key that is not a valid UUID v4, the API will reject the request:`}),`\n`,_jsx(CodeBlock,{filename:``,lines:`true`,wrap:`true`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errorType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"invalid_request\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errorMessage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"parameter `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`X-Idempotency-Key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` in header has an error: must be a valid UUID v4 format (e.g., 8e03978e-40d5-43e8-bc93-6894a57f9324)\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`idempotency-key-conflict`,children:`Idempotency key conflict`}),`\n`,_jsx(_components.p,{children:`This occurs when you use the same idempotency key with different request parameters:`}),`\n`,_jsx(CodeBlock,{filename:``,lines:`true`,wrap:`true`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errorType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"idempotency_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errorMessage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Idempotency key '8e03978e-40d5-43e8-bc93-6894a57f9324' was already used with a different request payload. Please try again with a new idempotency key.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`already-processing`,children:`Already processing`}),`\n`,_jsx(_components.p,{children:`This error occurs in certain highly-concurrent scenarios whereby you send multiple requests within a short period with the same idempotency key. Note that under normal circumstances, sending the same request with the same idempotency\nkey within a 24-hour period will return the same response as the first request.`}),`\n`,_jsx(CodeBlock,{filename:``,lines:`true`,wrap:`true`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errorType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"already_exists\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errorMessage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Another request with the same idempotency key is currently processing.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`usage-constraints`,children:`Usage constraints`}),`\n`,_jsx(_components.p,{children:`Idempotency keys are subject to the following limitations:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Keys must be valid UUID v4 strings`}),`\n`,_jsx(_components.li,{children:`Keys should be unique within a 24-hour window`}),`\n`,_jsx(_components.li,{children:`Duplicate requests with the same key count towards your API rate limits`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`security-considerations`,children:`Security considerations`}),`\n`,_jsx(_components.p,{children:`While idempotency keys aren’t sensitive like API keys, we recommend following these security practices:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Use cryptographically secure UUID v4 generators`}),`\n`,_jsx(_components.li,{children:`Don’t use sequential or predictable keys (only UUID v4 format is accepted)`}),`\n`,_jsx(_components.li,{children:`Don’t reuse keys across different operations`}),`\n`,_jsx(_components.li,{children:`Store keys securely if you need to reference them later`}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Idempotency","description":null,"href":"/api-reference/v2/idempotency"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Using idempotency keys","slug":"using-idempotency-keys","depth":2,"children":[{"title":"Header format","slug":"header-format","depth":3,"children":[]},{"title":"Generating keys","slug":"generating-keys","depth":3,"children":[]}]},{"title":"Best practices","slug":"best-practices","depth":2,"children":[]},{"title":"Supported endpoints","slug":"supported-endpoints","depth":2,"children":[]},{"title":"Error handling","slug":"error-handling","depth":2,"children":[{"title":"Invalid idempotency key format","slug":"invalid-idempotency-key-format","depth":3,"children":[]},{"title":"Idempotency key conflict","slug":"idempotency-key-conflict","depth":3,"children":[]},{"title":"Already processing","slug":"already-processing","depth":3,"children":[]}]},{"title":"Usage constraints","slug":"usage-constraints","depth":2,"children":[]},{"title":"Security considerations","slug":"security-considerations","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/coinbase-cloud/e7f7008f5db24529/ai-assistant-message.js","/_mintlify/custom/coinbase-cloud/a95e5b7dce1303be/dropdowns.js","/_mintlify/custom/coinbase-cloud/bef3f7e8e501ccfe/sprig.js","/_mintlify/custom/coinbase-cloud/06f253dee5fa900c/lint-staged.config.js","/_mintlify/custom/coinbase-cloud/6d906736c36798d6/add-scroll-gradient.js","/_mintlify/custom/coinbase-cloud/4ddd1361cd858209/payment-api-protection.js"],"subdomain":"coinbase-cloud","siteName":"Coinbase Developer Documentation","title":"Idempotency - Coinbase Developer Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-02T21:41:56.288Z","originalFileLocation":"api-reference/v2/idempotency.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Coinbase Developer Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/coinbase-cloud/QIxkIqQGmtBiz2Kd/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/coinbase-cloud/QIxkIqQGmtBiz2Kd/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/coinbase-cloud/QIxkIqQGmtBiz2Kd/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/coinbase-cloud/QIxkIqQGmtBiz2Kd/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/coinbase-cloud/QIxkIqQGmtBiz2Kd/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/coinbase-cloud/QIxkIqQGmtBiz2Kd/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/coinbase-cloud/QIxkIqQGmtBiz2Kd/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/coinbase-cloud/QIxkIqQGmtBiz2Kd/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/coinbase-cloud/QIxkIqQGmtBiz2Kd/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Idempotency - Coinbase Developer Documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Coinbase Developer Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cloud.coinbase.com/api-reference/v2/idempotency\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://coinbase-cloud.mintlify.site/_mintlify/api/og/v2?division=CDP+API\u0026amp;title=Idempotency\u0026amp;theme=b18300d82c528d7a817aebbd\u0026amp;signature=b9c10104fb21aaa04e8b9979af1aaf83b56c91ad0ade0fda7b92c3669792741c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Idempotency - Coinbase Developer Documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://coinbase-cloud.mintlify.site/_mintlify/api/og/v2?division=CDP+API\u0026amp;title=Idempotency\u0026amp;theme=b18300d82c528d7a817aebbd\u0026amp;signature=b9c10104fb21aaa04e8b9979af1aaf83b56c91ad0ade0fda7b92c3669792741c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/coinbase-cloud/QIxkIqQGmtBiz2Kd/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Coinbase Developer Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#004cec\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cloud.coinbase.com/api-reference/v2/idempotency\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/v2/idempotency.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cloud.coinbase.com/#organization\",\"name\":\"Coinbase Developer Documentation\",\"url\":\"https://docs.cloud.coinbase.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/coinbase-cloud/FjMSMQIg--bQwlYn/logos/wordmark-light.svg?fit=max\u0026auto=format\u0026n=FjMSMQIg--bQwlYn\u0026q=85\u0026s=78661b6fd3ff79c8e85642f839addf7b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cloud.coinbase.com#website\",\"name\":\"Coinbase Developer Documentation\",\"url\":\"https://docs.cloud.coinbase.com\",\"publisher\":{\"@id\":\"https://docs.cloud.coinbase.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cloud.coinbase.com/api-reference/v2/idempotency#webpage\",\"url\":\"https://docs.cloud.coinbase.com/api-reference/v2/idempotency\",\"name\":\"Idempotency\",\"dateModified\":\"2026-06-02T21:41:56.288Z\",\"isPartOf\":{\"@id\":\"https://docs.cloud.coinbase.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cloud.coinbase.com/api-reference/v2/idempotency#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cloud.coinbase.com/api-reference/v2/idempotency#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"CDP API\",\"item\":\"https://docs.cloud.coinbase.com/api-reference/v2/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Idempotency\",\"item\":\"https://docs.cloud.coinbase.com/api-reference/v2/idempotency\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cloud.coinbase.com/api-reference/v2/idempotency#article\",\"headline\":\"Idempotency\",\"name\":\"Idempotency\",\"url\":\"https://docs.cloud.coinbase.com/api-reference/v2/idempotency\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cloud.coinbase.com/api-reference/v2/idempotency#webpage\"},\"dateModified\":\"2026-06-02T21:41:56.288Z\",\"publisher\":{\"@id\":\"https://docs.cloud.coinbase.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cloud.coinbase.com#website\"}}]}\u003c/script>","agentPointerHref":"/api-reference/v2/idempotency.md","siteName":"Coinbase Developer Documentation","nav":{"global":null,"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":""}]},{"tab":"API Reference","dropdowns":[{"dropdown":"CDP API","icon":"https://mintlify-assets.b-cdn.net/developerSDKNavigation-0.svg","groups":[{"group":"CDP API","pages":[{"title":"Welcome to CDP API","sidebarTitle":"Overview","href":"/api-reference/v2/introduction"},{"title":"Business Onboarding","href":"/api-reference/v2/business-onboarding"},{"title":"API Authentication","sidebarTitle":"Authentication","description":null,"href":"/api-reference/v2/authentication"},{"title":"Idempotency","href":"/api-reference/v2/idempotency"},{"title":"Rate Limits","description":null,"href":"/api-reference/v2/rate-limits"},{"title":"Errors","href":"/api-reference/v2/errors"}]},{"group":"REST API","pages":[{"group":"Wallets","pages":[{"group":"Custodial","pages":[{"group":"Accounts","tag":"Beta","pages":[{"title":"Accounts","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/accounts/accounts"},{"openapi":"get /v2/accounts/{accountId}","title":"Get account","href":"/api-reference/v2/rest-api/accounts/get-account"},{"openapi":"get /v2/accounts/{accountId}/balances/{asset}","title":"Get balance for account","href":"/api-reference/v2/rest-api/accounts/get-balance-for-account"},{"openapi":"get /v2/accounts","title":"List accounts","href":"/api-reference/v2/rest-api/accounts/list-accounts"},{"openapi":"get /v2/accounts/{accountId}/balances","title":"List balances for account","href":"/api-reference/v2/rest-api/accounts/list-balances-for-account"},{"openapi":"post /v2/accounts","title":"Create account","href":"/api-reference/v2/rest-api/accounts/create-account"}]}]},{"group":"Non-custodial","pages":[{"group":"User Wallets","pages":[{"group":"End User Account Management","pages":[{"title":"End User Account Management","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/end-user-account-management/end-user-account-management"},{"openapi":"get /v2/end-users/{userId}","title":"Get end user","href":"/api-reference/v2/rest-api/end-user-account-management/get-end-user"},{"openapi":"get /v2/end-users","title":"List end users","href":"/api-reference/v2/rest-api/end-user-account-management/list-end-users"},{"openapi":"get /v2/end-users/lookup","title":"Look up end users by identity","href":"/api-reference/v2/rest-api/end-user-account-management/look-up-end-users-by-identity"},{"openapi":"post /v2/end-users/{userId}/evm","title":"Add EVM account to end user","href":"/api-reference/v2/rest-api/end-user-account-management/add-evm-account-to-end-user"},{"openapi":"post /v2/end-users/{userId}/evm-smart-account","title":"Add EVM smart account to end user","href":"/api-reference/v2/rest-api/end-user-account-management/add-evm-smart-account-to-end-user"},{"openapi":"post /v2/end-users/{userId}/solana","title":"Add Solana account to end user","href":"/api-reference/v2/rest-api/end-user-account-management/add-solana-account-to-end-user"},{"openapi":"post /v2/end-users","title":"Create end user","href":"/api-reference/v2/rest-api/end-user-account-management/create-end-user"},{"openapi":"post /v2/end-users/import","title":"Import end user private key","href":"/api-reference/v2/rest-api/end-user-account-management/import-end-user-private-key"},{"openapi":"post /v2/end-users/auth/validate-token","title":"Validate end user access token","href":"/api-reference/v2/rest-api/end-user-account-management/validate-end-user-access-token"}]},{"group":"End User Accounts","pages":[{"title":"End User Accounts","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/end-user-accounts/end-user-accounts"},{"openapi":"get /v2/embedded-wallet-api/end-users/{userId}/address/{address}/delegation","title":"Get account-scoped delegation for end user","href":"/api-reference/v2/rest-api/end-user-accounts/get-account-scoped-delegation-for-end-user"},{"openapi":"get /v2/embedded-wallet-api/end-users/{userId}/delegation","title":"Get delegation for end user","href":"/api-reference/v2/rest-api/end-user-accounts/get-delegation-for-end-user"},{"openapi":"post /v2/embedded-wallet-api/end-users/{userId}/address/{address}/delegation","title":"Create account-scoped delegation for end user","href":"/api-reference/v2/rest-api/end-user-accounts/create-account-scoped-delegation-for-end-user"},{"openapi":"post /v2/embedded-wallet-api/end-users/{userId}/evm/eip7702/delegation","title":"Create EIP-7702 delegation for end user EVM account","href":"/api-reference/v2/rest-api/end-user-accounts/create-eip-7702-delegation-for-end-user-evm-account"},{"openapi":"post /v2/embedded-wallet-api/end-users/{userId}/evm/send/transaction","title":"Send transaction via end user EVM account","href":"/api-reference/v2/rest-api/end-user-accounts/send-transaction-via-end-user-evm-account"},{"openapi":"post /v2/embedded-wallet-api/end-users/{userId}/solana/send/transaction","title":"Send transaction via end user Solana account","href":"/api-reference/v2/rest-api/end-user-accounts/send-transaction-via-end-user-solana-account"},{"openapi":"post /v2/embedded-wallet-api/end-users/{userId}/evm/{address}/send/{asset}","title":"Send USDC on EVM","href":"/api-reference/v2/rest-api/end-user-accounts/send-usdc-on-evm"},{"openapi":"post /v2/embedded-wallet-api/end-users/{userId}/solana/{address}/send/{asset}","title":"Send USDC on Solana","href":"/api-reference/v2/rest-api/end-user-accounts/send-usdc-on-solana"},{"openapi":"post /v2/embedded-wallet-api/end-users/{userId}/evm/smart-accounts/{address}/send","title":"Send user operation for end user Smart Account","href":"/api-reference/v2/rest-api/end-user-accounts/send-user-operation-for-end-user-smart-account"},{"openapi":"post /v2/embedded-wallet-api/end-users/{userId}/solana/sign/message","title":"Sign Base64-encoded message","href":"/api-reference/v2/rest-api/end-user-accounts/sign-base64-encoded-message"},{"openapi":"post /v2/embedded-wallet-api/end-users/{userId}/evm/sign/message","title":"Sign EIP-191 message via end user EVM account","href":"/api-reference/v2/rest-api/end-user-accounts/sign-eip-191-message-via-end-user-evm-account"},{"openapi":"post /v2/embedded-wallet-api/end-users/{userId}/evm/sign/typed-data","title":"Sign EIP-712 typed data via end user EVM account","href":"/api-reference/v2/rest-api/end-user-accounts/sign-eip-712-typed-data-via-end-user-evm-account"},{"openapi":"post /v2/embedded-wallet-api/end-users/{userId}/evm/sign/transaction","title":"Sign transaction via end user EVM account","href":"/api-reference/v2/rest-api/end-user-accounts/sign-transaction-via-end-user-evm-account"},{"openapi":"post /v2/embedded-wallet-api/end-users/{userId}/solana/sign/transaction","title":"Sign transaction via end user Solana account","href":"/api-reference/v2/rest-api/end-user-accounts/sign-transaction-via-end-user-solana-account"},{"openapi":"delete /v2/embedded-wallet-api/end-users/{userId}/address/{address}/delegation","title":"Revoke account-scoped delegation for end user","href":"/api-reference/v2/rest-api/end-user-accounts/revoke-account-scoped-delegation-for-end-user"},{"openapi":"delete /v2/embedded-wallet-api/end-users/{userId}/delegation","title":"Revoke delegation for end user","href":"/api-reference/v2/rest-api/end-user-accounts/revoke-delegation-for-end-user"}]}]},{"group":"API Key Wallets","pages":[{"group":"EVM Accounts","pages":[{"title":"EVM Accounts","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/evm-accounts/evm-accounts"},{"openapi":"get /v2/evm/eip7702/delegation-operations/{delegationOperationId}","title":"Get EIP-7702 delegation operation by ID","href":"/api-reference/v2/rest-api/evm-accounts/get-eip-7702-delegation-operation-by-id"},{"openapi":"get /v2/evm/accounts/{address}","title":"Get EVM account by address","href":"/api-reference/v2/rest-api/evm-accounts/get-evm-account-by-address"},{"openapi":"get /v2/evm/accounts/by-name/{name}","title":"Get EVM account by name","href":"/api-reference/v2/rest-api/evm-accounts/get-evm-account-by-name"},{"openapi":"get /v2/evm/accounts","title":"List EVM accounts","href":"/api-reference/v2/rest-api/evm-accounts/list-evm-accounts"},{"openapi":"post /v2/evm/accounts/{address}/eip7702/delegation","title":"Create EIP-7702 delegation","href":"/api-reference/v2/rest-api/evm-accounts/create-eip-7702-delegation"},{"openapi":"post /v2/evm/accounts","title":"Create EVM account","href":"/api-reference/v2/rest-api/evm-accounts/create-evm-account"},{"openapi":"post /v2/evm/accounts/{address}/export","title":"Export EVM account","href":"/api-reference/v2/rest-api/evm-accounts/export-evm-account"},{"openapi":"post /v2/evm/accounts/export/by-name/{name}","title":"Export EVM account by name","href":"/api-reference/v2/rest-api/evm-accounts/export-evm-account-by-name"},{"openapi":"post /v2/evm/accounts/import","title":"Import EVM account","href":"/api-reference/v2/rest-api/evm-accounts/import-evm-account"},{"openapi":"post /v2/evm/accounts/{address}/send/transaction","title":"Send transaction","href":"/api-reference/v2/rest-api/evm-accounts/send-transaction"},{"openapi":"post /v2/evm/accounts/{address}/sign/message","title":"Sign EIP-191 message","href":"/api-reference/v2/rest-api/evm-accounts/sign-eip-191-message"},{"openapi":"post /v2/evm/accounts/{address}/sign/typed-data","title":"Sign EIP-712 typed data","href":"/api-reference/v2/rest-api/evm-accounts/sign-eip-712-typed-data"},{"openapi":"post /v2/evm/accounts/{address}/sign","title":"Sign hash","href":"/api-reference/v2/rest-api/evm-accounts/sign-hash"},{"openapi":"post /v2/evm/accounts/{address}/sign/transaction","title":"Sign transaction","href":"/api-reference/v2/rest-api/evm-accounts/sign-transaction"},{"openapi":"put /v2/evm/accounts/{address}","title":"Update EVM account","href":"/api-reference/v2/rest-api/evm-accounts/update-evm-account"}]},{"group":"EVM Smart Accounts","pages":[{"title":"EVM Smart Accounts","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/evm-smart-accounts/evm-smart-accounts"},{"openapi":"get /v2/evm/smart-accounts/{address}","title":"Get Smart Account by address","href":"/api-reference/v2/rest-api/evm-smart-accounts/get-smart-account-by-address"},{"openapi":"get /v2/evm/smart-accounts/by-name/{name}","title":"Get Smart Account by name","href":"/api-reference/v2/rest-api/evm-smart-accounts/get-smart-account-by-name"},{"openapi":"get /v2/evm/smart-accounts/{address}/user-operations/{userOpHash}","title":"Get user operation","href":"/api-reference/v2/rest-api/evm-smart-accounts/get-user-operation"},{"openapi":"get /v2/evm/smart-accounts","title":"List Smart Accounts","href":"/api-reference/v2/rest-api/evm-smart-accounts/list-smart-accounts"},{"openapi":"get /v2/evm/smart-accounts/{address}/spend-permissions/list","title":"List spend permissions","href":"/api-reference/v2/rest-api/evm-smart-accounts/list-spend-permissions"},{"openapi":"post /v2/evm/smart-accounts","title":"Create Smart Account","href":"/api-reference/v2/rest-api/evm-smart-accounts/create-smart-account"},{"openapi":"post /v2/evm/smart-accounts/{address}/spend-permissions","title":"Create spend permission","href":"/api-reference/v2/rest-api/evm-smart-accounts/create-spend-permission"},{"openapi":"post /v2/evm/smart-accounts/{address}/user-operations/prepare-and-send","title":"Prepare and send user operation","href":"/api-reference/v2/rest-api/evm-smart-accounts/prepare-and-send-user-operation"},{"openapi":"post /v2/evm/smart-accounts/{address}/user-operations","title":"Prepare user operation","href":"/api-reference/v2/rest-api/evm-smart-accounts/prepare-user-operation"},{"openapi":"post /v2/evm/smart-accounts/{address}/spend-permissions/revoke","title":"Revoke spend permission","href":"/api-reference/v2/rest-api/evm-smart-accounts/revoke-spend-permission"},{"openapi":"post /v2/evm/smart-accounts/{address}/user-operations/{userOpHash}/send","title":"Send user operation","href":"/api-reference/v2/rest-api/evm-smart-accounts/send-user-operation"},{"openapi":"put /v2/evm/smart-accounts/{address}","title":"Update EVM Smart Account","href":"/api-reference/v2/rest-api/evm-smart-accounts/update-evm-smart-account"}]},{"group":"Solana Accounts","pages":[{"title":"Solana Accounts","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/solana-accounts/solana-accounts"},{"openapi":"get /v2/solana/accounts/{address}","title":"Get Solana account by address","href":"/api-reference/v2/rest-api/solana-accounts/get-solana-account-by-address"},{"openapi":"get /v2/solana/accounts/by-name/{name}","title":"Get Solana account by name","href":"/api-reference/v2/rest-api/solana-accounts/get-solana-account-by-name"},{"openapi":"get /v2/solana/accounts","title":"List Solana accounts","href":"/api-reference/v2/rest-api/solana-accounts/list-solana-accounts"},{"openapi":"post /v2/solana/accounts","title":"Create Solana account","href":"/api-reference/v2/rest-api/solana-accounts/create-solana-account"},{"openapi":"post /v2/solana/accounts/{address}/export","title":"Export Solana account","href":"/api-reference/v2/rest-api/solana-accounts/export-solana-account"},{"openapi":"post /v2/solana/accounts/export/by-name/{name}","title":"Export Solana account by name","href":"/api-reference/v2/rest-api/solana-accounts/export-solana-account-by-name"},{"openapi":"post /v2/solana/accounts/import","title":"Import Solana account","href":"/api-reference/v2/rest-api/solana-accounts/import-solana-account"},{"openapi":"post /v2/solana/accounts/send/transaction","title":"Send Solana transaction","href":"/api-reference/v2/rest-api/solana-accounts/send-solana-transaction"},{"openapi":"post /v2/solana/accounts/{address}/sign/message","title":"Sign message","href":"/api-reference/v2/rest-api/solana-accounts/sign-message"},{"openapi":"post /v2/solana/accounts/{address}/sign/transaction","title":"Sign transaction","href":"/api-reference/v2/rest-api/solana-accounts/sign-transaction"},{"openapi":"put /v2/solana/accounts/{address}","title":"Update Solana account","href":"/api-reference/v2/rest-api/solana-accounts/update-solana-account"}]}]},{"group":"Policy Engine","pages":[{"title":"Policy Engine","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/policy-engine/policy-engine"},{"openapi":"get /v2/policy-engine/policies/{policyId}","title":"Get policy by ID","href":"/api-reference/v2/rest-api/policy-engine/get-policy-by-id"},{"openapi":"get /v2/policy-engine/policies","title":"List policies","href":"/api-reference/v2/rest-api/policy-engine/list-policies"},{"openapi":"post /v2/policy-engine/policies","title":"Create policy","href":"/api-reference/v2/rest-api/policy-engine/create-policy"},{"openapi":"put /v2/policy-engine/policies/{policyId}","title":"Update policy","href":"/api-reference/v2/rest-api/policy-engine/update-policy"},{"openapi":"delete /v2/policy-engine/policies/{policyId}","title":"Delete policy","href":"/api-reference/v2/rest-api/policy-engine/delete-policy"}]}]}]},{"group":"Payments","pages":[{"group":"Deposit Destinations","tag":"Beta","pages":[{"title":"Deposit Destinations","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/deposit-destinations/deposit-destinations"},{"openapi":"get /v2/deposit-destinations/{depositDestinationId}","title":"Get deposit destination","href":"/api-reference/v2/rest-api/deposit-destinations/get-deposit-destination"},{"openapi":"get /v2/deposit-destinations","title":"List deposit destinations","href":"/api-reference/v2/rest-api/deposit-destinations/list-deposit-destinations"},{"openapi":"post /v2/deposit-destinations","title":"Create deposit destination","href":"/api-reference/v2/rest-api/deposit-destinations/create-deposit-destination"}]},{"group":"Payment Methods","tag":"Beta","pages":[{"title":"Payment Methods","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/payment-methods/payment-methods"},{"openapi":"get /v2/payment-methods/{paymentMethodId}","title":"Get payment method","href":"/api-reference/v2/rest-api/payment-methods/get-payment-method"},{"openapi":"get /v2/payment-methods","title":"List payment methods","href":"/api-reference/v2/rest-api/payment-methods/list-payment-methods"}]},{"group":"Transfers","tag":"Beta","pages":[{"title":"Transfers","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/transfers/transfers"},{"openapi":"get /v2/transfers/{transferId}","title":"Get transfer","href":"/api-reference/v2/rest-api/transfers/get-transfer"},{"openapi":"get /v2/transfers","title":"List transfers","href":"/api-reference/v2/rest-api/transfers/list-transfers"},{"openapi":"post /v2/transfers","title":"Create transfer","href":"/api-reference/v2/rest-api/transfers/create-transfer"},{"openapi":"post /v2/transfers/{transferId}/execute","title":"Execute transfer","href":"/api-reference/v2/rest-api/transfers/execute-transfer"},{"openapi":"post /v2/transfers/{transferId}/travel-rule","title":"Submit deposit travel rule information","href":"/api-reference/v2/rest-api/transfers/submit-deposit-travel-rule-information"}]},{"group":"Onramp","pages":[{"title":"Onramp","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/onramp/onramp"},{"openapi":"get /v2/onramp/orders/{orderId}","title":"Get an onramp order by ID","href":"/api-reference/v2/rest-api/onramp/get-an-onramp-order-by-id"},{"openapi":"post /v2/onramp/orders","title":"Create an onramp order","href":"/api-reference/v2/rest-api/onramp/create-an-onramp-order"},{"openapi":"post /v2/onramp/sessions","title":"Create an onramp session","href":"/api-reference/v2/rest-api/onramp/create-an-onramp-session"},{"openapi":"post /v2/onramp/limits","title":"Get onramp user limits","href":"/api-reference/v2/rest-api/onramp/get-onramp-user-limits"},{"openapi":"post /v2/onramp/limits/upgrade","title":"Request limit upgrade","href":"/api-reference/v2/rest-api/onramp/request-limit-upgrade"},{"group":"Webhooks","pages":[{"title":"Webhook offramp transaction created","href":"/api-reference/v2/webhook-offramp-transaction-created"},{"title":"Webhook offramp transaction failed","href":"/api-reference/v2/webhook-offramp-transaction-failed"},{"title":"Webhook offramp transaction success","href":"/api-reference/v2/webhook-offramp-transaction-success"},{"title":"Webhook offramp transaction updated","href":"/api-reference/v2/webhook-offramp-transaction-updated"},{"title":"Webhook onramp transaction created","href":"/api-reference/v2/webhook-onramp-transaction-created"},{"title":"Webhook onramp transaction failed","href":"/api-reference/v2/webhook-onramp-transaction-failed"},{"title":"Webhook onramp transaction success","href":"/api-reference/v2/webhook-onramp-transaction-success"},{"title":"Webhook onramp transaction updated","href":"/api-reference/v2/webhook-onramp-transaction-updated"}]}]},{"group":"x402 Facilitator","tag":"Beta","pages":[{"title":"x402 Facilitator","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/x402-facilitator/x402-facilitator"},{"openapi":"get /v2/x402/supported","title":"Get supported payment schemes and networks","href":"/api-reference/v2/rest-api/x402-facilitator/get-supported-payment-schemes-and-networks"},{"openapi":"get /v2/x402/discovery/merchant","title":"List merchant discovery info","href":"/api-reference/v2/rest-api/x402-facilitator/list-merchant-discovery-info"},{"openapi":"get /v2/x402/discovery/resources","title":"List x402 resources","href":"/api-reference/v2/rest-api/x402-facilitator/list-x402-resources"},{"openapi":"get /v2/x402/discovery/search","title":"Search x402 resources","href":"/api-reference/v2/rest-api/x402-facilitator/search-x402-resources"},{"openapi":"post /v2/x402/discovery/mcp","title":"Handle MCP JSON-RPC request","href":"/api-reference/v2/rest-api/x402-facilitator/handle-mcp-json-rpc-request"},{"openapi":"post /v2/x402/settle","title":"Settle payment","href":"/api-reference/v2/rest-api/x402-facilitator/settle-payment"},{"openapi":"post /v2/x402/verify","title":"Verify payment","href":"/api-reference/v2/rest-api/x402-facilitator/verify-payment"}]}]},{"group":"Trading","pages":[{"group":"EVM Swaps","tag":"Beta","pages":[{"title":"EVM Swaps","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/evm-swaps/evm-swaps"},{"openapi":"get /v2/evm/swaps/quote","title":"Get swap price estimate","href":"/api-reference/v2/rest-api/evm-swaps/get-swap-price-estimate"},{"openapi":"post /v2/evm/swaps","title":"Create swap quote","href":"/api-reference/v2/rest-api/evm-swaps/create-swap-quote"}]}]},{"group":"Onchain Tools","pages":[{"group":"EVM Token Balances","pages":[{"title":"EVM Token Balances","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/evm-token-balances/evm-token-balances"},{"openapi":"get /v2/evm/token-balances/{network}/{address}","title":"List EVM token balances","href":"/api-reference/v2/rest-api/evm-token-balances/list-evm-token-balances"}]},{"group":"Faucets","pages":[{"title":"Faucets","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/faucets/faucets"},{"openapi":"post /v2/evm/faucet","title":"Request funds on EVM test networks","href":"/api-reference/v2/rest-api/faucets/request-funds-on-evm-test-networks"},{"openapi":"post /v2/solana/faucet","title":"Request funds on Solana devnet","href":"/api-reference/v2/rest-api/faucets/request-funds-on-solana-devnet"}]},{"group":"Onchain Data","pages":[{"title":"Onchain Data","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/onchain-data/onchain-data"},{"openapi":"get /v2/data/evm/token-balances/{network}/{address}","title":"List EVM token balances","href":"/api-reference/v2/rest-api/onchain-data/list-evm-token-balances"},{"openapi":"get /v2/data/evm/token-ownership/{network}/{address}","title":"List token addresses for account","href":"/api-reference/v2/rest-api/onchain-data/list-token-addresses-for-account"},{"group":"Webhooks","pages":[{"title":"Webhook onchain activity detected","href":"/api-reference/v2/webhook-onchain-activity-detected"},{"title":"Webhook wallet activity detected","href":"/api-reference/v2/webhook-wallet-activity-detected"},{"title":"Webhook wallet activity multi","href":"/api-reference/v2/webhook-wallet-activity-multi"}]}]},{"group":"Solana Token Balances","pages":[{"title":"Solana Token Balances","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/solana-token-balances/solana-token-balances"},{"openapi":"get /v2/solana/token-balances/{network}/{address}","title":"List Solana token balances","href":"/api-reference/v2/rest-api/solana-token-balances/list-solana-token-balances"}]},{"group":"SQL API","pages":[{"title":"SQL API","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/sql-api/sql-api"},{"openapi":"get /v2/data/query/schema","title":"Get schema details","href":"/api-reference/v2/rest-api/sql-api/get-schema-details"},{"openapi":"get /v2/data/query/grammar","title":"Get SQL grammar","href":"/api-reference/v2/rest-api/sql-api/get-sql-grammar"},{"openapi":"post /v2/data/query/run","title":"Run SQL Query","href":"/api-reference/v2/rest-api/sql-api/run-sql-query"}]}]},{"group":"Webhooks","pages":[{"title":"Webhooks","sidebarTitle":"Overview","href":"/api-reference/v2/rest-api/webhooks/webhooks"},{"openapi":"get /v2/data/webhooks/subscriptions/{subscriptionId}","title":"Get webhook subscription","href":"/api-reference/v2/rest-api/webhooks/get-webhook-subscription"},{"openapi":"get /v2/data/webhooks/subscriptions/{subscriptionId}/events","title":"List webhook subscription events","href":"/api-reference/v2/rest-api/webhooks/list-webhook-subscription-events"},{"openapi":"get /v2/data/webhooks/subscriptions","title":"List webhook subscriptions","href":"/api-reference/v2/rest-api/webhooks/list-webhook-subscriptions"},{"openapi":"post /v2/data/webhooks/subscriptions","title":"Create webhook subscription","href":"/api-reference/v2/rest-api/webhooks/create-webhook-subscription"},{"openapi":"put /v2/data/webhooks/subscriptions/{subscriptionId}","title":"Update webhook subscription","href":"/api-reference/v2/rest-api/webhooks/update-webhook-subscription"},{"openapi":"delete /v2/data/webhooks/subscriptions/{subscriptionId}","title":"Delete webhook subscription","href":"/api-reference/v2/rest-api/webhooks/delete-webhook-subscription"}]}]}]},{"dropdown":"CDP Payments API","icon":"https://mintlify.b-cdn.net/coinbase/pay.svg","groups":[{"group":"CDP PAYMENTS API","pages":[{"title":"CDP Payments API","sidebarTitle":"Overview","href":"/api-reference/payment-apis/overview"},{"title":"API Conventions","sidebarTitle":"Conventions","href":"/api-reference/payment-apis/conventions"},{"title":"Create a recurring report in Portal","sidebarTitle":"Reports","href":"/api-reference/payment-apis/reports"},{"group":"Troubleshooting","pages":[{"title":"Troubleshooting \u0026 Help","sidebarTitle":"Common Issues","href":"/api-reference/payment-apis/troubleshooting"},{"title":"Errors","href":"/api-reference/payment-apis/errors"}]},{"group":"Resource guides","pages":[{"title":"Accounts","sidebarTitle":"Overview","href":"/api-reference/payment-apis/rest-api/accounts/accounts"},{"title":"Deposit Destinations","sidebarTitle":"Deposit Destinations","href":"/api-reference/payment-apis/rest-api/deposit-destinations-under-development/overview"},{"title":"Payment Methods","sidebarTitle":"Overview","href":"/api-reference/payment-apis/rest-api/payment-methods/payment-methods"},{"group":"Transfers","pages":[{"title":"Transfers","sidebarTitle":"Overview","href":"/api-reference/payment-apis/rest-api/transfers/transfers"},{"title":"Metadata","sidebarTitle":"Metadata","href":"/api-reference/payment-apis/rest-api/transfers/metadata"},{"title":"Transfer Validation","sidebarTitle":"Validation","href":"/api-reference/payment-apis/rest-api/transfers/validation"},{"title":"Example payloads","sidebarTitle":"Example payloads","href":"/api-reference/payment-apis/rest-api/transfers/example-payloads"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","sidebarTitle":"Overview","href":"/api-reference/payment-apis/webhooks"},{"title":"Verification","sidebarTitle":"Verification","href":"/api-reference/payment-apis/webhooks/verification"},{"title":"Subscriptions","sidebarTitle":"Subscriptions","href":"/api-reference/payment-apis/webhooks/subscriptions"},{"title":"Example payloads","sidebarTitle":"Example payloads","href":"/api-reference/payment-apis/webhooks/example-payloads"}]},{"group":"Payment Acceptance","pages":[{"title":"Checkout","sidebarTitle":"Checkout","href":"/api-reference/payment-acceptance/payments/embedded-checkout"}]}]},{"title":"OpenAPI Spec","sidebarTitle":"OpenAPI Spec","url":"https://docs.cdp.coinbase.com/api-reference/payment-apis/payment-apis-spec.yaml","href":"/api-reference/payment-apis/openapi-spec"}]},{"group":"SANDBOX","pages":[{"title":"Sandbox Overview","sidebarTitle":"Overview","href":"/api-reference/payment-apis/sandbox/overview"},{"title":"Sandbox Quickstart","sidebarTitle":"Quickstart","href":"/api-reference/payment-apis/sandbox/quickstart"},{"title":"Testing with Postman","sidebarTitle":"Postman","href":"/api-reference/payment-apis/sandbox/postman"},{"group":"Resource guides","pages":[{"title":"Sandbox: Accounts","sidebarTitle":"Accounts","href":"/api-reference/payment-apis/sandbox/guides/accounts"},{"title":"Sandbox: Deposit Destinations","sidebarTitle":"Deposit Destinations","href":"/api-reference/payment-apis/sandbox/guides/deposit-destinations"},{"title":"Sandbox: Payment Methods","sidebarTitle":"Payment Methods","href":"/api-reference/payment-apis/sandbox/guides/payment-methods"},{"title":"Sandbox: Transfers","sidebarTitle":"Transfers","href":"/api-reference/payment-apis/sandbox/guides/transfers"}]}]},{"group":"REST API","pages":[{"group":"Accounts","pages":[{"title":"Accounts","sidebarTitle":"Overview","href":"/api-reference/payment-apis/rest-api/accounts/accounts"},{"openapi":"get /v2/accounts/{accountId}","title":"Get account","href":"/api-reference/payment-apis/rest-api/accounts/get-account"},{"openapi":"get /v2/accounts/{accountId}/balances/{asset}","title":"Get balance for account","href":"/api-reference/payment-apis/rest-api/accounts/get-balance-for-account"},{"openapi":"get /v2/accounts","title":"List accounts","href":"/api-reference/payment-apis/rest-api/accounts/list-accounts"},{"openapi":"get /v2/accounts/{accountId}/balances","title":"List balances for account","href":"/api-reference/payment-apis/rest-api/accounts/list-balances-for-account"},{"openapi":"post /v2/accounts","title":"Create account","href":"/api-reference/payment-apis/rest-api/accounts/create-account"}]},{"group":"Deposit Destinations","pages":[{"title":"Deposit Destinations","sidebarTitle":"Overview","href":"/api-reference/payment-apis/rest-api/deposit-destinations/deposit-destinations"},{"openapi":"get /v2/deposit-destinations/{depositDestinationId}","title":"Get deposit destination","href":"/api-reference/payment-apis/rest-api/deposit-destinations/get-deposit-destination"},{"openapi":"get /v2/deposit-destinations","title":"List deposit destinations","href":"/api-reference/payment-apis/rest-api/deposit-destinations/list-deposit-destinations"},{"openapi":"post /v2/deposit-destinations","title":"Create deposit destination","href":"/api-reference/payment-apis/rest-api/deposit-destinations/create-deposit-destination"}]},{"group":"Payment Acceptance","pages":[{"title":"Payment Acceptance","sidebarTitle":"Overview","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/payment-acceptance-under-development"},{"openapi":"get /v2/disbursements/{disbursementId}","title":"Get a disbursement","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/get-a-disbursement"},{"openapi":"get /v2/payment-sessions/{paymentSessionId}","title":"Get a payment session","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/get-a-payment-session"},{"openapi":"get /v2/payment-sessions/{paymentSessionId}/authorizations/{authorizationId}","title":"Get a payment session authorization","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/get-a-payment-session-authorization"},{"openapi":"get /v2/payment-sessions/{paymentSessionId}/captures/{captureId}","title":"Get a payment session capture","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/get-a-payment-session-capture"},{"openapi":"get /v2/payment-sessions/{paymentSessionId}/refunds/{refundId}","title":"Get a payment session refund","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/get-a-payment-session-refund"},{"openapi":"get /v2/payment-sessions/{paymentSessionId}/voids/{voidId}","title":"Get a payment session void","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/get-a-payment-session-void"},{"openapi":"get /v2/payment-sessions/{paymentSessionId}/authorizations/wallet/options","title":"Get wallet authorization options","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/get-wallet-authorization-options"},{"openapi":"get /v2/coinbase-accounts/balances","title":"List Coinbase account balances","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/list-coinbase-account-balances"},{"openapi":"get /v2/disbursements","title":"List disbursements","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/list-disbursements"},{"openapi":"get /v2/payment-sessions/{paymentSessionId}/authorizations","title":"List payment session authorizations","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/list-payment-session-authorizations"},{"openapi":"get /v2/payment-sessions/{paymentSessionId}/captures","title":"List payment session captures","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/list-payment-session-captures"},{"openapi":"get /v2/payment-sessions/{paymentSessionId}/refunds","title":"List payment session refunds","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/list-payment-session-refunds"},{"openapi":"get /v2/payment-sessions/{paymentSessionId}/voids","title":"List payment session voids","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/list-payment-session-voids"},{"openapi":"get /v2/payment-sessions","title":"List payment sessions","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/list-payment-sessions"},{"openapi":"post /v2/payment-sessions/{paymentSessionId}/authorizations/coinbase","title":"Authorize a payment session with a Coinbase account","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/authorize-a-payment-session-with-a-coinbase-account"},{"openapi":"post /v2/payment-sessions/{paymentSessionId}/authorizations/wallet","title":"Authorize a payment session with a wallet","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/authorize-a-payment-session-with-a-wallet"},{"openapi":"post /v2/payment-sessions/{paymentSessionId}/authorizations/x402","title":"Authorize a payment session with x402","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/authorize-a-payment-session-with-x402"},{"openapi":"post /v2/payment-sessions/{paymentSessionId}/cancel","title":"Cancel a payment session","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/cancel-a-payment-session"},{"openapi":"post /v2/payment-sessions/{paymentSessionId}/captures","title":"Capture a payment session","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/capture-a-payment-session"},{"openapi":"post /v2/disbursements","title":"Create a disbursement","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/create-a-disbursement"},{"openapi":"post /v2/payment-sessions","title":"Create a payment session","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/create-a-payment-session"},{"openapi":"post /v2/payment-sessions/{paymentSessionId}/refunds","title":"Refund a payment session","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/refund-a-payment-session"},{"openapi":"post /v2/payment-sessions/{paymentSessionId}/voids","title":"Void a payment session","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/void-a-payment-session"},{"openapi":"webhook disbursementChanged","title":"Disbursement changed","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/disbursement-changed"},{"openapi":"webhook paymentSessionChanged","title":"Payment session changed","href":"/api-reference/payment-apis/rest-api/payment-acceptance-under-development/payment-session-changed"}]},{"group":"Payment Methods","pages":[{"title":"Payment Methods","sidebarTitle":"Overview","href":"/api-reference/payment-apis/rest-api/payment-methods/payment-methods"},{"openapi":"get /v2/payment-methods/{paymentMethodId}","title":"Get payment method","href":"/api-reference/payment-apis/rest-api/payment-methods/get-payment-method"},{"openapi":"get /v2/payment-methods","title":"List payment methods","href":"/api-reference/payment-apis/rest-api/payment-methods/list-payment-methods"}]},{"group":"Transfers","pages":[{"title":"Transfers","sidebarTitle":"Overview","href":"/api-reference/payment-apis/rest-api/transfers/transfers"},{"openapi":"get /v2/transfers/{transferId}","title":"Get transfer","href":"/api-reference/payment-apis/rest-api/transfers/get-transfer"},{"openapi":"get /v2/transfers","title":"List transfers","href":"/api-reference/payment-apis/rest-api/transfers/list-transfers"},{"openapi":"post /v2/transfers","title":"Create transfer","href":"/api-reference/payment-apis/rest-api/transfers/create-transfer"},{"openapi":"post /v2/transfers/{transferId}/execute","title":"Execute transfer","href":"/api-reference/payment-apis/rest-api/transfers/execute-transfer"},{"openapi":"post /v2/transfers/{transferId}/travel-rule","title":"Submit deposit travel rule information","href":"/api-reference/payment-apis/rest-api/transfers/submit-deposit-travel-rule-information"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","sidebarTitle":"Overview","href":"/api-reference/payment-apis/rest-api/webhooks/webhooks"},{"openapi":"get /v2/data/webhooks/subscriptions/{subscriptionId}","title":"Get webhook subscription","href":"/api-reference/payment-apis/rest-api/webhooks/get-webhook-subscription"},{"openapi":"get /v2/data/webhooks/subscriptions/{subscriptionId}/events","title":"List webhook subscription events","href":"/api-reference/payment-apis/rest-api/webhooks/list-webhook-subscription-events"},{"openapi":"get /v2/data/webhooks/subscriptions","title":"List webhook subscriptions","href":"/api-reference/payment-apis/rest-api/webhooks/list-webhook-subscriptions"},{"openapi":"post /v2/data/webhooks/subscriptions","title":"Create webhook subscription","href":"/api-reference/payment-apis/rest-api/webhooks/create-webhook-subscription"},{"openapi":"put /v2/data/webhooks/subscriptions/{subscriptionId}","title":"Update webhook subscription","href":"/api-reference/payment-apis/rest-api/webhooks/update-webhook-subscription"},{"openapi":"delete /v2/data/webhooks/subscriptions/{subscriptionId}","title":"Delete webhook subscription","href":"/api-reference/payment-apis/rest-api/webhooks/delete-webhook-subscription"}]}]}]},{"dropdown":"Payment Acceptance","icon":"https://mintlify-assets.b-cdn.net/commerceProduct-1.svg","groups":[{"group":"PAYMENT ACCEPTANCE","pages":[{"title":"Overview","sidebarTitle":"Overview","href":"/api-reference/payment-acceptance/overview"},{"group":"Payments","pages":[{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/payments","title":"Create payment","href":"/api-reference/payment-acceptance/payments/create-payment"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml get /api/v1/payments/{id}","title":"Get payment","href":"/api-reference/payment-acceptance/payments/get-payment"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/payments/{paymentId}/authorize","title":"Authorize payment","href":"/api-reference/payment-acceptance/payments/authorize-payment"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/payments/{paymentId}/capture","title":"Capture payment","href":"/api-reference/payment-acceptance/payments/capture-payment"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/payments/{paymentId}/void","title":"Void payment","href":"/api-reference/payment-acceptance/payments/void-payment"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/payments/{paymentId}/refund","title":"Refund payment","href":"/api-reference/payment-acceptance/payments/refund-payment"}]},{"group":"Operators","pages":[{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/operators","title":"Create Operator","href":"/api-reference/payment-acceptance/operators/create-operator"}]},{"group":"Campaigns","pages":[{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/campaigns","title":"Create campaign","href":"/api-reference/payment-acceptance/campaigns/create-campaign"}]},{"group":"Rewards","pages":[{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/rewards/allocate","title":"Allocate rewards","href":"/api-reference/payment-acceptance/rewards/allocate-rewards"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/rewards/distribute","title":"Distribute rewards","href":"/api-reference/payment-acceptance/rewards/distribute-rewards"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/rewards/deallocate","title":"Deallocate rewards","href":"/api-reference/payment-acceptance/rewards/deallocate-rewards"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/rewards/send","title":"Send rewards","href":"/api-reference/payment-acceptance/rewards/send-rewards"}]},{"group":"Webhooks","pages":[{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml post /api/v1/webhooks","title":"Create webhook","href":"/api-reference/payment-acceptance/webhooks/create-webhook"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml get /api/v1/webhooks/{id}","title":"Get webhook","href":"/api-reference/payment-acceptance/webhooks/get-webhook"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml delete /api/v1/webhooks/{id}","title":"Delete webhook","href":"/api-reference/payment-acceptance/webhooks/delete-webhook"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml put /api/v1/webhooks/{id}","title":"Update webhook","href":"/api-reference/payment-acceptance/webhooks/update-webhook"}]},{"group":"Webhook Events","pages":[{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml get /api/v1/webhook-events","title":"List webhook events","href":"/api-reference/payment-acceptance/webhook-events/list-webhook-events"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml get /api/v1/webhook-events/payment-operation/{operationId}","title":"Get webhook events by payment operation ID","href":"/api-reference/payment-acceptance/webhook-events/get-webhook-events-by-payment-operation"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml get /api/v1/webhook-events/reward-operation/{operationId}","title":"Get webhook events by reward operation ID","href":"/api-reference/payment-acceptance/webhook-events/get-webhook-events-by-reward-operation"},{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml get /api/v1/webhook-events/{id}","title":"Get webhook event by ID","href":"/api-reference/payment-acceptance/webhook-events/get-webhook-event-by-id"}]},{"group":"Webhook Deliveries","pages":[{"openapi":"/api-reference/payment-acceptance/payment-acceptance-api.yaml get /api/v1/webhook-deliveries/event/{eventId}","title":"Get webhook deliveries by event ID","href":"/api-reference/payment-acceptance/webhook-deliveries/get-webhook-deliveries-by-event-id"}]},{"title":"OpenAPI Spec","sidebarTitle":"OpenAPI Spec","url":"https://docs.cdp.coinbase.com/api-reference/payment-acceptance/payment-acceptance-api.yaml","href":"/api-reference/payment-acceptance/openapi-spec"}]}]},{"dropdown":"Coinbase Advanced Trade API","icon":"https://mintlify-assets.b-cdn.net/advancedTradeProduct-1.svg","groups":[{"group":"REST API","pages":[{"title":"Welcome to Coinbase Advanced Trade API","sidebarTitle":"Overview","href":"/api-reference/advanced-trade-api/rest-api/introduction"},{"group":"Accounts","pages":[{"title":"Get Account","openapi":"GET /api/v3/brokerage/accounts/{account_uuid}","href":"/api-reference/advanced-trade-api/rest-api/accounts/get-account"},{"title":"List Accounts","openapi":"GET /api/v3/brokerage/accounts","href":"/api-reference/advanced-trade-api/rest-api/accounts/list-accounts"}]},{"group":"Convert","pages":[{"title":"Commit Convert Trade","openapi":"POST /api/v3/brokerage/convert/trade/{trade_id}","href":"/api-reference/advanced-trade-api/rest-api/convert/commit-convert-trade"},{"title":"Create Convert Quote","openapi":"POST /api/v3/brokerage/convert/quote","href":"/api-reference/advanced-trade-api/rest-api/convert/create-convert-quote"},{"title":"Get Convert Trade","openapi":"GET /api/v3/brokerage/convert/trade/{trade_id}","href":"/api-reference/advanced-trade-api/rest-api/convert/get-convert-trade"}]},{"group":"Data API","pages":[{"title":"Get API Key Permissions","openapi":"GET /api/v3/brokerage/key_permissions","href":"/api-reference/advanced-trade-api/rest-api/data-api/get-api-key-permissions"}]},{"group":"Fees","pages":[{"title":"Get Transaction Summary","openapi":"GET /api/v3/brokerage/transaction_summary","href":"/api-reference/advanced-trade-api/rest-api/fees/get-transaction-summary"}]},{"group":"US Derivatives","pages":[{"title":"Cancel Pending US Derivatives Sweep","openapi":"DELETE /api/v3/brokerage/cfm/sweeps","href":"/api-reference/advanced-trade-api/rest-api/futures/cancel-pending-futures-sweep"},{"title":"Get Current Margin Window","openapi":"GET /api/v3/brokerage/cfm/intraday/current_margin_window","href":"/api-reference/advanced-trade-api/rest-api/futures/get-current-margin-window"},{"title":"Get US Derivatives Balance Summary","openapi":"GET /api/v3/brokerage/cfm/balance_summary","href":"/api-reference/advanced-trade-api/rest-api/futures/get-futures-balance-summary"},{"title":"Get US Derivatives Position","openapi":"GET /api/v3/brokerage/cfm/positions/{product_id}","href":"/api-reference/advanced-trade-api/rest-api/futures/get-futures-position"},{"title":"Get Intraday Margin Setting","openapi":"GET /api/v3/brokerage/cfm/intraday/margin_setting","href":"/api-reference/advanced-trade-api/rest-api/futures/get-intraday-margin-setting"},{"title":"List US Derivatives Positions","openapi":"GET /api/v3/brokerage/cfm/positions","href":"/api-reference/advanced-trade-api/rest-api/futures/list-futures-positions"},{"title":"List US Derivatives Sweeps","openapi":"GET /api/v3/brokerage/cfm/sweeps","href":"/api-reference/advanced-trade-api/rest-api/futures/list-futures-sweeps"},{"title":"Schedule US Derivatives Sweep","openapi":"POST /api/v3/brokerage/cfm/sweeps/schedule","href":"/api-reference/advanced-trade-api/rest-api/futures/schedule-futures-sweep"},{"title":"Set Intraday Margin Setting","openapi":"POST /api/v3/brokerage/cfm/intraday/margin_setting","href":"/api-reference/advanced-trade-api/rest-api/futures/set-intraday-margin-settings"}]},{"group":"Orders","pages":[{"title":"Cancel Orders","openapi":"POST /api/v3/brokerage/orders/batch_cancel","href":"/api-reference/advanced-trade-api/rest-api/orders/cancel-order"},{"title":"Close Position","openapi":"POST /api/v3/brokerage/orders/close_position","href":"/api-reference/advanced-trade-api/rest-api/orders/close-position"},{"title":"Create Order","openapi":"POST /api/v3/brokerage/orders","href":"/api-reference/advanced-trade-api/rest-api/orders/create-order"},{"title":"Edit Order","openapi":"POST /api/v3/brokerage/orders/edit","href":"/api-reference/advanced-trade-api/rest-api/orders/edit-order"},{"title":"Edit Order Preview","openapi":"POST /api/v3/brokerage/orders/edit_preview","href":"/api-reference/advanced-trade-api/rest-api/orders/edit-order-preview"},{"title":"Get Order","openapi":"GET /api/v3/brokerage/orders/historical/{order_id}","href":"/api-reference/advanced-trade-api/rest-api/orders/get-order"},{"title":"List Fills","openapi":"GET /api/v3/brokerage/orders/historical/fills","href":"/api-reference/advanced-trade-api/rest-api/orders/list-fills"},{"title":"List Orders","openapi":"GET /api/v3/brokerage/orders/historical/batch","href":"/api-reference/advanced-trade-api/rest-api/orders/list-orders"},{"title":"Preview Order","openapi":"POST /api/v3/brokerage/orders/preview","href":"/api-reference/advanced-trade-api/rest-api/orders/preview-orders"}]},{"group":"Payment Methods","pages":[{"title":"Get Payment Method","openapi":"GET /api/v3/brokerage/payment_methods/{payment_method_id}","href":"/api-reference/advanced-trade-api/rest-api/payment-methods/get-payment-method"},{"title":"List Payment Methods","openapi":"GET /api/v3/brokerage/payment_methods","href":"/api-reference/advanced-trade-api/rest-api/payment-methods/list-payment-methods"}]},{"group":"International Derivatives","pages":[{"title":"Allocate Portfolio","openapi":"POST /api/v3/brokerage/intx/allocate","href":"/api-reference/advanced-trade-api/rest-api/perpetuals/allocate-portfolio"},{"title":"Get Perpetuals Portfolio Summary","openapi":"GET /api/v3/brokerage/intx/portfolio/{portfolio_uuid}","href":"/api-reference/advanced-trade-api/rest-api/perpetuals/get-perpetuals-portfolio-summary"},{"title":"Get Perpetuals Position","openapi":"GET /api/v3/brokerage/intx/positions/{portfolio_uuid}/{symbol}","href":"/api-reference/advanced-trade-api/rest-api/perpetuals/get-perpetuals-position"},{"title":"Get Portfolios Balances","openapi":"GET /api/v3/brokerage/intx/balances/{portfolio_uuid}","href":"/api-reference/advanced-trade-api/rest-api/perpetuals/get-portfolio-balances"},{"title":"List Perpetuals Positions","openapi":"GET /api/v3/brokerage/intx/positions/{portfolio_uuid}","href":"/api-reference/advanced-trade-api/rest-api/perpetuals/list-perpetuals-positions"},{"title":"Opt In or Out of Multi Asset Collateral","openapi":"POST /api/v3/brokerage/intx/multi_asset_collateral","href":"/api-reference/advanced-trade-api/rest-api/perpetuals/opt-in-or-out"}]},{"group":"Portfolios","pages":[{"title":"Create Portfolio","openapi":"POST /api/v3/brokerage/portfolios","href":"/api-reference/advanced-trade-api/rest-api/portfolios/create-portfolio"},{"title":"Delete Portfolio","openapi":"DELETE /api/v3/brokerage/portfolios/{portfolio_uuid}","href":"/api-reference/advanced-trade-api/rest-api/portfolios/delete-portfolio"},{"title":"Edit Portfolio","openapi":"PUT /api/v3/brokerage/portfolios/{portfolio_uuid}","href":"/api-reference/advanced-trade-api/rest-api/portfolios/edit-portfolio"},{"title":"Get Portfolio Breakdown","openapi":"GET /api/v3/brokerage/portfolios/{portfolio_uuid}","href":"/api-reference/advanced-trade-api/rest-api/portfolios/get-portfolio-breakdown"},{"title":"List Portfolios","openapi":"GET /api/v3/brokerage/portfolios","href":"/api-reference/advanced-trade-api/rest-api/portfolios/list-portfolios"},{"title":"Move Portfolio Funds","openapi":"POST /api/v3/brokerage/portfolios/move_funds","href":"/api-reference/advanced-trade-api/rest-api/portfolios/move-portfolios-funds"}]},{"group":"Products","pages":[{"title":"Get Best Bid/Ask","openapi":"GET /api/v3/brokerage/best_bid_ask","href":"/api-reference/advanced-trade-api/rest-api/products/get-best-bid-ask"},{"title":"Get Market Trades","openapi":"GET /api/v3/brokerage/products/{product_id}/ticker","href":"/api-reference/advanced-trade-api/rest-api/products/get-market-trades"},{"title":"Get Product","openapi":"GET /api/v3/brokerage/products/{product_id}","href":"/api-reference/advanced-trade-api/rest-api/products/get-product"},{"title":"Get Product Book","openapi":"GET /api/v3/brokerage/product_book","href":"/api-reference/advanced-trade-api/rest-api/products/get-product-book"},{"title":"Get Product Candles","openapi":"GET /api/v3/brokerage/products/{product_id}/candles","href":"/api-reference/advanced-trade-api/rest-api/products/get-product-candles"},{"title":"List Products","openapi":"GET /api/v3/brokerage/products","href":"/api-reference/advanced-trade-api/rest-api/products/list-products"}]},{"group":"Public","pages":[{"title":"Get Public Market Trades","openapi":"GET /api/v3/brokerage/market/products/{product_id}/ticker","href":"/api-reference/advanced-trade-api/rest-api/public/get-public-market-trades"},{"title":"Get Public Product","openapi":"GET /api/v3/brokerage/market/products/{product_id}","href":"/api-reference/advanced-trade-api/rest-api/public/get-public-product"},{"title":"Get Public Product Book","openapi":"GET /api/v3/brokerage/market/product_book","href":"/api-reference/advanced-trade-api/rest-api/public/get-public-product-book"},{"title":"Get Public Product Candles","openapi":"GET /api/v3/brokerage/market/products/{product_id}/candles","href":"/api-reference/advanced-trade-api/rest-api/public/get-public-product-candles"},{"title":"Get Server Time","openapi":"GET /api/v3/brokerage/time","href":"/api-reference/advanced-trade-api/rest-api/public/get-server-time"},{"title":"List Public Products","openapi":"GET /api/v3/brokerage/market/products","href":"/api-reference/advanced-trade-api/rest-api/public/list-public-products"}]}]}]},{"dropdown":"Coinbase App API","icon":"https://mintlify-assets.b-cdn.net/coinbase-0.svg","pages":[{"title":"Welcome to Coinbase App APIs","sidebarTitle":"Overview","href":"/coinbase-app/introduction/welcome"}]},{"dropdown":"Coinbase Business API","icon":"https://mintlify-assets.b-cdn.net/coinbase-0.svg","groups":[{"group":"REST API","pages":[{"title":"Welcome to Coinbase Business API","sidebarTitle":"Overview","href":"/api-reference/business-api/rest-api/introduction"},{"group":"Payment Links","pages":[{"title":"Payment Link API Reference","sidebarTitle":"Overview","href":"/api-reference/business-api/rest-api/payment-links/introduction"},{"openapi":"post /api/v1/payment-links","playground":"simple","title":"Create Payment Link","href":"/api-reference/business-api/rest-api/payment-links/create-payment-link"},{"openapi":"get /api/v1/payment-links","playground":"simple","title":"List Payment Links","href":"/api-reference/business-api/rest-api/payment-links/list-payment-links"},{"openapi":"get /api/v1/payment-links/{paymentLinkId}","playground":"simple","title":"Get Payment Link","href":"/api-reference/business-api/rest-api/payment-links/get-payment-link"},{"openapi":"post /api/v1/payment-links/{paymentLinkId}/deactivate","playground":"simple","title":"Deactivate Payment Link","href":"/api-reference/business-api/rest-api/payment-links/deactivate-payment-link"}]},{"group":"Checkouts","pages":[{"title":"Checkouts API Reference","sidebarTitle":"Overview","href":"/api-reference/business-api/rest-api/checkouts/introduction"},{"openapi":"post /api/v1/checkouts","playground":"simple","title":"Create Checkout","href":"/api-reference/business-api/rest-api/checkouts/create-checkout"},{"openapi":"get /api/v1/checkouts","playground":"simple","title":"List Checkouts","href":"/api-reference/business-api/rest-api/checkouts/list-checkouts"},{"openapi":"get /api/v1/checkouts/{id}","playground":"simple","title":"Get Checkout","href":"/api-reference/business-api/rest-api/checkouts/get-checkout"},{"openapi":"post /api/v1/checkouts/{id}/deactivate","playground":"simple","title":"Deactivate Checkout","href":"/api-reference/business-api/rest-api/checkouts/deactivate-checkout"},{"openapi":"post /api/v1/checkouts/{id}/refund","playground":"simple","title":"Refund Checkout","href":"/api-reference/business-api/rest-api/checkouts/refund-checkout"}]},{"group":"Invoicing","pages":[{"title":"Invoicing API Reference","sidebarTitle":"Overview","href":"/api-reference/business-api/rest-api/invoicing/introduction"},{"openapi":"get /api/v1/invoices","playground":"simple","title":"List Invoices","href":"/api-reference/business-api/rest-api/invoicing/list-invoices"},{"openapi":"get /api/v1/invoices/{invoiceUuid}","playground":"simple","title":"Get Invoice","href":"/api-reference/business-api/rest-api/invoicing/get-invoice"}]},{"group":"Advanced Trade APIs","pages":[{"title":"API Reference","url":"/api-reference/advanced-trade-api/rest-api/introduction","href":"/coinbase-business/advanced-trade-apis/api-reference"}]},{"group":"Transfer APIs","pages":[{"title":"Send Crypto","href":"/coinbase-business/transfer-apis/send-crypto"},{"title":"Onchain Addresses","href":"/coinbase-business/transfer-apis/onchain-addresses"},{"title":"Fiat Deposits","sidebarTitle":"Deposits Fiat","href":"/coinbase-business/transfer-apis/deposit-fiat"},{"title":"Fiat Withdrawals","sidebarTitle":"Withdrawals Fiat","href":"/coinbase-business/transfer-apis/withdraw-fiat"},{"title":"Travel Rule Fields for Crypto Sends Guide","sidebarTitle":"Travel Rule","href":"/coinbase-business/transfer-apis/travel-rule"},{"title":"Supported Virtual Asset Service Provider (VASP) Tables","sidebarTitle":"VASPs","href":"/coinbase-business/transfer-apis/vasps"}]},{"group":"Track APIs","pages":[{"title":"Accounts","href":"/coinbase-business/track-apis/accounts"},{"title":"Transactions","href":"/coinbase-business/track-apis/transactions"},{"title":"Data API - Currencies","sidebarTitle":"Currencies","href":"/coinbase-business/track-apis/currencies"},{"title":"Data API- Exchange Rates","sidebarTitle":"Exchange Rates","href":"/coinbase-business/track-apis/exchange-rates"},{"title":"Data API- Prices","sidebarTitle":"Prices","href":"/coinbase-business/track-apis/prices"},{"title":"Data API- Time","sidebarTitle":"Time","href":"/coinbase-business/track-apis/time"}]}]}]},{"dropdown":"Coinbase Exchange API","icon":"https://mintlify-assets.b-cdn.net/exchangeProduct-1.svg","groups":[{"group":"REST API","pages":[{"title":"Welcome to Coinbase Exchange API","sidebarTitle":"Overview","href":"/api-reference/exchange-api/rest-api/introduction"},{"title":"Exchange REST API Requests","sidebarTitle":"Requests","href":"/exchange/rest-api/requests"},{"title":"Exchange REST API Authentication","sidebarTitle":"Authentication","href":"/exchange/rest-api/authentication"},{"title":"REST Rate Limits Overview","sidebarTitle":"Rate Limits","href":"/exchange/rest-api/rate-limits"},{"title":"Exchange REST API Pagination","sidebarTitle":"Pagination","href":"/exchange/rest-api/pagination"},{"title":"Exchange REST API SDKs","sidebarTitle":"SDKs","href":"/exchange/rest-api/sdks"},{"title":"Exchange Types","sidebarTitle":"Types","href":"/exchange/rest-api/types"},{"group":"Accounts","pages":[{"title":"Get a single account by id","openapi":"GET /accounts/{account_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/accounts/get-single-account-by-id"},{"title":"Get a single account's holds","openapi":"GET /accounts/{account_id}/holds","playground":"simple","href":"/api-reference/exchange-api/rest-api/accounts/get-single-account-hold"},{"title":"Get a single account's ledger","openapi":"GET /accounts/{account_id}/ledger","playground":"simple","href":"/api-reference/exchange-api/rest-api/accounts/get-single-account-ledger"},{"title":"Get a single account's transfers","openapi":"GET /accounts/{account_id}/transfers","playground":"simple","href":"/api-reference/exchange-api/rest-api/accounts/get-single-account-transfer"},{"title":"Get all accounts for a profile","openapi":"GET /accounts","playground":"simple","href":"/api-reference/exchange-api/rest-api/accounts/get-all-account-profile"}]},{"group":"Address Book","pages":[{"title":"Add addresses","openapi":"POST /address-book","playground":"simple","href":"/api-reference/exchange-api/rest-api/address-book/add-addresses"},{"title":"Delete address","openapi":"DELETE /address-book/{id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/address-book/delete-address"},{"title":"Get address book","openapi":"GET /address-book","playground":"simple","href":"/api-reference/exchange-api/rest-api/address-book/get-address-book"},{"title":"Get counterparty address book","openapi":"get /address-book/counterparty","playground":"simple","href":"/api-reference/exchange-api/rest-api/address-book/get-counterparty-address-book"},{"openapi":"put /address-book/{id}","playground":"simple","title":"Update address book","href":"/api-reference/exchange-api/rest-api/address-book/update-address-book"}]},{"group":"Coinbase Accounts","pages":[{"title":"Generate crypto address","openapi":"POST /coinbase-accounts/{account_id}/addresses","playground":"simple","href":"/api-reference/exchange-api/rest-api/coinbase-accounts/generate-crypto-address"},{"title":"Get all Coinbase wallets","openapi":"GET /coinbase-accounts","playground":"simple","href":"/api-reference/exchange-api/rest-api/coinbase-accounts/get-all-coinbase-wallets"}]},{"group":"Conversions","pages":[{"title":"Convert currency","openapi":"POST /conversions","playground":"simple","href":"/api-reference/exchange-api/rest-api/conversions/convert-currency"},{"title":"Get a conversion","openapi":"GET /conversions/{conversion_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/conversions/get-a-conversion"},{"title":"Get all conversions","openapi":"GET /conversions","playground":"simple","href":"/api-reference/exchange-api/rest-api/conversions/get-all-conversions"},{"title":"Get conversion fee rates","openapi":"GET /conversions/fees","playground":"simple","href":"/api-reference/exchange-api/rest-api/conversions/get-conversion-fee-rates"}]},{"group":"Currencies","pages":[{"title":"Get a currency","openapi":"GET /currencies/{currency_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/currencies/get-a-currency"},{"title":"Get all known currencies","openapi":"GET /currencies","playground":"simple","href":"/api-reference/exchange-api/rest-api/currencies/get-all-known-currencies"}]},{"group":"Fees","pages":[{"title":"Get fees","openapi":"GET /fees","playground":"simple","href":"/api-reference/exchange-api/rest-api/fees/get-fee"}]},{"group":"Futures","pages":[{"title":"Get auto loan setting","openapi":"GET /margin/auto-loan","playground":"simple","href":"/api-reference/exchange-api/rest-api/futures/get-auto-loan-setting"},{"title":"Get USDC conversion","openapi":"GET /margin/usdc","playground":"simple","href":"/api-reference/exchange-api/rest-api/futures/get-usdc-conversion"},{"title":"Set auto loan","openapi":"POST /margin/auto-loan","playground":"simple","href":"/api-reference/exchange-api/rest-api/futures/set-auto-loan"},{"title":"Set USDC conversion","openapi":"POST /margin/usdc","playground":"simple","href":"/api-reference/exchange-api/rest-api/futures/set-usdc-conversion"}]},{"group":"Loan","pages":[{"title":"Get lending overview","openapi":"GET /loans/lending-overview","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/get-lending-overview"},{"title":"Get lending overview XM","openapi":"GET /loans/lending-overview-xm","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/get-lending-overview-xm"},{"title":"Get new loan preview","openapi":"GET /loans/loan-preview","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/get-new-loan-preview"},{"title":"Get loan preview XM","openapi":"GET /loans/loan-preview-xm","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/get-loan-preview-xm"},{"title":"Get principal repayment preview","openapi":"GET /loans/repayment-preview","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/get-principal-repayment-preview"},{"title":"Get repayment preview XM","openapi":"GET /loans/repayment-preview-xm","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/get-repayment-preview-xm"},{"title":"List interest charges","openapi":"GET /loans/interest/{loan_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/list-interest-charges"},{"title":"List interest rate history","openapi":"GET /loans/interest/history/{loan_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/list-interest-rate-history"},{"title":"List interest summaries","openapi":"GET /loans/interest","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/list-interest-summaries"},{"title":"List loan assets","openapi":"GET /loans/assets","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/list-loan-assets"},{"title":"List loans","openapi":"GET /loans","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/list-loans"},{"title":"List new loan options","openapi":"GET /loans/options","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/list-new-loan-options"},{"title":"Open new loan","openapi":"POST /loans/open","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/open-new-loan"},{"title":"Repay loan interest","openapi":"POST /loans/repay-interest","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/repay-loan-interest"},{"title":"Repay loan principal","openapi":"POST /loans/repay-principal","playground":"simple","href":"/api-reference/exchange-api/rest-api/loan/repay-loan-principal"}]},{"group":"Orders","pages":[{"title":"Cancel all orders","openapi":"DELETE /orders","playground":"simple","href":"/api-reference/exchange-api/rest-api/orders/cancel-all-orders"},{"title":"Cancel an order","openapi":"DELETE /orders/{order_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/orders/cancel-an-order"},{"title":"Create a new order","openapi":"POST /orders","playground":"simple","href":"/api-reference/exchange-api/rest-api/orders/create-new-order"},{"title":"Get all fills","openapi":"GET /fills","playground":"simple","href":"/api-reference/exchange-api/rest-api/orders/get-all-fills"},{"title":"Get all orders","openapi":"GET /orders","playground":"simple","href":"/api-reference/exchange-api/rest-api/orders/get-all-orders"},{"title":"Get single order","openapi":"GET /orders/{order_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/orders/get-single-order"}]},{"group":"Products","pages":[{"title":"Get all known trading pairs","openapi":"GET /products","playground":"simple","href":"/api-reference/exchange-api/rest-api/products/get-all-known-trading-pairs"},{"title":"Get all product volume","openapi":"GET /products/volume-summary","playground":"simple","href":"/api-reference/exchange-api/rest-api/products/get-all-product-volume"},{"title":"Get product book","openapi":"GET /products/{product_id}/book","playground":"simple","href":"/api-reference/exchange-api/rest-api/products/get-product-book"},{"title":"Get product candles","openapi":"GET /products/{product_id}/candles","playground":"simple","href":"/api-reference/exchange-api/rest-api/products/get-product-candles"},{"title":"Get product stats","openapi":"GET /products/{product_id}/stats","playground":"simple","href":"/api-reference/exchange-api/rest-api/products/get-product-stats"},{"title":"Get product ticker","openapi":"GET /products/{product_id}/ticker","playground":"simple","href":"/api-reference/exchange-api/rest-api/products/get-product-ticker"},{"title":"Get product trades","openapi":"GET /products/{product_id}/trades","playground":"simple","href":"/api-reference/exchange-api/rest-api/products/get-product-trades"},{"title":"Get single product","openapi":"GET /products/{product_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/products/get-single-product"}]},{"group":"Profiles","pages":[{"title":"Create a profile","openapi":"POST /profiles","playground":"simple","href":"/api-reference/exchange-api/rest-api/profiles/create-profile"},{"title":"Delete a profile","openapi":"PUT /profiles/{profile_id}/deactivate","playground":"simple","href":"/api-reference/exchange-api/rest-api/profiles/delete-profile"},{"title":"Get profile by id","openapi":"GET /profiles/{profile_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/profiles/get-profile-by-id"},{"title":"Get profiles","openapi":"GET /profiles","playground":"simple","href":"/api-reference/exchange-api/rest-api/profiles/get-profiles"},{"title":"Rename a profile","openapi":"PUT /profiles/{profile_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/profiles/rename-profile"},{"title":"Transfer funds between profiles","openapi":"POST /profiles/transfer","playground":"simple","href":"/api-reference/exchange-api/rest-api/profiles/transfer-funds-profile"}]},{"group":"Reports","pages":[{"title":"Create a report","openapi":"POST /reports","playground":"simple","href":"/api-reference/exchange-api/rest-api/reports/create-report"},{"title":"Get a report","openapi":"GET /reports/{report_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/reports/get-report"},{"title":"Get all reports","openapi":"GET /reports","playground":"simple","href":"/api-reference/exchange-api/rest-api/reports/get-all-reports"}]},{"group":"Transfers","pages":[{"title":"Deposit from Coinbase account","openapi":"POST /deposits/coinbase-account","playground":"simple","href":"/api-reference/exchange-api/rest-api/transfers/deposit-from-coinbase-account"},{"title":"Deposit from payment method","openapi":"POST /deposits/payment-method","playground":"simple","href":"/api-reference/exchange-api/rest-api/transfers/deposit-from-payment-method"},{"title":"Get a single transfer","openapi":"GET /transfers/{transfer_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/transfers/get-single-transfer"},{"title":"Get all payment methods","openapi":"GET /payment-methods","playground":"simple","href":"/api-reference/exchange-api/rest-api/transfers/get-all-payment-methods"},{"title":"Get all transfers","openapi":"GET /transfers","playground":"simple","href":"/api-reference/exchange-api/rest-api/transfers/get-all-transfers"},{"title":"Get fee estimate for crypto withdrawal","openapi":"GET /withdrawals/fee-estimate","playground":"simple","href":"/api-reference/exchange-api/rest-api/transfers/get-fee-estimate"},{"title":"Submit travel information for a transfer","openapi":"POST /transfers/{transfer_id}/travel-rules","playground":"simple","href":"/api-reference/exchange-api/rest-api/transfers/submit-travel-info"},{"title":"Withdraw to Coinbase account","openapi":"POST /withdrawals/coinbase-account","playground":"simple","href":"/api-reference/exchange-api/rest-api/transfers/withdraw-to-coinbase-account"},{"title":"Withdraw to counterparty Id","openapi":"post /withdrawals/counterparty","playground":"simple","href":"/api-reference/exchange-api/rest-api/transfers/withdraw-to-counterparty"},{"title":"Withdraw to crypto address","openapi":"POST /withdrawals/crypto","playground":"simple","href":"/api-reference/exchange-api/rest-api/transfers/withdraw-to-crypto-address"},{"title":"Withdraw to payment method","openapi":"POST /withdrawals/payment-method","playground":"simple","href":"/api-reference/exchange-api/rest-api/transfers/withdraw-to-payment-method"}]},{"group":"Travel Rules","pages":[{"title":"Create travel rule entry","openapi":"POST /travel-rules","playground":"simple","href":"/api-reference/exchange-api/rest-api/travel-rules/create-travel-rule"},{"title":"Delete existing travel rule entry","openapi":"DELETE /travel-rules/{id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/travel-rules/delete-existing-travel-rule"},{"title":"Get all travel rule information","openapi":"GET /travel-rules","playground":"simple","href":"/api-reference/exchange-api/rest-api/travel-rules/get-all-travel-rule"}]},{"group":"Users","pages":[{"title":"Get user exchange limits","openapi":"GET /users/{user_id}/exchange-limits","playground":"simple","href":"/api-reference/exchange-api/rest-api/users/get-user-exchange-limits"},{"title":"Get user trading volume","openapi":"GET /users/{user_id}/trading-volumes","playground":"simple","href":"/api-reference/exchange-api/rest-api/users/get-user-trading-volume"},{"title":"Update settlement preference","openapi":"POST /users/{user_id}/settlement-preferences","playground":"simple","href":"/api-reference/exchange-api/rest-api/users/update-settlement-preference"}]},{"group":"Wrapped Assets","pages":[{"title":"Create a new redeem","openapi":"POST /wrapped-assets/redeem","playground":"simple","href":"/api-reference/exchange-api/rest-api/wrapped-assets/create-new-redeem"},{"title":"Create a new stake-wrap","openapi":"POST /wrapped-assets/stake-wrap","playground":"simple","href":"/api-reference/exchange-api/rest-api/wrapped-assets/create-new-stake-wrap"},{"title":"Get a single redeem","openapi":"GET /wrapped-assets/redeem/{redeem_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/wrapped-assets/get-single-redeem"},{"title":"Get a single stake-wrap","openapi":"GET /wrapped-assets/stake-wrap/{stake_wrap_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/wrapped-assets/get-a-single-stake-wrap"},{"title":"Get all redeems","openapi":"GET /wrapped-assets/redeem","playground":"simple","href":"/api-reference/exchange-api/rest-api/wrapped-assets/get-all-redeems"},{"title":"Get all stake-wraps","openapi":"GET /wrapped-assets/stake-wrap","playground":"simple","href":"/api-reference/exchange-api/rest-api/wrapped-assets/get-all-stake-wraps"},{"title":"Get all wrapped assets","openapi":"GET /wrapped-assets","playground":"simple","href":"/api-reference/exchange-api/rest-api/wrapped-assets/get-all-wrapped-assets"},{"title":"Get wrapped asset conversion rate","openapi":"GET /wrapped-assets/{wrapped_asset_id}/conversion-rate","playground":"simple","href":"/api-reference/exchange-api/rest-api/wrapped-assets/get-wrapped-asset-conversion-rate"},{"title":"Get wrapped asset details","openapi":"GET /wrapped-assets/{wrapped_asset_id}","playground":"simple","href":"/api-reference/exchange-api/rest-api/wrapped-assets/get-wrapped-asset-details"}]}]},{"group":"FIX API","pages":[{"title":"Exchange FIX API Connectivity","sidebarTitle":"Connectivity","href":"/exchange/fix-api/connectivity"},{"title":"Exchange FIX Best Practices","sidebarTitle":"Best Practices","href":"/exchange/fix-api/best-practices"},{"title":"FIX Rate Limits Overview","sidebarTitle":"Rate Limits","href":"/exchange/fix-api/rate-limits"},{"title":"Exchange FIX Drop Copy 5.0","sidebarTitle":"Drop Copy","href":"/exchange/fix-api/drop-copy"},{"group":"Order Entry Messages","pages":[{"title":"Exchange FIX Order Entry Messages 5.0","sidebarTitle":"Order Entry Messages 5.0","href":"/exchange/fix-api/order-entry-messages/order-entry-messages5"},{"title":"Exchange Take Profit Stop Loss Orders","sidebarTitle":"TPSL Orders","href":"/exchange/fix-api/order-entry-messages/tpsl-orders"},{"title":"Exchange Limit With Funds Orders","sidebarTitle":"Limit With Funds Orders","href":"/exchange/fix-api/order-entry-messages/limit-orders"}]},{"title":"Exchange FIX Market Data Messages 5.0","sidebarTitle":"Market Data Messages","href":"/exchange/fix-api/market-data"},{"title":"Exchange FIX Dictionary Downloads","sidebarTitle":"Dictionary Downloads","href":"/exchange/fix-api/dictionary-downloads"}]},{"group":"Websocket Feed","pages":[{"title":"Exchange WebSocket Overview","sidebarTitle":"Overview","href":"/exchange/websocket-feed/overview"},{"title":"Exchange WebSocket Best Practices","sidebarTitle":"Best Practices","href":"/exchange/websocket-feed/best-practices"},{"title":"Exchange WebSocket Authentication","sidebarTitle":"Authentication","href":"/exchange/websocket-feed/authentication"},{"title":"Exchange WebSocket Channels","sidebarTitle":"Channels","href":"/exchange/websocket-feed/channels"},{"title":"Exchange WebSocket Rate Limits","sidebarTitle":"Rate Limits","href":"/exchange/websocket-feed/rate-limits"},{"title":"Exchange WebSocket Errors","sidebarTitle":"Errors","href":"/exchange/websocket-feed/errors"}]}]},{"dropdown":"Coinbase International Exchange API","icon":"https://mintlify-assets.b-cdn.net/internationalExchangeProduct-0.svg","groups":[{"group":"REST API","pages":[{"title":"Welcome to Coinbase INTX API","sidebarTitle":"Overview","href":"/api-reference/international-exchange-api/rest-api/introduction"},{"title":"INTX REST API Authentication","sidebarTitle":"Authentication","href":"/api-reference/international-exchange-api/rest-api/authentication"},{"group":"Address Book","pages":[{"title":"Get address book","openapi":"GET /api/v1/address-book","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/address-book/get-address-book"}]},{"group":"Assets","pages":[{"title":"Get asset details","openapi":"GET /api/v1/assets/{asset}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/assets/get-asset-details"},{"title":"Get supported networks per asset","openapi":"GET /api/v1/assets/{asset}/networks","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/assets/get-supported-networks"},{"title":"List assets","openapi":"GET /api/v1/assets","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/assets/list-assets"}]},{"group":"Fee Rates","pages":[{"title":"List fee rate tiers","openapi":"GET /api/v1/fee-rate-tiers","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/fee-rates/list-fee-rate-tiers"}]},{"group":"Index","pages":[{"title":"Get index candles","openapi":"GET /api/v1/index/{index}/candles","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/index/get-index-candles"},{"title":"Get index composition","openapi":"GET /api/v1/index/{index}/composition","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/index/get-index-composition"},{"title":"Get index composition history","openapi":"GET /api/v1/index/{index}/composition-history","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/index/get-index-composition-history"},{"title":"Get index price","openapi":"GET /api/v1/index/{index}/price","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/index/get-index-price"}]},{"group":"Instruments","pages":[{"title":"Get aggregated candles data per instrument","openapi":"GET /api/v1/instruments/{instrument}/candles","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/instruments/get-aggegated-candles"},{"title":"Get daily trading volumes","openapi":"GET /api/v1/instruments/volumes/daily","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/instruments/get-daily-trading-volume"},{"title":"Get historical funding rates","openapi":"GET /api/v1/instruments/{instrument}/funding","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/instruments/get-historical-funding-rate"},{"title":"Get instrument details","openapi":"GET /api/v1/instruments/{instrument}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/instruments/get-instrument-details"},{"title":"Get quote per instrument","openapi":"GET /api/v1/instruments/{instrument}/quote","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/instruments/get-quote-per-instrument"},{"title":"List instruments","openapi":"GET /api/v1/instruments","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/instruments/list-instruments"}]},{"group":"Orders","pages":[{"title":"Cancel order","openapi":"DELETE /api/v1/orders/{id}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/orders/cancel-order"},{"title":"Cancel orders","openapi":"DELETE /api/v1/orders","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/orders/cancel-orders"},{"title":"Create order","openapi":"POST /api/v1/orders","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/orders/create-order"},{"title":"Get order details","openapi":"GET /api/v1/orders/{id}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/orders/get-order-details"},{"title":"List open orders","openapi":"GET /api/v1/orders","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/orders/list-open-orders"},{"title":"Modify open order","openapi":"PUT /api/v1/orders/{id}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/orders/modify-open-order"}]},{"group":"Portfolios","pages":[{"title":"Acquire/repay loan","openapi":"POST /api/v1/portfolios/{portfolio}/loans/{asset}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/acquire-and-repay-loan"},{"title":"Create portfolio","openapi":"POST /api/v1/portfolios","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/create-portfolio"},{"title":"Enable/Disable portfolio auto margin mode","openapi":"POST /api/v1/portfolios/{portfolio}/auto-margin-enabled","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/enable-and-disable-portfolio"},{"title":"Enable/Disable portfolio cross collateral","openapi":"POST /api/v1/portfolios/{portfolio}/cross-collateral-enabled","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/enable-and-disable-cross"},{"title":"Get balance for portfolio/asset","openapi":"GET /api/v1/portfolios/{portfolio}/balances/{asset}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/get-balance-for-assests"},{"title":"Get fund transfer limit between portfolios","openapi":"GET /api/v1/portfolios/transfer/{portfolio}/{asset}/transfer-limit","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/get-fund-transfer-limit"},{"title":"Get loan info for portfolio/asset","openapi":"GET /api/v1/portfolios/{portfolio}/loans/{asset}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/get-loan-info-for-portfolio"},{"title":"Get portfolio details","openapi":"GET /api/v1/portfolios/{portfolio}/detail","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/get-portfolio-details"},{"title":"Get portfolio margin call status","openapi":"GET /api/v1/portfolios/{portfolio}/margin-call-status","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/get-portfolio-margin-call"},{"title":"Get portfolio summary","openapi":"GET /api/v1/portfolios/{portfolio}/summary","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/get-portfolio-summary"},{"title":"Get position for portfolio/instrument","openapi":"GET /api/v1/portfolios/{portfolio}/positions/{instrument}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/get-position-portfolio"},{"title":"Get the open position limits for the portfolio instrument","openapi":"GET /api/v1/portfolios/{portfolio}/position-limits/positions/{instrument}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/get-the-open-position-limits"},{"title":"Get the total open position limit for the portfolio","openapi":"GET /api/v1/portfolios/{portfolio}/position-limits","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/get-the-total-open-position-limits"},{"title":"Get user portfolio","openapi":"GET /api/v1/portfolios/{portfolio}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/get-user-portfolio"},{"title":"List active loans for the portfolio","openapi":"GET /api/v1/portfolios/{portfolio}/loans","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/list-active-loans-for-the-portfolio"},{"title":"List all user portfolios","openapi":"GET /api/v1/portfolios","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/list-all-user-portfolios"},{"title":"List fills by portfolios","openapi":"GET /api/v1/portfolios/fills","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/list-fills-portfolio"},{"title":"List portfolio balances","openapi":"GET /api/v1/portfolios/{portfolio}/balances","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/list-portfolio-balances"},{"title":"List portfolio fee rates","openapi":"GET /api/v1/portfolios/fee-rates","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/list-portfolio-fee-rates"},{"title":"List portfolio fills","openapi":"GET /api/v1/portfolios/{portfolio}/fills","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/list-portfolio-fills"},{"title":"List portfolio positions","openapi":"GET /api/v1/portfolios/{portfolio}/positions","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/list-portfolio-positions"},{"title":"List the open position limits for all instruments","openapi":"GET /api/v1/portfolios/{portfolio}/position-limits/positions","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/list-open-position-limit"},{"title":"Patch portfolio","openapi":"PATCH /api/v1/portfolios/{portfolio}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/patch-portfolio"},{"title":"Preview loan update","openapi":"POST /api/v1/portfolios/{portfolio}/loans/{asset}/preview","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/preview-loan-update"},{"title":"Set portfolio margin override","openapi":"POST /api/v1/portfolios/margin","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/set-profile-margin"},{"title":"Transfer funds between portfolios","openapi":"POST /api/v1/portfolios/transfer","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/transfer-funds"},{"title":"Transfer positions between portfolios","openapi":"POST /api/v1/portfolios/transfer-position","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/transfer-positions"},{"title":"Update portfolio","openapi":"PUT /api/v1/portfolios/{portfolio}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/update-portfolio"},{"title":"View max loan availability","openapi":"GET /api/v1/portfolios/{portfolio}/loans/{asset}/availability","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/portfolios/view-max-loan"}]},{"group":"Position Offsets","pages":[{"title":"List position offsets","openapi":"GET /api/v1/position-offsets","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/position-offsets/list-position-offsets"}]},{"group":"Rankings","pages":[{"title":"Get your rankings","openapi":"GET /api/v1/rankings/statistics","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/rankings/get-your-rankings"}]},{"group":"Transfers","pages":[{"title":"Create counterparty Id","openapi":"POST /api/v1/transfers/create-counterparty-id","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/transfers/create-counterparty-id"},{"title":"Create crypto address","openapi":"POST /api/v1/transfers/address","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/transfers/create-crypto-address"},{"title":"Get counterparty withdrawal limit","openapi":"GET /api/v1/transfers/withdraw/{portfolio}/{asset}/counterparty-withdrawal-limit","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/transfers/get-counterparty-withdrawal-limit"},{"title":"Get transfer","openapi":"GET /api/v1/transfers/{transfer_uuid}","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/transfers/get-transfer"},{"title":"List matching transfers","openapi":"GET /api/v1/transfers","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/transfers/list-matching-transfers"},{"title":"Validate counterparty Id","openapi":"POST /api/v1/transfers/validate-counterparty-id","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/transfers/validate-counterparty-id"},{"title":"Withdraw to counterparty Id","openapi":"POST /api/v1/transfers/withdraw/counterparty","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/transfers/withdraw-to-counterparty-id"},{"title":"Withdraw to crypto address","openapi":"POST /api/v1/transfers/withdraw","playground":"simple","href":"/api-reference/international-exchange-api/rest-api/transfers/withdraw-to-crypto-address"}]}]},{"group":"FIX API","pages":[{"title":"INTX FIX API Overview","sidebarTitle":"Overview","href":"/international-exchange/fix-api/fix-api-overview"},{"title":"INTX FIX Dictionary Downloads","sidebarTitle":"Dictionary Downloads","href":"/international-exchange/fix-api/dictionary-downloads"},{"title":"INTX FIX Common Components","sidebarTitle":"Common Components","href":"/international-exchange/fix-api/common-components"},{"title":"INTX FIX Admin Messages","sidebarTitle":"Admin Messages","href":"/international-exchange/fix-api/admin-messages"},{"title":"INTX FIX Order Entry Messages","sidebarTitle":"Order Entry Messages","href":"/international-exchange/fix-api/order-entry-messages"},{"title":"INTX Take Profit Stop Loss Orders","sidebarTitle":"TPSL Orders","href":"/international-exchange/fix-api/tpsl-orders"},{"title":"INTX FIX Market Data Messages","sidebarTitle":"Market Data Messages","href":"/international-exchange/fix-api/market-data"},{"title":"INTX FIX Drop Copy Messages","sidebarTitle":"Drop Copy Messages","href":"/international-exchange/fix-api/drop-copy"}]},{"group":"WEBSOCKET FEED","pages":[{"title":"INTX WebSocket Overview","sidebarTitle":"Overview","href":"/international-exchange/websocket-feed/websocket-overview"},{"title":"INTX WebSocket Authentication","sidebarTitle":"Authentication","href":"/international-exchange/websocket-feed/authentication"},{"title":"INTX WebSocket Channels","sidebarTitle":"Channels","href":"/international-exchange/websocket-feed/channels"},{"title":"INTX WebSocket Errors","sidebarTitle":"Errors","href":"/international-exchange/websocket-feed/errors"}]}]},{"dropdown":"Coinbase Prime API","icon":"https://mintlify-assets.b-cdn.net/primeProduct-1.svg","groups":[{"group":"REST API","pages":[{"title":"Welcome to Coinbase Prime API","sidebarTitle":"Overview","href":"/api-reference/prime-api/rest-api/introduction"},{"title":"Prime Overview","href":"/prime/concepts/overview"},{"title":"Prime REST API Requests","sidebarTitle":"Requests","href":"/prime/rest-api/requests"},{"title":"Prime REST API Rate Limits","sidebarTitle":"Rate Limits","href":"/prime/rest-api/rate-limits"},{"title":"Prime REST API Authentication","sidebarTitle":"Authentication","href":"/prime/rest-api/authentication"},{"title":"Prime REST API Pagination","sidebarTitle":"Pagination","href":"/prime/rest-api/pagination"},{"title":"Prime REST API CLI Setup Guide","sidebarTitle":"CLI Setup","href":"/prime/rest-api/cli-setup"},{"title":"Prime REST API SDKs","sidebarTitle":"SDKs","href":"/prime/rest-api/sdks"},{"title":"Prime Types","sidebarTitle":"Types","href":"/prime/rest-api/types"},{"group":"Activities","pages":[{"title":"Get Activity by Activity ID","openapi":"GET /v1/activities/{activity_id}","playground":"simple","href":"/api-reference/prime-api/rest-api/activities/get-activity-by-activity-id"},{"title":"Get Portfolio Activity by Activity ID","openapi":"GET /v1/portfolios/{portfolio_id}/activities/{activity_id}","playground":"simple","href":"/api-reference/prime-api/rest-api/activities/get-portfolio-activity-by-activity-id"},{"title":"List Activities","openapi":"GET /v1/portfolios/{portfolio_id}/activities","playground":"simple","href":"/api-reference/prime-api/rest-api/activities/list-activities"},{"title":"List Entity Activities","openapi":"GET /v1/entities/{entity_id}/activities","playground":"simple","href":"/api-reference/prime-api/rest-api/activities/list-entity-activities"}]},{"group":"Address Book","pages":[{"title":"Get Address Book","openapi":"GET /v1/portfolios/{portfolio_id}/address_book","playground":"simple","href":"/api-reference/prime-api/rest-api/address-book/get-address-book"},{"title":"Create Address Book Entry","openapi":"POST /v1/portfolios/{portfolio_id}/address_book","playground":"simple","href":"/api-reference/prime-api/rest-api/address-book/create-address-book-entry"}]},{"group":"Advanced Transfer","pages":[{"openapi":"get /v1/portfolios/{portfolio_id}/counterparty","playground":"simple","title":"Get Portfolio Counterparty ID","href":"/api-reference/prime-api/rest-api/advanced-transfer/get-portfolio-counterparty-id"},{"openapi":"get /v1/portfolios/{portfolio_id}/advanced_transfers","playground":"simple","title":"List Advanced Transfers","href":"/api-reference/prime-api/rest-api/advanced-transfer/list-advanced-transfers"},{"openapi":"post /v1/portfolios/{portfolio_id}/advanced_transfers/{advanced_transfer_id}/cancel","playground":"simple","title":"Cancel Advanced Transfer","href":"/api-reference/prime-api/rest-api/advanced-transfer/cancel-advanced-transfer"},{"openapi":"post /v1/portfolios/{portfolio_id}/advanced_transfers","playground":"simple","title":"Create Advanced Transfer","href":"/api-reference/prime-api/rest-api/advanced-transfer/create-advanced-transfer"}]},{"group":"Allocations","pages":[{"title":"Get Allocation by ID","openapi":"GET /v1/portfolios/{portfolio_id}/allocations/{allocation_id}","playground":"simple","href":"/api-reference/prime-api/rest-api/allocations/get-allocation-by-id"},{"title":"Get Net Allocations by Netting ID","openapi":"GET /v1/portfolios/{portfolio_id}/allocations/net/{netting_id}","playground":"simple","href":"/api-reference/prime-api/rest-api/allocations/get-net-allocations-by-netting-id"},{"openapi":"get /v1/portfolios/{portfolio_id}/allocations","playground":"simple","title":"List Portfolio Allocations","href":"/api-reference/prime-api/rest-api/allocations/list-portfolio-allocations"},{"title":"Create Portfolio Allocations","openapi":"POST /v1/allocations","playground":"simple","href":"/api-reference/prime-api/rest-api/allocations/create-portfolio-allocations"},{"title":"Create Portfolio Net Allocations","openapi":"POST /v1/allocations/net","playground":"simple","href":"/api-reference/prime-api/rest-api/allocations/create-portfolio-net-allocations"}]},{"group":"Assets","pages":[{"title":"List Assets","openapi":"GET /v1/entities/{entity_id}/assets","playground":"simple","href":"/api-reference/prime-api/rest-api/assets/list-assets"}]},{"group":"Balances","pages":[{"title":"Get Wallet Balance","openapi":"GET /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/balance","playground":"simple","href":"/api-reference/prime-api/rest-api/balances/get-wallet-balance"},{"title":"List Entity Balances","openapi":"GET /v1/entities/{entity_id}/balances","playground":"simple","href":"/api-reference/prime-api/rest-api/balances/list-entity-balances"},{"title":"List Onchain Wallet Balances","openapi":"GET /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/web3_balances","playground":"simple","href":"/api-reference/prime-api/rest-api/balances/list-onchain-wallet-balances"},{"title":"List Portfolio Balances","openapi":"GET /v1/portfolios/{portfolio_id}/balances","playground":"simple","href":"/api-reference/prime-api/rest-api/balances/list-portfolio-balances"}]},{"group":"Commission","pages":[{"title":"Get Portfolio Commission","openapi":"GET /v1/portfolios/{portfolio_id}/commission","playground":"simple","href":"/api-reference/prime-api/rest-api/commission/get-portfolio-commission"}]},{"group":"Financing","pages":[{"openapi":"get /v1/entities/{entity_id}/conversion/fees","playground":"simple","title":"Get Conversion Fees (Beta)","href":"/api-reference/prime-api/rest-api/financing/get-conversion-fees-beta"},{"openapi":"get /v1/entities/{entity_id}/cross_margin/risk_parameters","playground":"simple","title":"Get Cross Margin Risk Parameters","href":"/api-reference/prime-api/rest-api/financing/get-cross-margin-risk-parameters"},{"title":"Get Entity Locate Availabilities","openapi":"GET /v1/entities/{entity_id}/locates_availability","playground":"simple","href":"/api-reference/prime-api/rest-api/financing/get-entity-locate-availabilities"},{"openapi":"get /v1/entities/{entity_id}/cross_margin","playground":"simple","title":"Get Exchange Cross Margin Overview","href":"/api-reference/prime-api/rest-api/financing/get-exchange-cross-margin-overview"},{"title":"Get Margin Information","openapi":"GET /v1/entities/{entity_id}/margin","playground":"simple","href":"/api-reference/prime-api/rest-api/financing/get-margin-information"},{"openapi":"get /v1/entities/{entity_id}/market_data","playground":"simple","title":"Get Market Data","href":"/api-reference/prime-api/rest-api/financing/get-market-data"},{"title":"Get Portfolio Buying Power","openapi":"GET /v1/portfolios/{portfolio_id}/buying_power","playground":"simple","href":"/api-reference/prime-api/rest-api/financing/get-portfolio-buying-power"},{"title":"Get Portfolio Credit Information","openapi":"GET /v1/portfolios/{portfolio_id}/credit","playground":"simple","href":"/api-reference/prime-api/rest-api/financing/get-portfolio-credit-information"},{"title":"Get Portfolio Withdrawal Power","openapi":"GET /v1/portfolios/{portfolio_id}/withdrawal_power","playground":"simple","href":"/api-reference/prime-api/rest-api/financing/get-portfolio-withdrawal-power"},{"openapi":"get /v2/entities/{entity_id}/cross_margin/prime","playground":"simple","title":"Get Prime Cross Margin Overview","href":"/api-reference/prime-api/rest-api/financing/get-prime-cross-margin-overview"},{"title":"Get Trade Finance Tiered Pricing Fees","openapi":"GET /v1/entities/{entity_id}/tf_tiered_fees","playground":"simple","href":"/api-reference/prime-api/rest-api/financing/get-trade-finance-tiered-pricing-fees"},{"title":"List Existing Locates","openapi":"GET /v1/portfolios/{portfolio_id}/locates","playground":"simple","href":"/api-reference/prime-api/rest-api/financing/list-existing-locates"},{"openapi":"get /v1/financing/eligible-assets","playground":"simple","title":"List Financing Eligible Assets","href":"/api-reference/prime-api/rest-api/financing/list-financing-eligible-assets"},{"title":"List Interest Accruals","openapi":"GET /v1/entities/{entity_id}/accruals","playground":"simple","href":"/api-reference/prime-api/rest-api/financing/list-interest-accruals"},{"title":"List Interest Accruals For Portfolio","openapi":"GET /v1/portfolios/{portfolio_id}/accruals","playground":"simple","href":"/api-reference/prime-api/rest-api/financing/list-interest-accruals-for-portfolio"},{"title":"List Margin Call Summaries","openapi":"GET /v1/entities/{entity_id}/margin_summaries","playground":"simple","href":"/api-reference/prime-api/rest-api/financing/list-margin-call-summaries"},{"title":"List Margin Conversions","openapi":"GET /v1/portfolios/{portfolio_id}/margin_conversions","playground":"simple","href":"/api-reference/prime-api/rest-api/financing/list-margin-conversions"},{"openapi":"get /v1/entities/{entity_id}/tf_obligations","playground":"simple","title":"List Trade Finance Obligations","href":"/api-reference/prime-api/rest-api/financing/list-trade-finance-obligations"},{"title":"Create New Locates","openapi":"POST /v1/portfolios/{portfolio_id}/locates","playground":"simple","href":"/api-reference/prime-api/rest-api/financing/create-new-locates"},{"openapi":"post /v1/entities/{entity_id}/funding_settings","playground":"simple","title":"Update Funding Settings","href":"/api-reference/prime-api/rest-api/financing/update-funding-settings"}]},{"group":"Futures","pages":[{"title":"Get Entity FCM Balance","openapi":"GET /v1/entities/{entity_id}/futures/balance_summary","playground":"simple","href":"/api-reference/prime-api/rest-api/futures/get-entity-fcm-balance"},{"title":"Get Entity Positions","openapi":"GET /v1/entities/{entity_id}/futures/positions","playground":"simple","href":"/api-reference/prime-api/rest-api/futures/get-entity-positions"},{"openapi":"get /v1/entities/{entity_id}/futures/equity","playground":"simple","title":"Get FCM Equity","href":"/api-reference/prime-api/rest-api/futures/get-fcm-equity"},{"title":"Get Margin Call Details","openapi":"GET /v1/entities/{entity_id}/futures/margin_call_details","playground":"simple","href":"/api-reference/prime-api/rest-api/futures/get-fcm-margin-call-details"},{"title":"Get Risk Limits","openapi":"GET /v1/entities/{entity_id}/futures/risk_limits","playground":"simple","href":"/api-reference/prime-api/rest-api/futures/get-fcm-risk-limits"},{"openapi":"get /v1/entities/{entity_id}/futures/settings","playground":"simple","title":"Get FCM Settings","href":"/api-reference/prime-api/rest-api/futures/get-fcm-settings"},{"title":"List Entity Futures Sweeps","openapi":"GET /v1/entities/{entity_id}/futures/sweeps","playground":"simple","href":"/api-reference/prime-api/rest-api/futures/list-entity-futures-sweeps"},{"title":"Schedule Entity Futures Sweep","openapi":"POST /v1/entities/{entity_id}/futures/sweeps","playground":"simple","href":"/api-reference/prime-api/rest-api/futures/schedule-entity-futures-sweep"},{"title":"Set Auto Sweep","openapi":"POST /v1/entities/{entity_id}/futures/auto_sweep","playground":"simple","href":"/api-reference/prime-api/rest-api/futures/set-auto-sweep"},{"openapi":"post /v1/entities/{entity_id}/futures/settings","playground":"simple","title":"Set FCM Settings","href":"/api-reference/prime-api/rest-api/futures/set-fcm-settings"},{"title":"Cancel Entity Futures Sweep","openapi":"delete /v1/entities/{entity_id}/futures/sweeps","playground":"simple","href":"/api-reference/prime-api/rest-api/futures/cancel-entity-futures-sweep"}]},{"group":"Invoice","pages":[{"title":"List Invoices","openapi":"GET /v1/entities/{entity_id}/invoices","playground":"simple","href":"/api-reference/prime-api/rest-api/invoice/list-invoices"}]},{"group":"Onchain Address Book","pages":[{"title":"List Onchain Address Groups","openapi":"GET /v1/portfolios/{portfolio_id}/onchain_address_groups","playground":"simple","href":"/api-reference/prime-api/rest-api/onchain-address-book/list-onchain-address-groups"},{"title":"Create Onchain Address Book Entry","openapi":"POST /v1/portfolios/{portfolio_id}/onchain_address_group","playground":"simple","href":"/api-reference/prime-api/rest-api/onchain-address-book/create-onchain-address-book-entry"},{"title":"Update Onchain Address Book Entry","openapi":"PUT /v1/portfolios/{portfolio_id}/onchain_address_group","playground":"simple","href":"/api-reference/prime-api/rest-api/onchain-address-book/update-onchain-address-book-entry"},{"title":"Delete Onchain Address Group","openapi":"DELETE /v1/portfolios/{portfolio_id}/onchain_address_group/{address_group_id}","playground":"simple","href":"/api-reference/prime-api/rest-api/onchain-address-book/delete-onchain-address-group"}]},{"group":"Orders","pages":[{"title":"Get Order by Order ID","openapi":"GET /v1/portfolios/{portfolio_id}/orders/{order_id}","playground":"simple","href":"/api-reference/prime-api/rest-api/orders/get-order-by-order-id"},{"title":"List Open Orders","openapi":"GET /v1/portfolios/{portfolio_id}/open_orders","playground":"simple","href":"/api-reference/prime-api/rest-api/orders/list-open-orders"},{"title":"List Order Edit History","openapi":"GET /v1/portfolios/{portfolio_id}/orders/{order_id}/edit_history","playground":"simple","href":"/api-reference/prime-api/rest-api/orders/list-order-edit-history"},{"title":"List Order Fills","openapi":"GET /v1/portfolios/{portfolio_id}/orders/{order_id}/fills","playground":"simple","href":"/api-reference/prime-api/rest-api/orders/list-order-fills"},{"title":"List Portfolio Fills","openapi":"GET /v1/portfolios/{portfolio_id}/fills","playground":"simple","href":"/api-reference/prime-api/rest-api/orders/list-portfolio-fills"},{"title":"List Portfolio Orders","openapi":"GET /v1/portfolios/{portfolio_id}/orders","playground":"simple","href":"/api-reference/prime-api/rest-api/orders/list-portfolio-orders"},{"title":"Accept Quote","openapi":"POST /v1/portfolios/{portfolio_id}/accept_quote","playground":"simple","href":"/api-reference/prime-api/rest-api/orders/accept-quote"},{"title":"Cancel Order","openapi":"POST /v1/portfolios/{portfolio_id}/orders/{order_id}/cancel","playground":"simple","href":"/api-reference/prime-api/rest-api/orders/cancel-order"},{"title":"Create Order","openapi":"POST /v1/portfolios/{portfolio_id}/order","playground":"simple","href":"/api-reference/prime-api/rest-api/orders/create-order"},{"title":"Create Quote Request","openapi":"POST /v1/portfolios/{portfolio_id}/rfq","playground":"simple","href":"/api-reference/prime-api/rest-api/orders/create-quote-request"},{"title":"Get Order Preview","openapi":"POST /v1/portfolios/{portfolio_id}/order_preview","playground":"simple","href":"/api-reference/prime-api/rest-api/orders/get-order-preview"},{"title":"Edit Order (Beta)","openapi":"PUT /v1/portfolios/{portfolio_id}/orders/{order_id}/edit","playground":"simple","href":"/api-reference/prime-api/rest-api/orders/edit-order-beta"}]},{"group":"Payment Methods","pages":[{"title":"Get Entity Payment Method","openapi":"GET /v1/entities/{entity_id}/payment-methods/{payment_method_id}","playground":"simple","href":"/api-reference/prime-api/rest-api/payment-methods/get-entity-payment-method"},{"title":"List Entity Payment Methods","openapi":"GET /v1/entities/{entity_id}/payment-methods","playground":"simple","href":"/api-reference/prime-api/rest-api/payment-methods/list-entity-payment-methods"}]},{"group":"Portfolios","pages":[{"title":"Get Portfolio by Portfolio ID","openapi":"GET /v1/portfolios/{portfolio_id}","playground":"simple","href":"/api-reference/prime-api/rest-api/portfolios/get-portfolio-by-portfolio-id"},{"title":"List Portfolios","openapi":"GET /v1/portfolios","playground":"simple","href":"/api-reference/prime-api/rest-api/portfolios/list-portfolios"}]},{"group":"Positions","pages":[{"title":"List Aggregate Entity Positions","openapi":"GET /v1/entities/{entity_id}/aggregate_positions","playground":"simple","href":"/api-reference/prime-api/rest-api/positions/list-aggregate-entity-positions"},{"title":"List Entity Positions","openapi":"GET /v1/entities/{entity_id}/positions","playground":"simple","href":"/api-reference/prime-api/rest-api/positions/list-entity-positions"}]},{"group":"Products","pages":[{"openapi":"get /v1/portfolios/{portfolio_id}/candles","playground":"simple","title":"Get Public Product Candles (Beta)","href":"/api-reference/prime-api/rest-api/products/get-public-product-candles-beta"},{"title":"List Portfolio Products","openapi":"GET /v1/portfolios/{portfolio_id}/products","playground":"simple","href":"/api-reference/prime-api/rest-api/products/list-portfolio-products"}]},{"group":"Staking","pages":[{"openapi":"get /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/status","playground":"simple","title":"Get Staking Status","href":"/api-reference/prime-api/rest-api/staking/get-staking-status"},{"openapi":"get /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/unstake/status","playground":"simple","title":"Get Unstaking Status","href":"/api-reference/prime-api/rest-api/staking/get-unstaking-status"},{"title":"Claim Wallet Staking Rewards","openapi":"post /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/claim_rewards","playground":"simple","href":"/api-reference/prime-api/rest-api/staking/claim-wallet-staking-rewards-alpha"},{"title":"Query Transaction Validators","openapi":"post /v1/portfolios/{portfolio_id}/staking/transaction-validators/query","playground":"simple","href":"/api-reference/prime-api/rest-api/staking/list-transaction-validators"},{"openapi":"post /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/unstake/preview","playground":"simple","title":"Preview Unstake","href":"/api-reference/prime-api/rest-api/staking/preview-unstake"},{"title":"Request to stake currency in a portfolio","openapi":"post /v1/portfolios/{portfolio_id}/staking/initiate","playground":"simple","href":"/api-reference/prime-api/rest-api/staking/request-to-stake-currency-in-a-portfolio"},{"title":"Request to stake or delegate a wallet","openapi":"post /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/initiate","playground":"simple","href":"/api-reference/prime-api/rest-api/staking/request-to-stake-or-delegate-a-wallet"},{"title":"Request to unstake a wallet","openapi":"POST /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/staking/unstake","playground":"simple","href":"/api-reference/prime-api/rest-api/staking/request-to-unstake-a-wallet"},{"title":"Request to unstake currency across a portfolio","openapi":"post /v1/portfolios/{portfolio_id}/staking/unstake","playground":"simple","href":"/api-reference/prime-api/rest-api/staking/request-to-unstake-currency-across-a-portfolio"}]},{"group":"Transactions","pages":[{"title":"Get Transaction by Transaction ID","openapi":"GET /v1/portfolios/{portfolio_id}/transactions/{transaction_id}","playground":"simple","href":"/api-reference/prime-api/rest-api/transactions/get-transaction-by-transaction-id"},{"title":"List Portfolio Transactions","openapi":"GET /v1/portfolios/{portfolio_id}/transactions","playground":"simple","href":"/api-reference/prime-api/rest-api/transactions/list-portfolio-transactions"},{"openapi":"get /v1/portfolios/{portfolio_id}/advanced_transfers/{advanced_transfer_id}/transactions","playground":"simple","title":"List transactions associated with an Advanced Transfer","href":"/api-reference/prime-api/rest-api/transactions/list-transactions-associated-with-an-advanced-transfer"},{"title":"List Wallet Transactions","openapi":"GET /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transactions","playground":"simple","href":"/api-reference/prime-api/rest-api/transactions/list-wallet-transactions"},{"title":"Create Conversion","openapi":"POST /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/conversion","playground":"simple","href":"/api-reference/prime-api/rest-api/transactions/create-conversion"},{"title":"Create Onchain Transaction","openapi":"POST /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/onchain_transaction","playground":"simple","href":"/api-reference/prime-api/rest-api/transactions/create-onchain-transaction"},{"title":"Create Transfer","openapi":"POST /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/transfers","playground":"simple","href":"/api-reference/prime-api/rest-api/transactions/create-transfer"},{"title":"Create Withdrawal","openapi":"POST /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/withdrawals","playground":"simple","href":"/api-reference/prime-api/rest-api/transactions/create-withdrawal"}]},{"group":"Travel Rule","pages":[{"openapi":"get /v1/portfolios/{portfolio_id}/transactions/{transaction_id}/travel_rule","playground":"simple","title":"Get Transaction Travel Rule Data","href":"/api-reference/prime-api/rest-api/travel-rule/get-transaction-travel-rule-data"},{"openapi":"post /v1/portfolios/{portfolio_id}/transactions/{transaction_id}/travel_rule/deposit","playground":"simple","title":"Submit Deposit Travel Rule Data","href":"/api-reference/prime-api/rest-api/travel-rule/submit-deposit-travel-rule-data"}]},{"group":"Users","pages":[{"title":"List Portfolio Users","openapi":"GET /v1/portfolios/{portfolio_id}/users","playground":"simple","href":"/api-reference/prime-api/rest-api/users/list-portfolio-users"},{"title":"List Users","openapi":"GET /v1/entities/{entity_id}/users","playground":"simple","href":"/api-reference/prime-api/rest-api/users/list-users"}]},{"group":"Wallets","pages":[{"title":"Get Wallet by Wallet ID","openapi":"GET /v1/portfolios/{portfolio_id}/wallets/{wallet_id}","playground":"simple","href":"/api-reference/prime-api/rest-api/wallets/get-wallet-by-wallet-id"},{"title":"Get Wallet Deposit Instructions","openapi":"GET /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/deposit_instructions","playground":"simple","href":"/api-reference/prime-api/rest-api/wallets/get-wallet-deposit-instructions"},{"title":"List Portfolio Wallets","openapi":"GET /v1/portfolios/{portfolio_id}/wallets","playground":"simple","href":"/api-reference/prime-api/rest-api/wallets/list-portfolio-wallets"},{"title":"List Wallet Addresses","openapi":"GET /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/addresses","playground":"simple","href":"/api-reference/prime-api/rest-api/wallets/list-wallet-addresses"},{"title":"Create Wallet","openapi":"POST /v1/portfolios/{portfolio_id}/wallets","playground":"simple","href":"/api-reference/prime-api/rest-api/wallets/create-wallet"},{"title":"Create Wallet Deposit Address","openapi":"POST /v1/portfolios/{portfolio_id}/wallets/{wallet_id}/addresses","playground":"simple","href":"/api-reference/prime-api/rest-api/wallets/create-wallet-deposit-address"}]}]},{"group":"Websocket Feed","pages":[{"title":"Prime WebSocket Overview","sidebarTitle":"Overview","href":"/prime/websocket-feed/overview"},{"title":"Prime WebSocket Channels","sidebarTitle":"Channels","href":"/prime/websocket-feed/channels"}]},{"group":"FIX 4.2 API","pages":[{"title":"Prime FIX API Connectivity","sidebarTitle":"Connectivity","href":"/prime/fix-api/connectivity"},{"title":"Prime FIX Data Dictionaries","sidebarTitle":"Prime FIX Data Dictionaries","href":"/prime/fix-api/fix-data-dictionaries"},{"group":"Messages","pages":[{"title":"Prime FIX Administrative Messages","sidebarTitle":"Administrative Messages","href":"/prime/fix-api/admin-messages"},{"title":"Prime FIX Order Entry Messages","sidebarTitle":"Order Entry Messages","href":"/prime/fix-api/order-entry-messages"},{"title":"Prime FIX Market Data Messages","sidebarTitle":"Market Data Messages","href":"/prime/fix-api/market-data"}]}]},{"group":"FIX 5.0 API","tag":"Beta","pages":[{"title":"Prime FIX 5.0 Messages","sidebarTitle":"Overview","href":"/prime/fix-5-0-api/overview"}]}]},{"dropdown":"Coinbase Derivatives API","icon":"https://mintlify-assets.b-cdn.net/derivativesProduct-2.svg","groups":[{"group":"REST API Overview","pages":[{"title":"Welcome to the Coinbase Derivatives REST API","sidebarTitle":"Overview","href":"/api-reference/derivatives-api/rest-api/introduction"},{"title":"Coinbase Derivatives REST API Authentication","sidebarTitle":"Authentication","href":"/api-reference/derivatives-api/rest-api/authentication"}]},{"group":"REST Endpoints","pages":[{"group":"Block Trades","pages":[{"title":"Get Block Trades","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-trade","href":"/api-reference/derivatives-api/rest-api/block-trades/get-block-trades"},{"title":"Get Filtered Block Trades","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/block-trade","href":"/api-reference/derivatives-api/rest-api/block-trades/get-filtered-block-trades"},{"title":"Get Bookable Block Trade Accounts","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-trade/booking/bookable-accounts","href":"/api-reference/derivatives-api/rest-api/block-trades/get-bookable-block-trade-accounts"},{"title":"Get Bookable Block Trade Entities","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-trade/booking/bookable-entities","href":"/api-reference/derivatives-api/rest-api/block-trades/get-bookable-block-trade-entities"},{"title":"Get Bookable Block Traders","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-trade/booking/bookable-traders","href":"/api-reference/derivatives-api/rest-api/block-trades/get-bookable-block-traders"},{"title":"Book a Block Trade","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/block-trade/new","href":"/api-reference/derivatives-api/rest-api/block-trades/book-a-block-trade"}]},{"group":"Block Trade Accounts","pages":[{"title":"Get All Block Trade Account Permissions","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-trade-account-permissions","href":"/api-reference/derivatives-api/rest-api/block-trade-accounts/get-all-block-trade-account-permissions"},{"title":"Get Block Trade Account Permission","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-trade-account-permissions/{uuid}","href":"/api-reference/derivatives-api/rest-api/block-trade-accounts/get-block-trade-account-permission"},{"title":"Get All Block Trade Accounts","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-trade-accounts","href":"/api-reference/derivatives-api/rest-api/block-trade-accounts/get-all-block-trade-accounts"},{"title":"Get Block Trade Account","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-trade-accounts/{uuid}","href":"/api-reference/derivatives-api/rest-api/block-trade-accounts/get-block-trade-account"},{"title":"Get All Block Trade Position Limits","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-trade-position-limits","href":"/api-reference/derivatives-api/rest-api/block-trade-accounts/get-all-block-trade-position-limits"},{"title":"Get Block Trade Position Limit","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-trade-position-limits/{uuid}","href":"/api-reference/derivatives-api/rest-api/block-trade-accounts/get-block-trade-position-limit"}]},{"group":"Block Trade Entities","pages":[{"title":"Get All Block Trade Entities","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-trade-entities","href":"/api-reference/derivatives-api/rest-api/block-trade-entities/get-all-block-trade-entities"},{"title":"Get Block Trade Entity","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-trade-entities/{uuid}","href":"/api-reference/derivatives-api/rest-api/block-trade-entities/get-block-trade-entity"},{"title":"Get Block Trade Entities by Firm","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/firm-block-trade-entities/{firm_uuid}","href":"/api-reference/derivatives-api/rest-api/block-trade-entities/get-block-trade-entities-by-firm"}]},{"group":"Block Traders","pages":[{"title":"Get All Block Traders","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-traders","href":"/api-reference/derivatives-api/rest-api/block-traders/get-all-block-traders"},{"title":"Get Block Trader","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/block-traders/{uuid}","href":"/api-reference/derivatives-api/rest-api/block-traders/get-block-trader"}]},{"group":"Firm Position Limits","pages":[{"title":"List All Position Limits","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/firm-position-limits","href":"/api-reference/derivatives-api/rest-api/firm-position-limits/list-all-position-limits"},{"title":"Get Firm Position Limits","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/firm-position-limits/{firm_uuid}","href":"/api-reference/derivatives-api/rest-api/firm-position-limits/get-firm-position-limits"},{"title":"Update Firm Position Limits","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/firm-position-limits/{firm_uuid}","href":"/api-reference/derivatives-api/rest-api/firm-position-limits/update-firm-position-limits"},{"title":"List All Position Limits","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/v2/firm-position-limits","href":"/api-reference/derivatives-api/rest-api/firm-position-limits/list-all-position-limits-1"},{"title":"Get Firm Position Limits","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/v2/firm-position-limits/{firm_uuid}","href":"/api-reference/derivatives-api/rest-api/firm-position-limits/get-firm-position-limits-1"},{"title":"Update Firm Position Limits","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/v2/firm-position-limits/{firm_uuid}","href":"/api-reference/derivatives-api/rest-api/firm-position-limits/update-firm-position-limits-1"}]},{"group":"Firm Product Group Limits","pages":[{"title":"Create Zero Firm Product Group Limit","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/firm-product-group-limit","href":"/api-reference/derivatives-api/rest-api/firm-product-group-limits/create-zero-firm-product-group-limit"},{"title":"Remove Firm Product Group Limit","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/firm-product-group-limit/remove","href":"/api-reference/derivatives-api/rest-api/firm-product-group-limits/remove-firm-product-group-limit"},{"title":"Get Firm Product Group Limits","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/firm-product-group-limit/{firm_uuid}","href":"/api-reference/derivatives-api/rest-api/firm-product-group-limits/get-firm-product-group-limits"},{"title":"Create Zero Firm Product Group Limit","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/v2/firm-product-group-limit","href":"/api-reference/derivatives-api/rest-api/firm-product-group-limits/create-zero-firm-product-group-limit-1"},{"title":"Remove Firm Product Group Limit","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/v2/firm-product-group-limit/remove","href":"/api-reference/derivatives-api/rest-api/firm-product-group-limits/remove-firm-product-group-limit-1"},{"title":"Get Firm Product Group Limits","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/v2/firm-product-group-limit/{firm_uuid}","href":"/api-reference/derivatives-api/rest-api/firm-product-group-limits/get-firm-product-group-limits-1"}]},{"group":"Firm Product Limits","pages":[{"title":"Create Zero Firm Product Limit","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/firm-product-limit","href":"/api-reference/derivatives-api/rest-api/firm-product-limits/create-zero-firm-product-limit"},{"title":"Remove Firm Product Limit","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/firm-product-limit/remove","href":"/api-reference/derivatives-api/rest-api/firm-product-limits/remove-firm-product-limit"},{"title":"Get Firm Product Limits","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/firm-product-limit/{firm_uuid}","href":"/api-reference/derivatives-api/rest-api/firm-product-limits/get-firm-product-limits"},{"title":"Set Firm Product Limit","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/v2/firm-product-limit","href":"/api-reference/derivatives-api/rest-api/firm-product-limits/set-firm-product-limit"},{"title":"Batch Set Firm Product Limit","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/v2/firm-product-limit/batch","href":"/api-reference/derivatives-api/rest-api/firm-product-limits/batch-set-firm-product-limit"},{"title":"Remove Firm Product Limit","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/v2/firm-product-limit/remove","href":"/api-reference/derivatives-api/rest-api/firm-product-limits/remove-firm-product-limit-1"},{"title":"Get Firm Product Limits","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/v2/firm-product-limit/{firm_uuid}","href":"/api-reference/derivatives-api/rest-api/firm-product-limits/get-firm-product-limits-1"}]},{"group":"Firms","pages":[{"title":"Get All Firms","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/firms","href":"/api-reference/derivatives-api/rest-api/firms/get-all-firms"},{"title":"Get Firm","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/firms/{uuid}","href":"/api-reference/derivatives-api/rest-api/firms/get-firm"}]},{"group":"Funding Rate","pages":[{"title":"Get historical funding rates","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/funding-rate","href":"/api-reference/derivatives-api/rest-api/funding-rate/get-historical-funding-rates"}]},{"group":"Instruments","pages":[{"title":"Get Instrument Details","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/instruments","href":"/api-reference/derivatives-api/rest-api/instruments/get-instrument-details"},{"title":"Get Valid Series","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/valid-series","href":"/api-reference/derivatives-api/rest-api/instruments/get-valid-series"}]},{"group":"Risk","pages":[{"title":"Kill Switch","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/kill-switch","href":"/api-reference/derivatives-api/rest-api/risk/kill-switch"},{"title":"Unlock Trading","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json post /rest/unlock-trading","href":"/api-reference/derivatives-api/rest-api/risk/unlock-trading"}]},{"group":"Positions","pages":[{"title":"Get All Firm Positions","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/positions","href":"/api-reference/derivatives-api/rest-api/positions/get-all-firm-positions"},{"title":"Get Firm Position","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/positions/{firm_uuid}","href":"/api-reference/derivatives-api/rest-api/positions/get-firm-position"},{"title":"Get All Firm Positions","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/v2/positions","href":"/api-reference/derivatives-api/rest-api/positions/get-all-firm-positions-1"},{"title":"Get Firm Position","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/v2/positions/{firm_uuid}","href":"/api-reference/derivatives-api/rest-api/positions/get-firm-position-1"}]},{"group":"Users","pages":[{"title":"Get All Users","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/users","href":"/api-reference/derivatives-api/rest-api/users/get-all-users"},{"title":"Get User","deprecated":false,"version":null,"openapi":"/api-reference/derivatives-api/rest-api/cde-spec.json get /rest/users/{uuid}","href":"/api-reference/derivatives-api/rest-api/users/get-user"}]}]},{"group":"FIX","pages":[{"title":"Derivatives FIX Overview","sidebarTitle":"Overview","href":"/derivatives/fix/overview"},{"title":"Derivatives FIX Header/Trailer Messages","sidebarTitle":"Header/Trailer","href":"/derivatives/fix/header-trailer"},{"title":"Derivatives FIX Session Messages","sidebarTitle":"Session","href":"/derivatives/fix/session"},{"title":"Derivatives FIX Market Data Messages","sidebarTitle":"Market Data","href":"/derivatives/fix/market-data"},{"title":"Derivatives FIX Order Entry Messages","sidebarTitle":"Order Entry","href":"/derivatives/fix/order-entry"},{"title":"Derivatives FIX Drop Copy Messages","sidebarTitle":"Drop Copy","href":"/derivatives/fix/drop-copy"},{"title":"Derivatives FIX Security Definitions","sidebarTitle":"Security Definitions","href":"/derivatives/fix/security-definitions"},{"title":"Derivatives FIX Code Sets","sidebarTitle":"Code Sets","href":"/derivatives/fix/code-sets"}]},{"group":"SBE","pages":[{"title":"Derivatives SBE Overview","sidebarTitle":"Overview","href":"/derivatives/sbe/overview"},{"title":"Derivatives SBE Header Message","sidebarTitle":"Header","href":"/derivatives/sbe/header"},{"title":"Derivatives SBE Session Messages","sidebarTitle":"Session","href":"/derivatives/sbe/session"},{"title":"Derivatives SBE Order Entry Messages","sidebarTitle":"Order Entry","href":"/derivatives/sbe/order-entry"}]},{"group":"UDP","pages":[{"title":"Derivatives UDP Overview","href":"/derivatives/udp/overview"},{"sidebarTitle":"Message Structure","title":null,"href":"/derivatives/udp/message-structure"},{"title":"Derivatives UDP Realtime Incremental Updates","sidebarTitle":"Incrementals","href":"/derivatives/udp/incrementals"},{"title":"Derivatives UDP Periodic Snapshots","sidebarTitle":"Snapshots","href":"/derivatives/udp/snapshots"},{"title":"Derivatives UDP Retransmits","sidebarTitle":"Retransmits","href":"/derivatives/udp/retransmits"}]}]},{"dropdown":"CDP API V1","icon":"https://mintlify-assets.b-cdn.net/layerNetworks-3.svg","groups":[{"group":"CDP API V1","pages":[{"title":"Welcome to CDP APIs","sidebarTitle":"Overview","href":"/api-reference/introduction"},{"title":"API Authentication","sidebarTitle":"Authentication","href":"/api-reference/authentication"},{"title":"Networks","href":"/api-reference/networks"}]},{"group":"REST API","pages":[{"group":"Staking","pages":[{"title":"Build a new staking operation","openapi":"POST /v1/stake/build","href":"/api-reference/rest-api/staking/build-a-new-staking-operation"},{"title":"Fetch historical staking balances","openapi":"GET /v1/networks/{network_id}/addresses/{address_id}/stake/balances","href":"/api-reference/rest-api/staking/fetch-historical-staking-balances"},{"title":"Fetch staking rewards","openapi":"POST /v1/stake/rewards/search","href":"/api-reference/rest-api/staking/fetch-staking-rewards"},{"title":"Get latest staking operation","openapi":"GET /v1/networks/{network_id}/addresses/{address_id}/staking_operations/{staking_operation_id}","href":"/api-reference/rest-api/staking/get-latest-staking-operation"},{"title":"Get staking context","openapi":"POST /v1/stake/context","href":"/api-reference/rest-api/staking/get-staking-context"},{"title":"Get validator by ID","openapi":"GET /v1/networks/{network_id}/assets/{asset_id}/validators/{validator_id}","href":"/api-reference/rest-api/staking/get-validator-by-id"},{"title":"List validators","openapi":"GET /v1/networks/{network_id}/assets/{asset_id}/validators","href":"/api-reference/rest-api/staking/list-validators"}]},{"group":"Onramp/Offramp","pages":[{"title":"Create buy quote","openapi":"POST /v1/buy/quote","href":"/api-reference/rest-api/onramp-offramp/create-buy-quote"},{"title":"Create sell quote","openapi":"POST /v1/sell/quote","href":"/api-reference/rest-api/onramp-offramp/create-sell-quote"},{"title":"Create session token","openapi":"POST /v1/token","href":"/api-reference/rest-api/onramp-offramp/create-session-token"},{"title":"Get all offramp transactions","openapi":"GET /v1/sell/transactions","href":"/api-reference/rest-api/onramp-offramp/get-all-offramp-transactions"},{"title":"Get all onramp transactions","openapi":"GET /v1/buy/transactions","href":"/api-reference/rest-api/onramp-offramp/get-all-onramp-transactions"},{"title":"Get buy config","openapi":"GET /v1/buy/config","href":"/api-reference/rest-api/onramp-offramp/get-buy-config"},{"title":"Get buy options","openapi":"GET /v1/buy/options","href":"/api-reference/rest-api/onramp-offramp/get-buy-options"},{"title":"Get offramp transactions by ID","openapi":"GET /v1/sell/user/{partnerUserRef}/transactions","href":"/api-reference/rest-api/onramp-offramp/get-offramp-transactions-by-id"},{"title":"Get onramp transactions by ID","openapi":"GET /v1/buy/user/{partnerUserRef}/transactions","href":"/api-reference/rest-api/onramp-offramp/get-onramp-transactions-by-id"},{"title":"Get sell config","openapi":"GET /v1/sell/config","href":"/api-reference/rest-api/onramp-offramp/get-sell-config"},{"title":"Get sell options","openapi":"GET /v1/sell/options","href":"/api-reference/rest-api/onramp-offramp/get-sell-options"}]}]},{"group":"JSON-RPC API","pages":[{"title":"Core JSON-RPC Methods","sidebarTitle":"Core","href":"/api-reference/json-rpc-api/core"},{"title":"Paymaster JSON-RPC Methods","sidebarTitle":"Paymaster","href":"/api-reference/json-rpc-api/paymaster"},{"title":"Address History JSON-RPC Methods","sidebarTitle":"Address History","href":"/api-reference/json-rpc-api/address-history"}]}]}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks"}]},{"tab":"Recipes","pages":[{"title":"Recipes","href":"/get-started/demo-apps/learn"}]},{"tab":"Changelogs","pages":[{"title":"Changelogs","href":"/get-started/changelog"}]}]},"basePath":"","title":"Idempotency - Coinbase Developer Documentation","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":[],"chunks":[]}