FIX API keys use the same key pair as the REST API: Ed25519 (recommended) or 2048-bit RSA. Generate a key pair and register the public key in your account profile, or generate one there. The API Key ID (UUID) is your SenderCompID.
The initiator sends a Logon message. The acceptor responds with either a Logon (success) or Logout (failure).
Do not send SenderSubID<50> on Logon. Kalshi rejects it with a Logout; send operator identity per message instead — on NewOrderSingle, OrderCancelRequest, or OrderCancelReplaceRequest.
Emit Expired<C> (150/39) for expiry-style system cancellations (CloseCancel and OrderExpiryCancel) instead of Canceled<4>
N
21007
EnableIocCancelReport
Partially filled IOC orders produce a cancel report
N
21008
PreserveOriginalOrderQty
OrderQty tag 38 always reflects original order quantity across all states
N
21026
AlwaysEmitNewBeforeTrade
Emit a standalone New<0> execution report before any Trade<F> report when both occur in the same matching cycle
N
21027
SplitCollateralReturn
Include per-trade collateral return breakdown (tags 21030/21031) on Execution Reports
N
21032
UseCapReservation
Reserve event contract daily cap headroom on order entry and replace. FCM members only, event-contract sessions only. Replace requires OrderID<37>, only after that order’s ExecType=New<0> report, one amend per order in flight. RFQ quote acceptances are not cap-reserved.
N
21035
AutoTransfer
Set Y on each Logon to automatically move shared FCM collateral between exchange shards for new orders and replacements. FCM event-contract order-entry sessions (KalshiNR/KalshiRT) only, excluding listeners. Omit ExDestination<100> or use -1. Disable automatic rebalancing while this option is enabled.
SendingTime in SignatureThe SendingTime in the PreHashString must match exactly the value in field 52 of the Logon message. Format: YYYYMMDD-HH:MM:SS.mmm.SendingTime must be within 30 seconds of the server’s current time, or the message will be rejected with SessionRejectReason<373>=10.
from base64 import b64encodefrom cryptography.hazmat.primitives import serializationprivate_key = serialization.load_pem_private_key(open('kalshi-fix.key', 'rb').read(), password=None)sending_time, msg_type, msg_seq_num = "20230809-05:28:18.035", "A", "1"sender_comp_id = "your-fix-api-key-uuid"target_comp_id = "KalshiNR" # Must match TargetCompID in tag 56msg_string = chr(1).join([sending_time, msg_type, msg_seq_num, sender_comp_id, target_comp_id])raw_data_value = b64encode(private_key.sign(msg_string.encode('utf-8'))).decode('utf-8')
from base64 import b64encodefrom Cryptodome.Signature import pssfrom Cryptodome.Hash import SHA256from Cryptodome.PublicKey import RSAprivate_key = RSA.import_key(open('kalshi-fix.key').read().encode('utf-8'))sending_time = "20230809-05:28:18.035"msg_type = "A"msg_seq_num = "1"sender_comp_id = "your-fix-api-key-uuid"target_comp_id = "KalshiNR" # Must match TargetCompID in tag 56msg_string = chr(1).join([ sending_time, msg_type, msg_seq_num, sender_comp_id, target_comp_id])msg_hash = SHA256.new(msg_string.encode('utf-8'))signature = pss.new(private_key).sign(msg_hash)raw_data_value = b64encode(signature).decode('utf-8')
Use one active FIX connection per API key. If Logon is rejected, inspect Text (58) in the Logout (35=5) response:
already exists: check for another connection using the same key before retrying.
rate limit exceeded or FIX logon service busy; retry with backoff: retry with exponential backoff and jitter.
Authentication, permission, or invalid-field errors: correct the issue before retrying.
Avoid overlapping reconnect attempts. Generate a fresh SendingTime and signature for each attempt, and follow the sequence-number and retransmission rules below.
Either side may initiate a Logout. The counterparty responds with a Logout, and the transport connection is terminated. If CancelOrdersOnDisconnect=Y was set on Logon, all open orders are canceled.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"API Documentation","colors":{"primary":"#00B67A","light":"#00DD94","dark":"#00B67A"},"logo":{"light":"https://mintcdn.com/kalshi-b198743e/koRHzlv9fsyF-jSm/logo-light.svg?fit=max\u0026auto=format\u0026n=koRHzlv9fsyF-jSm\u0026q=85\u0026s=bac849e081bbb1881bb945ea3e0464a8","dark":"https://mintcdn.com/kalshi-b198743e/koRHzlv9fsyF-jSm/logo-dark.svg?fit=max\u0026auto=format\u0026n=koRHzlv9fsyF-jSm\u0026q=85\u0026s=a4da341dfa9fb72cf3f2e94566447d0a"},"favicon":"https://mintcdn.com/kalshi-b198743e/koRHzlv9fsyF-jSm/favicon.png?fit=max\u0026auto=format\u0026n=koRHzlv9fsyF-jSm\u0026q=85\u0026s=292b09f2d750fdddf9861e6d016116dd","api":{"playground":{}},"thumbnails":{"appearance":"dark","background":"https://mintcdn.com/kalshi-b198743e/koRHzlv9fsyF-jSm/images/og-background.png?fit=max\u0026auto=format\u0026n=koRHzlv9fsyF-jSm\u0026q=85\u0026s=345c6286bc1878240df49e1dabe7a10f"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"kalshi-b198743e","hasAudioNarration":false,"actualSubdomain":"kalshi-b198743e","customDomains":["docs.kalshi.com"],"gitSource":{"type":"github","owner":"kalshi","repo":"exchange-infra","deployBranch":"dev","contentDirectory":"mintlify","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae3756b890fbf4d00686915","collectionId":"ed453434-58db-4f36-b826-4168238d5fb0","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae3756b890fbf4d00686915"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae3bb61f7d4b69ad614b8b0","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"REST","count":202},{"language":"default","tag":"Predictions APIs","count":148},{"language":"default","tag":"Perps APIs","count":101},{"language":"default","tag":"clearing-members","count":28},{"language":"default","tag":"WebSockets","count":25},{"language":"default","tag":"portfolio","count":25},{"language":"default","tag":"Concepts","count":21},{"language":"default","tag":"FIX","count":20},{"language":"default","tag":"communications","count":18},{"language":"default","tag":"orders","count":18}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","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":"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":"llms-txt-v2","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":"per-site-search-delta","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":"editor-private-page-search","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#navigation-items li[id=\"/changelog\"],.dark .docs-home-hero-bg-light{display:none}.docs-home-hero{position:relative;width:100%;height:24rem;overflow:hidden;margin-top:-1px;display:flex;align-items:center;justify-content:center}.docs-home-hero-bg{position:absolute;inset:0;height:24rem;background-size:100%;background-position:center;background-repeat:no-repeat}.docs-home-hero-bg-light{background-image:url(https://mintlify-assets.b-cdn.net/kalshi-bg.svg)}.docs-home-hero-bg-dark{display:none;background-image:url(https://mintlify-assets.b-cdn.net/kalshi-dark-bg.svg)}.dark .docs-home-hero-bg-dark{display:block}.docs-home-hero-content{position:absolute;width:min(45rem,calc(100% - 2rem));padding:0 1rem;text-align:center;color:#000}.dark .docs-home-hero-content{color:#fff}.docs-home-hero-title{margin:0;font-family:Inter,sans-serif;font-size:36px;font-weight:500;line-height:44px}.docs-home-hero-subtitle{margin-top:1rem;font-size:18px;font-weight:400;opacity:.6}.docs-home-hero-agreement{margin-top:.75rem;font-size:14px;font-weight:400}.docs-home-hero-agreement span{opacity:.6}.docs-home-hero-link{color:#00b67a;text-decoration:underline}html.dark .docs-home-hero-link{color:#00dd94}.docs-home-content{max-width:70rem;margin:4rem auto 8rem;padding:0 1.25rem}.docs-home-section-title{margin-top:3.25rem;margin-bottom:1.25rem;font-size:1.75rem;font-weight:650;line-height:2.25rem}.docs-home-section-title:first-child{margin-top:0}"}],"page":{"pagePath":"fix/authentication","slug":"/fix/authentication","pageMetadata":{"title":"Authentication \u0026 Sessions","description":"API key creation, logon, session lifecycle, and message retransmission","icon":"key","href":"/fix/authentication"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"API key creation, logon, session lifecycle, and message retransmission\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`api-key-setup`,children:`API Key Setup`}),`\n`,_jsxs(_components.p,{children:[`FIX API keys use the same key pair as the `,_jsx(_components.a,{href:`/getting_started/api_keys`,children:`REST API`}),`: Ed25519 (recommended) or 2048-bit RSA. Generate a key pair and register the public key in your `,_jsx(_components.a,{href:`https://kalshi.com/account/profile`,children:`account profile`}),`, or generate one there. The API Key ID (UUID) is your `,_jsx(_components.code,{children:`SenderCompID`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Ed25519`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` genpkey`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -algorithm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ed25519`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -out`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` kalshi-fix.key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pkey`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -in`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` kalshi-fix.key`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -pubout`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -out`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` kalshi-fix.pub`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# RSA`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` genpkey`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -algorithm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` RSA`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -pkeyopt`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rsa_keygen_bits:2048`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -out`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` kalshi-fix.key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rsa`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -in`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` kalshi-fix.key`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -pubout`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -out`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` kalshi-fix.pub`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`logon-35=a`,children:`Logon (35=A)`}),`\n`,_jsx(_components.p,{children:`The initiator sends a Logon message. The acceptor responds with either a Logon (success) or Logout (failure).`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Do not send `,_jsx(_components.code,{children:`SenderSubID\u003c50>`}),` on Logon. Kalshi rejects it with a Logout; send operator identity per message instead — on NewOrderSingle, OrderCancelRequest, or OrderCancelReplaceRequest.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`required-fields`,children:`Required Fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Tag`}),_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Description`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`98`}),_jsx(_components.td,{children:`EncryptMethod`}),_jsx(_components.td,{children:`Method of encryption`}),_jsx(_components.td,{children:`None\u003c0>`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`96`}),_jsx(_components.td,{children:`RawData`}),_jsx(_components.td,{children:`Client logon message signature`}),_jsx(_components.td,{children:`Base64 encoded signature`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`108`}),_jsx(_components.td,{children:`HeartbeatInt`}),_jsx(_components.td,{children:`Heartbeat interval (seconds)`}),_jsx(_components.td,{children:`N > 3`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`1137`}),_jsx(_components.td,{children:`DefaultApplVerID`}),_jsx(_components.td,{children:`Default application version`}),_jsx(_components.td,{children:`FIX50SP2\u003c9>`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`optional-fields`,children:`Optional Fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Tag`}),_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Description`}),_jsx(_components.th,{children:`Default`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`141`}),_jsx(_components.td,{children:`ResetSeqNumFlag`}),_jsxs(_components.td,{children:[`Reset sequence numbers on logon. `,_jsx(_components.strong,{children:`Must be Y for non-retransmission sessions.`})]}),_jsx(_components.td,{children:`N`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`8013`}),_jsx(_components.td,{children:`CancelOrdersOnDisconnect`}),_jsx(_components.td,{children:`Cancel orders on any disconnection (including graceful logout)`}),_jsx(_components.td,{children:`N`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`20126`}),_jsx(_components.td,{children:`ListenerSession`}),_jsxs(_components.td,{children:[`Listen-only session. `,_jsx(_components.strong,{children:`KalshiNR/RT only, requires SkipPendingExecReports=Y.`})]}),_jsx(_components.td,{children:`N`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`20127`}),_jsx(_components.td,{children:`ReceiveSettlementReports`}),_jsxs(_components.td,{children:[`Receive settlement reports. `,_jsx(_components.strong,{children:`KalshiNR, KalshiRT, and KalshiPT only. Defaults to Y on KalshiPT.`})]}),_jsx(_components.td,{children:`N (Y on KalshiPT)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`20200`}),_jsx(_components.td,{children:`MessageRetentionPeriod`}),_jsxs(_components.td,{children:[`How long session messages will be stored for retransmission, max of 72 hours. `,_jsx(_components.strong,{children:`KalshiRT and KalshiPT only.`})]}),_jsx(_components.td,{\"data-numeric\":`true`,children:`24`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`21005`}),_jsx(_components.td,{children:`UseDollars`}),_jsx(_components.td,{children:`Enable dollar-based price format for prices, including subpenny precision`}),_jsx(_components.td,{children:`N`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`21011`}),_jsx(_components.td,{children:`SkipPendingExecReports`}),_jsx(_components.td,{children:`Skip PENDING_{NEW|REPLACE|CANCEL} execution reports`}),_jsx(_components.td,{children:`N`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`21012`}),_jsx(_components.td,{children:`UseExpiredOrdStatus`}),_jsx(_components.td,{children:`Emit Expired\u003cC> (150/39) for expiry-style system cancellations (CloseCancel and OrderExpiryCancel) instead of Canceled\u003c4>`}),_jsx(_components.td,{children:`N`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`21007`}),_jsx(_components.td,{children:`EnableIocCancelReport`}),_jsx(_components.td,{children:`Partially filled IOC orders produce a cancel report`}),_jsx(_components.td,{children:`N`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`21008`}),_jsx(_components.td,{children:`PreserveOriginalOrderQty`}),_jsx(_components.td,{children:`OrderQty tag 38 always reflects original order quantity across all states`}),_jsx(_components.td,{children:`N`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`21026`}),_jsx(_components.td,{children:`AlwaysEmitNewBeforeTrade`}),_jsx(_components.td,{children:`Emit a standalone New\u003c0> execution report before any Trade\u003cF> report when both occur in the same matching cycle`}),_jsx(_components.td,{children:`N`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`21027`}),_jsx(_components.td,{children:`SplitCollateralReturn`}),_jsx(_components.td,{children:`Include per-trade collateral return breakdown (tags 21030/21031) on Execution Reports`}),_jsx(_components.td,{children:`N`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`21032`}),_jsx(_components.td,{children:`UseCapReservation`}),_jsxs(_components.td,{children:[`Reserve event contract daily cap headroom on order entry and replace. `,_jsx(_components.strong,{children:`FCM members only, event-contract sessions only.`}),` Replace requires `,_jsx(_components.code,{children:`OrderID\u003c37>`}),`, only after that order’s `,_jsx(_components.code,{children:`ExecType=New\u003c0>`}),` report, one amend per order in flight. RFQ quote acceptances are not cap-reserved.`]}),_jsx(_components.td,{children:`N`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`21035`}),_jsx(_components.td,{children:`AutoTransfer`}),_jsxs(_components.td,{children:[`Set `,_jsx(_components.code,{children:`Y`}),` on each Logon to automatically move shared FCM collateral between exchange shards for new orders and replacements. `,_jsxs(_components.strong,{children:[`FCM event-contract order-entry sessions (`,_jsx(_components.code,{children:`KalshiNR`}),`/`,_jsx(_components.code,{children:`KalshiRT`}),`) only, excluding listeners.`]}),` Omit `,_jsx(_components.code,{children:`ExDestination\u003c100>`}),` or use `,_jsx(_components.code,{children:`-1`}),`. Disable automatic rebalancing while this option is enabled.`]}),_jsx(_components.td,{children:`N`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`signature-generation`,children:`Signature Generation`}),`\n`,_jsx(_components.p,{children:`The RawData field must contain a base64-encoded signature of the pre-hash string: Ed25519 for Ed25519 keys, RSA-PSS with SHA-256 for RSA keys.`}),`\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:`PreHashString = SendingTime + SOH + MsgType + SOH + MsgSeqNum + SOH + SenderCompID + SOH + TargetCompID`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`SendingTime in Signature`})}),_jsxs(_components.p,{children:[`The SendingTime in the PreHashString must match `,_jsx(_components.strong,{children:`exactly`}),` the value in field 52 of the Logon message. Format: `,_jsx(_components.code,{children:`YYYYMMDD-HH:MM:SS.mmm`}),`.`]}),_jsxs(_components.p,{children:[`SendingTime must be within 30 seconds of the server’s current time, or the message will be rejected with `,_jsx(_components.code,{children:`SessionRejectReason\u003c373>=10`}),`.`]})]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python (Ed25519)`,numberOfLines:`10`,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:`10`,children:[_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:` base64 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` b64encode`})]}),`\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:` cryptography.hazmat.primitives `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` serialization`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`private_key `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` serialization.load_pem_private_key(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'kalshi-fix.key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'rb'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).read(), `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`password`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`None`}),_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:`sending_time, msg_type, msg_seq_num `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"20230809-05:28:18.035\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sender_comp_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your-fix-api-key-uuid\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`target_comp_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"KalshiNR\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Must match TargetCompID in tag 56`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`msg_string `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` chr`}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).join([sending_time, msg_type, msg_seq_num, sender_comp_id, target_comp_id])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`raw_data_value `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` b64encode(private_key.sign(msg_string.encode(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'utf-8'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))).decode(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'utf-8'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python (RSA)`,numberOfLines:`21`,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:`21`,children:[_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:` base64 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` b64encode`})]}),`\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:` Cryptodome.Signature `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pss`})]}),`\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:` Cryptodome.Hash `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` SHA256`})]}),`\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:` Cryptodome.PublicKey `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` RSA`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`private_key `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` RSA`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.import_key(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'kalshi-fix.key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).read().encode(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'utf-8'`}),_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:`sending_time `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"20230809-05:28:18.035\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`msg_type `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"A\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`msg_seq_num `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"1\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sender_comp_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your-fix-api-key-uuid\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`target_comp_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"KalshiNR\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Must match TargetCompID in tag 56`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`msg_string `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` chr`}),_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).join([`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sending_time, msg_type, msg_seq_num,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sender_comp_id, target_comp_id`})}),`\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:`msg_hash `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` SHA256`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.new(msg_string.encode(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'utf-8'`}),_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:`signature `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pss.new(private_key).sign(msg_hash)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`raw_data_value `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` b64encode(signature).decode(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'utf-8'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`reconnecting`,children:`Reconnecting`}),`\n`,_jsxs(_components.p,{children:[`Use one active FIX connection per API key. If Logon is rejected, inspect Text (`,_jsx(_components.code,{children:`58`}),`) in the Logout (`,_jsx(_components.code,{children:`35=5`}),`) response:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`already exists`}),`: check for another connection using the same key before retrying.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`rate limit exceeded`}),` or `,_jsx(_components.code,{children:`FIX logon service busy; retry with backoff`}),`: retry with exponential backoff and jitter.`]}),`\n`,_jsx(_components.li,{children:`Authentication, permission, or invalid-field errors: correct the issue before retrying.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Avoid overlapping reconnect attempts. Generate a fresh SendingTime and signature for each attempt, and follow the sequence-number and retransmission rules below.`}),`\n`,_jsx(Heading,{level:`2`,id:`heartbeat-\u0026-sequence-numbers`,children:`Heartbeat \u0026 Sequence Numbers`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Behavior`}),_jsx(_components.th,{children:`Detail`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Default heartbeat interval`}),_jsx(_components.td,{children:`30 seconds`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Missed heartbeat`}),_jsx(_components.td,{children:`Connection terminates if heartbeat response not received within interval`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Sequence number lower than expected`}),_jsx(_components.td,{children:`Connection terminated`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Sequence number higher than expected`}),_jsx(_components.td,{children:`Recoverable with ResendRequest (KalshiRT, KalshiPT only)`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`message-retransmission`,children:`Message Retransmission`}),`\n`,_jsxs(_components.p,{children:[`Message retransmission (ResendRequest, SequenceReset) is only supported on `,_jsx(_components.strong,{children:`KalshiRT`}),` and `,_jsx(_components.strong,{children:`KalshiPT`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`For all other sessions, `,_jsx(_components.code,{children:`ResetSeqNumFlag\u003c141>`}),` in the Logon message must always be `,_jsx(_components.code,{children:`Y`}),` or the Logon will be rejected.`]})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/fix/drop-copy`,children:`drop copy session`}),` provides an alternative way to query for missed execution reports. For a real-time streaming feed, see `,_jsx(_components.a,{href:`/fix/listener-sessions`,children:`Listener Sessions`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`resendrequest-35=2`,children:`ResendRequest (35=2)`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`KalshiRT and KalshiPT only.`}),` Lookback window limited to 24 hours (or up to 72 hours if `,_jsx(_components.code,{children:`MessageRetentionPeriod`}),` was set on Logon).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Tag`}),_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`7`}),_jsx(_components.td,{children:`BeginSeqNo`}),_jsx(_components.td,{children:`Lower bound (inclusive)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`16`}),_jsx(_components.td,{children:`EndSeqNo`}),_jsx(_components.td,{children:`Upper bound (inclusive)`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`logout-35=5`,children:`Logout (35=5)`}),`\n`,_jsxs(_components.p,{children:[`Either side may initiate a Logout. The counterparty responds with a Logout, and the transport connection is terminated. If `,_jsx(_components.code,{children:`CancelOrdersOnDisconnect=Y`}),` was set on Logon, all open orders are canceled.`]})]})}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":"Authentication \u0026 Sessions","description":"API key creation, logon, session lifecycle, and message retransmission","icon":"key","href":"/fix/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"API Key Setup","slug":"api-key-setup","depth":2,"children":[]},{"title":"Logon (35=A)","slug":"logon-35=a","depth":2,"children":[{"title":"Required Fields","slug":"required-fields","depth":3,"children":[]},{"title":"Optional Fields","slug":"optional-fields","depth":3,"children":[]},{"title":"Signature Generation","slug":"signature-generation","depth":3,"children":[]}]},{"title":"Reconnecting","slug":"reconnecting","depth":2,"children":[]},{"title":"Heartbeat \u0026 Sequence Numbers","slug":"heartbeat-\u0026-sequence-numbers","depth":2,"children":[]},{"title":"Message Retransmission","slug":"message-retransmission","depth":2,"children":[{"title":"ResendRequest (35=2)","slug":"resendrequest-35=2","depth":3,"children":[]}]},{"title":"Logout (35=5)","slug":"logout-35=5","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"kalshi-b198743e","siteName":"API Documentation","title":"Authentication \u0026 Sessions - API Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-13T20:31:35.338Z","originalFileLocation":"fix/authentication.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=\"system\"}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=\"description\" content=\"API key creation, logon, session lifecycle, and message retransmission\">\u003cmeta data-mint-head name=\"application-name\" content=\"API 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/kalshi-b198743e/_UdUeym1J95PnKJ_/_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/kalshi-b198743e/_UdUeym1J95PnKJ_/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/kalshi-b198743e/_UdUeym1J95PnKJ_/_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/kalshi-b198743e/_UdUeym1J95PnKJ_/_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/kalshi-b198743e/_UdUeym1J95PnKJ_/_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/kalshi-b198743e/_UdUeym1J95PnKJ_/_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/kalshi-b198743e/_UdUeym1J95PnKJ_/_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/kalshi-b198743e/_UdUeym1J95PnKJ_/_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/kalshi-b198743e/_UdUeym1J95PnKJ_/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication \u0026amp; Sessions - API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"API key creation, logon, session lifecycle, and message retransmission\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.kalshi.com/fix/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://kalshi-b198743e.mintlify.app/_mintlify/api/og/v2?division=FIX\u0026amp;title=Authentication+%26+Sessions\u0026amp;description=API+key+creation%2C+logon%2C+session+lifecycle%2C+and+message+retransmission\u0026amp;theme=59554236caa76c2d4ca00cb1\u0026amp;signature=f5d4e3fa90eb17a9b4ab222719c654ad429a093ec0f0e6613e065e5b8a35b315\">\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=\"Authentication \u0026amp; Sessions - API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"API key creation, logon, session lifecycle, and message retransmission\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://kalshi-b198743e.mintlify.app/_mintlify/api/og/v2?division=FIX\u0026amp;title=Authentication+%26+Sessions\u0026amp;description=API+key+creation%2C+logon%2C+session+lifecycle%2C+and+message+retransmission\u0026amp;theme=59554236caa76c2d4ca00cb1\u0026amp;signature=f5d4e3fa90eb17a9b4ab222719c654ad429a093ec0f0e6613e065e5b8a35b315\">\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/kalshi-b198743e/_UdUeym1J95PnKJ_/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#00B67A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.kalshi.com/fix/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/fix/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.kalshi.com/#organization\",\"name\":\"API Documentation\",\"url\":\"https://docs.kalshi.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/kalshi-b198743e/koRHzlv9fsyF-jSm/logo-light.svg?fit=max\u0026auto=format\u0026n=koRHzlv9fsyF-jSm\u0026q=85\u0026s=bac849e081bbb1881bb945ea3e0464a8\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.kalshi.com#website\",\"name\":\"API Documentation\",\"url\":\"https://docs.kalshi.com\",\"publisher\":{\"@id\":\"https://docs.kalshi.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.kalshi.com/fix/authentication#webpage\",\"url\":\"https://docs.kalshi.com/fix/authentication\",\"name\":\"Authentication \u0026 Sessions\",\"description\":\"API key creation, logon, session lifecycle, and message retransmission\",\"dateModified\":\"2026-10-13T20:31:35.338Z\",\"isPartOf\":{\"@id\":\"https://docs.kalshi.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.kalshi.com/fix/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.kalshi.com/fix/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"FIX\",\"item\":\"https://docs.kalshi.com/fix/common-components\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication \u0026 Sessions\",\"item\":\"https://docs.kalshi.com/fix/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.kalshi.com/fix/authentication#article\",\"headline\":\"Authentication \u0026 Sessions\",\"name\":\"Authentication \u0026 Sessions\",\"description\":\"API key creation, logon, session lifecycle, and message retransmission\",\"url\":\"https://docs.kalshi.com/fix/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.kalshi.com/fix/authentication#webpage\"},\"dateModified\":\"2026-10-13T20:31:35.338Z\",\"publisher\":{\"@id\":\"https://docs.kalshi.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.kalshi.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"API Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"API Documentation","nav":{"global":null,"tabs":[{"tab":"Welcome","pages":[{"title":"Welcome","href":"/welcome"}]},{"tab":"Quick Start","pages":[{"title":"Quick Start","href":"/getting_started/api_environments"}]},{"tab":"Concepts","pages":[{"title":"Concepts","href":"/getting_started/making_your_first_request"}]},{"tab":"Predictions APIs","groups":[{"group":"REST","pages":[{"title":"CF Benchmarks REST Passthrough","href":"/cfbenchmarks/rest-passthrough"},{"group":"exchange","pages":[{"title":"Get Exchange Status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /exchange/status","href":"/api-reference/exchange/get-exchange-status"},{"title":"Get Series Fee Changes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /series/fee_changes","href":"/api-reference/exchange/get-series-fee-changes"},{"title":"Get Exchange Schedule","deprecated":null,"version":null,"openapi":"/openapi.yaml get /exchange/schedule","href":"/api-reference/exchange/get-exchange-schedule"},{"title":"Get User Data Timestamp","deprecated":null,"version":null,"openapi":"/openapi.yaml get /exchange/user_data_timestamp","href":"/api-reference/exchange/get-user-data-timestamp"}]},{"group":"market","pages":[{"title":"Get Market Candlesticks","deprecated":null,"version":null,"openapi":"/openapi.yaml get /series/{series_ticker}/markets/{ticker}/candlesticks","href":"/api-reference/market/get-market-candlesticks"},{"title":"Get Trades","deprecated":null,"version":null,"openapi":"/openapi.yaml get /markets/trades","href":"/api-reference/market/get-trades"},{"title":"Get Market Orderbook","deprecated":null,"version":null,"openapi":"/openapi.yaml get /markets/{ticker}/orderbook","href":"/api-reference/market/get-market-orderbook"},{"title":"Get Multiple Market Orderbooks","deprecated":null,"version":null,"openapi":"/openapi.yaml get /markets/orderbooks","href":"/api-reference/market/get-multiple-market-orderbooks"},{"title":"Get Series","deprecated":null,"version":null,"openapi":"/openapi.yaml get /series/{series_ticker}","href":"/api-reference/market/get-series"},{"title":"Get Series List","deprecated":null,"version":null,"openapi":"/openapi.yaml get /series","href":"/api-reference/market/get-series-list"},{"title":"Get Markets","deprecated":null,"version":null,"openapi":"/openapi.yaml get /markets","href":"/api-reference/market/get-markets"},{"title":"Get Market","deprecated":null,"version":null,"openapi":"/openapi.yaml get /markets/{ticker}","href":"/api-reference/market/get-market"},{"title":"Batch Get Market Candlesticks","deprecated":null,"version":null,"openapi":"/openapi.yaml get /markets/candlesticks","href":"/api-reference/market/batch-get-market-candlesticks"}]},{"group":"events","pages":[{"title":"Get Event Candlesticks","deprecated":null,"version":null,"openapi":"/openapi.yaml get /series/{series_ticker}/events/{ticker}/candlesticks","href":"/api-reference/events/get-event-candlesticks"},{"title":"Get Events","deprecated":null,"version":null,"openapi":"/openapi.yaml get /events","href":"/api-reference/events/get-events"},{"title":"Get Multivariate Events","deprecated":null,"version":null,"openapi":"/openapi.yaml get /events/multivariate","href":"/api-reference/events/get-multivariate-events"},{"title":"Get Event Fee Changes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /events/fee_changes","href":"/api-reference/events/get-event-fee-changes"},{"title":"Get Event","deprecated":null,"version":null,"openapi":"/openapi.yaml get /events/{event_ticker}","href":"/api-reference/events/get-event"},{"title":"Get Event Metadata","deprecated":null,"version":null,"openapi":"/openapi.yaml get /events/{event_ticker}/metadata","href":"/api-reference/events/get-event-metadata"},{"title":"Get Event Forecast Percentile History","deprecated":null,"version":null,"openapi":"/openapi.yaml get /series/{series_ticker}/events/{ticker}/forecast_percentile_history","href":"/api-reference/events/get-event-forecast-percentile-history"}]},{"group":"orders","pages":[{"title":"Get Orders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/orders","href":"/api-reference/orders/get-orders"},{"title":"Get Order","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/orders/{order_id}","href":"/api-reference/orders/get-order"},{"title":"Get Queue Positions for Orders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/orders/queue_positions","href":"/api-reference/orders/get-queue-positions-for-orders"},{"title":"Get Order Queue Position","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/orders/{order_id}/queue_position","href":"/api-reference/orders/get-order-queue-position"},{"title":"Create Order (V2)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /portfolio/events/orders","href":"/api-reference/orders/create-order-v2"},{"title":"Cancel All Orders","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /portfolio/events/orders","href":"/api-reference/orders/cancel-all-orders"},{"title":"Batch Create Orders (V2)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /portfolio/events/orders/batched","href":"/api-reference/orders/batch-create-orders-v2"},{"title":"Batch Cancel Orders (V2)","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /portfolio/events/orders/batched","href":"/api-reference/orders/batch-cancel-orders-v2"},{"title":"Cancel Order (V2)","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /portfolio/events/orders/{order_id}","href":"/api-reference/orders/cancel-order-v2"},{"title":"Amend Order (V2)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /portfolio/events/orders/{order_id}/amend","href":"/api-reference/orders/amend-order-v2"},{"title":"Decrease Order (V2)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /portfolio/events/orders/{order_id}/decrease","href":"/api-reference/orders/decrease-order-v2"}]},{"group":"order-groups","pages":[{"title":"Get Order Groups","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/order_groups","href":"/api-reference/order-groups/get-order-groups"},{"title":"Create Order Group","deprecated":null,"version":null,"openapi":"/openapi.yaml post /portfolio/order_groups/create","href":"/api-reference/order-groups/create-order-group"},{"title":"Get Order Group","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/order_groups/{order_group_id}","href":"/api-reference/order-groups/get-order-group"},{"title":"Delete Order Group","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /portfolio/order_groups/{order_group_id}","href":"/api-reference/order-groups/delete-order-group"},{"title":"Reset Order Group","deprecated":null,"version":null,"openapi":"/openapi.yaml put /portfolio/order_groups/{order_group_id}/reset","href":"/api-reference/order-groups/reset-order-group"},{"title":"Trigger Order Group","deprecated":null,"version":null,"openapi":"/openapi.yaml put /portfolio/order_groups/{order_group_id}/trigger","href":"/api-reference/order-groups/trigger-order-group"},{"title":"Update Order Group Limit","deprecated":null,"version":null,"openapi":"/openapi.yaml put /portfolio/order_groups/{order_group_id}/limit","href":"/api-reference/order-groups/update-order-group-limit"}]},{"group":"portfolio","pages":[{"title":"Get Balance","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/balance","href":"/api-reference/portfolio/get-balance"},{"title":"Intra Account Transfer","deprecated":null,"version":null,"openapi":"/openapi.yaml post /portfolio/intra_exchange_instance_transfer","href":"/api-reference/portfolio/intra-account-transfer"},{"title":"Get Intra Account Transfers","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/intra_exchange_instance_transfers","href":"/api-reference/portfolio/get-intra-account-transfers"},{"title":"Get Intra Account Transfer","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/intra_exchange_instance_transfers/{transfer_id}","href":"/api-reference/portfolio/get-intra-account-transfer"},{"title":"Create Subaccount","deprecated":null,"version":null,"openapi":"/openapi.yaml post /portfolio/subaccounts","href":"/api-reference/portfolio/create-subaccount"},{"title":"Transfer Between Subaccounts","deprecated":null,"version":null,"openapi":"/openapi.yaml post /portfolio/subaccounts/transfer","href":"/api-reference/portfolio/transfer-between-subaccounts"},{"title":"Get All Subaccount Balances","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/subaccounts/balances","href":"/api-reference/portfolio/get-all-subaccount-balances"},{"title":"Get Subaccount Transfers","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/subaccounts/transfers","href":"/api-reference/portfolio/get-subaccount-transfers"},{"title":"Get Subaccount Netting","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/subaccounts/netting","href":"/api-reference/portfolio/get-subaccount-netting"},{"title":"Update Subaccount Netting","deprecated":null,"version":null,"openapi":"/openapi.yaml put /portfolio/subaccounts/netting","href":"/api-reference/portfolio/update-subaccount-netting"},{"title":"Get Positions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/positions","href":"/api-reference/portfolio/get-positions"},{"title":"Get Settlements","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/settlements","href":"/api-reference/portfolio/get-settlements"},{"title":"Get Credit History","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/credit_history","href":"/api-reference/portfolio/get-credit-history"},{"title":"Get Deposits","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/deposits","href":"/api-reference/portfolio/get-deposits"},{"title":"Get Withdrawals","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/withdrawals","href":"/api-reference/portfolio/get-withdrawals"},{"title":"Get Total Resting Order Value","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/summary/total_resting_order_value","href":"/api-reference/portfolio/get-total-resting-order-value"},{"title":"Get Fills","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/fills","href":"/api-reference/portfolio/get-fills"},{"title":"Get Target Balance Allocation","deprecated":null,"version":null,"openapi":"/openapi.yaml get /portfolio/target_balance_allocation","href":"/api-reference/portfolio/get-target-balance-allocation"},{"title":"Set Target Balance Allocation","deprecated":null,"version":null,"openapi":"/openapi.yaml post /portfolio/target_balance_allocation","href":"/api-reference/portfolio/set-target-balance-allocation"}]},{"group":"communications","pages":[{"title":"Get Communications ID","deprecated":null,"version":null,"openapi":"/openapi.yaml get /communications/id","href":"/api-reference/communications/get-communications-id"},{"title":"Get Block Trade Proposals","deprecated":null,"version":null,"openapi":"/openapi.yaml get /communications/block-trade-proposals","href":"/api-reference/communications/get-block-trade-proposals"},{"title":"Propose Block Trade","deprecated":null,"version":null,"openapi":"/openapi.yaml post /communications/block-trade-proposals","href":"/api-reference/communications/propose-block-trade"},{"title":"Accept Block Trade Proposal","deprecated":null,"version":null,"openapi":"/openapi.yaml post /communications/block-trade-proposals/{block_trade_proposal_id}/accept","href":"/api-reference/communications/accept-block-trade-proposal"},{"title":"Get RFQs","deprecated":null,"version":null,"openapi":"/openapi.yaml get /communications/rfqs","href":"/api-reference/communications/get-rfqs"},{"title":"Create RFQ","deprecated":null,"version":null,"openapi":"/openapi.yaml post /communications/rfqs","href":"/api-reference/communications/create-rfq"},{"title":"Get RFQ","deprecated":null,"version":null,"openapi":"/openapi.yaml get /communications/rfqs/{rfq_id}","href":"/api-reference/communications/get-rfq"},{"title":"Delete RFQ","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /communications/rfqs/{rfq_id}","href":"/api-reference/communications/delete-rfq"},{"title":"Get RFQ Quote","deprecated":null,"version":null,"openapi":"/openapi.yaml get /communications/rfqs/{rfq_id}/quotes/{quote_id}","href":"/api-reference/communications/get-rfq-quote"},{"title":"Delete RFQ Quote","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /communications/rfqs/{rfq_id}/quotes/{quote_id}","href":"/api-reference/communications/delete-rfq-quote"},{"title":"Accept RFQ Quote","deprecated":null,"version":null,"openapi":"/openapi.yaml put /communications/rfqs/{rfq_id}/quotes/{quote_id}/accept","href":"/api-reference/communications/accept-rfq-quote"},{"title":"Confirm RFQ Quote","deprecated":null,"version":null,"openapi":"/openapi.yaml put /communications/rfqs/{rfq_id}/quotes/{quote_id}/confirm","href":"/api-reference/communications/confirm-rfq-quote"},{"title":"Get Quotes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /communications/quotes","href":"/api-reference/communications/get-quotes"},{"title":"Create Quote","deprecated":null,"version":null,"openapi":"/openapi.yaml post /communications/quotes","href":"/api-reference/communications/create-quote"},{"title":"Get Quote","deprecated":true,"version":null,"openapi":"/openapi.yaml get /communications/quotes/{quote_id}","href":"/api-reference/communications/get-quote"},{"title":"Delete Quote","deprecated":true,"version":null,"openapi":"/openapi.yaml delete /communications/quotes/{quote_id}","href":"/api-reference/communications/delete-quote"},{"title":"Accept Quote","deprecated":true,"version":null,"openapi":"/openapi.yaml put /communications/quotes/{quote_id}/accept","href":"/api-reference/communications/accept-quote"},{"title":"Confirm Quote","deprecated":true,"version":null,"openapi":"/openapi.yaml put /communications/quotes/{quote_id}/confirm","href":"/api-reference/communications/confirm-quote"}]},{"group":"api-keys","pages":[{"title":"Get API Keys","deprecated":null,"version":null,"openapi":"/openapi.yaml get /api_keys","href":"/api-reference/api-keys/get-api-keys"},{"title":"Create API Key","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api_keys","href":"/api-reference/api-keys/create-api-key"},{"title":"Generate API Key","deprecated":null,"version":null,"openapi":"/openapi.yaml post /api_keys/generate","href":"/api-reference/api-keys/generate-api-key"},{"title":"Delete API Key","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /api_keys/{api_key}","href":"/api-reference/api-keys/delete-api-key"}]},{"group":"account","pages":[{"title":"Get Account API Limits","deprecated":null,"version":null,"openapi":"/openapi.yaml get /account/limits","href":"/api-reference/account/get-account-api-limits"},{"title":"Upgrade Account API Usage Level","deprecated":null,"version":null,"openapi":"/openapi.yaml post /account/api_usage_level/upgrade","href":"/api-reference/account/upgrade-account-api-usage-level"},{"title":"Get Account API Usage Level Volume Progress","deprecated":null,"version":null,"openapi":"/openapi.yaml get /account/api_usage_level/volume_progress","href":"/api-reference/account/get-account-api-usage-level-volume-progress"},{"title":"List Non-Default Endpoint Costs","deprecated":null,"version":null,"openapi":"/openapi.yaml get /account/endpoint_costs","href":"/api-reference/account/list-non-default-endpoint-costs"}]},{"group":"search","pages":[{"title":"Get Tags for Series Categories","deprecated":null,"version":null,"openapi":"/openapi.yaml get /search/tags_by_categories","href":"/api-reference/search/get-tags-for-series-categories"},{"title":"Get Filters for Sports","deprecated":null,"version":null,"openapi":"/openapi.yaml get /search/filters_by_sport","href":"/api-reference/search/get-filters-for-sports"}]},{"group":"live-data","pages":[{"title":"Get Live Data","deprecated":null,"version":null,"openapi":"/openapi.yaml get /live_data/milestone/{milestone_id}","href":"/api-reference/live-data/get-live-data"},{"title":"Get Live Data (with type)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /live_data/{type}/milestone/{milestone_id}","href":"/api-reference/live-data/get-live-data-with-type"},{"title":"Get Multiple Live Data","deprecated":null,"version":null,"openapi":"/openapi.yaml get /live_data/batch","href":"/api-reference/live-data/get-multiple-live-data"},{"title":"Get Game Stats","deprecated":null,"version":null,"openapi":"/openapi.yaml get /live_data/milestone/{milestone_id}/game_stats","href":"/api-reference/live-data/get-game-stats"},{"title":"Get Event Live Data","deprecated":null,"version":null,"openapi":"/openapi.yaml get /live_data/events/{event_ticker}","href":"/api-reference/live-data/get-event-live-data"},{"title":"Get Weather Index","deprecated":null,"version":null,"openapi":"/openapi.yaml get /live_data/weather/{city}","href":"/api-reference/live-data/get-weather-index"},{"title":"Get Weather Index Calibrations","deprecated":null,"version":null,"openapi":"/openapi.yaml get /live_data/weather/{city}/calibrations","href":"/api-reference/live-data/get-weather-index-calibrations"}]},{"group":"structured-targets","pages":[{"title":"Get Structured Targets","deprecated":null,"version":null,"openapi":"/openapi.yaml get /structured_targets","href":"/api-reference/structured-targets/get-structured-targets"},{"title":"Get Structured Target","deprecated":null,"version":null,"openapi":"/openapi.yaml get /structured_targets/{structured_target_id}","href":"/api-reference/structured-targets/get-structured-target"}]},{"group":"milestone","pages":[{"title":"Get Milestone","deprecated":null,"version":null,"openapi":"/openapi.yaml get /milestones/{milestone_id}","href":"/api-reference/milestone/get-milestone"},{"title":"Get Milestones","deprecated":null,"version":null,"openapi":"/openapi.yaml get /milestones","href":"/api-reference/milestone/get-milestones"}]},{"group":"multivariate","pages":[{"title":"Get Multivariate Event Collection","deprecated":null,"version":null,"openapi":"/openapi.yaml get /multivariate_event_collections/{collection_ticker}","href":"/api-reference/multivariate/get-multivariate-event-collection"},{"title":"Create Market In Multivariate Event Collection","deprecated":null,"version":null,"openapi":"/openapi.yaml post /multivariate_event_collections/{collection_ticker}","href":"/api-reference/multivariate/create-market-in-multivariate-event-collection"},{"title":"Get Multivariate Event Collections","deprecated":null,"version":null,"openapi":"/openapi.yaml get /multivariate_event_collections","href":"/api-reference/multivariate/get-multivariate-event-collections"}]},{"group":"incentive-programs","pages":[{"title":"Get Incentives","deprecated":null,"version":null,"openapi":"/openapi.yaml get /incentive_programs","href":"/api-reference/incentive-programs/get-incentives"}]},{"group":"fcm","pages":[{"title":"Get FCM Fills","deprecated":null,"version":null,"openapi":"/openapi.yaml get /fcm/fills","href":"/api-reference/fcm/get-fcm-fills"},{"title":"Get FCM Orders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /fcm/orders","href":"/api-reference/fcm/get-fcm-orders"},{"title":"List FCM Subtraders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /fcm/subtraders","href":"/api-reference/fcm/list-fcm-subtraders"},{"title":"Create FCM Subtrader","deprecated":null,"version":null,"openapi":"/openapi.yaml post /fcm/subtraders","href":"/api-reference/fcm/create-fcm-subtrader"},{"title":"Get FCM Subtrader Event Contract Daily Cap","deprecated":null,"version":null,"openapi":"/openapi.yaml get /fcm/subtraders/event_contract_daily_cap","href":"/api-reference/fcm/get-fcm-subtrader-event-contract-daily-cap"},{"title":"Update FCM Subtrader Event Contract Daily Cap","deprecated":null,"version":null,"openapi":"/openapi.yaml put /fcm/subtraders/event_contract_daily_cap","href":"/api-reference/fcm/update-fcm-subtrader-event-contract-daily-cap"},{"title":"Delete FCM Subtrader Event Contract Daily Cap","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /fcm/subtraders/event_contract_daily_cap","href":"/api-reference/fcm/delete-fcm-subtrader-event-contract-daily-cap"},{"title":"Get FCM Subtrader Blocked Categories","deprecated":null,"version":null,"openapi":"/openapi.yaml get /fcm/subtraders/blocked_categories","href":"/api-reference/fcm/get-fcm-subtrader-blocked-categories"},{"title":"Update FCM Subtrader Blocked Categories","deprecated":null,"version":null,"openapi":"/openapi.yaml put /fcm/subtraders/blocked_categories","href":"/api-reference/fcm/update-fcm-subtrader-blocked-categories"},{"title":"Get FCM Positions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /fcm/positions","href":"/api-reference/fcm/get-fcm-positions"},{"title":"Create FCM Position Transfer","deprecated":null,"version":null,"openapi":"/openapi.yaml post /fcm/positions/transfers","href":"/api-reference/fcm/create-fcm-position-transfer"}]},{"group":"historical","pages":[{"title":"Get Historical Cutoff Timestamps","deprecated":null,"version":null,"openapi":"/openapi.yaml get /historical/cutoff","href":"/api-reference/historical/get-historical-cutoff-timestamps"},{"title":"Get Historical Market Candlesticks","deprecated":null,"version":null,"openapi":"/openapi.yaml get /historical/markets/{ticker}/candlesticks","href":"/api-reference/historical/get-historical-market-candlesticks"},{"title":"Get Historical Fills","deprecated":null,"version":null,"openapi":"/openapi.yaml get /historical/fills","href":"/api-reference/historical/get-historical-fills"},{"title":"Get Historical Orders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /historical/orders","href":"/api-reference/historical/get-historical-orders"},{"title":"Get Historical Positions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /historical/positions","href":"/api-reference/historical/get-historical-positions"},{"title":"Get Historical Trades","deprecated":null,"version":null,"openapi":"/openapi.yaml get /historical/trades","href":"/api-reference/historical/get-historical-trades"},{"title":"Get Historical Markets","deprecated":null,"version":null,"openapi":"/openapi.yaml get /historical/markets","href":"/api-reference/historical/get-historical-markets"},{"title":"Get Historical Market","deprecated":null,"version":null,"openapi":"/openapi.yaml get /historical/markets/{ticker}","href":"/api-reference/historical/get-historical-market"}]}]},{"group":"WebSockets","pages":[{"title":"WebSocket API","sidebarTitle":"Overview","href":"/websockets"},{"title":"WebSocket Connection","asyncapi":"asyncapi.yaml root","href":"/websockets/websocket-connection"},{"title":"Connection Keep-Alive","asyncapi":"asyncapi.yaml control_frames","href":"/websockets/connection-keep-alive"},{"title":"Orderbook Updates","asyncapi":"asyncapi.yaml orderbook_delta","href":"/websockets/orderbook-updates"},{"title":"Market Ticker","asyncapi":"asyncapi.yaml ticker","href":"/websockets/market-ticker"},{"title":"CF Benchmarks Value Feed","asyncapi":"asyncapi.yaml cfbenchmarks_value","href":"/websockets/cfbenchmarks-value"},{"title":"CF Benchmarks 5Hz Value Feed","asyncapi":"asyncapi.yaml cfbenchmarks_value_5hz","href":"/websockets/cfbenchmarks-value-5hz"},{"title":"Pyth Value Feed","asyncapi":"asyncapi.yaml pyth_value","href":"/websockets/pyth-value"},{"title":"Public Trades","asyncapi":"asyncapi.yaml trade","href":"/websockets/public-trades"},{"title":"User Fills","asyncapi":"asyncapi.yaml fill","href":"/websockets/user-fills"},{"title":"Market Positions","asyncapi":"asyncapi.yaml market_positions","href":"/websockets/market-positions"},{"title":"Market \u0026 Event Lifecycle","asyncapi":"asyncapi.yaml market_lifecycle_v2","href":"/websockets/market-and-event-lifecycle"},{"title":"Multivariate Market \u0026 Event Lifecycle","asyncapi":"asyncapi.yaml multivariate_market_lifecycle","href":"/websockets/multivariate-market-and-event-lifecycle"},{"title":"Communications","asyncapi":"asyncapi.yaml communications","href":"/websockets/communications"},{"title":"Order Group Updates","asyncapi":"asyncapi.yaml order_group_updates","href":"/websockets/order-group-updates"},{"title":"User Orders","asyncapi":"asyncapi.yaml user_orders","href":"/websockets/user-orders"}]},{"group":"FIX","pages":[{"title":"Common Components","icon":"puzzle-piece","href":"/fix/common-components"},{"title":"Connectivity","description":"Endpoints, transport configuration, and rate limits for the Kalshi FIX API","icon":"network-wired","href":"/fix/connectivity"},{"title":"Authentication \u0026 Sessions","icon":"key","href":"/fix/authentication"},{"title":"Order Entry","description":"Submit, modify, and cancel orders through FIX messages","icon":"cart-plus","href":"/fix/order-entry"},{"title":"Order Groups","icon":"layer-group","href":"/fix/order-groups"},{"title":"Market Data","icon":"chart-line","href":"/fix/market-data"},{"title":"RFQ","icon":"comments-dollar","href":"/fix/rfq-messages"},{"title":"Drop Copy Session","icon":"copy","href":"/fix/drop-copy"},{"title":"Listener Sessions","icon":"headphones","href":"/fix/listener-sessions"},{"title":"Market Settlement","icon":"circle-check","href":"/fix/market-settlement"},{"title":"Error Handling","icon":"triangle-exclamation","href":"/fix/error-handling"},{"title":"Subpenny Pricing","icon":"dollar-sign","href":"/fix/subpenny-pricing"}]}]},{"tab":"Perps APIs","pages":[{"title":"Perps APIs","href":"/margin"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"title":"Authentication \u0026 Sessions - API Documentation","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":[],"chunks":[]}