1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,487486,e=>{"use strict";var t=e.i(843476),s=e.i(225913),a=e.i(975157);let r=(0,s.cva)("inline-flex items-center gap-1 font-medium transition-colors",{variants:{variant:{default:"bg-surface-elevated text-text-secondary border border-border rounded-[var(--radius-full)] px-3 py-0.5 text-[var(--font-size-xs)]",gold:"bg-gold-muted text-gold border border-border-gold rounded-[var(--radius-full)] px-3 py-0.5 text-[var(--font-size-xs)]",success:"bg-success-muted text-success rounded-[var(--radius-full)] px-3 py-0.5 text-[var(--font-size-xs)]",danger:"bg-danger-muted text-danger rounded-[var(--radius-full)] px-3 py-0.5 text-[var(--font-size-xs)]",new:"bg-info-muted text-info rounded-[var(--radius-full)] px-2 py-0.5 text-[var(--font-size-xs)] uppercase tracking-wider font-bold",hot:"bg-danger-muted text-danger rounded-[var(--radius-full)] px-2 py-0.5 text-[var(--font-size-xs)] uppercase tracking-wider font-bold",pro:"bg-gold-muted text-gold rounded-[var(--radius-full)] px-2 py-0.5 text-[var(--font-size-xs)] uppercase tracking-wider font-bold"}},defaultVariants:{variant:"default"}});function i({className:e,variant:s,...i}){return(0,t.jsx)("span",{className:(0,a.cn)(r({variant:s,className:e})),...i})}e.s(["Badge",()=>i])},130917,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(975157);let r={h1:"text-[clamp(2.618rem,6vw,6.854rem)] font-bold tracking-[-0.03em] leading-[1.05]",h2:"text-[clamp(2rem,4vw,4.236rem)] font-bold tracking-[-0.025em] leading-[1.1]",h3:"text-[clamp(1.618rem,3vw,2.618rem)] font-semibold tracking-[-0.02em] leading-[1.2]",h4:"text-[clamp(1.25rem,2vw,1.618rem)] font-semibold tracking-[-0.015em] leading-[1.3]",h5:"text-[1.25rem] font-medium tracking-[-0.01em] leading-[1.4]",h6:"text-[1rem] font-medium tracking-[0.01em] leading-[1.5] uppercase"},i=(0,s.forwardRef)(({as:e="h2",gradient:s=!1,className:i,...n},o)=>(0,t.jsx)(e,{ref:o,className:(0,a.cn)(r[e],"text-text-primary",s&&"text-gradient-gold",i),...n}));i.displayName="Heading",e.s(["Heading",()=>i])},327507,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(975157);let r={lead:"text-[var(--font-size-lg)] leading-relaxed",body:"text-[var(--font-size-base)] leading-relaxed",caption:"text-[var(--font-size-sm)] leading-normal",overline:"text-[var(--font-size-xs)] font-semibold uppercase tracking-[0.15em] leading-normal",mono:"text-[var(--font-size-sm)] font-mono leading-normal"},i=(0,s.forwardRef)(({variant:e="body",muted:s=!1,className:i,...n},o)=>(0,t.jsx)("p",{ref:o,className:(0,a.cn)(r[e],s?"text-text-secondary":"text-text-primary","mono"===e&&"font-mono",i),...n}));i.displayName="Text",e.s(["Text",()=>i])},283364,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(975157);let r=(0,s.forwardRef)(({variant:e="gold",className:s,...r},i)=>(0,t.jsx)("span",{ref:i,className:(0,a.cn)("bg-clip-text text-transparent",{"bg-gradient-to-r from-gold via-gold-light to-gold":"gold"===e,"bg-gradient-to-r from-text-secondary via-text-primary to-text-secondary":"silver"===e,"bg-gradient-to-r from-white/80 via-white to-white/80":"white"===e},s),...r}));r.displayName="GradientText",e.s(["GradientText",()=>r])},22121,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(522016),r=e.i(846932);e.i(156669);var i=e.i(761178),n=e.i(351578),o=e.i(320841),d=e.i(102030),c=e.i(925746),l=e.i(796497),m=e.i(928995),x=e.i(270276),p=e.i(504241),h=e.i(764018),u=e.i(536122),b=e.i(483727),g=e.i(401039),j=e.i(792978),v=e.i(237918),f=e.i(130917),y=e.i(327507),N=e.i(487486),D=e.i(519455),w=e.i(283364),T=e.i(31241),C=e.i(948148);let k=[{label:"Endpoints",value:"200+"},{label:"Uptime",value:"99.99%"},{label:"Latency",value:"<10ms"},{label:"WebSocket Streams",value:"50+"}],S=[{step:1,title:"Generate API Key",description:"Create an API key in your account settings. Assign read-only, trading, or withdrawal permissions depending on your use case.",icon:(0,t.jsx)(m.Key,{className:"h-5 w-5"})},{step:2,title:"Install SDK",description:"Use our official SDKs for Python, Node.js, or Go. Or call the REST endpoints directly with any HTTP client.",icon:(0,t.jsx)(p.Terminal,{className:"h-5 w-5"})},{step:3,title:"Make Your First Request",description:"Fetch live market data, place an order, or subscribe to a WebSocket stream. You are up and running in minutes.",icon:(0,t.jsx)(n.Zap,{className:"h-5 w-5"})}],A={Python:"pip install midas-sdk",JavaScript:"npm install @midas/sdk",Go:"go get github.com/midas-exchange/sdk-go"},P=[{title:"Market Data",icon:(0,t.jsx)(x.Activity,{className:"h-5 w-5 text-gold"}),endpoints:[{method:"GET",path:"/api/v1/ticker",description:"24h price statistics for a symbol or all symbols"},{method:"GET",path:"/api/v1/orderbook",description:"Live order book depth (up to 500 levels)"},{method:"GET",path:"/api/v1/trades",description:"Recent public trades for a trading pair"},{method:"GET",path:"/api/v1/klines",description:"Candlestick/OHLCV data for charting"}]},{title:"Account",icon:(0,t.jsx)(d.Shield,{className:"h-5 w-5 text-gold"}),endpoints:[{method:"GET",path:"/api/v1/account",description:"Account information and trading status"},{method:"GET",path:"/api/v1/balances",description:"All asset balances with available/locked amounts"},{method:"GET",path:"/api/v1/deposit-history",description:"Historical deposit records with status"}]},{title:"Spot Trading",icon:(0,t.jsx)(l.Globe,{className:"h-5 w-5 text-gold"}),endpoints:[{method:"POST",path:"/api/v1/order",description:"Place a new limit, market, or stop order"},{method:"DELETE",path:"/api/v1/order",description:"Cancel an existing open order by ID"},{method:"GET",path:"/api/v1/open-orders",description:"List all currently open orders"}]},{title:"Futures",icon:(0,t.jsx)(n.Zap,{className:"h-5 w-5 text-gold"}),endpoints:[{method:"POST",path:"/api/v1/futures/order",description:"Open or close a futures position"},{method:"GET",path:"/api/v1/futures/positions",description:"Active positions with PnL and margin info"},{method:"POST",path:"/api/v1/futures/leverage",description:"Adjust leverage for a trading pair"}]},{title:"Wallet",icon:(0,t.jsx)(g.Lock,{className:"h-5 w-5 text-gold"}),endpoints:[{method:"POST",path:"/api/v1/withdraw",description:"Submit a withdrawal request to an external address"},{method:"GET",path:"/api/v1/deposit-address",description:"Get your deposit address for a given asset and network"}]}],E=[{name:"ticker",description:"Real-time 24h price statistics"},{name:"orderbook",description:"Live order book updates (diff or snapshot)"},{name:"trades",description:"Public trade execution feed"},{name:"klines",description:"Candlestick updates by interval"}],I=[{name:"orders",description:"Order status changes and fills"},{name:"balances",description:"Real-time balance updates"},{name:"positions",description:"Futures position changes and liquidation alerts"}],R=[{tier:"Standard",requests:"1,200",websocket:"5",orderRate:"10"},{tier:"Advanced",requests:"6,000",websocket:"20",orderRate:"50"},{tier:"VIP",requests:"12,000",websocket:"50",orderRate:"100"},{tier:"Institutional",requests:"Custom",websocket:"Custom",orderRate:"Custom"}],_=[{code:"10001",message:"Invalid API Key",description:"API key not found or disabled"},{code:"10002",message:"Invalid Signature",description:"HMAC signature mismatch"},{code:"10003",message:"Timestamp Expired",description:"Request timestamp outside window"},{code:"10004",message:"Rate Limit Exceeded",description:"Too many requests"},{code:"20001",message:"Insufficient Balance",description:"Not enough funds for this operation"},{code:"20002",message:"Invalid Order",description:"Order parameters invalid"},{code:"20003",message:"Order Not Found",description:"Order ID does not exist"},{code:"30001",message:"Market Suspended",description:"Trading pair temporarily suspended"}],B={Python:`import midas 2 3client = midas.Client( 4 api_key="your_api_key", 5 api_secret="your_api_secret" 6) 7 8# Fetch ticker data 9ticker = client.get_ticker(symbol="BTC_USDT")
10print(f"BTC Price: {ticker['last_price']}") 11 12# Place a limit buy order 13order = client.create_order( 14 symbol="BTC_USDT", 15 side="BUY", 16 type="LIMIT", 17 quantity=0.001, 18 price=65000.00 19) 20print(f"Order ID: {order['id']}")`,JavaScript:`import { MidasClient } from "@midas/sdk"; 21 22const client = new MidasClient({ 23 apiKey: "your_api_key", 24 apiSecret: "your_api_secret", 25}); 26 27// Fetch ticker data 28const ticker = await client.getTicker("BTC_USDT"); 29console.log(\`BTC Price: \${ticker.lastPrice}\`); 30 31// Place a limit buy order 32const order = await client.createOrder({ 33 symbol: "BTC_USDT", 34 side: "BUY", 35 type: "LIMIT", 36 quantity: 0.001, 37 price: 65000.00, 38}); 39console.log(\`Order ID: \${order.id}\`);`,Go:`package main 40 41import ( 42 "fmt" 43 midas "github.com/midas-exchange/sdk-go" 44) 45 46func main() { 47 client := midas.NewClient( 48 "your_api_key", 49 "your_api_secret", 50 ) 51 52 // Fetch ticker data 53 ticker, _ := client.GetTicker("BTC_USDT") 54 fmt.Printf("BTC Price: %s\\n", ticker.LastPrice) 55 56 // Place a limit buy order 57 order, _ := client.CreateOrder(&midas.OrderRequest{ 58 Symbol: "BTC_USDT", 59 Side: "BUY", 60 Type: "LIMIT", 61 Quantity: 0.001, 62 Price: 65000.00, 63 }) 64 fmt.Printf("Order ID: %s\\n", order.ID) 65}`},G={initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,ease:[.16,1,.3,1]}};function O({method:e}){return(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 rounded-[var(--radius-md)] text-[11px] font-bold font-mono uppercase tracking-wider border ${{GET:"bg-emerald-500/15 text-emerald-400 border-emerald-500/25",POST:"bg-blue-500/15 text-blue-400 border-blue-500/25",DELETE:"bg-[#E44D90]/15 text-[#E44D90] border-red-500/25",PUT:"bg-amber-500/15 text-amber-400 border-amber-500/25"}[e]??"bg-surface-elevated text-text-secondary border-border"}`,children:e})}function U({text:e}){let a=(0,C.useTranslations)(),[r,i]=(0,s.useState)(!1);return(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)},className:"absolute top-3 right-3 p-1.5 rounded-[var(--radius-md)] bg-white/5 hover:bg-white/10 text-text-muted hover:text-text-secondary transition-colors cursor-pointer","aria-label":a("learn.apiDocs.apiDocsContent.copyToClipboard"),children:r?(0,t.jsx)(u.Check,{className:"h-4 w-4 text-success"}):(0,t.jsx)(h.Copy,{className:"h-4 w-4"})})}function q({code:e,className:s}){return(0,t.jsxs)("div",{className:`relative group rounded-[var(--radius-lg)] bg-[#0D0D0F] border border-border overflow-hidden ${s??""}`,children:[(0,t.jsx)(U,{text:e}),(0,t.jsx)("pre",{className:"p-4 overflow-x-auto",children:(0,t.jsx)("code",{className:"font-mono text-sm text-text-secondary leading-relaxed whitespace-pre",children:e})})]})}function H(){let e=(0,C.useTranslations)();return(0,t.jsxs)("section",{className:"relative pt-32 pb-20 overflow-hidden",children:[(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0",children:(0,t.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[800px] h-[400px] bg-gold/5 rounded-full blur-[120px]"})}),(0,t.jsx)(v.Container,{children:(0,t.jsxs)(r.motion.div,{...G,className:"max-w-3xl mx-auto text-center",children:[(0,t.jsx)(y.Text,{variant:"overline",className:"text-gold mb-4",children:e("learn.apiDocs.apiDocsContent.developerPlatform")}),(0,t.jsxs)(f.Heading,{as:"h1",className:"mb-6",children:["API ",(0,t.jsx)(w.GradientText,{children:e("learn.apiDocs.apiDocsContent.documentation")})]}),(0,t.jsx)(y.Text,{variant:"lead",muted:!0,className:"mb-8 max-w-2xl mx-auto",children:e("learn.apiDocs.apiDocsContent.buildTradingBotsPortfolioManagersAnd")}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-4 mb-12",children:[(0,t.jsx)(D.Button,{asChild:!0,size:"lg",children:(0,t.jsxs)(a.default,{href:`${T.APP_URL}/app/api-keys`,children:[e("learn.apiDocs.apiDocsContent.getApiKey"),(0,t.jsx)(c.ArrowRight,{className:"h-4 w-4"})]})}),(0,t.jsx)(D.Button,{asChild:!0,variant:"secondary",size:"lg",children:(0,t.jsxs)(a.default,{href:"#rest-api",children:[(0,t.jsx)(b.BookOpen,{className:"h-4 w-4"}),e("learn.apiDocs.apiDocsContent.viewFullDocs")]})})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6",children:k.map(e=>(0,t.jsxs)("div",{className:"p-4 rounded-[var(--radius-xl)] bg-surface-tertiary border border-border",children:[(0,t.jsx)("p",{className:"text-2xl font-bold text-text-primary",children:e.value}),(0,t.jsx)("p",{className:"text-sm text-text-muted mt-1",children:e.label})]},e.label))})]})})]})}
65function L(){let e=(0,C.useTranslations)(),[a,i]=(0,s.useState)("Python");return(0,t.jsx)("section",{className:"relative py-24 border-t border-border",children:(0,t.jsxs)(v.Container,{children:[(0,t.jsxs)(r.motion.div,{...G,className:"mb-12",children:[(0,t.jsx)(y.Text,{variant:"overline",className:"text-gold mb-4",children:e("learn.apiDocs.apiDocsContent.quickStart")}),(0,t.jsxs)(f.Heading,{as:"h2",className:"mb-4",children:[e("learn.apiDocs.apiDocsContent.upAndRunningIn")," ",(0,t.jsx)(w.GradientText,{children:e("learn.apiDocs.apiDocsContent.3Steps")})]}),(0,t.jsx)(y.Text,{muted:!0,className:"max-w-2xl",children:e("learn.apiDocs.apiDocsContent.fromApiKeyGenerationToYour")})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:S.map((e,s)=>(0,t.jsxs)(r.motion.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1*s,ease:[.16,1,.3,1]},className:"relative p-6 rounded-[var(--radius-xl)] bg-surface-tertiary border border-border",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,t.jsx)("span",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-gold/10 text-gold text-sm font-bold",children:e.step}),(0,t.jsx)("span",{className:"text-text-muted",children:e.icon})]}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-text-primary mb-2",children:e.title}),(0,t.jsx)("p",{className:"text-sm text-text-secondary leading-relaxed",children:e.description}),2===e.step&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("div",{className:"flex gap-1 mb-2",children:Object.keys(A).map(e=>(0,t.jsx)("button",{onClick:()=>i(e),className:`px-2.5 py-1 text-xs font-medium rounded-[var(--radius-md)] transition-colors cursor-pointer ${a===e?"bg-gold/15 text-gold":"text-text-muted hover:text-text-secondary"}`,children:e},e))}),(0,t.jsx)(q,{code:A[a]})]})]},e.step))})]})})}function M(){let e=(0,C.useTranslations)();return(0,t.jsx)("section",{id:"rest-api",className:"relative py-24 border-t border-border",children:(0,t.jsxs)(v.Container,{children:[(0,t.jsxs)(r.motion.div,{...G,className:"mb-12",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,t.jsx)(y.Text,{variant:"overline",className:"text-gold",children:e("learn.apiDocs.apiDocsContent.restApi")}),(0,t.jsx)(N.Badge,{variant:"gold",children:"v1"})]}),(0,t.jsxs)(f.Heading,{as:"h2",className:"mb-4",children:[e("learn.apiDocs.apiDocsContent.restApi")," ",(0,t.jsx)(w.GradientText,{children:e("learn.apiDocs.apiDocsContent.reference")})]}),(0,t.jsxs)(y.Text,{muted:!0,className:"max-w-2xl",children:[e("learn.apiDocs.apiDocsContent.allEndpointsAreAvailableAt")," ",(0,t.jsx)("code",{className:"font-mono text-gold text-sm",children:"https://api.midas.exchange"}),e("learn.apiDocs.apiDocsContent.responsesAreJsonEncodedWithStandard")]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:P.map((e,s)=>(0,t.jsxs)(r.motion.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.08*s,ease:[.16,1,.3,1]},className:"p-6 rounded-[var(--radius-xl)] bg-surface-tertiary border border-border",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[e.icon,(0,t.jsx)("h3",{className:"text-lg font-semibold text-text-primary",children:e.title})]}),(0,t.jsx)("div",{className:"space-y-3",children:e.endpoints.map(e=>(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start gap-2 p-3 rounded-[var(--radius-lg)] bg-[#0D0D0F]/60 border border-border/50",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,t.jsx)(O,{method:e.method}),(0,t.jsx)("code",{className:"font-mono text-sm text-text-primary",children:e.path})]}),(0,t.jsx)("p",{className:"text-xs text-text-muted sm:ml-auto sm:text-right leading-relaxed",children:e.description})]},e.path))})]},e.title))})]})})}function K(){let e=(0,C.useTranslations)();return(0,t.jsx)("section",{id:"websocket",className:"relative py-24 border-t border-border",children:(0,t.jsxs)(v.Container,{children:[(0,t.jsxs)(r.motion.div,{...G,className:"mb-12",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,t.jsx)(y.Text,{variant:"overline",className:"text-gold",children:e("learn.apiDocs.apiDocsContent.websocketApi")}),(0,t.jsx)(N.Badge,{variant:"success",children:e("learn.apiDocs.apiDocsContent.realTime")})]}),(0,t.jsxs)(f.Heading,{as:"h2",className:"mb-4",children:[e("learn.apiDocs.apiDocsContent.websocket")," ",(0,t.jsx)(w.GradientText,{children:e("learn.apiDocs.apiDocsContent.streams")})]}),(0,t.jsx)(y.Text,{muted:!0,className:"max-w-2xl",children:e("learn.apiDocs.apiDocsContent.subscribeToRealTimeMarketDataAnd")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8",children:[(0,t.jsxs)(r.motion.div,{...G,className:"p-6 rounded-[var(--radius-xl)] bg-surface-tertiary border border-border",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,t.jsx)(j.Radio,{className:"h-5 w-5 text-emerald-400"}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-text-primary",children:e("learn.apiDocs.apiDocsContent.publicStreams")}),(0,t.jsx)(N.Badge,{variant:"default",children:e("learn.apiDocs.apiDocsContent.noAuth")})]}),(0,t.jsx)("div",{className:"space-y-3",children:E.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-[var(--radius-lg)] bg-[#0D0D0F]/60 border border-border/50",children:[(0,t.jsx)("code",{className:"font-mono text-sm text-emerald-400",children:e.name}),(0,t.jsx)("span",{className:"text-xs text-text-muted",children:e.description})]},e.name))})]}),(0,t.jsxs)(r.motion.div,{...G,className:"p-6 rounded-[var(--radius-xl)] bg-surface-tertiary border border-border",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,t.jsx)(g.Lock,{className:"h-5 w-5 text-amber-400"}),(0,t.jsx)("h3",{className:"text-lg font-semibold text-text-primary",children:e("learn.apiDocs.apiDocsContent.privateStreams")}),(0,t.jsx)(N.Badge,{variant:"gold",children:e("learn.apiDocs.apiDocsContent.authRequired")})]}),(0,t.jsx)("div",{className:"space-y-3",children:I.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-[var(--radius-lg)] bg-[#0D0D0F]/60 border border-border/50",children:[(0,t.jsx)("code",{className:"font-mono text-sm text-amber-400",children:e.name}),(0,t.jsx)("span",{className:"text-xs text-text-muted",children:e.description})]},e.name))})]})]}),(0,t.jsxs)(r.motion.div,{...G,children:[(0,t.jsx)("p",{className:"text-sm text-text-secondary mb-3",children:e("learn.apiDocs.apiDocsContent.connectionEndpoint")}),(0,t.jsx)(q,{code:`// Connect to the WebSocket server 66const ws = new WebSocket("wss://stream.midas.exchange/ws/v1"); 67 68// Subscribe to BTC/USDT ticker 69ws.onopen = () => { 70 ws.send(JSON.stringify({ 71 method: "SUBSCRIBE", 72 params: ["ticker@BTC_USDT", "orderbook@BTC_USDT"], 73 id: 1, 74 })); 75}; 76 77ws.onmessage = (event) => { 78 const data = JSON.parse(event.data); 79 console.log(data); 80};`})]})]})})}function z(){let e=(0,C.useTranslations)();return(0,t.jsx)("section",{id:"authentication",className:"relative py-24 border-t border-border",children:(0,t.jsxs)(v.Container,{children:[(0,t.jsxs)(r.motion.div,{...G,className:"mb-12",children:[(0,t.jsx)(y.Text,{variant:"overline",className:"text-gold mb-4",children:e("common.security")}),(0,t.jsx)(f.Heading,{as:"h2",className:"mb-4",children:(0,t.jsx)(w.GradientText,{children:e("learn.apiDocs.apiDocsContent.authentication")})}),(0,t.jsx)(y.Text,{muted:!0,className:"max-w-2xl",children:e("learn.apiDocs.apiDocsContent.allPrivateEndpointsRequireHmacSha256Signed")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,t.jsxs)(r.motion.div,{...G,className:"p-6 rounded-[var(--radius-xl)] bg-surface-tertiary border border-border",children:[(0,t.jsx)("h3",{className:"text-lg font-semibold text-text-primary mb-5",children:e("learn.apiDocs.apiDocsContent.signingProcess")}),(0,t.jsx)("div",{className:"space-y-4",children:[{icon:(0,t.jsx)(m.Key,{className:"h-4 w-4 text-gold"}),title:e("learn.apiDocs.apiDocsContent.apiKeySecret"),desc:"Every request includes your API key in the X-API-KEY header. Your secret is used only for signing and never sent over the wire."},{icon:(0,t.jsx)(d.Shield,{className:"h-4 w-4 text-gold"}),title:e("learn.apiDocs.apiDocsContent.hmacSha256Signature"),desc:"Concatenate the timestamp, HTTP method, request path, and body. Sign the string with your secret using HMAC-SHA256."},{icon:(0,t.jsx)(o.Clock,{className:"h-4 w-4 text-gold"}),title:e("learn.apiDocs.apiDocsContent.timestampWindow"),desc:"Include a millisecond timestamp in the X-TIMESTAMP header. Requests older than 5 seconds are rejected to prevent replay attacks."}].map(e=>(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("span",{className:"mt-0.5 shrink-0",children:e.icon}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-text-primary",children:e.title}),(0,t.jsx)("p",{className:"text-xs text-text-muted leading-relaxed mt-0.5",children:e.desc})]})]},e.title))})]}),(0,t.jsxs)(r.motion.div,{...G,children:[(0,t.jsx)("p",{className:"text-sm text-text-secondary mb-3",children:e("learn.apiDocs.apiDocsContent.requiredHeadersForAuthenticatedRequests")}),(0,t.jsx)(q,{code:`X-API-KEY: your_api_key 81X-TIMESTAMP: 1718032000000 82X-SIGNATURE: hmac_sha256( 83 secret, 84 timestamp + method + path + body 85 ) 86 87# Example: signing a POST /api/v1/order request 88import hmac, hashlib, time, json 89 90timestamp = str(int(time.time() * 1000)) 91body = json.dumps({"symbol": "BTC_USDT", "side": "BUY", ...}) 92message = timestamp + "POST" + "/api/v1/order" + body 93signature = hmac.new( 94 secret.encode(), 95 message.encode(), 96 hashlib.sha256 97).hexdigest() 98 99headers = { 100 "X-API-KEY": api_key, 101 "X-TIMESTAMP": timestamp, 102 "X-SIGNATURE": signature, 103 "Content-Type": "application/json", 104}`})]})]})]})})}function F(){let e=(0,C.useTranslations)();return(0,t.jsx)("section",{id:"rate-limits",className:"relative py-24 border-t border-border",children:(0,t.jsxs)(v.Container,{children:[(0,t.jsxs)(r.motion.div,{...G,className:"mb-12",children:[(0,t.jsx)(y.Text,{variant:"overline",className:"text-gold mb-4",children:e("learn.apiDocs.apiDocsContent.rateLimits")}),(0,t.jsxs)(f.Heading,{as:"h2",className:"mb-4",children:[e("learn.apiDocs.apiDocsContent.usage")," ",(0,t.jsx)(w.GradientText,{children:e("dashboard.p2p.ads.edit.editAdClient.limits")})]}),(0,t.jsx)(y.Text,{muted:!0,className:"max-w-2xl",children:e("learn.apiDocs.apiDocsContent.rateLimitsScaleWithYourAccount")}
104)]}),(0,t.jsx)(r.motion.div,{...G,className:"rounded-[var(--radius-xl)] bg-surface-tertiary border border-border overflow-hidden",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-left",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b border-border",children:[(0,t.jsx)("th",{className:"px-6 py-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:e("learn.apiDocs.apiDocsContent.tier")}),(0,t.jsx)("th",{className:"px-6 py-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:e("learn.apiDocs.apiDocsContent.requestsMin")}),(0,t.jsx)("th",{className:"px-6 py-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:e("learn.apiDocs.apiDocsContent.websocketConnections")}),(0,t.jsx)("th",{className:"px-6 py-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:e("learn.apiDocs.apiDocsContent.orderRateSec")})]})}),(0,t.jsx)("tbody",{children:R.map((s,a)=>(0,t.jsxs)("tr",{className:`border-b border-border/50 ${a===R.length-1?"border-b-0":""}`,children:[(0,t.jsxs)("td",{className:"px-6 py-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-text-primary",children:s.tier}),"VIP"===s.tier&&(0,t.jsx)(N.Badge,{variant:"gold",className:"ml-2",children:e("dashboard.earn.popular")})]}),(0,t.jsx)("td",{className:"px-6 py-4 font-mono text-sm text-text-secondary",children:s.requests}),(0,t.jsx)("td",{className:"px-6 py-4 font-mono text-sm text-text-secondary",children:s.websocket}),(0,t.jsx)("td",{className:"px-6 py-4 font-mono text-sm text-text-secondary",children:s.orderRate})]},s.tier))})]})})})]})})}function Y(){let e=(0,C.useTranslations)();return(0,t.jsx)("section",{id:"error-codes",className:"relative py-24 border-t border-border",children:(0,t.jsxs)(v.Container,{children:[(0,t.jsxs)(r.motion.div,{...G,className:"mb-12",children:[(0,t.jsx)(y.Text,{variant:"overline",className:"text-gold mb-4",children:e("learn.apiDocs.apiDocsContent.errorHandling")}),(0,t.jsxs)(f.Heading,{as:"h2",className:"mb-4",children:[e("dashboard.bots.performance.error")," ",(0,t.jsx)(w.GradientText,{children:e("learn.apiDocs.apiDocsContent.codes")})]}),(0,t.jsx)(y.Text,{muted:!0,className:"max-w-2xl",children:e("learn.apiDocs.apiDocsContent.allApiErrorsReturnAJson")})]}),(0,t.jsx)(r.motion.div,{...G,className:"rounded-[var(--radius-xl)] bg-surface-tertiary border border-border overflow-hidden",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-left",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b border-border",children:[(0,t.jsx)("th",{className:"px-6 py-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:e("dashboard.rewards.cashback.claim.code")}),(0,t.jsx)("th",{className:"px-6 py-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:e("learn.apiDocs.apiDocsContent.message")}),(0,t.jsx)("th",{className:"px-6 py-4 text-xs font-semibold uppercase tracking-wider text-text-muted",children:e("dashboard.p2p.disputes.disputesClient.description")})]})}),(0,t.jsx)("tbody",{children:_.map((e,s)=>(0,t.jsxs)("tr",{className:`border-b border-border/50 ${s===_.length-1?"border-b-0":""}`,children:[(0,t.jsx)("td",{className:"px-6 py-4",children:(0,t.jsx)("code",{className:"font-mono text-sm text-danger",children:e.code})}),(0,t.jsx)("td",{className:"px-6 py-4 text-sm font-medium text-text-primary",children:e.message}),(0,t.jsx)("td",{className:"px-6 py-4 text-sm text-text-secondary",children:e.description})]},e.code))})]})})})]})})}function $(){let e=(0,C.useTranslations)(),a=Object.keys(B),[i,n]=(0,s.useState)("Python");return(0,t.jsx)("section",{id:"examples",className:"relative py-24 border-t border-border",children:(0,t.jsxs)(v.Container,{children:[(0,t.jsxs)(r.motion.div,{...G,className:"mb-12",children:[(0,t.jsx)(y.Text,{variant:"overline",className:"text-gold mb-4",children:e("learn.apiDocs.apiDocsContent.examples")}),(0,t.jsxs)(f.Heading,{as:"h2",className:"mb-4",children:[e("dashboard.rewards.cashback.claim.code")," ",(0,t.jsx)(w.GradientText,{children:e("learn.apiDocs.apiDocsContent.examples")})]}),(0,t.jsx)(y.Text,{muted:!0,className:"max-w-2xl",children:e("learn.apiDocs.apiDocsContent.getStartedQuicklyWithReadyToRunExamples")})]}),(0,t.jsxs)(r.motion.div,{...G,children:[(0,t.jsx)("div",{className:"flex items-center gap-1 mb-4 p-1 rounded-[var(--radius-lg)] bg-surface-tertiary border border-border w-fit",children:a.map(e=>(0,t.jsx)("button",{onClick:()=>n(e),className:`px-4 py-2 text-sm font-medium rounded-[var(--radius-md)] transition-all duration-200 cursor-pointer ${i===e?"bg-gold/15 text-gold shadow-sm":"text-text-muted hover:text-text-secondary"}`,children:e},e))}),(0,t.jsx)(q,{code:B[i]})]})]})})}function W(){let e=(0,C.useTranslations)();return(0,t.jsx)("section",{className:"relative py-24 border-t border-border",children:(0,t.jsx)(v.Container,{children:(0,t.jsxs)(r.motion.div,{...G,className:"text-center max-w-2xl mx-auto",children:[(0,t.jsxs)(f.Heading,{as:"h2",className:"mb-4",children:[e("learn.apiDocs.apiDocsContent.readyTo")," ",(0,t.jsx)(w.GradientText,{children:e("learn.apiDocs.apiDocsContent.build")}),"?"]}),(0,t.jsx)(y.Text,{muted:!0,className:"mb-8",children:e("learn.apiDocs.apiDocsContent.createYourApiKeyAndStart")}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-4",children:[(0,t.jsx)(D.Button,{asChild:!0,size:"lg",children:(0,t.jsxs)(a.default,{href:`${T.APP_URL}/app/api-keys`,children:[e("learn.apiDocs.apiDocsContent.getApiKey"),(0,t.jsx)(c.ArrowRight,{className:"h-4 w-4"})]})}),(0,t.jsx)(D.Button,{asChild:!0,variant:"secondary",size:"lg",children:(0,t.jsxs)(a.default,{href:"https://github.com/midas-exchange",target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)(i.Code2,{className:"h-4 w-4"}),e("learn.apiDocs.apiDocsContent.githubSdks")]})})]})]})})})}function X(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H,{}),(0,t.jsx)(L,{}),(0,t.jsx)(M,{}),(0,t.jsx)(K,{}),(0,t.jsx)(z,{}),(0,t.jsx)(F,{}),(0,t.jsx)(Y,{}),(0,t.jsx)($,{}),(0,t.jsx)(W,{})]})}e.s(["ApiDocsContent",()=>X])},244860,e=>{e.n(e.i(22121))}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.