{"openapi":"3.1.0","info":{"title":"Oqto Developer API","version":"1.0.0","description":"Non-custodial market data, best-route quotes and unsigned swap/liquidity transactions for Stable."},"servers":[{"url":"https://preview.oqto.fun/api/v1"}],"x-oqto-realtime":{"url":null,"protocol":"oqto.realtime.v1","channels":["trades","markets","pools","system"],"cursor":"durable sequence","finalized":true},"tags":[{"name":"System"},{"name":"Markets"},{"name":"Pools"},{"name":"Trading"},{"name":"Liquidity"}],"security":[],"paths":{"/status":{"get":{"tags":["System"],"summary":"Network, contracts and capabilities","responses":{"200":{"description":"Current API status"}}}},"/markets":{"get":{"tags":["Markets"],"summary":"Search Oqto markets","parameters":[{"in":"query","name":"q","schema":{"type":"string"}},{"in":"query","name":"status","schema":{"type":"string","enum":["curve","dex"]}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"$ref":"#/components/responses/Envelope"},"503":{"$ref":"#/components/responses/Error"}}}},"/markets/{market}":{"get":{"tags":["Markets"],"summary":"Get a market by token, slug or symbol","parameters":[{"in":"path","name":"market","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/Envelope"},"404":{"$ref":"#/components/responses/Error"}}}},"/markets/{market}/{resource}":{"get":{"tags":["Markets"],"summary":"Market holders, trades, candles or bins","parameters":[{"in":"path","name":"market","required":true,"schema":{"type":"string"}},{"in":"path","name":"resource","required":true,"schema":{"type":"string","enum":["holders","trades","series","bins"]}}],"responses":{"200":{"description":"Market resource"},"404":{"$ref":"#/components/responses/Error"}}}},"/pools":{"get":{"tags":["Pools"],"summary":"List launch and permissionless pools","responses":{"200":{"description":"Pools"}}}},"/pools/{pool}":{"get":{"tags":["Pools"],"summary":"Pool detail and performance","parameters":[{"in":"path","name":"pool","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}],"responses":{"200":{"description":"Pool"},"404":{"$ref":"#/components/responses/Error"}}}},"/pools/{pool}/{resource}":{"get":{"tags":["Pools"],"summary":"Pool candles or bin liquidity","parameters":[{"in":"path","name":"pool","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},{"in":"path","name":"resource","required":true,"schema":{"type":"string","enum":["series","bins","trades"]}}],"responses":{"200":{"description":"Pool resource"}}}},"/terminal/config":{"get":{"tags":["System"],"summary":"Trading-terminal venue configuration","responses":{"200":{"description":"Venue adapter metadata"}}}},"/terminal/token-list":{"get":{"tags":["Markets"],"summary":"Standard EVM token list","responses":{"200":{"description":"Token list document"}}}},"/terminal/pairs":{"get":{"tags":["Pools"],"summary":"Normalized terminal pair feed","responses":{"200":{"description":"Launch and community pairs"}}}},"/terminal/trades":{"get":{"tags":["Markets"],"summary":"Cursor-based terminal trade feed","parameters":[{"in":"query","name":"pair","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"description":"DEX pair address; mutually exclusive with market."},{"in":"query","name":"market","schema":{"type":"string"},"description":"Token, slug or curve market; mutually exclusive with pair."},{"in":"query","name":"cursor","schema":{"type":"string","pattern":"^[0-9]+:[0-9]+$"}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":250}}],"responses":{"200":{"description":"Trades ordered newest-first without a cursor and oldest-first after a cursor"}}}},"/terminal/quote":{"post":{"tags":["Trading"],"summary":"Unified bonding-curve and DEX market quote","description":"The same market endpoint builds LaunchRouter execution before graduation and Oqto DEX execution after graduation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketQuoteRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/Envelope"},"413":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/swap/quote":{"post":{"tags":["Trading"],"summary":"Quote the best Oqto-first route and optionally build it","description":"Native USDT0 routes are disabled on this profile; use the configured ERC-20 interface. Supplying taker returns approval and unsigned execution transactions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapQuoteRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/Envelope"},"413":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/liquidity/add":{"post":{"tags":["Liquidity"],"summary":"Build add-liquidity approvals, preview and protected transaction","description":"First request returns approvals. After they are mined, repeat the request; Oqto derives minimum utilization exclusively from an exact server-side simulation before returning the protected transaction.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddLiquidityRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/LiquidityEnvelope"},"413":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/liquidity/remove":{"post":{"tags":["Liquidity"],"summary":"Build remove-liquidity approval, preview and protected transaction","description":"First request returns an operator approval. After it is mined, repeat the request; Oqto validates the pair against its configured factory and derives minimum outputs exclusively from an exact server-side simulation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveLiquidityRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/LiquidityEnvelope"},"413":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}}},"components":{"responses":{"Envelope":{"description":"Versioned Oqto API envelope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiEnvelope"}}}},"LiquidityEnvelope":{"description":"Versioned unsigned liquidity execution bundle","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ApiEnvelope"}],"properties":{"data":{"$ref":"#/components/schemas/LiquidityBundle"}}}}}},"Error":{"description":"Structured API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"securitySchemes":{"PartnerApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Optional higher-limit key for approved terminal integrations."}},"schemas":{"ApiEnvelope":{"type":"object","required":["data","meta"],"properties":{"data":{},"meta":{"type":"object","required":["apiVersion","revision","requestId"],"properties":{"apiVersion":{"type":"string"},"revision":{"type":"string"},"requestId":{"type":"string"}}}}},"UnsignedTransaction":{"type":"object","required":["chainId","to","data","value"],"properties":{"chainId":{"type":"integer"},"to":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"data":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"value":{"type":"string","pattern":"^[0-9]+$","description":"Unsigned integer in token base units."},"gas":{"type":"string","pattern":"^[0-9]+$","description":"Unsigned integer in token base units."}}},"ApprovalRequirement":{"type":"object","required":["type","token","spender","transaction"],"properties":{"type":{"type":"string","enum":["erc20-allowance","lb-token-operator"]},"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"spender":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"amount":{"type":"string","pattern":"^[0-9]+$","description":"Unsigned integer in token base units."},"resetTransaction":{"oneOf":[{"$ref":"#/components/schemas/UnsignedTransaction"},{"type":"null"}]},"transaction":{"$ref":"#/components/schemas/UnsignedTransaction"}}},"LiquidityBundle":{"type":"object","required":["approvals","previewTransaction","transaction","nextAction","expected"],"properties":{"approvals":{"type":"array","items":{"$ref":"#/components/schemas/ApprovalRequirement"}},"previewTransaction":{"$ref":"#/components/schemas/UnsignedTransaction"},"transaction":{"oneOf":[{"$ref":"#/components/schemas/UnsignedTransaction"},{"type":"null"}]},"nextAction":{"type":"string","enum":["approve-then-simulate","submit"]},"expected":{"oneOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]}}},"Error":{"type":"object","required":["error","meta"],"properties":{"error":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}},"meta":{"type":"object"}}},"SwapQuoteRequest":{"type":"object","required":["tokenIn","tokenOut","amountIn","slippageBps"],"properties":{"tokenIn":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"tokenOut":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"amountIn":{"type":"string","pattern":"^[0-9]+$","description":"Unsigned integer in token base units."},"slippageBps":{"type":"integer","minimum":10,"maximum":2000},"taker":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"recipient":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"referrer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"deadline":{"oneOf":[{"type":"integer"},{"type":"string","pattern":"^[0-9]+$"}]}}},"MarketQuoteRequest":{"type":"object","required":["market","side","amountIn","slippageBps"],"properties":{"market":{"type":"string","description":"Token address, curve address or Oqto slug."},"side":{"type":"string","enum":["buy","sell"]},"amountIn":{"type":"string","pattern":"^[0-9]+$","description":"Unsigned integer in token base units."},"slippageBps":{"type":"integer","minimum":10,"maximum":2000},"taker":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"recipient":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"referrer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"deadline":{"oneOf":[{"type":"integer"},{"type":"string","pattern":"^[0-9]+$"}]}}},"AddLiquidityRequest":{"type":"object","required":["taker","token","quoteToken","binStep","tokenAmount","quoteAmount","binsBelow","binsAbove","shape","slippageBps"],"properties":{"taker":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"recipient":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"token":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"quoteToken":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"binStep":{"type":"integer","enum":[25,50,80,100,125,200,250]},"tokenAmount":{"type":"string","pattern":"^[0-9]+$","description":"Unsigned integer in token base units."},"quoteAmount":{"type":"string","pattern":"^[0-9]+$","description":"Unsigned integer in token base units."},"binsBelow":{"type":"integer","minimum":0,"maximum":50},"binsAbove":{"type":"integer","minimum":0,"maximum":50},"shape":{"type":"integer","enum":[0,1,2],"description":"0 Spot, 1 Curve, 2 Bid-Ask"},"slippageBps":{"type":"integer","minimum":10,"maximum":2000},"deadline":{"oneOf":[{"type":"integer"},{"type":"string","pattern":"^[0-9]+$"}]}}},"RemoveLiquidityRequest":{"type":"object","required":["taker","pair","ids","liquidity","slippageBps"],"properties":{"taker":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"recipient":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"pair":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"ids":{"type":"array","minItems":1,"maxItems":101,"items":{"type":"string","pattern":"^[0-9]+$","description":"Unsigned integer in token base units."}},"liquidity":{"type":"array","minItems":1,"maxItems":101,"items":{"type":"string","pattern":"^[0-9]+$","description":"Unsigned integer in token base units."}},"slippageBps":{"type":"integer","minimum":10,"maximum":2000},"deadline":{"oneOf":[{"type":"integer"},{"type":"string","pattern":"^[0-9]+$"}]}}}}}}