
{/*
TODO checklist for each new L3 page:
1. Add nav entry in zudoku.config.tsx under Clearing items[]
2. Update prev on this page and next on the preceding page
3. Update next on this page and prev on the following page (if exists)
4. Add redirect in zudoku.config.tsx: { from: "/rest/[operationId]", to: "/rest-api/trading/clearing/[slug]" }
*/}

<EndpointPage
  breadcrumbs={[
    { label: "REST APIs", href: "/rest-api/rest-api" },
    { label: "Trading", href: "/rest-api/rest-api#trading" },
    { label: "Clearing", href: "/rest-api/trading/clearing" },
    { label: "TODO: Endpoint Title" },
  ]}
  title="TODO: Endpoint Title"
  method="POST"
  url="https://api.gemini.com/v1/TODO"
  description="TODO: description"
  example={{
    request: {
      method: "POST",
      url: "https://api.gemini.com/v1/TODO",
      headers: [
        { name: "X-GEMINI-APIKEY", value: "<string>" },
        { name: "X-GEMINI-PAYLOAD", value: "<string>" },
        { name: "X-GEMINI-SIGNATURE", value: "<string>" },
      ],
      body: {
        request: "/v1/TODO",
        nonce: "<nonce>",
      },
    },
  }}
  sections={[
    {
      heading: "Roles",
      children: (
        <>
          <p style={{ margin: "0 0 2px" }}>The API key you use to access this endpoint must have the Trader role assigned. See <a href="https://docs.gemini.com/roles#roles" style={{ color: "inherit", textDecorationLine: "underline" }}>Roles</a> for more information.</p>
          <p style={{ margin: 0 }}>The OAuth scope must have <InlineBadge>TODO:scope</InlineBadge> assigned to access this endpoint. See <a href="/authentication/oauth#oauth-scopes" style={{ color: "inherit", textDecorationLine: "underline" }}>OAuth Scopes</a> for more information.</p>
        </>
      ),
    },
    {
      heading: "Headers",
      children: <SpecHeaders operationId="TODO_OPERATION_ID" />,
    },
    {
      heading: "Request Body",
      children: (
        <ParamList
          exampleCode={`{\n  "request": "/v1/TODO",\n  "nonce": "<nonce>"\n}`}
          exampleLabel="Example request body"
          params={[
            { name: "request", type: "string", required: true, description: 'The literal string "/v1/TODO"', example: "/v1/TODO" },
            { name: "nonce", type: "number", required: true, description: "The nonce, as described in Private API Invocation" },
          ]}
        />
      ),
    },
    {
      heading: "Responses",
      children: (
        <ResponsesSection tabs={[
          {
            code: "200",
            description: "TODO: success description",
            params: [],
            example: `{}`,
          },
          { code: "400", description: "Bad request - malformed request or invalid parameters", params: [{ name: "result", type: "string", description: "Error" }, { name: "reason", type: "string", description: "A short description" }, { name: "message", type: "string", description: "Detailed error message" }], example: `{\n  "result": "error",\n  "reason": "InvalidSignature",\n  "message": "Invalid signature for this request"\n}` },
          { code: "401", description: "Unauthorized - missing or invalid authentication", params: [{ name: "result", type: "string", description: "Error" }, { name: "reason", type: "string", description: "A short description" }, { name: "message", type: "string", description: "Detailed error message" }], example: `{\n  "result": "error",\n  "reason": "MissingApikeyHeader",\n  "message": "Must provide 'X-GEMINI-APIKEY' header"\n}` },
          { code: "403", description: "API key fails IP filtering check", params: [{ name: "result", type: "string", description: "Error" }, { name: "reason", type: "string", description: "A short description" }, { name: "message", type: "string", description: "Detailed error message" }], example: `{\n  "result": "error",\n  "reason": "ApiKeyIpFilteringFailure",\n  "message": "ApiKey fails IP Filtering Check for some accounts"\n}` },
          { code: "404", description: "Resource not found", params: [{ name: "result", type: "string", description: "Error" }, { name: "reason", type: "string", description: "A short description" }, { name: "message", type: "string", description: "Detailed error message" }], example: `{\n  "result": "error",\n  "reason": "EndpointNotFound",\n  "message": "API entry point not found"\n}` },
          { code: "429", description: "Too many requests - you have exceeded the rate limit", params: [{ name: "result", type: "string", description: "Error" }, { name: "reason", type: "string", description: "A short description" }, { name: "message", type: "string", description: "Detailed error message" }], example: `{\n  "result": "error",\n  "reason": "Too Many Requests",\n  "message": "Too Many Requests"\n}` },
          { code: "500", description: "Internal server error", params: [{ name: "result", type: "string", description: "Error" }, { name: "reason", type: "string", description: "A short description" }, { name: "message", type: "string", description: "Detailed error message" }], example: `{\n  "result": "error",\n  "reason": "Internal Server Error",\n  "message": "Unexpected server error occurred."\n}` },
        ]} />
      ),
    },
  ]}
/>

<PageNavigation
  prev={{ label: "TODO: prev label", href: "/rest-api/trading/clearing/TODO-prev-slug" }}
  next={{ label: "TODO: next label", href: "/rest-api/trading/clearing/TODO-next-slug" }}
/>
