2:I[91610,["270","static/chunks/app/docs/api/page-8b175cd63b0d4c87.js"],"CodeBlock"] 4:I[75001,[],""] 5:I[9596,[],""] 6:I[83453,["575","static/chunks/575-5a246ccadcf411fa.js","418","static/chunks/418-f3b6d2f154485d8f.js","998","static/chunks/app/docs/layout-c4230139aed5d08b.js"],"default",1] 7:I[5520,["575","static/chunks/575-5a246ccadcf411fa.js","913","static/chunks/913-95a4bf8751887fd7.js","319","static/chunks/319-a605e396582267ab.js","114","static/chunks/114-54f34015d309a9f8.js","654","static/chunks/654-8e46d05deaba89c2.js","395","static/chunks/395-2e55d845c3f0b2f3.js","185","static/chunks/app/layout-0fe9fc7be6bfdac9.js"],"Providers"] 3:T4eb,{ "mode": "live", "orders": [ { "id": "42", "owner": "0x9832...", "tokenIn": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168", // USDG "tokenOut": "0x322F0929c4625eD5bAd873c95208D54E1c003b2d", // TSLA "priceFeed": "0x12f1...", // Chainlink TSLA feed "amountIn": "1500000000", // 1,500 USDG (6 decimals) "minAmountOut": "5500000000000000000", // 5.5 TSLA (18 decimals) "triggerPrice": "26200000000", // $262.00 (8 decimals) "triggerDir": 0, // 0 BELOW, 1 ABOVE "gapMode": 0, // 0 NONE, 1 BUY_DISCOUNT, 2 SELL_PREMIUM "triggerGapBps": 0, // signed bps; -100 = ≥1% discount "orderType": 0, // 0 LIMIT, 1 DCA "interval": "0", "windowStart": "0", // execution window (unix); 0 = anytime "windowEnd": "0", // session orders set these to the NYSE open/close "remainingRuns": 1, "active": true } ] }0:["oSNFCr-VaZMgs1L9AoMiI",[[["",{"children":["docs",{"children":["api",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["docs",{"children":["api",{"children":["__PAGE__",{},[["$L1",[["$","h1",null,{"className":"mb-3 font-display text-3xl font-bold tracking-tight text-cream","children":"HTTP API"}],["$","p",null,{"className":"mb-8 text-base leading-relaxed text-muted","children":"Public read endpoints served by the Longbow web application. All responses are returned as JSON payloads. No authentication or API keys are required."}],["$","h2",null,{"className":"mb-3 mt-10 font-display text-xl font-semibold text-cream","children":"Endpoints Registry"}],["$","div",null,{"className":"mb-5 overflow-x-auto rounded-xl border border-white/10","children":["$","table",null,{"className":"w-full min-w-[560px] text-sm","children":[["$","thead",null,{"children":["$","tr",null,{"className":"border-b border-white/10 bg-white/[0.03] text-left text-xs uppercase tracking-wider text-muted","children":[["$","th","Endpoint",{"className":"px-4 py-2.5 font-medium","children":"Endpoint"}],["$","th","Description",{"className":"px-4 py-2.5 font-medium","children":"Description"}],["$","th","Cache Policy",{"className":"px-4 py-2.5 font-medium","children":"Cache Policy"}]]}]}],["$","tbody",null,{"children":[["$","tr","0",{"className":"border-b border-white/5 last:border-0","children":[["$","td","0",{"className":"tnum px-4 py-2.5 align-top text-muted","children":["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"GET /api/quote?symbol=TSLA"}]}],["$","td","1",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"fetches the off-chain stock quote (Finnhub → Alpha Vantage → mock fallback)"}],["$","td","2",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"15 seconds"}]]}],["$","tr","1",{"className":"border-b border-white/5 last:border-0","children":[["$","td","0",{"className":"tnum px-4 py-2.5 align-top text-muted","children":["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"GET /api/markets"}]}],["$","td","1",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"all tokens: on-chain vs real price, premium/discount calculation, and 24h change"}],["$","td","2",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"no-cache"}]]}],["$","tr","2",{"className":"border-b border-white/5 last:border-0","children":[["$","td","0",{"className":"tnum px-4 py-2.5 align-top text-muted","children":["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"GET /api/tokens"}]}],["$","td","1",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"fetches the token registry configuration + protocol addresses for the active chain"}],["$","td","2",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"no-cache"}]]}],["$","tr","3",{"className":"border-b border-white/5 last:border-0","children":[["$","td","0",{"className":"tnum px-4 py-2.5 align-top text-muted","children":["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"GET /api/reserves?symbol=TSLA"}]}],["$","td","1",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"queries Uniswap V2 token/USDG reserves directly via factory.getPair and getReserves"}],["$","td","2",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"no-cache"}]]}],["$","tr","4",{"className":"border-b border-white/5 last:border-0","children":[["$","td","0",{"className":"tnum px-4 py-2.5 align-top text-muted","children":["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"GET /api/orders?status=active"}]}],["$","td","1",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"active order mirror database (called by keepers to poll execution candidates)"}],["$","td","2",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"no-cache"}]]}],["$","tr","5",{"className":"border-b border-white/5 last:border-0","children":[["$","td","0",{"className":"tnum px-4 py-2.5 align-top text-muted","children":["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"GET /api/gap/history?symbol=TSLA"}]}],["$","td","1",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"pool-vs-feed premium/discount series + stats for one ticker (CORS-open)"}],["$","td","2",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"no-cache"}]]}],["$","tr","6",{"className":"border-b border-white/5 last:border-0","children":[["$","td","0",{"className":"tnum px-4 py-2.5 align-top text-muted","children":["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"GET /api/gap/summary"}]}],["$","td","1",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"24h gap statistics for every listed ticker, sorted by dislocation (CORS-open)"}],["$","td","2",{"className":"tnum px-4 py-2.5 align-top text-muted","children":"no-cache"}]]}]]}]]}]}],["$","h2",null,{"className":"mb-3 mt-10 font-display text-xl font-semibold text-cream","children":"GET /api/quote"}],["$","$L2",null,{"code":"{\n \"symbol\": \"TSLA\",\n \"price\": 268.45,\n \"marketOpen\": true,\n \"source\": \"finnhub\", // \"finnhub\" | \"alphavantage\" | \"mock\"\n \"ts\": 1783102938123\n}","language":"json","title":"200 response"}],["$","p",null,{"className":"mb-4 text-sm leading-relaxed text-muted","children":["Query Parameters: ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"symbol"}]," (e.g. TSLA, NVDA)."]}],["$","p",null,{"className":"mb-4 text-sm leading-relaxed text-muted","children":["Errors: ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"400"}]," missing symbol, ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"404"}]," unknown symbol. The server caches each symbol for 15 seconds to respect Finnhub's free-tier limit (60 req/min). To bypass public caching limits, supply your own developer API key in the server configuration via ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"FINNHUB_API_KEY"}],"."]}],["$","h2",null,{"className":"mb-3 mt-10 font-display text-xl font-semibold text-cream","children":"GET /api/markets"}],["$","$L2",null,{"code":"{\n \"mode\": \"live\",\n \"rows\": [\n {\n \"symbol\": \"TSLA\",\n \"name\": \"Tesla\",\n \"kind\": \"stock\",\n \"address\": \"0x322F…3b2d\",\n \"real\": 268.45, // off-chain quote (USD)\n \"onchain\": 268.97, // Chainlink feed (USD)\n \"premiumPct\": 0.19, // + premium / − discount\n \"change24hPct\": 1.24,\n \"marketOpen\": true,\n \"history\": [267.1, 268.2, 268.97] // sparkline samples, 24h\n }\n ]\n}","language":"json","title":"200 response"}],["$","p",null,{"className":"mb-4 text-sm leading-relaxed text-muted","children":[["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"premiumPct"}]," is signed: positive values represent on-chain swaps trading rich compared to traditional stock quotes; negative values represent a discount. Note that off-hours the on-chain oracles may freeze; compare ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"marketOpen"}]," flags before committing arbitrage trades."]}],["$","h2",null,{"className":"mb-3 mt-10 font-display text-xl font-semibold text-cream","children":"GET /api/tokens"}],["$","$L2",null,{"code":"{\n \"chainId\": 4663,\n \"mode\": \"live\",\n \"addresses\": { \"uniswapV2Router02\": \"0x89e5…9eba\", \"uniswapV2Factory\": \"0x8bce...\" },\n \"tokens\": [\n { \"symbol\": \"TSLA\", \"name\": \"Tesla\", \"kind\": \"stock\",\n \"decimals\": 18, \"address\": \"0x322F…3b2d\", \"chainlinkFeed\": \"0x…\" }\n ]\n}","language":"json","title":"200 response"}],["$","h2",null,{"className":"mb-3 mt-10 font-display text-xl font-semibold text-cream","children":"GET /api/reserves"}],["$","$L2",null,{"code":"{\n \"symbol\": \"TSLA\",\n \"pairAddress\": \"0x51296baE01...\",\n \"reserveStock\": \"1250000000000000000000\", // 1,250 TSLA (18 decimals)\n \"reserveUsdg\": \"335000000000\", // 335,000 USDG (6 decimals)\n \"price\": 268.00, // ratio price of reserveUsdg/reserveStock\n \"ts\": 1783102938555\n}","language":"json","title":"200 response"}],["$","p",null,{"className":"mb-4 text-sm leading-relaxed text-muted","children":["Query Parameters: ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"symbol"}]," (e.g. TSLA)."]}],["$","p",null,{"className":"mb-4 text-sm leading-relaxed text-muted","children":"Returns raw reserves from the Uniswap V2 pool pair. Useful for calculating off-chain slippage and price impact checks dynamically before submitting transaction orders."}],["$","h2",null,{"className":"mb-3 mt-10 font-display text-xl font-semibold text-cream","children":"GET /api/gap/history"}],["$","$L2",null,{"code":"{\n \"symbol\": \"TSLA\",\n \"hours\": 24,\n \"mode\": \"live\",\n \"points\": [\n { \"ts\": 1784160000000, \"premiumPct\": -0.42 },\n { \"ts\": 1784160900000, \"premiumPct\": -0.55 }\n ],\n \"stats\": {\n \"last\": -0.55, // signed; − = pool below the real quote\n \"maxPremium\": 0.83,\n \"maxDiscount\": -1.62,\n \"absMean\": 0.47, // mean |gap| over the window\n \"dislocatedPct\": 31.2 // share of samples with |gap| >= 0.5%\n }\n}","language":"json","title":"200 response"}],["$","p",null,{"className":"mb-4 text-sm leading-relaxed text-muted","children":["Query Parameters: ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"symbol"}]," (required), ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"hours"}]," ","1–168 (default 24), ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"points"}]," 2–500 (default 96)."]}],["$","p",null,{"className":"mb-4 text-sm leading-relaxed text-muted","children":["The gap dataset nobody else on the chain records: how far the pool traded from the real quote, over time. Responses carry"," ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"Access-Control-Allow-Origin: *"}]," so bots, dashboards and research notebooks can consume them directly."," ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"/api/gap/summary"}]," returns the same statistics for every listed ticker at once, sorted by mean dislocation."]}],["$","h2",null,{"className":"mb-3 mt-10 font-display text-xl font-semibold text-cream","children":"GET /api/orders"}],["$","$L2",null,{"code":"$3","language":"json","title":"200 response"}],["$","p",null,{"className":"mb-4 text-sm leading-relaxed text-muted","children":["Query Parameters: ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"status"}]," (active, executed, cancelled)."]}],["$","p",null,{"className":"mb-4 text-sm leading-relaxed text-muted","children":["Keeper nodes use this endpoint to poll candidate orders. Values like ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"amountIn"}],",",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"minAmountOut"}],", and ",["$","code",null,{"className":"rounded bg-white/10 px-1.5 py-0.5 text-[13px] text-cream","children":"triggerPrice"}]," are returned as string-encoded big numbers respecting decimals."]}]],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children","api","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}],"params":{}}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f55723d0ee21179d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_f367f3 __variable_dd5b2f","children":["$","body",null,{"className":"font-sans","children":["$","$L7",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L8",null]]]] 8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Longbow Docs — HTTP API"}],["$","meta","3",{"name":"description","content":"Wall Street closes, the chain doesn't. Longbow tracks the gap between on-chain stock prices and real quotes on Robinhood Chain — non-custodial limit orders & DCA, keeper-executed through Uniswap V2. Nock. Draw. Loose."}],["$","meta","4",{"property":"og:title","content":"Longbow — Wall Street closes. The chain doesn't."}],["$","meta","5",{"property":"og:description","content":"The gap terminal for tokenized stocks: on-chain price vs real quote, live — with non-custodial limit & DCA orders keepers execute through Uniswap V2."}],["$","meta","6",{"property":"og:image","content":"https://longbowtrade.xyz/brand/og.png"}],["$","meta","7",{"property":"og:image:width","content":"1200"}],["$","meta","8",{"property":"og:image:height","content":"630"}],["$","meta","9",{"property":"og:image:alt","content":"Longbow"}],["$","meta","10",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","11",{"name":"twitter:site","content":"@longbowtrade"}],["$","meta","12",{"name":"twitter:title","content":"Longbow — Wall Street closes. The chain doesn't."}],["$","meta","13",{"name":"twitter:description","content":"The gap terminal for tokenized stocks: on-chain price vs real quote, live — with non-custodial limit & DCA orders keepers execute through Uniswap V2."}],["$","meta","14",{"name":"twitter:image","content":"https://longbowtrade.xyz/brand/og.png"}],["$","link","15",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"48x48"}],["$","link","16",{"rel":"icon","href":"/brand/favicon.svg","type":"image/svg+xml"}],["$","link","17",{"rel":"icon","href":"/brand/favicon-32.png","sizes":"32x32","type":"image/png"}],["$","link","18",{"rel":"icon","href":"/brand/icon-192.png","sizes":"192x192","type":"image/png"}],["$","link","19",{"rel":"apple-touch-icon","href":"/brand/apple-touch-icon.png"}]] 1:null