How to authenticate with the VecTrade API and manage API keys securely.
Authentication
All VecTrade API requests require authentication with your VecTrade API key.Use X-API-Key as the primary header for hosted/public API traffic.
Some direct deployments also accept Authorization: Bearer vq_..., but X-API-Key is the stable default.
API Key Format
API keys follow the format vq_ followed by a random string:
from vectrade import VecTrade# Reads VECTRADE_API_KEY from environment automaticallyclient = VecTrade()# Or pass explicitlyclient = VecTrade(api_key="vq_your_key_here")
TypeScript SDK
import { VecTrade } from "@vectrade/sdk";// Reads VECTRADE_API_KEY from environmentconst client = new VecTrade();// Or pass explicitlyconst client = new VecTrade({ apiKey: "vq_your_key_here" });
Never hardcode API keys in source code. Use environment variables or secret managers.
Key Security Best Practices
Rotate regularly — Generate new keys and revoke old ones monthly
Use scoped keys — Create keys with minimum required permissions
Separate environments — Use different keys for dev/staging/production
Monitor usage — Check the dashboard for unexpected activity
Use secrets managers — Store keys in Vault, AWS Secrets Manager, etc.
Key Permissions (Scopes)
Scope
Access
quotes:read
Real-time and historical quotes
fundamentals:read
Company financials, profiles, and statements
technicals:read
Technical indicators and scoring
news:read
Financial news articles
analyst:read
Analyst consensus, price targets, ratings
earnings:read
Earnings history and calendar
insider:read
Insider trading activity
options:read
Options chain data
sentiment:read
Market sentiment data
etf:read
ETF profiles and holdings
Error Responses
Missing or invalid keys return 401 Unauthorized:
{ "error": { "type": "authentication_error", "message": "Missing or invalid API key", "docs_url": "https://docs.vectrade.io/guides/authentication" }}
Insufficient permissions return 403 Forbidden:
{ "error": { "type": "permission_error", "message": "API key does not have permission. Required scope: ai:read" }}
SDK Error Handling
from vectrade import VecTrade, AuthenticationErrortry: client = VecTrade(api_key="invalid_key") client.quotes.get("AAPL")except AuthenticationError as e: print(f"Auth failed: {e.message}") print(f"Request ID: {e.request_id}")
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"VecTrade","colors":{"primary":"#0891B2","light":"#06B6D4","dark":"#0E7490"},"favicon":"https://mintcdn.com/vectrade/i7a2W30rjqqszMLH/favicon.svg?fit=max\u0026auto=format\u0026n=i7a2W30rjqqszMLH\u0026q=85\u0026s=c7e02f73bc1f7ab7dcedf641aea5d08e","logo":{"light":"https://mintcdn.com/vectrade/i7a2W30rjqqszMLH/logo/light.svg?fit=max\u0026auto=format\u0026n=i7a2W30rjqqszMLH\u0026q=85\u0026s=b763fd409b10c3ddf5adc7307bd83837","dark":"https://mintcdn.com/vectrade/i7a2W30rjqqszMLH/logo/dark.svg?fit=max\u0026auto=format\u0026n=i7a2W30rjqqszMLH\u0026q=85\u0026s=2cb095d93964ba4f60e0eec47851b06e"},"api":{"openapi":"openapi/spec.yaml","playground":{"display":"simple"},"mdx":{"server":"https://api.vectrade.io/v1","auth":{"method":"key","name":"X-API-Key"}}},"navbar":{"links":[{"label":"vTrade","href":"https://vectrade.io/vtrade"}],"primary":{"type":"button","label":"Get API Key","href":"https://vectrade.io/vtrade/developer"}},"footer":{"socials":{"github":"https://github.com/VecTrade-io","x":"https://x.com/vectrade"},"links":[{"header":"Product","items":[{"label":"vTrade","href":"https://vectrade.io/vtrade"},{"label":"API Reference","href":"https://docs.vectrade.io/api-reference/overview"},{"label":"Pricing","href":"https://vectrade.io/pricing"}]},{"header":"SDKs","items":[{"label":"Python","href":"https://docs.vectrade.io/sdks/python"},{"label":"TypeScript","href":"https://docs.vectrade.io/sdks/typescript"},{"label":"CLI","href":"https://docs.vectrade.io/sdks/cli"}]},{"header":"Company","items":[{"label":"GitHub","href":"https://github.com/VecTrade-io"},{"label":"Status","href":"https://status.vectrade.io"}]}]},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"GitHub","href":"https://github.com/VecTrade-io","icon":"github"},{"anchor":"Status","href":"https://status.vectrade.io","icon":"signal"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"vectrade","hasAudioNarration":false,"actualSubdomain":"vectrade","customDomains":["docs.vectrade.io"],"gitSource":{"type":"github","owner":"vectrade-io","repo":"vectrade-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af6510b366235c07ba6b4b5","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"API Reference","count":32},{"language":"default","tag":"Documentation","count":24},{"language":"default","tag":"SDKs","count":12},{"language":"default","tag":"Market Data","count":9},{"language":"default","tag":"AI \u0026 Analysis","count":8},{"language":"default","tag":"Developer","count":8},{"language":"default","tag":"Guides","count":8},{"language":"default","tag":"VTrade","count":8},{"language":"default","tag":"Options \u0026 Events","count":5},{"language":"default","tag":"Getting Started","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"guides/authentication","slug":"/guides/authentication","pageMetadata":{"title":"Authentication","description":"How to authenticate with the VecTrade API and manage API keys securely.","href":"/guides/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: \"How to authenticate with the VecTrade API and manage API keys securely.\"\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={code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(_components.p,{children:`All VecTrade API requests require authentication with your VecTrade API key.`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`X-API-Key`}),` as the primary header for hosted/public API traffic.\nSome direct deployments also accept `,_jsx(_components.code,{children:`Authorization: Bearer vq_...`}),`, but `,_jsx(_components.code,{children:`X-API-Key`}),` is the stable default.`]}),`\n`,_jsx(Heading,{level:`2`,id:`api-key-format`,children:`API Key Format`}),`\n`,_jsxs(_components.p,{children:[`API keys follow the format `,_jsx(_components.code,{children:`vq_`}),` followed by a random string:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`X-API-Key: vq_aaJFCQFZpv8BZU_RuLLAHlXP_Md3A55GhNeVtnn3Ykk`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`making-authenticated-requests`,children:`Making Authenticated Requests`}),`\n`,_jsx(Heading,{level:`3`,id:`curl`,children:`cURL`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,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:`2`,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:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$VECTRADE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.vectrade.io/v1/vq/quotes/AAPL`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Alternative header form (when supported by your deployment):`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,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:`2`,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:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$VECTRADE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.vectrade.io/v1/vq/quotes/AAPL`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`python-sdk`,children:`Python SDK`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,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:` vectrade `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` VecTrade`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Reads VECTRADE_API_KEY from environment automatically`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` VecTrade()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Or pass explicitly`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` VecTrade(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vq_your_key_here\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`typescript-sdk`,children:`TypeScript SDK`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`VecTrade`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@vectrade/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Reads VECTRADE_API_KEY from environment`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` VecTrade`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Or pass explicitly`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` VecTrade`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vq_your_key_here\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Never hardcode API keys in source code. Use environment variables or secret managers.`})}),`\n`,_jsx(Heading,{level:`2`,id:`key-security-best-practices`,children:`Key Security Best Practices`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rotate regularly`}),` — Generate new keys and revoke old ones monthly`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use scoped keys`}),` — Create keys with minimum required permissions`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Separate environments`}),` — Use different keys for dev/staging/production`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Monitor usage`}),` — Check the dashboard for unexpected activity`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use secrets managers`}),` — Store keys in Vault, AWS Secrets Manager, etc.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`key-permissions-scopes`,children:`Key Permissions (Scopes)`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Scope`}),_jsx(_components.th,{children:`Access`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`quotes:read`})}),_jsx(_components.td,{children:`Real-time and historical quotes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fundamentals:read`})}),_jsx(_components.td,{children:`Company financials, profiles, and statements`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`technicals:read`})}),_jsx(_components.td,{children:`Technical indicators and scoring`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`news:read`})}),_jsx(_components.td,{children:`Financial news articles`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`analyst:read`})}),_jsx(_components.td,{children:`Analyst consensus, price targets, ratings`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`earnings:read`})}),_jsx(_components.td,{children:`Earnings history and calendar`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`insider:read`})}),_jsx(_components.td,{children:`Insider trading activity`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`options:read`})}),_jsx(_components.td,{children:`Options chain data`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sentiment:read`})}),_jsx(_components.td,{children:`Market sentiment data`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`etf:read`})}),_jsx(_components.td,{children:`ETF profiles and holdings`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsxs(_components.p,{children:[`Missing or invalid keys return `,_jsx(_components.code,{children:`401 Unauthorized`}),`:`]}),`\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:` \"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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"authentication_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:`\"Missing or invalid API key\"`}),_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:` \"docs_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://docs.vectrade.io/guides/authentication\"`})]}),`\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`,_jsxs(_components.p,{children:[`Insufficient permissions return `,_jsx(_components.code,{children:`403 Forbidden`}),`:`]}),`\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:` \"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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"permission_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:`\"API key does not have permission. Required scope: ai:read\"`})]}),`\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:`sdk-error-handling`,children:`SDK Error Handling`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,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:`8`,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:` vectrade `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` VecTrade, AuthenticationError`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` VecTrade(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"invalid_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\":`#D4D4D4`},children:` client.quotes.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AAPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`except`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AuthenticationError `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Auth failed: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`e.message`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Request ID: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`e.request_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Authentication","description":"How to authenticate with the VecTrade API and manage API keys securely.","href":"/guides/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":1,"children":[]},{"title":"API Key Format","slug":"api-key-format","depth":2,"children":[]},{"title":"Making Authenticated Requests","slug":"making-authenticated-requests","depth":2,"children":[{"title":"cURL","slug":"curl","depth":3,"children":[]},{"title":"Python SDK","slug":"python-sdk","depth":3,"children":[]},{"title":"TypeScript SDK","slug":"typescript-sdk","depth":3,"children":[]}]},{"title":"Key Security Best Practices","slug":"key-security-best-practices","depth":2,"children":[]},{"title":"Key Permissions (Scopes)","slug":"key-permissions-scopes","depth":2,"children":[]},{"title":"Error Responses","slug":"error-responses","depth":2,"children":[]},{"title":"SDK Error Handling","slug":"sdk-error-handling","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/vectrade/3b9359b70f12acbf/analytics.js"],"subdomain":"vectrade","siteName":"VecTrade","title":"Authentication - VecTrade","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T23:41:57.161Z","originalFileLocation":"guides/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=\"How to authenticate with the VecTrade API and manage API keys securely.\">\u003cmeta data-mint-head name=\"application-name\" content=\"VecTrade\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vectrade/209JvPpsWi6qWlO4/_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/vectrade/209JvPpsWi6qWlO4/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vectrade/209JvPpsWi6qWlO4/_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/vectrade/209JvPpsWi6qWlO4/_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/vectrade/209JvPpsWi6qWlO4/_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/vectrade/209JvPpsWi6qWlO4/_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/vectrade/209JvPpsWi6qWlO4/_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/vectrade/209JvPpsWi6qWlO4/_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/vectrade/209JvPpsWi6qWlO4/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - VecTrade\">\u003cmeta data-mint-head property=\"og:description\" content=\"How to authenticate with the VecTrade API and manage API keys securely.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"VecTrade\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.vectrade.io/guides/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://vectrade.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Authentication\u0026amp;description=How+to+authenticate+with+the+VecTrade+API+and+manage+API+keys+securely.\u0026amp;theme=e576ebcca9f24b5e377c37e1\u0026amp;signature=d186dec2c2b50638c241b8de6f1fe75a33d9113fe80cbf87df0f8cc6dc9de664\">\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 - VecTrade\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How to authenticate with the VecTrade API and manage API keys securely.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://vectrade.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Authentication\u0026amp;description=How+to+authenticate+with+the+VecTrade+API+and+manage+API+keys+securely.\u0026amp;theme=e576ebcca9f24b5e377c37e1\u0026amp;signature=d186dec2c2b50638c241b8de6f1fe75a33d9113fe80cbf87df0f8cc6dc9de664\">\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/vectrade/209JvPpsWi6qWlO4/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"VecTrade\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0891B2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.vectrade.io/guides/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.vectrade.io/#organization\",\"name\":\"VecTrade\",\"url\":\"https://docs.vectrade.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/vectrade/i7a2W30rjqqszMLH/logo/light.svg?fit=max\u0026auto=format\u0026n=i7a2W30rjqqszMLH\u0026q=85\u0026s=b763fd409b10c3ddf5adc7307bd83837\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.vectrade.io#website\",\"name\":\"VecTrade\",\"url\":\"https://docs.vectrade.io\",\"publisher\":{\"@id\":\"https://docs.vectrade.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.vectrade.io/guides/authentication#webpage\",\"url\":\"https://docs.vectrade.io/guides/authentication\",\"name\":\"Authentication\",\"description\":\"How to authenticate with the VecTrade API and manage API keys securely.\",\"dateModified\":\"2026-11-12T23:41:57.161Z\",\"isPartOf\":{\"@id\":\"https://docs.vectrade.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.vectrade.io/guides/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.vectrade.io/guides/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"VecTrade\",\"item\":\"https://docs.vectrade.io\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.vectrade.io/guides/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.vectrade.io/guides/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"How to authenticate with the VecTrade API and manage API keys securely.\",\"url\":\"https://docs.vectrade.io/guides/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.vectrade.io/guides/authentication#webpage\"},\"dateModified\":\"2026-11-12T23:41:57.161Z\",\"publisher\":{\"@id\":\"https://docs.vectrade.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.vectrade.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"VecTrade\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"VecTrade\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/authentication.md","siteName":"VecTrade","nav":{"global":{"anchors":[{"anchor":"GitHub","href":"https://github.com/VecTrade-io","icon":"github"},{"anchor":"Status","href":"https://status.vectrade.io","icon":"signal"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"VTrade","pages":[{"title":"VTrade Platform Guide","href":"/guides/vtrade/overview"},{"title":"Trading Desk","href":"/guides/vtrade/trading"},{"title":"Portfolio, Wallet \u0026 Watchlists","href":"/guides/vtrade/portfolio"},{"title":"Market Data \u0026 Analytics","href":"/guides/vtrade/market-analytics"},{"title":"AI Copilot","href":"/guides/vtrade/copilot"},{"title":"Social \u0026 Community","href":"/guides/vtrade/social"},{"title":"Developer Portal","href":"/guides/vtrade/developer"},{"title":"Settings","href":"/guides/vtrade/settings"}]},{"group":"Getting Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"},{"title":"Ecosystem","href":"/ecosystem"},{"title":"Changelog","description":"Release history and breaking changes across the VecTrade platform.","href":"/changelog"}]},{"group":"Guides","pages":[{"title":"Authentication","href":"/guides/authentication"},{"title":"Error Handling","description":"Understanding VecTrade API errors, retry strategies, and best practices.","href":"/guides/error-handling"},{"title":"Pagination","href":"/guides/pagination"},{"title":"Streaming","href":"/guides/streaming"},{"title":"Rate Limits","href":"/guides/rate-limits"},{"title":"Webhook Subscriptions","href":"/guides/webhooks"},{"title":"Bot Trading","href":"/guides/bot-trading"},{"title":"Best Practices","href":"/guides/best-practices"}]},{"group":"Resources","pages":[{"title":"Examples","href":"/resources/examples"},{"title":"OpenAPI Specification","href":"/resources/openapi"},{"title":"SDK Generator","href":"/resources/sdk-generator"},{"title":"Community","href":"/resources/community"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/python"}]}]},"basePath":"","title":"Authentication - VecTrade","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}