{
"success": false,
"error": "Missing parameters",
"message": "walletIdOrAddress, accountIndex, apiKeyIndex, apiPublicKey, and apiPrivateKey are required",
"timestamp": 123
}
{
"success": false,
"error": "No authorization header provided"
}
{
"success": false,
"error": "Internal server error",
"message": "Wallet not found in system. Please connect wallet first.",
"timestamp": 123
}
Import existing Lighter API credentials for a wallet. This endpoint is used when delegation or server wallet generation is not possible, allowing users to provide their own pre-generated API keys from the Lighter platform.
The imported credentials will be securely linked to the authenticated user account. Never share your API private keys.
{ "success": false, "error": "Internal server error", "message": "Wallet not found in system. Please connect wallet first.", "timestamp": 1733215000000}
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Tide API Documentation","colors":{"primary":"#0EA5E9","light":"#38BDF8","dark":"#0284C7"},"favicon":"/tidebluefull.svg","logo":{"light":"https://mintcdn.com/arcane-0ded8dd0/TW8Wh8CNYhd3LgAt/tidebluefull.svg?fit=max\u0026auto=format\u0026n=TW8Wh8CNYhd3LgAt\u0026q=85\u0026s=75bd86a2ce8488db623250a6ccbe9af3","dark":"https://mintcdn.com/arcane-0ded8dd0/TW8Wh8CNYhd3LgAt/tidebluefull.svg?fit=max\u0026auto=format\u0026n=TW8Wh8CNYhd3LgAt\u0026q=85\u0026s=75bd86a2ce8488db623250a6ccbe9af3"},"api":{"openapi":"openapi.json","mdx":{"server":"https://api.tide.ag","auth":{"method":"key","name":"X-API-KEY"}}},"navbar":{"links":[{"label":"Dashboard","href":"https://app.tide.ag/"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.tide.ag/"}},"footer":{"socials":{"twitter":"https://x.com/tide_ag","telegram":"https://t.me/tidedotag"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"API Status","href":"https://api.tide.ag/health","icon":"chart-line"},{"anchor":"Community","href":"https://t.me/tidedotag","icon":"telegram"},{"anchor":"Support","href":"https://x.com/tide_ag","icon":"twitter"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"arcane-0ded8dd0","hasAudioNarration":false,"actualSubdomain":"arcane-0ded8dd0","customDomains":["docs.tide.ag"],"gitSource":{"type":"github","owner":"arcane-build","repo":"hyperdex-doc","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e8dc044dd579e9b5ccd5","collectionId":"4bee5a2a-953f-402b-a1a2-79fcc7d1cd5d","schemaVersion":"v2"},"entitlements":{},"buildId":"6a399b9e4917e8d409cb9bb9:failure","clientVersion":"0.0.3966","searchFilterCounts":[{"language":"default","tag":"Documentation","count":24},{"language":"default","tag":"Account","count":6},{"language":"default","tag":"Trading","count":6},{"language":"default","tag":"Market Data","count":4},{"language":"default","tag":"Guides","count":3},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Positions","count":1},{"language":"default","tag":"System","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"editor-v7-file-tree","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":"pause-universal-search-reconcile","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":"editor-nav-generations","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":"editor-agent-model-picker","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":"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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"account/import-lighter-credentials","slug":"/account/import-lighter-credentials","pageMetadata":{"title":"Import Lighter Credentials","openapi":"POST /api/trading/lighter/import","description":"Import existing Lighter API credentials for a wallet. Used when delegation or server wallet generation is not possible.","href":"/account/import-lighter-credentials"},"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: \"Import existing Lighter API credentials for a wallet. Used when delegation or server wallet generation is not possible.\"\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`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Import existing Lighter API credentials for a wallet. This endpoint is used when delegation or server wallet generation is not possible, allowing users to provide their own pre-generated API keys from the Lighter platform.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`The imported credentials will be securely linked to the authenticated user account. Never share your API private keys.`})}),`\n`,_jsx(Heading,{level:`2`,id:`features`,children:`Features`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Credential Import`}),`: Link existing Lighter API keys to your HyperDEX account`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Secure Storage`}),`: Credentials are encrypted and stored securely`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Flexible Wallet Linking`}),`: Use wallet address or internal wallet ID`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`when-to-use`,children:`When to Use`}),`\n`,_jsx(_components.p,{children:`Use this endpoint when:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`You already have Lighter API credentials generated from the Lighter platform`}),`\n`,_jsx(_components.li,{children:`Server-side wallet delegation is not available`}),`\n`,_jsx(_components.li,{children:`You want to use your existing Lighter account with HyperDEX`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Method`}),`: `,_jsx(_components.code,{children:`POST`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Endpoint`}),`: `,_jsx(_components.code,{children:`/api/trading/lighter/import`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Authentication`}),`: Required (JWT Bearer token)`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Required`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Content-Type`})}),_jsx(_components.td,{children:`application/json`}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Authorization`})}),_jsx(_components.td,{children:`Bearer \u003cjwt_token>`}),_jsx(_components.td,{children:`Yes`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,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:` \"walletIdOrAddress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xA5BD439c4d4Fc7cA8B14A9FE77fd5C4FFd7e4996\"`}),_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:` \"accountIndex\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apiKeyIndex\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_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:` \"apiPublicKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x...\"`}),_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:` \"apiPrivateKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`request-parameters`,children:`Request Parameters`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`walletIdOrAddress`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`The wallet address or internal wallet ID associated with these credentials`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`accountIndex`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`The Lighter account index (usually `,_jsx(_components.code,{children:`0`}),` or `,_jsx(_components.code,{children:`1`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`apiKeyIndex`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`The index of the API key being imported`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`apiPublicKey`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`The public key of the API key pair`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`apiPrivateKey`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`The private key of the API key pair`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example-request`,children:`Example Request`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,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:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.tide.ag/api/trading/lighter/import`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_JWT_TOKEN\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"walletIdOrAddress\": \"0xA5BD439c4d4Fc7cA8B14A9FE77fd5C4FFd7e4996\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"accountIndex\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"apiKeyIndex\": 10,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"apiPublicKey\": \"your_public_key\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"apiPrivateKey\": \"your_private_key\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,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:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` axios`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.tide.ag/api/trading/lighter/import'`}),_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:` walletIdOrAddress:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '0xA5BD439c4d4Fc7cA8B14A9FE77fd5C4FFd7e4996'`}),_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:` accountIndex:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKeyIndex:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`}),_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:` apiPublicKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your_public_key'`}),_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:` apiPrivateKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your_private_key'`})]}),`\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:` 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:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Bearer YOUR_JWT_TOKEN'`})]}),`\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:`success-response`,children:`Success Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,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:` \"success\"`}),_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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Lighter credentials imported successfully\"`}),_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:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1733215000000`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`response-fields`,children:`Response Fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`success`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Operation status`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Success message`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`timestamp`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Unix timestamp in milliseconds`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsx(Heading,{level:`3`,id:`400-bad-request-missing-parameters`,children:`400 Bad Request - Missing Parameters`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,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:`6`,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:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Missing parameters\"`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"walletIdOrAddress, accountIndex, apiKeyIndex, apiPublicKey, and apiPrivateKey are required\"`}),_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:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1733215000000`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`401-unauthorized-missing-token`,children:`401 Unauthorized - Missing Token`}),`\n`,_jsx(CodeBlock,{filename:``,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:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"No authorization header provided\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`500-internal-server-error-wallet-not-found`,children:`500 Internal Server Error - Wallet Not Found`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,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:`6`,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:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Internal server 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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Wallet not found in system. Please connect wallet first.\"`}),_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:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1733215000000`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`how-to-get-lighter-credentials`,children:`How to Get Lighter Credentials`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Visit `,_jsx(_components.a,{href:`https://app.lighter.xyz`,children:`Lighter DEX`}),` and create an account`]}),`\n`,_jsx(_components.li,{children:`Navigate to your account settings`}),`\n`,_jsx(_components.li,{children:`Generate API keys from the dashboard`}),`\n`,_jsxs(_components.li,{children:[`Note down your:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`accountIndex`}),` - Your Lighter account index`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`apiKeyIndex`}),` - The API key index`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`apiPublicKey`}),` - Your API public key`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`apiPrivateKey`}),` - Your API private key`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`After importing credentials, you can use the standard trading endpoints to place orders on Lighter without providing credentials as query parameters.`})}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`If you don’t have existing Lighter credentials, you can generate them directly on the Lighter platform and then import them using this endpoint.`})})]})}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":"Import Lighter Credentials","openapi":"POST /api/trading/lighter/import","description":"Import existing Lighter API credentials for a wallet. Used when delegation or server wallet generation is not possible.","href":"/account/import-lighter-credentials"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Features","slug":"features","depth":2,"children":[]},{"title":"When to Use","slug":"when-to-use","depth":2,"children":[]},{"title":"Request","slug":"request","depth":2,"children":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Request Body","slug":"request-body","depth":3,"children":[]},{"title":"Request Parameters","slug":"request-parameters","depth":3,"children":[]}]},{"title":"Example Request","slug":"example-request","depth":2,"children":[]},{"title":"Success Response","slug":"success-response","depth":2,"children":[{"title":"Response Fields","slug":"response-fields","depth":3,"children":[]}]},{"title":"Error Responses","slug":"error-responses","depth":2,"children":[{"title":"400 Bad Request - Missing Parameters","slug":"400-bad-request-missing-parameters","depth":3,"children":[]},{"title":"401 Unauthorized - Missing Token","slug":"401-unauthorized-missing-token","depth":3,"children":[]},{"title":"500 Internal Server Error - Wallet Not Found","slug":"500-internal-server-error-wallet-not-found","depth":3,"children":[]}]},{"title":"How to Get Lighter Credentials","slug":"how-to-get-lighter-credentials","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Import Lighter Credentials","description":"Import existing Lighter API credentials for a wallet. Used when delegation or server wallet generation is not possible.","tags":["Account"],"security":["a58a951e-7c36-4004-9c49-d556a88a3c74"],"requestBody":"ff049908-8333-476c-a080-bad2218b5284","responses":{"200":"c7a281cb-a4b3-46c5-87ea-07c1cfa54996","400":"75f54ed3-9e43-45ba-aff8-b75f870824ef","401":"945c40be-8f77-4ea0-b7c9-86937a039292","500":"e625efa0-d925-4dce-b8ec-283947497745"},"method":"post","type":"path","servers":["7ffd4899-ce4a-4b56-8c94-cbc914622ed8"],"path":"/api/trading/lighter/import","baseUrlOptions":["https://api.tide.ag"],"title":"Import Lighter Credentials","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["walletIdOrAddress","accountIndex","apiKeyIndex","apiPublicKey","apiPrivateKey"],"properties":{"walletIdOrAddress":{"type":"string","description":"The wallet address or internal wallet ID associated with these credentials","example":"0xA5BD439c4d4Fc7cA8B14A9FE77fd5C4FFd7e4996","isRequired":true,"uniqueKey":"walletIdOrAddress","typeLabel":"string"},"accountIndex":{"type":"integer","description":"The Lighter account index (usually 0 or 1)","example":0,"isRequired":true,"uniqueKey":"accountIndex","typeLabel":"integer"},"apiKeyIndex":{"type":"integer","description":"The index of the API key being imported","example":10,"isRequired":true,"uniqueKey":"apiKeyIndex","typeLabel":"integer"},"apiPublicKey":{"type":"string","description":"The public key of the API key pair","example":"0x...","isRequired":true,"uniqueKey":"apiPublicKey","typeLabel":"string"},"apiPrivateKey":{"type":"string","description":"The private key of the API key pair","example":"0x...","isRequired":true,"uniqueKey":"apiPrivateKey","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"walletIdOrAddress":"0xA5BD439c4d4Fc7cA8B14A9FE77fd5C4FFd7e4996","accountIndex":0,"apiKeyIndex":10,"apiPublicKey":"0x...","apiPrivateKey":"0x..."},"examples":{"Example":{"title":"Example","value":{"walletIdOrAddress":"0xA5BD439c4d4Fc7cA8B14A9FE77fd5C4FFd7e4996","accountIndex":0,"apiKeyIndex":10,"apiPublicKey":"0x...","apiPrivateKey":"0x..."}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"c7a281cb-a4b3-46c5-87ea-07c1cfa54996":{"description":"Credentials imported successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true,"uniqueKey":"success","typeLabel":"boolean"},"message":{"type":"string","example":"Lighter credentials imported successfully","uniqueKey":"message","typeLabel":"string"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","uniqueKey":"timestamp","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"message":"Lighter credentials imported successfully","timestamp":123}}},"exampleType":"generated"}},"exampleType":"generated"},"75f54ed3-9e43-45ba-aff8-b75f870824ef":{"description":"Missing required parameters","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"Missing parameters","uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","example":"walletIdOrAddress, accountIndex, apiKeyIndex, apiPublicKey, and apiPrivateKey are required","uniqueKey":"message","typeLabel":"string"},"timestamp":{"type":"integer","uniqueKey":"timestamp","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"Missing parameters","message":"walletIdOrAddress, accountIndex, apiKeyIndex, apiPublicKey, and apiPrivateKey are required","timestamp":123}}},"exampleType":"generated"}},"exampleType":"generated"},"945c40be-8f77-4ea0-b7c9-86937a039292":{"description":"Unauthorized - Missing or invalid JWT token","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"No authorization header provided","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"No authorization header provided"}}},"exampleType":"generated"}},"exampleType":"generated"},"e625efa0-d925-4dce-b8ec-283947497745":{"description":"Internal server error - Wallet not found or other issues","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"Internal server error","uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","example":"Wallet not found in system. Please connect wallet first.","uniqueKey":"message","typeLabel":"string"},"timestamp":{"type":"integer","uniqueKey":"timestamp","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"Internal server error","message":"Wallet not found in system. Please connect wallet first.","timestamp":123}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"a58a951e-7c36-4004-9c49-d556a88a3c74":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for authentication. Required for smart order execution.","scopes":[]}}},"servers":{"7ffd4899-ce4a-4b56-8c94-cbc914622ed8":{"url":"https://api.tide.ag","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token for authentication. Required for smart order execution.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"JWT token for authentication. Required for smart order execution.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"arcane-0ded8dd0","siteName":"Tide API Documentation","title":"Import Lighter Credentials - Tide API Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2025-12-30T07:44:42.872Z","originalFileLocation":"account/import-lighter-credentials.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=\"Import existing Lighter API credentials for a wallet. Used when delegation or server wallet generation is not possible.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Tide 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/arcane-0ded8dd0/ZWboUMerARSBM0eF/_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/arcane-0ded8dd0/ZWboUMerARSBM0eF/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/arcane-0ded8dd0/ZWboUMerARSBM0eF/_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/arcane-0ded8dd0/ZWboUMerARSBM0eF/_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/arcane-0ded8dd0/ZWboUMerARSBM0eF/_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/arcane-0ded8dd0/ZWboUMerARSBM0eF/_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/arcane-0ded8dd0/ZWboUMerARSBM0eF/_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/arcane-0ded8dd0/ZWboUMerARSBM0eF/_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/arcane-0ded8dd0/ZWboUMerARSBM0eF/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Import Lighter Credentials - Tide API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Import existing Lighter API credentials for a wallet. Used when delegation or server wallet generation is not possible.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Tide API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.tide.ag/account/import-lighter-credentials\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://arcane-0ded8dd0.mintlify.app/_mintlify/api/og/v2?division=Account\u0026amp;title=Import+Lighter+Credentials\u0026amp;description=Import+existing+Lighter+API+credentials+for+a+wallet.+Used+when+delegation+or+server+wallet+generation+is+not+possible.\u0026amp;theme=31a04741b4af92565e5a1ec8\u0026amp;signature=fcdb878a28e3a8f9ca73bef8b9c1cbf2106240c06d21341b6b7a4b188624025d\">\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=\"Import Lighter Credentials - Tide API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Import existing Lighter API credentials for a wallet. Used when delegation or server wallet generation is not possible.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://arcane-0ded8dd0.mintlify.app/_mintlify/api/og/v2?division=Account\u0026amp;title=Import+Lighter+Credentials\u0026amp;description=Import+existing+Lighter+API+credentials+for+a+wallet.+Used+when+delegation+or+server+wallet+generation+is+not+possible.\u0026amp;theme=31a04741b4af92565e5a1ec8\u0026amp;signature=fcdb878a28e3a8f9ca73bef8b9c1cbf2106240c06d21341b6b7a4b188624025d\">\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/arcane-0ded8dd0/ZWboUMerARSBM0eF/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Tide API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0EA5E9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.tide.ag/account/import-lighter-credentials\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/account/import-lighter-credentials.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.tide.ag/#organization\",\"name\":\"Tide API Documentation\",\"url\":\"https://docs.tide.ag\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/arcane-0ded8dd0/TW8Wh8CNYhd3LgAt/tidebluefull.svg?fit=max\u0026auto=format\u0026n=TW8Wh8CNYhd3LgAt\u0026q=85\u0026s=75bd86a2ce8488db623250a6ccbe9af3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.tide.ag#website\",\"name\":\"Tide API Documentation\",\"url\":\"https://docs.tide.ag\",\"publisher\":{\"@id\":\"https://docs.tide.ag/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.tide.ag/account/import-lighter-credentials#webpage\",\"url\":\"https://docs.tide.ag/account/import-lighter-credentials\",\"name\":\"Import Lighter Credentials\",\"description\":\"Import existing Lighter API credentials for a wallet. Used when delegation or server wallet generation is not possible.\",\"dateModified\":\"2025-12-30T07:44:42.872Z\",\"isPartOf\":{\"@id\":\"https://docs.tide.ag#website\"},\"breadcrumb\":{\"@id\":\"https://docs.tide.ag/account/import-lighter-credentials#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.tide.ag/account/import-lighter-credentials#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Account\",\"item\":\"https://docs.tide.ag/account/create-wallet\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Import Lighter Credentials\",\"item\":\"https://docs.tide.ag/account/import-lighter-credentials\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.tide.ag/account/import-lighter-credentials#apireference\",\"headline\":\"Import Lighter Credentials\",\"name\":\"Import Lighter Credentials\",\"description\":\"Import existing Lighter API credentials for a wallet. Used when delegation or server wallet generation is not possible.\",\"url\":\"https://docs.tide.ag/account/import-lighter-credentials\",\"mainEntityOfPage\":{\"@id\":\"https://docs.tide.ag/account/import-lighter-credentials#webpage\"},\"dateModified\":\"2025-12-30T07:44:42.872Z\",\"publisher\":{\"@id\":\"https://docs.tide.ag/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.tide.ag#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Tide API Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Tide API Documentation","nav":{"global":{"anchors":[{"anchor":"API Status","href":"https://api.tide.ag/health","icon":"chart-line"},{"anchor":"Community","href":"https://t.me/tidedotag","icon":"telegram"},{"anchor":"Support","href":"https://x.com/tide_ag","icon":"twitter"}]},"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Getting Started","pages":[{"title":"API Reference","href":"/introduction"},{"title":"Quick Start","href":"/quickstart"},{"title":"User Flow Documentation","href":"/user-flow"}]},{"group":"Market Data","pages":[{"title":"Get Token Pairs","api":"GET /api/token-pairs","href":"/market-data/token-pairs"},{"title":"Get Aggregated Order Book","openapi":"GET /orderbook","href":"/market-data/orderbook"},{"title":"Get Ticker Data","openapi":"GET /api/trading/ticker/{symbol}","href":"/market-data/ticker"},{"title":"Get Recent Trades","openapi":"GET /trades","href":"/market-data/trades"}]},{"group":"Trading","pages":[{"title":"Place Order","openapi":"POST /api/trading/{exchange}/orders","href":"/trading/open-position"},{"title":"Close Position","openapi":"POST /api/trade/position/close","href":"/trading/close-position"},{"title":"Set Leverage (Aster)","openapi":"POST /api/aster/perp/{walletId}/leverage","href":"/trading/set-leverage"},{"title":"Execute Smart Order","openapi":"POST /api/trade/execute","href":"/trading/execute-smart-order"},{"title":"Get Order Status","openapi":"GET /api/trading/{exchange}/orders/{orderId}/status","href":"/trading/get-order-status"},{"title":"Get Routing Recommendation","openapi":"GET /api/trade/routing/{symbol}","href":"/trading/routing-recommendation"}]},{"group":"Positions","pages":[{"title":"Get Open Positions","openapi":"GET /api/trading/positions/all/{walletAddress}","href":"/positions/get-positions"}]},{"group":"Account","pages":[{"title":"Create Server Wallet","openapi":"POST /api/wallets","href":"/account/create-wallet"},{"title":"Register API Key","openapi":"POST /api/trading/{exchange}/apikey","description":"Register API keys with exchanges to enable trading operations. Links server wallet to exchange accounts.","href":"/account/register-api-key"},{"title":"Import Lighter Credentials","openapi":"POST /api/trading/lighter/import","href":"/account/import-lighter-credentials"},{"title":"Deposit Funds","openapi":"POST /api/trading/{exchange}/deposit","description":null,"href":"/account/deposit"},{"title":"Withdraw Funds","openapi":"POST /api/trading/{exchange}/withdraw","href":"/account/withdraw"},{"title":"Get Account Balances","openapi":"GET /api/trading/{exchange}/balances","href":"/account/get-balances"}]},{"group":"System","pages":[{"title":"Get System Status","openapi":"GET /health","href":"/system/get-status"}]},{"group":"Guides","pages":[{"title":"WebSocket API","href":"/websocket"},{"title":"Schema Reference","href":"/schema"},{"title":"Error Handling","href":"/errors"}]}]}]},"title":"Import Lighter Credentials - Tide API Documentation","buildId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","deploymentId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DKJwRUt2.js","utils-CWD_VS3u.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-oFjciODD.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-C76WsxC3.js","snippetPresets-DvPMxpX_.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CuNQfndH.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BVFpVUoF.js","shallow-t59Jg5Kr.js","getApiPlaygroundDisplay-C_JZ4amX.js","CodeSnippet-CLRDnx_h.js","CodeSnippets-C2myU4kc.js","Page-7TwLLapg.js","getPastedJson-B-JaVXw7.js","icon-BA-iDhH3.js","MethodPill-D4qZABFp.js","DuplicateIcon-THIDKO1O.js","createIcon-CYYJwgFd.js","DynamicMarkdown-UGQuxDKp.js","SectionHeading-jYELb23h.js","axios-vUo_bRtp.js","Markdown-DKsLa3wy.js","clsx-CefdjKz2.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BaREnp3o.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-sgx_0XzF.js"]}