> For the complete documentation index, see [llms.txt](https://docs.turbine.exchange/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.turbine.exchange/reference/api/readme/turbine.md).

# Turbine

Turbine API endpoints

## POST /api/add\_liquidity

> Submit a new liquidity request to the system

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/add_liquidity":{"post":{"tags":["turbine"],"summary":"Submit a new liquidity request to the system","operationId":"add_liquidity","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddLiquidity"}}},"required":true},"responses":{"200":{"description":"Liquidity intent successfully submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddLiquidityResponse"}}}},"400":{"description":"Invalid intent, signatures, or session state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"401":{"description":"User not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"AddLiquidity":{"type":"object","description":"Represents a liquidity addition with SignatureTransfer permit functionality.\n\nThis struct encapsulates all necessary information needed to submit a new intent to add\nliquidity to the system, including the intent and SignatureTransfer permit data for approvals.\nUser authentication is handled via session-based SIWE verification.\n\n# Fields\n* `add_liquidity` The intent to add liquidity\n* `permit_tokens` The batch SignatureTransfer permit and signature for token0 and token1","required":["addLiquidity","permitTokens"],"properties":{"addLiquidity":{"$ref":"#/components/schemas/AddLiquidityIntent"},"permitTokens":{"$ref":"#/components/schemas/SignedBatchSignatureTransferDTO"}}},"AddLiquidityIntent":{"type":"object","required":["owner","token0","token1","fee","token0Amount","token1Amount","exact","salt"],"properties":{"exact":{"type":"boolean","description":"Whether the user wants to provide exactly the specified amounts (and is willing to\npay a swap fee first) or would rather like to provide liquidity in current ratio of pool\nreserves (in such case the specified token amounts are treated as maximum amounts)."},"fee":{"type":"integer","format":"uint32","description":"The fee for the pool","minimum":0},"owner":{"type":"string","format":"address","description":"The address of the user submitting the intent"},"salt":{"type":"string","format":"bytes32","description":"Used to differentiate between intents with the same parameters"},"token0":{"type":"string","format":"address","description":"The token0 of the pool. Tokens must be sorted ascending by address so that\n`token0 < token1`; unordered intents are rejected."},"token0Amount":{"type":"string","format":"uint256","description":"The amount of token0 to provide. If `exact` is true, this is the exact amount of token0 to\nprovide. If `exact` is false, this is the maximum amount of token0 to provide."},"token1":{"type":"string","format":"address","description":"The token1 of the pool. Must be greater than `token0` (see `token0`)."},"token1Amount":{"type":"string","format":"uint256","description":"The amount of token1 to provide. If `exact` is true, this is the exact amount of token1 to\nprovide. If `exact` is false, this is the maximum amount of token1 to provide."}}},"SignedBatchSignatureTransferDTO":{"type":"object","description":"Signed batch SignatureTransfer permit (for add liquidity token0 and token1 transfer)","required":["permit","signature"],"properties":{"permit":{"$ref":"#/components/schemas/PermitBatchTransferFrom"},"signature":{"$ref":"#/components/schemas/PermitSignature"}}},"PermitBatchTransferFrom":{"type":"object","description":"DTO for ISignatureTransfer.PermitBatchTransferFrom - batch token transfer authorization","required":["permitted","nonce","deadline"],"properties":{"deadline":{"type":"string","format":"uint256"},"nonce":{"type":"string","format":"uint256"},"permitted":{"type":"array","items":{"$ref":"#/components/schemas/TokenPermissions"}}}},"TokenPermissions":{"type":"object","description":"Token permissions for ISignatureTransfer permits.\nUsed in PermitTransferFrom and PermitBatchTransferFrom.","required":["token","amount"],"properties":{"amount":{"type":"string","format":"uint256","description":"The maximum amount that can be transferred"},"token":{"type":"string","format":"address","description":"The token address"}}},"PermitSignature":{"type":"object","required":["r","s","yParity"],"properties":{"r":{"type":"string","format":"uint256"},"s":{"type":"string","format":"uint256"},"yParity":{"type":"boolean","format":"boolean"}}},"AddLiquidityResponse":{"type":"object","description":"Response returned after successfully submitting a liquidity intent to the system.\nContains the unique identifier assigned to the submitted intent.\n\n# Fields\n* `hash` - Unique identifier assigned to the liquidity intent","required":["intentHash"],"properties":{"intentHash":{"type":"string","format":"bytes32"}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/add\_order

> Submit a new order to the system

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/add_order":{"post":{"tags":["turbine"],"summary":"Submit a new order to the system","operationId":"add_order","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOrder"}}},"required":true},"responses":{"200":{"description":"Order successfully submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOrderResponse"}}}},"400":{"description":"Invalid order, signature, or session state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"401":{"description":"User not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"503":{"description":"Orderbook is full","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"AddOrder":{"type":"object","description":"Represents an order submission with optional permit functionality.\n\nThis struct encapsulates all necessary information needed to submit a new order to the system.\n`signed_permit` is required only for non-smart orders.","required":["order"],"properties":{"annotations":{"$ref":"#/components/schemas/OrderAnnotations","description":"Optional informational annotations stored alongside the order in order history\nand echoed back from the order-state endpoints. Not part of the signed order."},"order":{"$ref":"#/components/schemas/OrderIntent"},"signedPermit":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SignedPermitDTO","description":"The optional signed permit. Only required for non-smart orders.\nDefaults to None in the JSON input.\nBut defaults to a permit in the API schema, as an example."}],"default":{"permit":{"details":{"token":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","amount":"1461501637330902918203684832716283019655932542975","expiration":1630003600,"nonce":0},"spender":"0x346a33009161ed9085b75c9194a523322236f74e","sigDeadline":"1630003600"},"signature":{"r":"93806474433608546370310852361160557641089548055391845313596357890102999855022","s":"44967894251262473816400307202805291026637879676677543909166458416059363900630","yParity":true}}}}},"OrderAnnotations":{"type":"object","description":"Additional data attached to an order, provided by the user. Purely informational —\nnot part of the signed order and not used by the protocol.","properties":{"spreadAtSubmissionHbp":{"type":["integer","null"],"format":"int64","description":"The market spread (in hundredths of a basis point, 10_000 hbp = 1%) quoted to the\nuser at submission time, as returned by `/api/quote` (`amm_spread_hbp`).","minimum":0}}},"OrderIntent":{"type":"object","description":"The swap intent for a user","required":["owner","sellToken","buyToken","sellAmount","minBuyAmount","spreadCurve","startTime","endTime","partialFill","callData","callDataTarget","calldataSellAmountOffset","calldataBuyAmountOffset","salt"],"properties":{"buyToken":{"type":"string","format":"address","description":"The token being bought"},"callData":{"type":"string","format":"bytes","description":"Optional call data for smart orders, allowing custom routing"},"callDataTarget":{"type":"string","format":"address","description":"The address of the target contract for the calldata"},"calldataBuyAmountOffset":{"type":"integer","format":"uint64","description":"The offset of the buy amount in the calldata\nIf Some, used to update the calldata with the actual buy amount","minimum":0},"calldataSellAmountOffset":{"type":"integer","format":"uint64","description":"The offset of the sell amount in the calldata\nIf Some, used to update the calldata with the actual sell amount","minimum":0},"endTime":{"type":"integer","format":"uint256","description":"Block timestamp until when the order is valid.","minimum":0},"minBuyAmount":{"type":"string","format":"uint256","description":"The minimum amount of tokens being bought, effectively defining limit price."},"owner":{"type":"string","format":"address","description":"The address of the user submitting the order"},"partialFill":{"type":"boolean","format":"boolean","description":"Flag allowing partial fills"},"salt":{"type":"string","format":"bytes32","description":"The offset of the buy amount in the calldata\nUsed to differentiate between orders with the same parameters"},"sellAmount":{"type":"string","format":"uint196","description":"The amount of tokens being sold"},"sellToken":{"type":"string","format":"address","description":"The token being sold"},"spreadCurve":{"$ref":"#/components/schemas/SpreadCurveDto","description":"A piecewise-linear spread curve mapping a fraction of the order window to a mid-price\ndelta in basis points. Each interior point's `windowBps` is a fraction of the order\nduration in basis points (5_000 = halfway)."},"startTime":{"type":"integer","format":"uint256","description":"Block timestamp since when the order is valid","minimum":0}}},"SpreadCurveDto":{"type":"object","description":"Piecewise-linear spread curve. Interior `points` express knot positions as a fraction\nof the order's `[start_time, end_time]` window in basis points (`windowBps`), so the\ncurve is portable across orders of different durations.","required":["startDeltaBps","endDeltaBps"],"properties":{"endDeltaBps":{"type":"integer","format":"int32","description":"Mid-price delta at the order's `end_time`, in basis points."},"points":{"type":"array","items":{"$ref":"#/components/schemas/CurvePointDto"},"description":"Interior knots. Each `windowBps` must lie in `[1, 9_999]` and values must be\nstrictly increasing across `points`. Defaults to `[]` if absent, yielding a single\nlinear segment from `startDeltaBps` to `endDeltaBps`."},"startDeltaBps":{"type":"integer","format":"int32","description":"Mid-price delta at the order's `start_time`, in basis points."}}},"CurvePointDto":{"type":"object","description":"A single interior knot in a [`SpreadCurveDto`].","required":["windowBps","deltaBps"],"properties":{"deltaBps":{"type":"integer","format":"int32","description":"Mid-price delta in basis points at this knot."},"windowBps":{"type":"integer","format":"int32","description":"Knot position as a fraction of the order window in basis points. Must lie in\n`(0, 10_000)` exclusive — `5_000` is the order midpoint.","maximum":9999,"minimum":1}}},"SignedPermitDTO":{"type":"object","required":["permit","signature"],"properties":{"permit":{"$ref":"#/components/schemas/PermitSingle"},"signature":{"$ref":"#/components/schemas/PermitSignature"}}},"PermitSingle":{"type":"object","required":["details","spender","sigDeadline"],"properties":{"details":{"$ref":"#/components/schemas/PermitDetails"},"sigDeadline":{"type":"string","format":"uint256"},"spender":{"type":"string","format":"address"}}},"PermitDetails":{"type":"object","required":["token","amount","expiration","nonce"],"properties":{"amount":{"type":"string","format":"uint160"},"expiration":{"type":"integer","format":"uint64","minimum":0},"nonce":{"type":"integer","format":"uint64","minimum":0},"token":{"type":"string","format":"address"}}},"PermitSignature":{"type":"object","required":["r","s","yParity"],"properties":{"r":{"type":"string","format":"uint256"},"s":{"type":"string","format":"uint256"},"yParity":{"type":"boolean","format":"boolean"}}},"AddOrderResponse":{"type":"object","description":"Response returned after successfully submitting an order to the system.\nContains the unique identifier assigned to the submitted order.\n\n# Fields\n* `order_hash` - Unique identifier assigned to the submitted order","required":["orderHash"],"properties":{"orderHash":{"type":"string","format":"bytes32"}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/add\_orders

> Submit multiple orders to the system

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/add_orders":{"post":{"tags":["turbine"],"summary":"Submit multiple orders to the system","operationId":"add_orders","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AddOrder"}}}},"required":true},"responses":{"200":{"description":"Orders successfully submitted","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AddOrderResponse"}}}}},"400":{"description":"Invalid orders, signatures, or session state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"401":{"description":"User not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"503":{"description":"Orderbook is full","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"AddOrder":{"type":"object","description":"Represents an order submission with optional permit functionality.\n\nThis struct encapsulates all necessary information needed to submit a new order to the system.\n`signed_permit` is required only for non-smart orders.","required":["order"],"properties":{"annotations":{"$ref":"#/components/schemas/OrderAnnotations","description":"Optional informational annotations stored alongside the order in order history\nand echoed back from the order-state endpoints. Not part of the signed order."},"order":{"$ref":"#/components/schemas/OrderIntent"},"signedPermit":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SignedPermitDTO","description":"The optional signed permit. Only required for non-smart orders.\nDefaults to None in the JSON input.\nBut defaults to a permit in the API schema, as an example."}],"default":{"permit":{"details":{"token":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","amount":"1461501637330902918203684832716283019655932542975","expiration":1630003600,"nonce":0},"spender":"0x346a33009161ed9085b75c9194a523322236f74e","sigDeadline":"1630003600"},"signature":{"r":"93806474433608546370310852361160557641089548055391845313596357890102999855022","s":"44967894251262473816400307202805291026637879676677543909166458416059363900630","yParity":true}}}}},"OrderAnnotations":{"type":"object","description":"Additional data attached to an order, provided by the user. Purely informational —\nnot part of the signed order and not used by the protocol.","properties":{"spreadAtSubmissionHbp":{"type":["integer","null"],"format":"int64","description":"The market spread (in hundredths of a basis point, 10_000 hbp = 1%) quoted to the\nuser at submission time, as returned by `/api/quote` (`amm_spread_hbp`).","minimum":0}}},"OrderIntent":{"type":"object","description":"The swap intent for a user","required":["owner","sellToken","buyToken","sellAmount","minBuyAmount","spreadCurve","startTime","endTime","partialFill","callData","callDataTarget","calldataSellAmountOffset","calldataBuyAmountOffset","salt"],"properties":{"buyToken":{"type":"string","format":"address","description":"The token being bought"},"callData":{"type":"string","format":"bytes","description":"Optional call data for smart orders, allowing custom routing"},"callDataTarget":{"type":"string","format":"address","description":"The address of the target contract for the calldata"},"calldataBuyAmountOffset":{"type":"integer","format":"uint64","description":"The offset of the buy amount in the calldata\nIf Some, used to update the calldata with the actual buy amount","minimum":0},"calldataSellAmountOffset":{"type":"integer","format":"uint64","description":"The offset of the sell amount in the calldata\nIf Some, used to update the calldata with the actual sell amount","minimum":0},"endTime":{"type":"integer","format":"uint256","description":"Block timestamp until when the order is valid.","minimum":0},"minBuyAmount":{"type":"string","format":"uint256","description":"The minimum amount of tokens being bought, effectively defining limit price."},"owner":{"type":"string","format":"address","description":"The address of the user submitting the order"},"partialFill":{"type":"boolean","format":"boolean","description":"Flag allowing partial fills"},"salt":{"type":"string","format":"bytes32","description":"The offset of the buy amount in the calldata\nUsed to differentiate between orders with the same parameters"},"sellAmount":{"type":"string","format":"uint196","description":"The amount of tokens being sold"},"sellToken":{"type":"string","format":"address","description":"The token being sold"},"spreadCurve":{"$ref":"#/components/schemas/SpreadCurveDto","description":"A piecewise-linear spread curve mapping a fraction of the order window to a mid-price\ndelta in basis points. Each interior point's `windowBps` is a fraction of the order\nduration in basis points (5_000 = halfway)."},"startTime":{"type":"integer","format":"uint256","description":"Block timestamp since when the order is valid","minimum":0}}},"SpreadCurveDto":{"type":"object","description":"Piecewise-linear spread curve. Interior `points` express knot positions as a fraction\nof the order's `[start_time, end_time]` window in basis points (`windowBps`), so the\ncurve is portable across orders of different durations.","required":["startDeltaBps","endDeltaBps"],"properties":{"endDeltaBps":{"type":"integer","format":"int32","description":"Mid-price delta at the order's `end_time`, in basis points."},"points":{"type":"array","items":{"$ref":"#/components/schemas/CurvePointDto"},"description":"Interior knots. Each `windowBps` must lie in `[1, 9_999]` and values must be\nstrictly increasing across `points`. Defaults to `[]` if absent, yielding a single\nlinear segment from `startDeltaBps` to `endDeltaBps`."},"startDeltaBps":{"type":"integer","format":"int32","description":"Mid-price delta at the order's `start_time`, in basis points."}}},"CurvePointDto":{"type":"object","description":"A single interior knot in a [`SpreadCurveDto`].","required":["windowBps","deltaBps"],"properties":{"deltaBps":{"type":"integer","format":"int32","description":"Mid-price delta in basis points at this knot."},"windowBps":{"type":"integer","format":"int32","description":"Knot position as a fraction of the order window in basis points. Must lie in\n`(0, 10_000)` exclusive — `5_000` is the order midpoint.","maximum":9999,"minimum":1}}},"SignedPermitDTO":{"type":"object","required":["permit","signature"],"properties":{"permit":{"$ref":"#/components/schemas/PermitSingle"},"signature":{"$ref":"#/components/schemas/PermitSignature"}}},"PermitSingle":{"type":"object","required":["details","spender","sigDeadline"],"properties":{"details":{"$ref":"#/components/schemas/PermitDetails"},"sigDeadline":{"type":"string","format":"uint256"},"spender":{"type":"string","format":"address"}}},"PermitDetails":{"type":"object","required":["token","amount","expiration","nonce"],"properties":{"amount":{"type":"string","format":"uint160"},"expiration":{"type":"integer","format":"uint64","minimum":0},"nonce":{"type":"integer","format":"uint64","minimum":0},"token":{"type":"string","format":"address"}}},"PermitSignature":{"type":"object","required":["r","s","yParity"],"properties":{"r":{"type":"string","format":"uint256"},"s":{"type":"string","format":"uint256"},"yParity":{"type":"boolean","format":"boolean"}}},"AddOrderResponse":{"type":"object","description":"Response returned after successfully submitting an order to the system.\nContains the unique identifier assigned to the submitted order.\n\n# Fields\n* `order_hash` - Unique identifier assigned to the submitted order","required":["orderHash"],"properties":{"orderHash":{"type":"string","format":"bytes32"}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/cancel\_order

> Remove an order from the system

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/cancel_order":{"post":{"tags":["turbine"],"summary":"Remove an order from the system","operationId":"cancel_order","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrder"}}},"required":true},"responses":{"200":{"description":"Order successfully queued for cancellation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderResponse"}}}},"401":{"description":"User not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"404":{"description":"Order not found or not owned by caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"CancelOrder":{"type":"object","required":["orderHash"],"properties":{"orderHash":{"type":"string","format":"bytes32"}}},"CancelOrderResponse":{"type":"object","required":["orderHash"],"properties":{"orderHash":{"type":"string","format":"bytes32"}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## GET /api/config

> Get the current config

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/config":{"get":{"tags":["turbine"],"summary":"Get the current config","operationId":"config","responses":{"200":{"description":"Config retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigResponse"}}}}}}}},"components":{"schemas":{"ConfigResponse":{"type":"object","required":["version","turbineSettlerAddress","turbineSignerAddress","lpHookAddress","lpRouterAddress","poolManagerAddress","submitSettlements","siweDomain","siweUri","minTradeSizeUsdc","minLiquidityVolumeUsdc","eip712Domain","maxSignatureLifetimeS","tokens"],"properties":{"eip712Domain":{"$ref":"#/components/schemas/Eip712DomainInfo","description":"The EIP-712 domain that `/api/eip712/` request signatures are verified against."},"lpHookAddress":{"type":"string","format":"address"},"lpRouterAddress":{"type":"string","format":"address"},"maxSignatureLifetimeS":{"type":"integer","format":"int64","description":"Maximum allowed remaining validity of an EIP-712 auth signature, in seconds.","minimum":0},"minLiquidityVolumeUsdc":{"type":"string","format":"uint256","description":"Minimum total USDC volume for a liquidity provision intent, in native USDC units\n(6 decimals). A value of `10000000` is 10 USDC."},"minTradeSizeUsdc":{"type":"string","format":"uint256","description":"Minimum trade size in native USDC units (6 decimals). A value of `10000000`\nis 10 USDC."},"poolManagerAddress":{"type":"string","format":"address"},"siweDomain":{"type":"string"},"siweUri":{"type":"string"},"submitSettlements":{"type":"boolean"},"tokens":{"type":"array","items":{"$ref":"#/components/schemas/TokenInfo"}},"turbineSettlerAddress":{"type":"string","format":"address"},"turbineSignerAddress":{"type":"string","format":"address"},"version":{"type":"string"}}},"Eip712DomainInfo":{"type":"object","description":"Wire form of the EIP-712 signing domain served by `/api/config`. This is the single\nsource of truth for the domain: both `/api/config` and signature verification read\ntheir alloy [`Eip712Domain`] from it, so what clients sign against is exactly what\nthe server verifies.","required":["name","version","chainId","verifyingContract","salt"],"properties":{"chainId":{"type":"integer","format":"int64","minimum":0},"name":{"type":"string"},"salt":{"type":"string","format":"bytes32"},"verifyingContract":{"type":"string","format":"address"},"version":{"type":"string"}}},"TokenInfo":{"type":"object","description":"Public metadata for a token in the allowlist, returned by `/api/config`.","required":["address","symbol","decimals"],"properties":{"address":{"type":"string","format":"address"},"class":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TokenClass"}]},"decimals":{"type":"integer","format":"int32","minimum":0},"oracles":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/OracleFeed"},"propertyNames":{"type":"string"}},"symbol":{"type":"string"}}},"TokenClass":{"type":"string","enum":["Stable","Regular","Meme"]},"OracleFeed":{"oneOf":[{"type":"object","description":"Binance WebSocket depth feed.","required":["ticker_symbol"],"properties":{"ticker_symbol":{"type":"string"}}},{"type":"object","description":"Coinbase WebSocket feed.","required":["product_id"],"properties":{"product_id":{"type":"string"}}},{"type":"object","description":"Kraken WebSocket feed.","required":["wsname"],"properties":{"wsname":{"type":"string"}}},{"type":"object","description":"Lighter WebSocket feed.","required":["market_id","symbol"],"properties":{"market_id":{"type":"string"},"symbol":{"type":"string"}}},{"type":"object","description":"Hyperliquid WebSocket feed.","required":["coin"],"properties":{"coin":{"type":"string"}}},{"type":"object","description":"Bitget WebSocket feed.","required":["symbol"],"properties":{"symbol":{"type":"string"}}}],"description":"OpenAPI schema for an oracle feed entry.\n\nThe wire format flattens the oracle configuration: the map key in\n`TokenInfo.oracles` identifies the oracle (e.g. `binance`, `kraken`),\nand the value carries only the provider-specific fields — the internal\n`type` discriminator is stripped by `serialize_feeds`.\n\nThis type is documentation-only: runtime (de)serialization goes through\n[`ExchangeFeedInfo`]. The `#[serde(untagged)]` attribute here merely keeps\n`ToSchema` output consistent with the flat wire shape."}}}}
```

## POST /api/eip712/add\_liquidity

> Submit an EIP-712 signed liquidity deposit intent

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/eip712/add_liquidity":{"post":{"tags":["turbine"],"summary":"Submit an EIP-712 signed liquidity deposit intent","operationId":"add_liquidity_eip712","requestBody":{"description":"An LP deposit intent and the Permit2 batch permit funding it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Eip712RequestBody_AddLiquidityEip712"}}},"required":true},"responses":{"200":{"description":"Liquidity intent successfully submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddLiquidityResponse"}}}},"400":{"description":"Invalid intent, deadline, or pool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"401":{"description":"Invalid signature or signer mismatch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"409":{"description":"Nonce already used or reserved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"Eip712RequestBody_AddLiquidityEip712":{"type":"object","description":"EIP-712 request body: the semantic payload plus its auth block. The EIP-712\nsignature covers the payload's typed struct together with `nonce` and `deadline`.","required":["payload","auth"],"properties":{"auth":{"$ref":"#/components/schemas/AuthBlock"},"payload":{"allOf":[{"$ref":"#/components/schemas/AddLiquidity"}],"description":"Inner payload of add_liquidity endpoint."}}},"AuthBlock":{"type":"object","description":"Auth block carried by every EIP-712 request body.","required":["signer","nonce","deadline","signature"],"properties":{"deadline":{"type":"integer","format":"int64","description":"Unix seconds; not more than `maxSignatureLifetimeS` (from the config endpoint) into the\nfuture.","minimum":0},"nonce":{"type":"string","description":"Random per-request value, unique per signer among un-expired requests."},"signature":{"$ref":"#/components/schemas/PermitSignature"},"signer":{"type":"string","format":"address","description":"Claimed signer. Must match the recovered address."}}},"PermitSignature":{"type":"object","required":["r","s","yParity"],"properties":{"r":{"type":"string","format":"uint256"},"s":{"type":"string","format":"uint256"},"yParity":{"type":"boolean","format":"boolean"}}},"AddLiquidity":{"type":"object","description":"Represents a liquidity addition with SignatureTransfer permit functionality.\n\nThis struct encapsulates all necessary information needed to submit a new intent to add\nliquidity to the system, including the intent and SignatureTransfer permit data for approvals.\nUser authentication is handled via session-based SIWE verification.\n\n# Fields\n* `add_liquidity` The intent to add liquidity\n* `permit_tokens` The batch SignatureTransfer permit and signature for token0 and token1","required":["addLiquidity","permitTokens"],"properties":{"addLiquidity":{"$ref":"#/components/schemas/AddLiquidityIntent"},"permitTokens":{"$ref":"#/components/schemas/SignedBatchSignatureTransferDTO"}}},"AddLiquidityIntent":{"type":"object","required":["owner","token0","token1","fee","token0Amount","token1Amount","exact","salt"],"properties":{"exact":{"type":"boolean","description":"Whether the user wants to provide exactly the specified amounts (and is willing to\npay a swap fee first) or would rather like to provide liquidity in current ratio of pool\nreserves (in such case the specified token amounts are treated as maximum amounts)."},"fee":{"type":"integer","format":"uint32","description":"The fee for the pool","minimum":0},"owner":{"type":"string","format":"address","description":"The address of the user submitting the intent"},"salt":{"type":"string","format":"bytes32","description":"Used to differentiate between intents with the same parameters"},"token0":{"type":"string","format":"address","description":"The token0 of the pool. Tokens must be sorted ascending by address so that\n`token0 < token1`; unordered intents are rejected."},"token0Amount":{"type":"string","format":"uint256","description":"The amount of token0 to provide. If `exact` is true, this is the exact amount of token0 to\nprovide. If `exact` is false, this is the maximum amount of token0 to provide."},"token1":{"type":"string","format":"address","description":"The token1 of the pool. Must be greater than `token0` (see `token0`)."},"token1Amount":{"type":"string","format":"uint256","description":"The amount of token1 to provide. If `exact` is true, this is the exact amount of token1 to\nprovide. If `exact` is false, this is the maximum amount of token1 to provide."}}},"SignedBatchSignatureTransferDTO":{"type":"object","description":"Signed batch SignatureTransfer permit (for add liquidity token0 and token1 transfer)","required":["permit","signature"],"properties":{"permit":{"$ref":"#/components/schemas/PermitBatchTransferFrom"},"signature":{"$ref":"#/components/schemas/PermitSignature"}}},"PermitBatchTransferFrom":{"type":"object","description":"DTO for ISignatureTransfer.PermitBatchTransferFrom - batch token transfer authorization","required":["permitted","nonce","deadline"],"properties":{"deadline":{"type":"string","format":"uint256"},"nonce":{"type":"string","format":"uint256"},"permitted":{"type":"array","items":{"$ref":"#/components/schemas/TokenPermissions"}}}},"TokenPermissions":{"type":"object","description":"Token permissions for ISignatureTransfer permits.\nUsed in PermitTransferFrom and PermitBatchTransferFrom.","required":["token","amount"],"properties":{"amount":{"type":"string","format":"uint256","description":"The maximum amount that can be transferred"},"token":{"type":"string","format":"address","description":"The token address"}}},"AddLiquidityResponse":{"type":"object","description":"Response returned after successfully submitting a liquidity intent to the system.\nContains the unique identifier assigned to the submitted intent.\n\n# Fields\n* `hash` - Unique identifier assigned to the liquidity intent","required":["intentHash"],"properties":{"intentHash":{"type":"string","format":"bytes32"}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/eip712/add\_order

> Submit a single EIP-712 signed order

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/eip712/add_order":{"post":{"tags":["turbine"],"summary":"Submit a single EIP-712 signed order","operationId":"add_order_eip712","requestBody":{"description":"An order intent with its full spread curve, signed by the order's owner.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Eip712RequestBody_AddOrderEip712"}}},"required":true},"responses":{"200":{"description":"Order successfully submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOrderResponse"}}}},"400":{"description":"Invalid order, deadline, or canonicalization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"401":{"description":"Invalid signature or signer mismatch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"409":{"description":"Nonce already used or reserved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"503":{"description":"Orderbook is full","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"Eip712RequestBody_AddOrderEip712":{"type":"object","description":"EIP-712 request body: the semantic payload plus its auth block. The EIP-712\nsignature covers the payload's typed struct together with `nonce` and `deadline`.","required":["payload","auth"],"properties":{"auth":{"$ref":"#/components/schemas/AuthBlock"},"payload":{"type":"object","description":"Inner payload of add_order endpoint.","required":["order","spreadCurve"],"properties":{"annotations":{"$ref":"#/components/schemas/OrderAnnotations","description":"Informational only; deliberately outside the signature, as in the session API."},"order":{"$ref":"#/components/schemas/OrderIntentEip712"},"signedPermit":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SignedPermitDTO","description":"Permit2 signature funding the order; same semantics as the session API."}]},"spreadCurve":{"$ref":"#/components/schemas/SpreadCurveDto","description":"The full spread curve, signed as part of the inner payload."}}}}},"AuthBlock":{"type":"object","description":"Auth block carried by every EIP-712 request body.","required":["signer","nonce","deadline","signature"],"properties":{"deadline":{"type":"integer","format":"int64","description":"Unix seconds; not more than `maxSignatureLifetimeS` (from the config endpoint) into the\nfuture.","minimum":0},"nonce":{"type":"string","description":"Random per-request value, unique per signer among un-expired requests."},"signature":{"$ref":"#/components/schemas/PermitSignature"},"signer":{"type":"string","format":"address","description":"Claimed signer. Must match the recovered address."}}},"PermitSignature":{"type":"object","required":["r","s","yParity"],"properties":{"r":{"type":"string","format":"uint256"},"s":{"type":"string","format":"uint256"},"yParity":{"type":"boolean","format":"boolean"}}},"OrderAnnotations":{"type":"object","description":"Additional data attached to an order, provided by the user. Purely informational —\nnot part of the signed order and not used by the protocol.","properties":{"spreadAtSubmissionHbp":{"type":["integer","null"],"format":"int64","description":"The market spread (in hundredths of a basis point, 10_000 hbp = 1%) quoted to the\nuser at submission time, as returned by `/api/quote` (`amm_spread_hbp`).","minimum":0}}},"OrderIntentEip712":{"type":"object","description":"The EIP-712 API wire form of an order intent. Unlike the session-API DTO,\nit carries no spread curve inline. The curve is a required payload-level sibling.","required":["owner","sellToken","buyToken","sellAmount","minBuyAmount","startTime","endTime","partialFill","callData","callDataTarget","salt"],"properties":{"buyToken":{"type":"string","format":"address"},"callData":{"type":"string","format":"bytes"},"callDataTarget":{"type":"string","format":"address"},"endTime":{"type":"integer","format":"uint256","description":"Block timestamp until when the order is valid","minimum":0},"minBuyAmount":{"type":"string","format":"uint256"},"owner":{"type":"string","format":"address"},"partialFill":{"type":"boolean"},"salt":{"type":"string","format":"bytes32","description":"Differentiates orders that are otherwise identical (including their full spread\ncurve); SDKs should randomize it."},"sellAmount":{"type":"string","format":"uint256"},"sellToken":{"type":"string","format":"address"},"startTime":{"type":"integer","format":"uint256","description":"Block timestamp since when the order is valid","minimum":0}}},"SignedPermitDTO":{"type":"object","required":["permit","signature"],"properties":{"permit":{"$ref":"#/components/schemas/PermitSingle"},"signature":{"$ref":"#/components/schemas/PermitSignature"}}},"PermitSingle":{"type":"object","required":["details","spender","sigDeadline"],"properties":{"details":{"$ref":"#/components/schemas/PermitDetails"},"sigDeadline":{"type":"string","format":"uint256"},"spender":{"type":"string","format":"address"}}},"PermitDetails":{"type":"object","required":["token","amount","expiration","nonce"],"properties":{"amount":{"type":"string","format":"uint160"},"expiration":{"type":"integer","format":"uint64","minimum":0},"nonce":{"type":"integer","format":"uint64","minimum":0},"token":{"type":"string","format":"address"}}},"SpreadCurveDto":{"type":"object","description":"Piecewise-linear spread curve. Interior `points` express knot positions as a fraction\nof the order's `[start_time, end_time]` window in basis points (`windowBps`), so the\ncurve is portable across orders of different durations.","required":["startDeltaBps","endDeltaBps"],"properties":{"endDeltaBps":{"type":"integer","format":"int32","description":"Mid-price delta at the order's `end_time`, in basis points."},"points":{"type":"array","items":{"$ref":"#/components/schemas/CurvePointDto"},"description":"Interior knots. Each `windowBps` must lie in `[1, 9_999]` and values must be\nstrictly increasing across `points`. Defaults to `[]` if absent, yielding a single\nlinear segment from `startDeltaBps` to `endDeltaBps`."},"startDeltaBps":{"type":"integer","format":"int32","description":"Mid-price delta at the order's `start_time`, in basis points."}}},"CurvePointDto":{"type":"object","description":"A single interior knot in a [`SpreadCurveDto`].","required":["windowBps","deltaBps"],"properties":{"deltaBps":{"type":"integer","format":"int32","description":"Mid-price delta in basis points at this knot."},"windowBps":{"type":"integer","format":"int32","description":"Knot position as a fraction of the order window in basis points. Must lie in\n`(0, 10_000)` exclusive — `5_000` is the order midpoint.","maximum":9999,"minimum":1}}},"AddOrderResponse":{"type":"object","description":"Response returned after successfully submitting an order to the system.\nContains the unique identifier assigned to the submitted order.\n\n# Fields\n* `order_hash` - Unique identifier assigned to the submitted order","required":["orderHash"],"properties":{"orderHash":{"type":"string","format":"bytes32"}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/eip712/add\_orders

> Submit multiple independently-signed orders

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/eip712/add_orders":{"post":{"tags":["turbine"],"summary":"Submit multiple independently-signed orders","operationId":"add_orders_eip712","requestBody":{"description":"One independently signed request per order, all signed by the same signer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Eip712RequestBodyAddOrderBatch"}}},"required":true},"responses":{"200":{"description":"Orders successfully submitted","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AddOrderResponse"}}}}},"400":{"description":"All envelopes invalid (per-element errors inside)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"503":{"description":"Orderbook is full","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"Eip712RequestBodyAddOrderBatch":{"type":"array","items":{"$ref":"#/components/schemas/Eip712RequestBody_AddOrderEip712"},"description":"A batch of independently signed add-order requests."},"Eip712RequestBody_AddOrderEip712":{"type":"object","description":"EIP-712 request body: the semantic payload plus its auth block. The EIP-712\nsignature covers the payload's typed struct together with `nonce` and `deadline`.","required":["payload","auth"],"properties":{"auth":{"$ref":"#/components/schemas/AuthBlock"},"payload":{"type":"object","description":"Inner payload of add_order endpoint.","required":["order","spreadCurve"],"properties":{"annotations":{"$ref":"#/components/schemas/OrderAnnotations","description":"Informational only; deliberately outside the signature, as in the session API."},"order":{"$ref":"#/components/schemas/OrderIntentEip712"},"signedPermit":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SignedPermitDTO","description":"Permit2 signature funding the order; same semantics as the session API."}]},"spreadCurve":{"$ref":"#/components/schemas/SpreadCurveDto","description":"The full spread curve, signed as part of the inner payload."}}}}},"AuthBlock":{"type":"object","description":"Auth block carried by every EIP-712 request body.","required":["signer","nonce","deadline","signature"],"properties":{"deadline":{"type":"integer","format":"int64","description":"Unix seconds; not more than `maxSignatureLifetimeS` (from the config endpoint) into the\nfuture.","minimum":0},"nonce":{"type":"string","description":"Random per-request value, unique per signer among un-expired requests."},"signature":{"$ref":"#/components/schemas/PermitSignature"},"signer":{"type":"string","format":"address","description":"Claimed signer. Must match the recovered address."}}},"PermitSignature":{"type":"object","required":["r","s","yParity"],"properties":{"r":{"type":"string","format":"uint256"},"s":{"type":"string","format":"uint256"},"yParity":{"type":"boolean","format":"boolean"}}},"OrderAnnotations":{"type":"object","description":"Additional data attached to an order, provided by the user. Purely informational —\nnot part of the signed order and not used by the protocol.","properties":{"spreadAtSubmissionHbp":{"type":["integer","null"],"format":"int64","description":"The market spread (in hundredths of a basis point, 10_000 hbp = 1%) quoted to the\nuser at submission time, as returned by `/api/quote` (`amm_spread_hbp`).","minimum":0}}},"OrderIntentEip712":{"type":"object","description":"The EIP-712 API wire form of an order intent. Unlike the session-API DTO,\nit carries no spread curve inline. The curve is a required payload-level sibling.","required":["owner","sellToken","buyToken","sellAmount","minBuyAmount","startTime","endTime","partialFill","callData","callDataTarget","salt"],"properties":{"buyToken":{"type":"string","format":"address"},"callData":{"type":"string","format":"bytes"},"callDataTarget":{"type":"string","format":"address"},"endTime":{"type":"integer","format":"uint256","description":"Block timestamp until when the order is valid","minimum":0},"minBuyAmount":{"type":"string","format":"uint256"},"owner":{"type":"string","format":"address"},"partialFill":{"type":"boolean"},"salt":{"type":"string","format":"bytes32","description":"Differentiates orders that are otherwise identical (including their full spread\ncurve); SDKs should randomize it."},"sellAmount":{"type":"string","format":"uint256"},"sellToken":{"type":"string","format":"address"},"startTime":{"type":"integer","format":"uint256","description":"Block timestamp since when the order is valid","minimum":0}}},"SignedPermitDTO":{"type":"object","required":["permit","signature"],"properties":{"permit":{"$ref":"#/components/schemas/PermitSingle"},"signature":{"$ref":"#/components/schemas/PermitSignature"}}},"PermitSingle":{"type":"object","required":["details","spender","sigDeadline"],"properties":{"details":{"$ref":"#/components/schemas/PermitDetails"},"sigDeadline":{"type":"string","format":"uint256"},"spender":{"type":"string","format":"address"}}},"PermitDetails":{"type":"object","required":["token","amount","expiration","nonce"],"properties":{"amount":{"type":"string","format":"uint160"},"expiration":{"type":"integer","format":"uint64","minimum":0},"nonce":{"type":"integer","format":"uint64","minimum":0},"token":{"type":"string","format":"address"}}},"SpreadCurveDto":{"type":"object","description":"Piecewise-linear spread curve. Interior `points` express knot positions as a fraction\nof the order's `[start_time, end_time]` window in basis points (`windowBps`), so the\ncurve is portable across orders of different durations.","required":["startDeltaBps","endDeltaBps"],"properties":{"endDeltaBps":{"type":"integer","format":"int32","description":"Mid-price delta at the order's `end_time`, in basis points."},"points":{"type":"array","items":{"$ref":"#/components/schemas/CurvePointDto"},"description":"Interior knots. Each `windowBps` must lie in `[1, 9_999]` and values must be\nstrictly increasing across `points`. Defaults to `[]` if absent, yielding a single\nlinear segment from `startDeltaBps` to `endDeltaBps`."},"startDeltaBps":{"type":"integer","format":"int32","description":"Mid-price delta at the order's `start_time`, in basis points."}}},"CurvePointDto":{"type":"object","description":"A single interior knot in a [`SpreadCurveDto`].","required":["windowBps","deltaBps"],"properties":{"deltaBps":{"type":"integer","format":"int32","description":"Mid-price delta in basis points at this knot."},"windowBps":{"type":"integer","format":"int32","description":"Knot position as a fraction of the order window in basis points. Must lie in\n`(0, 10_000)` exclusive — `5_000` is the order midpoint.","maximum":9999,"minimum":1}}},"AddOrderResponse":{"type":"object","description":"Response returned after successfully submitting an order to the system.\nContains the unique identifier assigned to the submitted order.\n\n# Fields\n* `order_hash` - Unique identifier assigned to the submitted order","required":["orderHash"],"properties":{"orderHash":{"type":"string","format":"bytes32"}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/eip712/cancel\_order

> Cancel an order with an EIP-712 signed request

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/eip712/cancel_order":{"post":{"tags":["turbine"],"summary":"Cancel an order with an EIP-712 signed request","operationId":"cancel_order_eip712","requestBody":{"description":"The hash of the order to cancel, signed by the order's owner.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Eip712RequestBody_CancelOrderEip712"}}},"required":true},"responses":{"200":{"description":"Order successfully queued for cancellation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderResponse"}}}},"404":{"description":"Order not found or not owned by the signer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"409":{"description":"Nonce already used or reserved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"Eip712RequestBody_CancelOrderEip712":{"type":"object","description":"EIP-712 request body: the semantic payload plus its auth block. The EIP-712\nsignature covers the payload's typed struct together with `nonce` and `deadline`.","required":["payload","auth"],"properties":{"auth":{"$ref":"#/components/schemas/AuthBlock"},"payload":{"type":"object","description":"Inner payload of cancel_order endpoint.","required":["orderHash"],"properties":{"orderHash":{"type":"string","format":"bytes32"}}}}},"AuthBlock":{"type":"object","description":"Auth block carried by every EIP-712 request body.","required":["signer","nonce","deadline","signature"],"properties":{"deadline":{"type":"integer","format":"int64","description":"Unix seconds; not more than `maxSignatureLifetimeS` (from the config endpoint) into the\nfuture.","minimum":0},"nonce":{"type":"string","description":"Random per-request value, unique per signer among un-expired requests."},"signature":{"$ref":"#/components/schemas/PermitSignature"},"signer":{"type":"string","format":"address","description":"Claimed signer. Must match the recovered address."}}},"PermitSignature":{"type":"object","required":["r","s","yParity"],"properties":{"r":{"type":"string","format":"uint256"},"s":{"type":"string","format":"uint256"},"yParity":{"type":"boolean","format":"boolean"}}},"CancelOrderResponse":{"type":"object","required":["orderHash"],"properties":{"orderHash":{"type":"string","format":"bytes32"}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/eip712/liquidity\_intents

> Query the signer's liquidity intents by hash

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/eip712/liquidity_intents":{"post":{"tags":["turbine"],"summary":"Query the signer's liquidity intents by hash","operationId":"get_liquidity_intents_eip712","requestBody":{"description":"The LP intent hashes to look up, at least one and at most 30; results are scoped to the recovered signer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Eip712RequestBody_LiquidityIntentsQueryEip712"}}},"required":true},"responses":{"200":{"description":"Liquidity intent states owned by the recovered signer","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LiquidityIntentState"}}}}},"400":{"description":"Invalid deadline, or an empty or oversized hash list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"401":{"description":"Invalid signature or signer mismatch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"Eip712RequestBody_LiquidityIntentsQueryEip712":{"type":"object","description":"EIP-712 request body: the semantic payload plus its auth block. The EIP-712\nsignature covers the payload's typed struct together with `nonce` and `deadline`.","required":["payload","auth"],"properties":{"auth":{"$ref":"#/components/schemas/AuthBlock"},"payload":{"type":"object","description":"Inner payload for querying liquidity intents.","properties":{"hashes":{"type":"array","items":{"type":"string","format":"bytes32"},"description":"Intent hashes to look up. Max 30 per request; at least one is required."}}}}},"AuthBlock":{"type":"object","description":"Auth block carried by every EIP-712 request body.","required":["signer","nonce","deadline","signature"],"properties":{"deadline":{"type":"integer","format":"int64","description":"Unix seconds; not more than `maxSignatureLifetimeS` (from the config endpoint) into the\nfuture.","minimum":0},"nonce":{"type":"string","description":"Random per-request value, unique per signer among un-expired requests."},"signature":{"$ref":"#/components/schemas/PermitSignature"},"signer":{"type":"string","format":"address","description":"Claimed signer. Must match the recovered address."}}},"PermitSignature":{"type":"object","required":["r","s","yParity"],"properties":{"r":{"type":"string","format":"uint256"},"s":{"type":"string","format":"uint256"},"yParity":{"type":"boolean","format":"boolean"}}},"LiquidityIntentState":{"type":"object","required":["hash","intent","status"],"properties":{"hash":{"type":"string","format":"bytes32"},"intent":{"type":"object"},"status":{"$ref":"#/components/schemas/LiquidityIntentStatus"}}},"LiquidityIntentStatus":{"type":"string","enum":["Pending","Invalid","Expired","Executed","PendingCancellation","Canceled"]},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/eip712/orders

> Query the signer's orders

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/eip712/orders":{"post":{"tags":["turbine"],"summary":"Query the signer's orders","operationId":"get_orders_eip712","requestBody":{"description":"Filters for the signer's orders; results are scoped to the recovered signer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Eip712RequestBody_OrdersQueryEip712"}}},"required":true},"responses":{"200":{"description":"Orders for the recovered signer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersResponse"}}}},"400":{"description":"Invalid deadline or query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"401":{"description":"Invalid signature or signer mismatch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"Eip712RequestBody_OrdersQueryEip712":{"type":"object","description":"EIP-712 request body: the semantic payload plus its auth block. The EIP-712\nsignature covers the payload's typed struct together with `nonce` and `deadline`.","required":["payload","auth"],"properties":{"auth":{"$ref":"#/components/schemas/AuthBlock"},"payload":{"type":"object","description":"Inner payload of GET orders endpoint.\nField semantics mirror the session API's query parameters; zero values mean \"unset\".","properties":{"cursor":{"type":"string","description":"Opaque cursor from a previous response; empty for the first page."},"hashes":{"type":"array","items":{"type":"string","format":"bytes32"},"description":"Direct lookup by order hash. Max 30 per request; pagination is skipped."},"limit":{"type":"integer","format":"int64","description":"Max orders per page; 0 selects the server default, and larger values are capped.","minimum":0},"statuses":{"type":"array","items":{"$ref":"#/components/schemas/OrderStatus"},"description":"Filter by order status. Multiple values are OR'd."}}}}},"AuthBlock":{"type":"object","description":"Auth block carried by every EIP-712 request body.","required":["signer","nonce","deadline","signature"],"properties":{"deadline":{"type":"integer","format":"int64","description":"Unix seconds; not more than `maxSignatureLifetimeS` (from the config endpoint) into the\nfuture.","minimum":0},"nonce":{"type":"string","description":"Random per-request value, unique per signer among un-expired requests."},"signature":{"$ref":"#/components/schemas/PermitSignature"},"signer":{"type":"string","format":"address","description":"Claimed signer. Must match the recovered address."}}},"PermitSignature":{"type":"object","required":["r","s","yParity"],"properties":{"r":{"type":"string","format":"uint256"},"s":{"type":"string","format":"uint256"},"yParity":{"type":"boolean","format":"boolean"}}},"OrderStatus":{"type":"string","enum":["Active","Invalid","Expired","Filled","PendingCancellation","Canceled","Incompatible"]},"OrdersResponse":{"type":"object","description":"Response body for `GET /api/orders`.","required":["orders","hasMore"],"properties":{"cursor":{"type":["string","null"],"description":"Opaque token to pass back as `cursor` in the next request. `null` on the last page."},"hasMore":{"type":"boolean","description":"Mirrors `cursor.is_some()`."},"orders":{"type":"array","items":{"$ref":"#/components/schemas/OrderState"}}}},"OrderState":{"type":"object","required":["hash","owner","status","execution","orderDetails"],"properties":{"execution":{"type":"array","items":{"$ref":"#/components/schemas/OrderExecution"}},"hash":{"type":"string","format":"bytes32"},"orderDetails":{"$ref":"#/components/schemas/OrderDetails"},"owner":{"type":"string","format":"address"},"status":{"$ref":"#/components/schemas/OrderStatus"}}},"OrderExecution":{"type":"object","required":["blockNumber","soldAmount","boughtAmount","surplusBuyAmount"],"properties":{"batchId":{"type":["integer","null"],"format":"int64","minimum":0},"blockNumber":{"type":"integer","format":"int64","minimum":0},"boughtAmount":{"type":"string","format":"uint256"},"midPrice":{"type":"object","description":"Mid-price for the order's (sell → buy) pair at the clearing batch."},"soldAmount":{"type":"string","format":"uint256"},"surplusBuyAmount":{"type":"string","format":"uint256"},"txHash":{"type":["string","null"],"format":"bytes32"}}},"OrderDetails":{"type":"object","description":"Display subset of an `Order`, copied verbatim onto `OrderState` at insertion time.\n\nCarrying these fields on the state record keeps display detail available even after the\nunderlying `Order` is dropped at terminal-status transition.","required":["sellToken","buyToken","sellAmount","limitPrice","startTime","endTime","spreadCurve","createdTimestamp"],"properties":{"annotations":{"$ref":"#/components/schemas/OrderAnnotations","description":"User-provided annotations, snapshotted at insertion. Defaults for order\nhistory entries persisted before annotations existed."},"buyToken":{"type":"string","format":"address"},"createdTimestamp":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"uint256"},"limitPrice":{"type":"object"},"sellAmount":{"type":"string","format":"uint256"},"sellToken":{"type":"string","format":"address"},"spreadCurve":{"$ref":"#/components/schemas/SpreadCurve","description":"Piecewise-linear curve defining the allowed mid-price deviation over the order\nwindow. Snapshotted from the submitted [`Order`] at insertion so the curve remains\navailable after the underlying `Order` is dropped."},"startTime":{"type":"string","format":"uint256"}}},"OrderAnnotations":{"type":"object","description":"Additional data attached to an order, provided by the user. Purely informational —\nnot part of the signed order and not used by the protocol.","properties":{"spreadAtSubmissionHbp":{"type":["integer","null"],"format":"int64","description":"The market spread (in hundredths of a basis point, 10_000 hbp = 1%) quoted to the\nuser at submission time, as returned by `/api/quote` (`amm_spread_hbp`).","minimum":0}}},"SpreadCurve":{"type":"object","description":"A piecewise-linear curve mapping wall-clock time to a mid-price delta in basis points.\n\nThe curve carries its own `[start_secs, end_secs]` window: the order's `start_time`\nand `end_time` must match these for validation to succeed (enforced at the API layer).\nBetween interior knots, `delta_bps` is interpolated linearly using i64 arithmetic.\nOutside the curve window the value clamps to `start_delta_bps` / `end_delta_bps`.","required":["startSecs","endSecs","startDeltaBps","endDeltaBps","points"],"properties":{"endDeltaBps":{"type":"integer","format":"int32"},"endSecs":{"type":"integer","format":"int64","minimum":0},"points":{"type":"array","items":{"$ref":"#/components/schemas/CurvePoint"}},"startDeltaBps":{"type":"integer","format":"int32"},"startSecs":{"type":"integer","format":"int64","minimum":0}}},"CurvePoint":{"type":"object","description":"A single knot in a [`SpreadCurve`], binding a wall-clock time to a delta in basis points.","required":["timeSecs","deltaBps"],"properties":{"deltaBps":{"type":"integer","format":"int32"},"timeSecs":{"type":"integer","format":"int64","minimum":0}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/eip712/remove\_liquidity

> Submit an EIP-712 signed liquidity withdrawal intent

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/eip712/remove_liquidity":{"post":{"tags":["turbine"],"summary":"Submit an EIP-712 signed liquidity withdrawal intent","operationId":"remove_liquidity_eip712","requestBody":{"description":"An LP withdrawal intent and the Permit2 transfer permit for the LP token it burns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Eip712RequestBody_RemoveLiquidityEip712"}}},"required":true},"responses":{"200":{"description":"Liquidity intent successfully submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveLiquidityResponse"}}}},"400":{"description":"Invalid intent, deadline, or pool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"401":{"description":"Invalid signature or signer mismatch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"409":{"description":"Nonce already used or reserved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"Eip712RequestBody_RemoveLiquidityEip712":{"type":"object","description":"EIP-712 request body: the semantic payload plus its auth block. The EIP-712\nsignature covers the payload's typed struct together with `nonce` and `deadline`.","required":["payload","auth"],"properties":{"auth":{"$ref":"#/components/schemas/AuthBlock"},"payload":{"allOf":[{"$ref":"#/components/schemas/RemoveLiquidity"}],"description":"Inner payload of remove_liquidity endpoint."}}},"AuthBlock":{"type":"object","description":"Auth block carried by every EIP-712 request body.","required":["signer","nonce","deadline","signature"],"properties":{"deadline":{"type":"integer","format":"int64","description":"Unix seconds; not more than `maxSignatureLifetimeS` (from the config endpoint) into the\nfuture.","minimum":0},"nonce":{"type":"string","description":"Random per-request value, unique per signer among un-expired requests."},"signature":{"$ref":"#/components/schemas/PermitSignature"},"signer":{"type":"string","format":"address","description":"Claimed signer. Must match the recovered address."}}},"PermitSignature":{"type":"object","required":["r","s","yParity"],"properties":{"r":{"type":"string","format":"uint256"},"s":{"type":"string","format":"uint256"},"yParity":{"type":"boolean","format":"boolean"}}},"RemoveLiquidity":{"type":"object","description":"Represents a liquidity removal with SignatureTransfer permit functionality.\n\nThis struct encapsulates all necessary information needed to submit a new intent to remove\nliquidity to the system, including the intent and SignatureTransfer permit data for approvals.\nUser authentication is handled via session-based SIWE verification.\n\n# Fields\n* `remove_liquidity` The intent to remove liquidity\n* `permit_lp_token` The SignatureTransfer permit and signature for the LP token","required":["removeLiquidity","permitLpToken"],"properties":{"permitLpToken":{"$ref":"#/components/schemas/SignedSignatureTransferDTO"},"removeLiquidity":{"$ref":"#/components/schemas/RemoveLiquidityIntent"}}},"SignedSignatureTransferDTO":{"type":"object","description":"Signed single SignatureTransfer permit (for remove liquidity LP token transfer)","required":["permit","signature"],"properties":{"permit":{"$ref":"#/components/schemas/PermitTransferFrom"},"signature":{"$ref":"#/components/schemas/PermitSignature"}}},"PermitTransferFrom":{"type":"object","description":"DTO for ISignatureTransfer.PermitTransferFrom - single token transfer authorization","required":["permitted","nonce","deadline"],"properties":{"deadline":{"type":"string","format":"uint256"},"nonce":{"type":"string","format":"uint256"},"permitted":{"$ref":"#/components/schemas/TokenPermissions"}}},"TokenPermissions":{"type":"object","description":"Token permissions for ISignatureTransfer permits.\nUsed in PermitTransferFrom and PermitBatchTransferFrom.","required":["token","amount"],"properties":{"amount":{"type":"string","format":"uint256","description":"The maximum amount that can be transferred"},"token":{"type":"string","format":"address","description":"The token address"}}},"RemoveLiquidityIntent":{"type":"object","required":["owner","token0","token1","fee","lpToken","lpTokenAmount","salt"],"properties":{"fee":{"type":"integer","format":"uint32","description":"The fee for the pool","minimum":0},"lpToken":{"type":"string","format":"address","description":"The LP token of the pool"},"lpTokenAmount":{"type":"string","format":"uint256","description":"The amount of LP tokens to burn"},"owner":{"type":"string","format":"address","description":"The address of the user submitting the intent"},"salt":{"type":"string","format":"bytes32","description":"Used to differentiate between intents with the same parameters"},"token0":{"type":"string","format":"address","description":"The token0 of the pool. Tokens must be sorted ascending by address so that\n`token0 < token1`; unordered intents are rejected."},"token1":{"type":"string","format":"address","description":"The token1 of the pool. Must be greater than `token0` (see `token0`)."}}},"RemoveLiquidityResponse":{"type":"object","description":"Response returned after successfully submitting an intent to the system.\nContains the unique identifier assigned to the submitted intent.\n\n# Fields\n* `hash` - Unique identifier assigned to the submitted intent","required":["intentHash"],"properties":{"intentHash":{"type":"string","format":"bytes32"}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/liquidity\_intent\_states

> Get statuses for multiple liquidity intents

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/liquidity_intent_states":{"post":{"tags":["turbine"],"summary":"Get statuses for multiple liquidity intents","operationId":"get_liquidity_intent_states","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLiquidityIntentStates"}}},"required":true},"responses":{"200":{"description":"Liquidity intent states retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LiquidityIntentState"}}}}},"401":{"description":"User not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"GetLiquidityIntentStates":{"type":"object","required":["intentHashes"],"properties":{"intentHashes":{"type":"array","items":{"type":"string","format":"bytes32"}}}},"LiquidityIntentState":{"type":"object","required":["hash","intent","status"],"properties":{"hash":{"type":"string","format":"bytes32"},"intent":{"type":"object"},"status":{"$ref":"#/components/schemas/LiquidityIntentStatus"}}},"LiquidityIntentStatus":{"type":"string","enum":["Pending","Invalid","Expired","Executed","PendingCancellation","Canceled"]},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/logout

> Logout and clear all sessions for the current user

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/logout":{"post":{"tags":["turbine"],"summary":"Logout and clear all sessions for the current user","operationId":"logout","responses":{"200":{"description":"Successfully logged out, all sessions cleared"},"400":{"description":"Invalid session state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"401":{"description":"User not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## GET /api/me

> Get current user session information

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/me":{"get":{"tags":["turbine"],"summary":"Get current user session information","operationId":"me","responses":{"200":{"description":"User session information retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"400":{"description":"Invalid session state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"401":{"description":"User not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"MeResponse":{"type":"object","required":["address","authenticated"],"properties":{"address":{"type":"string","format":"address"},"authenticated":{"type":"boolean"}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/nonce

> Generate a nonce for the SIWE flow.

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/nonce":{"post":{"tags":["turbine"],"summary":"Generate a nonce for the SIWE flow.","operationId":"nonce","responses":{"200":{"description":"Nonce generated successfully","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Cannot generate nonce: user is already authenticated or nonce already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/order\_fees

>

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/order_fees":{"post":{"tags":["turbine"],"operationId":"get_order_fees","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderIntent"}}},"required":true},"responses":{"200":{"description":"Order fees retrieved successfully","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"OrderIntent":{"type":"object","description":"The swap intent for a user","required":["owner","sellToken","buyToken","sellAmount","minBuyAmount","spreadCurve","startTime","endTime","partialFill","callData","callDataTarget","calldataSellAmountOffset","calldataBuyAmountOffset","salt"],"properties":{"buyToken":{"type":"string","format":"address","description":"The token being bought"},"callData":{"type":"string","format":"bytes","description":"Optional call data for smart orders, allowing custom routing"},"callDataTarget":{"type":"string","format":"address","description":"The address of the target contract for the calldata"},"calldataBuyAmountOffset":{"type":"integer","format":"uint64","description":"The offset of the buy amount in the calldata\nIf Some, used to update the calldata with the actual buy amount","minimum":0},"calldataSellAmountOffset":{"type":"integer","format":"uint64","description":"The offset of the sell amount in the calldata\nIf Some, used to update the calldata with the actual sell amount","minimum":0},"endTime":{"type":"integer","format":"uint256","description":"Block timestamp until when the order is valid.","minimum":0},"minBuyAmount":{"type":"string","format":"uint256","description":"The minimum amount of tokens being bought, effectively defining limit price."},"owner":{"type":"string","format":"address","description":"The address of the user submitting the order"},"partialFill":{"type":"boolean","format":"boolean","description":"Flag allowing partial fills"},"salt":{"type":"string","format":"bytes32","description":"The offset of the buy amount in the calldata\nUsed to differentiate between orders with the same parameters"},"sellAmount":{"type":"string","format":"uint196","description":"The amount of tokens being sold"},"sellToken":{"type":"string","format":"address","description":"The token being sold"},"spreadCurve":{"$ref":"#/components/schemas/SpreadCurveDto","description":"A piecewise-linear spread curve mapping a fraction of the order window to a mid-price\ndelta in basis points. Each interior point's `windowBps` is a fraction of the order\nduration in basis points (5_000 = halfway)."},"startTime":{"type":"integer","format":"uint256","description":"Block timestamp since when the order is valid","minimum":0}}},"SpreadCurveDto":{"type":"object","description":"Piecewise-linear spread curve. Interior `points` express knot positions as a fraction\nof the order's `[start_time, end_time]` window in basis points (`windowBps`), so the\ncurve is portable across orders of different durations.","required":["startDeltaBps","endDeltaBps"],"properties":{"endDeltaBps":{"type":"integer","format":"int32","description":"Mid-price delta at the order's `end_time`, in basis points."},"points":{"type":"array","items":{"$ref":"#/components/schemas/CurvePointDto"},"description":"Interior knots. Each `windowBps` must lie in `[1, 9_999]` and values must be\nstrictly increasing across `points`. Defaults to `[]` if absent, yielding a single\nlinear segment from `startDeltaBps` to `endDeltaBps`."},"startDeltaBps":{"type":"integer","format":"int32","description":"Mid-price delta at the order's `start_time`, in basis points."}}},"CurvePointDto":{"type":"object","description":"A single interior knot in a [`SpreadCurveDto`].","required":["windowBps","deltaBps"],"properties":{"deltaBps":{"type":"integer","format":"int32","description":"Mid-price delta in basis points at this knot."},"windowBps":{"type":"integer","format":"int32","description":"Knot position as a fraction of the order window in basis points. Must lie in\n`(0, 10_000)` exclusive — `5_000` is the order midpoint.","maximum":9999,"minimum":1}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## GET /api/order\_state

>

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/order_state":{"get":{"tags":["turbine"],"operationId":"get_order_state","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderStatus"}}},"required":true},"responses":{"200":{"description":"Order state retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderState"}}}},"401":{"description":"User not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"404":{"description":"Order not found or not owned by caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"GetOrderStatus":{"type":"object","required":["orderHash"],"properties":{"orderHash":{"type":"string","format":"bytes32"}}},"OrderState":{"type":"object","required":["hash","owner","status","execution","orderDetails"],"properties":{"execution":{"type":"array","items":{"$ref":"#/components/schemas/OrderExecution"}},"hash":{"type":"string","format":"bytes32"},"orderDetails":{"$ref":"#/components/schemas/OrderDetails"},"owner":{"type":"string","format":"address"},"status":{"$ref":"#/components/schemas/OrderStatus"}}},"OrderExecution":{"type":"object","required":["blockNumber","soldAmount","boughtAmount","surplusBuyAmount"],"properties":{"batchId":{"type":["integer","null"],"format":"int64","minimum":0},"blockNumber":{"type":"integer","format":"int64","minimum":0},"boughtAmount":{"type":"string","format":"uint256"},"midPrice":{"type":"object","description":"Mid-price for the order's (sell → buy) pair at the clearing batch."},"soldAmount":{"type":"string","format":"uint256"},"surplusBuyAmount":{"type":"string","format":"uint256"},"txHash":{"type":["string","null"],"format":"bytes32"}}},"OrderDetails":{"type":"object","description":"Display subset of an `Order`, copied verbatim onto `OrderState` at insertion time.\n\nCarrying these fields on the state record keeps display detail available even after the\nunderlying `Order` is dropped at terminal-status transition.","required":["sellToken","buyToken","sellAmount","limitPrice","startTime","endTime","spreadCurve","createdTimestamp"],"properties":{"annotations":{"$ref":"#/components/schemas/OrderAnnotations","description":"User-provided annotations, snapshotted at insertion. Defaults for order\nhistory entries persisted before annotations existed."},"buyToken":{"type":"string","format":"address"},"createdTimestamp":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"uint256"},"limitPrice":{"type":"object"},"sellAmount":{"type":"string","format":"uint256"},"sellToken":{"type":"string","format":"address"},"spreadCurve":{"$ref":"#/components/schemas/SpreadCurve","description":"Piecewise-linear curve defining the allowed mid-price deviation over the order\nwindow. Snapshotted from the submitted [`Order`] at insertion so the curve remains\navailable after the underlying `Order` is dropped."},"startTime":{"type":"string","format":"uint256"}}},"OrderAnnotations":{"type":"object","description":"Additional data attached to an order, provided by the user. Purely informational —\nnot part of the signed order and not used by the protocol.","properties":{"spreadAtSubmissionHbp":{"type":["integer","null"],"format":"int64","description":"The market spread (in hundredths of a basis point, 10_000 hbp = 1%) quoted to the\nuser at submission time, as returned by `/api/quote` (`amm_spread_hbp`).","minimum":0}}},"SpreadCurve":{"type":"object","description":"A piecewise-linear curve mapping wall-clock time to a mid-price delta in basis points.\n\nThe curve carries its own `[start_secs, end_secs]` window: the order's `start_time`\nand `end_time` must match these for validation to succeed (enforced at the API layer).\nBetween interior knots, `delta_bps` is interpolated linearly using i64 arithmetic.\nOutside the curve window the value clamps to `start_delta_bps` / `end_delta_bps`.","required":["startSecs","endSecs","startDeltaBps","endDeltaBps","points"],"properties":{"endDeltaBps":{"type":"integer","format":"int32"},"endSecs":{"type":"integer","format":"int64","minimum":0},"points":{"type":"array","items":{"$ref":"#/components/schemas/CurvePoint"}},"startDeltaBps":{"type":"integer","format":"int32"},"startSecs":{"type":"integer","format":"int64","minimum":0}}},"CurvePoint":{"type":"object","description":"A single knot in a [`SpreadCurve`], binding a wall-clock time to a delta in basis points.","required":["timeSecs","deltaBps"],"properties":{"deltaBps":{"type":"integer","format":"int32"},"timeSecs":{"type":"integer","format":"int64","minimum":0}}},"OrderStatus":{"type":"string","enum":["Active","Invalid","Expired","Filled","PendingCancellation","Canceled","Incompatible"]},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/order\_states

> Get states for multiple orders

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/order_states":{"post":{"tags":["turbine"],"summary":"Get states for multiple orders","operationId":"get_order_states","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderStates"}}},"required":true},"responses":{"200":{"description":"Order states retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderState"}}}}},"401":{"description":"User not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"GetOrderStates":{"type":"object","required":["orderHashes"],"properties":{"orderHashes":{"type":"array","items":{"type":"string","format":"bytes32"}}}},"OrderState":{"type":"object","required":["hash","owner","status","execution","orderDetails"],"properties":{"execution":{"type":"array","items":{"$ref":"#/components/schemas/OrderExecution"}},"hash":{"type":"string","format":"bytes32"},"orderDetails":{"$ref":"#/components/schemas/OrderDetails"},"owner":{"type":"string","format":"address"},"status":{"$ref":"#/components/schemas/OrderStatus"}}},"OrderExecution":{"type":"object","required":["blockNumber","soldAmount","boughtAmount","surplusBuyAmount"],"properties":{"batchId":{"type":["integer","null"],"format":"int64","minimum":0},"blockNumber":{"type":"integer","format":"int64","minimum":0},"boughtAmount":{"type":"string","format":"uint256"},"midPrice":{"type":"object","description":"Mid-price for the order's (sell → buy) pair at the clearing batch."},"soldAmount":{"type":"string","format":"uint256"},"surplusBuyAmount":{"type":"string","format":"uint256"},"txHash":{"type":["string","null"],"format":"bytes32"}}},"OrderDetails":{"type":"object","description":"Display subset of an `Order`, copied verbatim onto `OrderState` at insertion time.\n\nCarrying these fields on the state record keeps display detail available even after the\nunderlying `Order` is dropped at terminal-status transition.","required":["sellToken","buyToken","sellAmount","limitPrice","startTime","endTime","spreadCurve","createdTimestamp"],"properties":{"annotations":{"$ref":"#/components/schemas/OrderAnnotations","description":"User-provided annotations, snapshotted at insertion. Defaults for order\nhistory entries persisted before annotations existed."},"buyToken":{"type":"string","format":"address"},"createdTimestamp":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"uint256"},"limitPrice":{"type":"object"},"sellAmount":{"type":"string","format":"uint256"},"sellToken":{"type":"string","format":"address"},"spreadCurve":{"$ref":"#/components/schemas/SpreadCurve","description":"Piecewise-linear curve defining the allowed mid-price deviation over the order\nwindow. Snapshotted from the submitted [`Order`] at insertion so the curve remains\navailable after the underlying `Order` is dropped."},"startTime":{"type":"string","format":"uint256"}}},"OrderAnnotations":{"type":"object","description":"Additional data attached to an order, provided by the user. Purely informational —\nnot part of the signed order and not used by the protocol.","properties":{"spreadAtSubmissionHbp":{"type":["integer","null"],"format":"int64","description":"The market spread (in hundredths of a basis point, 10_000 hbp = 1%) quoted to the\nuser at submission time, as returned by `/api/quote` (`amm_spread_hbp`).","minimum":0}}},"SpreadCurve":{"type":"object","description":"A piecewise-linear curve mapping wall-clock time to a mid-price delta in basis points.\n\nThe curve carries its own `[start_secs, end_secs]` window: the order's `start_time`\nand `end_time` must match these for validation to succeed (enforced at the API layer).\nBetween interior knots, `delta_bps` is interpolated linearly using i64 arithmetic.\nOutside the curve window the value clamps to `start_delta_bps` / `end_delta_bps`.","required":["startSecs","endSecs","startDeltaBps","endDeltaBps","points"],"properties":{"endDeltaBps":{"type":"integer","format":"int32"},"endSecs":{"type":"integer","format":"int64","minimum":0},"points":{"type":"array","items":{"$ref":"#/components/schemas/CurvePoint"}},"startDeltaBps":{"type":"integer","format":"int32"},"startSecs":{"type":"integer","format":"int64","minimum":0}}},"CurvePoint":{"type":"object","description":"A single knot in a [`SpreadCurve`], binding a wall-clock time to a delta in basis points.","required":["timeSecs","deltaBps"],"properties":{"deltaBps":{"type":"integer","format":"int32"},"timeSecs":{"type":"integer","format":"int64","minimum":0}}},"OrderStatus":{"type":"string","enum":["Active","Invalid","Expired","Filled","PendingCancellation","Canceled","Incompatible"]},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## List orders for the authenticated user.

> Returns active and terminal orders in a single time-sorted, cursor-paginated list. Each entry\
> carries full display detail via \`orderDetails\`, regardless of status. Supports multi-value\
> \`hash\` and \`status\` filters; when \`hash\` is provided, pagination is skipped.

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/orders":{"get":{"tags":["turbine"],"summary":"List orders for the authenticated user.","description":"Returns active and terminal orders in a single time-sorted, cursor-paginated list. Each entry\ncarries full display detail via `orderDetails`, regardless of status. Supports multi-value\n`hash` and `status` filters; when `hash` is provided, pagination is skipped.","operationId":"get_orders","parameters":[{"name":"hash","in":"query","description":"Direct lookup by order hash, comma-separated. Max 30 per request. When provided,\npagination is skipped.","required":false,"schema":{"type":"string","format":"bytes32"}},{"name":"status","in":"query","description":"Filter by order status, comma-separated. Multiple values are OR'd.","required":false,"schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Opaque cursor from a previous response. Ignored when `hash` is provided.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max orders per page (default 50, cap 200). Ignored when `hash` is provided.","required":false,"schema":{"type":"integer","format":"int32","minimum":0}}],"responses":{"200":{"description":"Orders retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"401":{"description":"User not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"OrdersResponse":{"type":"object","description":"Response body for `GET /api/orders`.","required":["orders","hasMore"],"properties":{"cursor":{"type":["string","null"],"description":"Opaque token to pass back as `cursor` in the next request. `null` on the last page."},"hasMore":{"type":"boolean","description":"Mirrors `cursor.is_some()`."},"orders":{"type":"array","items":{"$ref":"#/components/schemas/OrderState"}}}},"OrderState":{"type":"object","required":["hash","owner","status","execution","orderDetails"],"properties":{"execution":{"type":"array","items":{"$ref":"#/components/schemas/OrderExecution"}},"hash":{"type":"string","format":"bytes32"},"orderDetails":{"$ref":"#/components/schemas/OrderDetails"},"owner":{"type":"string","format":"address"},"status":{"$ref":"#/components/schemas/OrderStatus"}}},"OrderExecution":{"type":"object","required":["blockNumber","soldAmount","boughtAmount","surplusBuyAmount"],"properties":{"batchId":{"type":["integer","null"],"format":"int64","minimum":0},"blockNumber":{"type":"integer","format":"int64","minimum":0},"boughtAmount":{"type":"string","format":"uint256"},"midPrice":{"type":"object","description":"Mid-price for the order's (sell → buy) pair at the clearing batch."},"soldAmount":{"type":"string","format":"uint256"},"surplusBuyAmount":{"type":"string","format":"uint256"},"txHash":{"type":["string","null"],"format":"bytes32"}}},"OrderDetails":{"type":"object","description":"Display subset of an `Order`, copied verbatim onto `OrderState` at insertion time.\n\nCarrying these fields on the state record keeps display detail available even after the\nunderlying `Order` is dropped at terminal-status transition.","required":["sellToken","buyToken","sellAmount","limitPrice","startTime","endTime","spreadCurve","createdTimestamp"],"properties":{"annotations":{"$ref":"#/components/schemas/OrderAnnotations","description":"User-provided annotations, snapshotted at insertion. Defaults for order\nhistory entries persisted before annotations existed."},"buyToken":{"type":"string","format":"address"},"createdTimestamp":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"uint256"},"limitPrice":{"type":"object"},"sellAmount":{"type":"string","format":"uint256"},"sellToken":{"type":"string","format":"address"},"spreadCurve":{"$ref":"#/components/schemas/SpreadCurve","description":"Piecewise-linear curve defining the allowed mid-price deviation over the order\nwindow. Snapshotted from the submitted [`Order`] at insertion so the curve remains\navailable after the underlying `Order` is dropped."},"startTime":{"type":"string","format":"uint256"}}},"OrderAnnotations":{"type":"object","description":"Additional data attached to an order, provided by the user. Purely informational —\nnot part of the signed order and not used by the protocol.","properties":{"spreadAtSubmissionHbp":{"type":["integer","null"],"format":"int64","description":"The market spread (in hundredths of a basis point, 10_000 hbp = 1%) quoted to the\nuser at submission time, as returned by `/api/quote` (`amm_spread_hbp`).","minimum":0}}},"SpreadCurve":{"type":"object","description":"A piecewise-linear curve mapping wall-clock time to a mid-price delta in basis points.\n\nThe curve carries its own `[start_secs, end_secs]` window: the order's `start_time`\nand `end_time` must match these for validation to succeed (enforced at the API layer).\nBetween interior knots, `delta_bps` is interpolated linearly using i64 arithmetic.\nOutside the curve window the value clamps to `start_delta_bps` / `end_delta_bps`.","required":["startSecs","endSecs","startDeltaBps","endDeltaBps","points"],"properties":{"endDeltaBps":{"type":"integer","format":"int32"},"endSecs":{"type":"integer","format":"int64","minimum":0},"points":{"type":"array","items":{"$ref":"#/components/schemas/CurvePoint"}},"startDeltaBps":{"type":"integer","format":"int32"},"startSecs":{"type":"integer","format":"int64","minimum":0}}},"CurvePoint":{"type":"object","description":"A single knot in a [`SpreadCurve`], binding a wall-clock time to a delta in basis points.","required":["timeSecs","deltaBps"],"properties":{"deltaBps":{"type":"integer","format":"int32"},"timeSecs":{"type":"integer","format":"int64","minimum":0}}},"OrderStatus":{"type":"string","enum":["Active","Invalid","Expired","Filled","PendingCancellation","Canceled","Incompatible"]},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Request a single-order quote from the Fynd solver.

> Public, unauthenticated. Returns a trimmed view of the Fynd response\
> (amounts + gas). Any non-success status or transport error is returned as\
> a 502 with a descriptive message. If Quoting is disabled, 501 is returned.

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/quote":{"post":{"tags":["turbine"],"summary":"Request a single-order quote from the Fynd solver.","description":"Public, unauthenticated. Returns a trimmed view of the Fynd response\n(amounts + gas). Any non-success status or transport error is returned as\na 502 with a descriptive message. If Quoting is disabled, 501 is returned.","operationId":"quote","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}},"required":true},"responses":{"200":{"description":"Quote successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"501":{"description":"Fynd solver not enabled on this instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"502":{"description":"Quote failed upstream","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"QuoteRequest":{"type":"object","description":"Minimal inputs for a Fynd passthrough quote.","required":["sellToken","buyToken","sellAmount"],"properties":{"buyToken":{"type":"string","format":"address"},"sellAmount":{"type":"string","format":"uint256"},"sellToken":{"type":"string","format":"address"}}},"QuoteResponse":{"type":"object","description":"Pared-down Fynd quote: amounts, gas, and a reference midprice.","required":["sellToken","buyToken","sellAmount","buyAmount","ammSpreadHbp","spread","midPrice","fee"],"properties":{"ammSpreadHbp":{"type":"integer","format":"int64","description":"DEX-derived spread in hundredths of a basis point. 10_000 hbp = 1%.\nDeprecated: use `spread` instead.","minimum":0},"buyAmount":{"type":"string","format":"uint256"},"buyToken":{"type":"string","format":"address"},"fee":{"$ref":"#/components/schemas/QuoteFee","description":"Protocol fee for this trade."},"midPrice":{"$ref":"#/components/schemas/MidPrice","description":"Oracle-aggregated reference midprice for `sell_token → buy_token`."},"sellAmount":{"type":"string","format":"uint256"},"sellToken":{"type":"string","format":"address"},"spread":{"$ref":"#/components/schemas/QuoteResponseSpread"}}},"QuoteFee":{"type":"object","description":"Protocol fee for a quoted trade.\n\n`total_amount` is in `buy_token` atomic units, computed against the\ngross `buy_amount` Fynd quoted.","required":["totalHbp","totalAmount"],"properties":{"totalAmount":{"type":"string","format":"uint256","description":"Absolute fee in `buy_token` atomic units."},"totalHbp":{"type":"integer","format":"int64","description":"Sum of fee components in hundredths of a basis point. 10_000 hbp = 1%.","minimum":0}}},"MidPrice":{"type":"object","description":"Reference midprice for a token pair, expressed as the rational\n`numerator / denominator` in atomic units (buy-wei per sell-wei).","required":["numerator","denominator"],"properties":{"denominator":{"type":"string","format":"uint256"},"numerator":{"type":"string","format":"uint256"}}},"QuoteResponseSpread":{"type":"object","required":["ammSpreadHbp","gasHbp"],"properties":{"ammSpreadHbp":{"type":"integer","format":"int64","description":"DEX-derived spread in hundredths of a basis point. 10_000 hbp = 1%.","minimum":0},"gasHbp":{"type":"integer","format":"int64","description":"Extra spread due to gas cost. Add to `amm_spread_hbp` to get the spread accounting for gas.","minimum":0}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## POST /api/remove\_liquidity

> Submit a new liquidity removal request to the system

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/remove_liquidity":{"post":{"tags":["turbine"],"summary":"Submit a new liquidity removal request to the system","operationId":"remove_liquidity","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveLiquidity"}}},"required":true},"responses":{"200":{"description":"Liquidity intent successfully submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveLiquidityResponse"}}}},"400":{"description":"Invalid intent, signatures, or session state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"401":{"description":"User not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"RemoveLiquidity":{"type":"object","description":"Represents a liquidity removal with SignatureTransfer permit functionality.\n\nThis struct encapsulates all necessary information needed to submit a new intent to remove\nliquidity to the system, including the intent and SignatureTransfer permit data for approvals.\nUser authentication is handled via session-based SIWE verification.\n\n# Fields\n* `remove_liquidity` The intent to remove liquidity\n* `permit_lp_token` The SignatureTransfer permit and signature for the LP token","required":["removeLiquidity","permitLpToken"],"properties":{"permitLpToken":{"$ref":"#/components/schemas/SignedSignatureTransferDTO"},"removeLiquidity":{"$ref":"#/components/schemas/RemoveLiquidityIntent"}}},"SignedSignatureTransferDTO":{"type":"object","description":"Signed single SignatureTransfer permit (for remove liquidity LP token transfer)","required":["permit","signature"],"properties":{"permit":{"$ref":"#/components/schemas/PermitTransferFrom"},"signature":{"$ref":"#/components/schemas/PermitSignature"}}},"PermitTransferFrom":{"type":"object","description":"DTO for ISignatureTransfer.PermitTransferFrom - single token transfer authorization","required":["permitted","nonce","deadline"],"properties":{"deadline":{"type":"string","format":"uint256"},"nonce":{"type":"string","format":"uint256"},"permitted":{"$ref":"#/components/schemas/TokenPermissions"}}},"TokenPermissions":{"type":"object","description":"Token permissions for ISignatureTransfer permits.\nUsed in PermitTransferFrom and PermitBatchTransferFrom.","required":["token","amount"],"properties":{"amount":{"type":"string","format":"uint256","description":"The maximum amount that can be transferred"},"token":{"type":"string","format":"address","description":"The token address"}}},"PermitSignature":{"type":"object","required":["r","s","yParity"],"properties":{"r":{"type":"string","format":"uint256"},"s":{"type":"string","format":"uint256"},"yParity":{"type":"boolean","format":"boolean"}}},"RemoveLiquidityIntent":{"type":"object","required":["owner","token0","token1","fee","lpToken","lpTokenAmount","salt"],"properties":{"fee":{"type":"integer","format":"uint32","description":"The fee for the pool","minimum":0},"lpToken":{"type":"string","format":"address","description":"The LP token of the pool"},"lpTokenAmount":{"type":"string","format":"uint256","description":"The amount of LP tokens to burn"},"owner":{"type":"string","format":"address","description":"The address of the user submitting the intent"},"salt":{"type":"string","format":"bytes32","description":"Used to differentiate between intents with the same parameters"},"token0":{"type":"string","format":"address","description":"The token0 of the pool. Tokens must be sorted ascending by address so that\n`token0 < token1`; unordered intents are rejected."},"token1":{"type":"string","format":"address","description":"The token1 of the pool. Must be greater than `token0` (see `token0`)."}}},"RemoveLiquidityResponse":{"type":"object","description":"Response returned after successfully submitting an intent to the system.\nContains the unique identifier assigned to the submitted intent.\n\n# Fields\n* `hash` - Unique identifier assigned to the submitted intent","required":["intentHash"],"properties":{"intentHash":{"type":"string","format":"bytes32"}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## GET /api/status

> Get the status of the Turbine service

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/status":{"get":{"tags":["turbine"],"summary":"Get the status of the Turbine service","operationId":"status","responses":{"200":{"description":"Service is running","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
```

## Verify a SIWE message and create/update the session.

> Cycles the session id to prevent session fixation attacks.

```json
{"openapi":"3.1.0","info":{"title":"turbine","version":"0.149.3"},"tags":[{"name":"turbine","description":"Turbine API endpoints"}],"paths":{"/api/verify":{"post":{"tags":["turbine"],"summary":"Verify a SIWE message and create/update the session.","description":"Cycles the session id to prevent session fixation attacks.","operationId":"verify","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiweVerify"}}},"required":true},"responses":{"200":{"description":"SIWE verification successful, session created"},"400":{"description":"SIWE verification failed or invalid session state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponsePayload"}}}}}}}},"components":{"schemas":{"SiweVerify":{"type":"object","required":["message","signature"],"properties":{"message":{"type":"string"},"signature":{"type":"string"}}},"ErrorResponsePayload":{"type":"object","description":"Structured error response returned by the API","required":["code","message"],"properties":{"code":{"type":"string","description":"Error code in SNAKE_CASE format"},"inner":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InnerErrorResponsePayload"},"description":"Optional array of nested errors (only present for validation errors)"},"message":{"type":"string","description":"Human-readable error message"}}},"InnerErrorResponsePayload":{"type":"object","description":"Individual error within a validation error response","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.turbine.exchange/reference/api/readme/turbine.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
