openapi: 3.0.3 info: title: Tradecraft AMM HTTP API description: | REST API for interacting with the Tradecraft Exchange. Provides endpoints for querying pool information, getting trade quotes, and calculating liquidity provider operations. version: 1.29.0 servers: - url: https://api.tradecraft.fi/v1 description: Mainnet - url: https://tradecraft.validator.test.canton.obsidian.systems/amm-http-api description: Testnet - url: https://tradecraft.validator.dev.canton.obsidian.systems/amm-http-api description: Devnet paths: /health: get: summary: Health check description: Returns the health status of the API server. operationId: getHealth tags: - Health responses: "200": description: Server is healthy content: application/json: schema: type: object properties: status: type: string example: "ok" /pools: get: summary: List all liquidity pools description: Returns information about all available liquidity pools. operationId: listPools tags: - Pools responses: "200": description: List of liquidity pools content: application/json: schema: $ref: "#/components/schemas/ListPoolsResponse" "400": description: Bad request content: application/json: schema: $ref: "#/components/schemas/Error" /ammid/{tokenA}/{tokenB}: get: summary: Get a liquidity pool's ID description: Returns the liquidity pool identifier for a token pair. operationId: getAmmId tags: - Pools parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" responses: "200": description: Liquidity pool ID content: application/json: schema: $ref: "#/components/schemas/AmmIdResponse" "400": description: Liquidity pool not found or invalid token names given content: application/json: schema: $ref: "#/components/schemas/Error" /tokenA/{tokenA}/{tokenB}: get: summary: Get Token A information description: Returns token information for the first token in the liquidity pool. Note that this is not always the first token in the pool name. operationId: getTokenA tags: - Tokens parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" responses: "200": description: Token A information content: application/json: schema: $ref: "#/components/schemas/TokenResponse" "400": description: AMM not found or token unknown content: application/json: schema: $ref: "#/components/schemas/Error" /tokenB/{tokenA}/{tokenB}: get: summary: Get Token B information description: Returns token information for the second token in the pool. Note that this is not always the second token in the pool name. operationId: getTokenB tags: - Tokens parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" responses: "200": description: Token B information content: application/json: schema: $ref: "#/components/schemas/TokenResponse" "400": description: AMM not found or token unknown content: application/json: schema: $ref: "#/components/schemas/Error" /lpToken/{tokenA}/{tokenB}: get: summary: Get LP Token information description: Returns instrument information for the liquidity provider token of the pool. operationId: getLpToken tags: - Tokens parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" responses: "200": description: LP Token information content: application/json: schema: $ref: "#/components/schemas/TokenResponse" "400": description: LP token not found content: application/json: schema: $ref: "#/components/schemas/Error" /inspect/{tokenA}/{tokenB}: get: summary: Get liquidity pool state description: Returns detailed information about the liquidity pool state including holdings, supply, and the constant product K. operationId: inspectAmm tags: - Pools parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" responses: "200": description: Pool state content: application/json: schema: $ref: "#/components/schemas/AmmInspectResponse" "400": description: Pool not found or token unknown content: application/json: schema: $ref: "#/components/schemas/Error" /ratio/{tokenA}/{tokenB}: get: summary: Get price ratio description: Returns the current price ratio of token B in terms of token A. Note that token A and token B do not always correlate to the first and second tokens in the pool name. operationId: getRatio tags: - Prices parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" responses: "200": description: Price ratio content: application/json: schema: $ref: "#/components/schemas/RatioResponse" "400": description: AMM not found content: application/json: schema: $ref: "#/components/schemas/Error" /feeAmount/{tokenA}/{tokenB}: get: summary: Get fee amounts description: Returns the liquidity provider fee and operator fee percentages for the pool. operationId: getFeeAmount tags: - Fees parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" responses: "200": description: Fee amounts content: application/json: schema: $ref: "#/components/schemas/FeeAmountResponse" "400": description: Liquidity pool fees contract not found content: application/json: schema: $ref: "#/components/schemas/Error" /tradeDiscountCap: get: summary: Get the Trade Discount Cap description: | Returns the Trade Discount Cap in USD. Trades whose USD size is at or below this value qualify for the reduced swap fee. Integrations can poll this endpoint to dynamically size their trades so they always qualify for the fee rebate. See https://docs.tradecraft.fi/fees-and-pricing. operationId: getTradeDiscountCap tags: - Fees responses: "200": description: The Trade Discount Cap content: application/json: schema: $ref: "#/components/schemas/TradeDiscountCapResponse" "404": description: Trade Discount Cap is not configured content: application/json: schema: $ref: "#/components/schemas/Error" /physicalSettlementWhitelist: get: summary: List the physically settled tokens description: | Returns the token symbols the venue settles into a holding. Swap output in any other token goes to a trading balance. operationId: getPhysicalSettlementWhitelist tags: - Tokens responses: "200": description: The physically settled tokens content: application/json: schema: $ref: "#/components/schemas/PhysicalSettlementWhitelistResponse" /quoteForFixedInput/{tokenA}/{tokenB}: get: summary: Get trade quote for fixed input description: | Calculate how much of token B the user will receive when providing a fixed amount of token A. Uses the constant product formula with double-sided fees. Note that token A and token B do not always correlate to the first and second tokens in the pool name. operationId: getQuoteTradeFixedInput tags: - Quotes parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" - name: givingAmount in: query required: true description: The amount of token A the user is giving schema: type: number format: double minimum: 0 exclusiveMinimum: true example: 100.0 responses: "200": description: Trade quote content: application/json: schema: $ref: "#/components/schemas/QuoteTradeFixedInputResponse" "400": description: Invalid parameters or AMM not found content: application/json: schema: $ref: "#/components/schemas/Error" /quoteForFixedOutput/{tokenA}/{tokenB}: get: summary: Get trade quote for fixed output description: | Calculate how much of token A the user must provide to receive a fixed amount of token B. Uses the constant product formula with double-sided fees. Note that token A and token B do not always correlate to the first and second tokens in the pool name. operationId: getQuoteTradeFixedOutput tags: - Quotes parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" - name: gettingAmount in: query required: true description: The amount of token B the user wants to receive schema: type: number format: double minimum: 0 exclusiveMinimum: true example: 50.0 responses: "200": description: Trade quote content: application/json: schema: $ref: "#/components/schemas/QuoteTradeFixedOutputResponse" "400": description: Invalid parameters or AMM not found content: application/json: schema: $ref: "#/components/schemas/Error" /quoteLPWithdrawal/{tokenA}/{tokenB}: get: summary: Get liquidity withdrawal quote description: Calculate how much of each token the user will receive when redeeming LP tokens. operationId: getQuoteLiquidityWithdrawal tags: - Liquidity parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" - name: lpTokenAmount in: query required: true description: The amount of LP tokens to redeem schema: type: number format: double minimum: 0 exclusiveMinimum: true example: 10.0 responses: "200": description: Liquidity withdrawal quote content: application/json: schema: $ref: "#/components/schemas/QuoteLPWithdrawalResponse" "400": description: Invalid parameters or liquidity pool not found content: application/json: schema: $ref: "#/components/schemas/Error" /quoteLPDeposit/{tokenA}/{tokenB}: get: summary: Get liquidity deposit quote description: | Calculate the maximum LP tokens that can be minted given the provided amounts of both instruments. Returns the optimal deposit amounts maintaining the pool ratio. operationId: getQuoteLiquidityDeposit tags: - Liquidity parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" - name: instrument1Amount in: query required: true description: The amount of instrument 1 available for deposit schema: type: number format: double minimum: 0 example: 100.0 - name: instrument2Amount in: query required: true description: The available amount of instrument 2 available for deposit schema: type: number format: double minimum: 0 example: 200.0 responses: "200": description: Liquidity deposit quote content: application/json: schema: $ref: "#/components/schemas/QuoteLPDepositResponse" "400": description: Invalid parameters or liquidity pool not found content: application/json: schema: $ref: "#/components/schemas/Error" /yield/{tokenA}/{tokenB}: get: summary: Get pool yield/APY description: | Returns annualized percentage yield (APY) calculations for the pool across multiple time periods. APY is calculated based on the growth of value per LP token (k / lpSupply) over time. Requires Apollo DB connection for historical data; returns empty yield data if unavailable. operationId: getPoolYield tags: - Liquidity parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" responses: "200": description: Pool yield data content: application/json: schema: $ref: "#/components/schemas/PoolYieldResponse" "400": description: AMM not found content: application/json: schema: $ref: "#/components/schemas/Error" /yield_history/{tokenA}/{tokenB}: get: summary: Get historical yield/APY over time description: | Returns an array of timestamped APY data points for the pool. Each data point represents the annualized yield during that time interval, calculated based on the growth of value per LP token (sqrt(k) / lpSupply). Timestamps are aligned to interval boundaries (e.g., top of minute, top of hour, midnight). Available windows: - hour: 60 data points at 1-minute intervals - day: 288 data points at 5-minute intervals - week: 168 data points at 1-hour intervals Requires Apollo DB connection for historical data. operationId: getPoolYieldHistory tags: - Liquidity parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" - name: window in: query required: true description: The time window for the yield history schema: type: string enum: ["hour", "day", "week"] example: "day" responses: "200": description: Historical yield data content: application/json: schema: $ref: "#/components/schemas/PoolYieldHistoryResponse" "400": description: AMM not found or invalid window content: application/json: schema: $ref: "#/components/schemas/Error" /volume/{tokenA}/{tokenB}: get: summary: Get pool trading volume in USD description: | Returns USD-denominated trading volume for the pool across multiple time periods. Volume is calculated by tracking changes in AMM reserves between consecutive states. Each swap is converted to USD at the exchange rate that was active at the time of that swap. USD conversion is performed using: - Stablecoins (SBC, USDCx): 1:1 with USD - CC (Canton Coin): Historical exchange rate from OpenMiningRound contracts via Scan ACS API Returns an error if neither token can be converted to USD. operationId: getPoolVolume tags: - Liquidity parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" responses: "200": description: Pool volume data in USD content: application/json: schema: $ref: "#/components/schemas/PoolVolumeResponse" "400": description: AMM not found or cannot calculate USD volume content: application/json: schema: $ref: "#/components/schemas/Error" /volume_history/{tokenA}/{tokenB}: get: summary: Get historical trading volume over time description: | Returns an array of timestamped volume data points for the pool. Each data point represents the USD-denominated trading volume during that time interval. Timestamps are aligned to interval boundaries (e.g., top of minute, top of hour, midnight). Available windows: - hour: 60 data points at 1-minute intervals - day: 288 data points at 5-minute intervals - week: 168 data points at 1-hour intervals Volume calculation uses the same methodology as /volume endpoint. operationId: getPoolVolumeHistory tags: - Liquidity parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" - name: window in: query required: true description: The time window for the volume history schema: type: string enum: ["hour", "day", "week"] example: "day" responses: "200": description: Historical volume data content: application/json: schema: $ref: "#/components/schemas/PoolVolumeHistoryResponse" "400": description: AMM not found, invalid window, or cannot calculate USD volume content: application/json: schema: $ref: "#/components/schemas/Error" /disclosures/{tokenA}/{tokenB}: get: summary: Get pool disclosures description: | Returns disclosed contract blobs for the pool's AMM, AMMFees, AMMRules, LP instrument config, allocation factory, and featured app right contracts. These disclosures are required by clients to submit transactions (swaps, deposits, withdrawals) against the pool. operationId: getPoolDisclosures tags: - Pools parameters: - $ref: "#/components/parameters/tokenA" - $ref: "#/components/parameters/tokenB" responses: "200": description: Pool disclosures content: application/json: schema: $ref: "#/components/schemas/PoolDisclosuresResponse" "404": description: Pool not found content: application/json: schema: $ref: "#/components/schemas/Error" /allocation-factory/{token}: get: summary: Get a token's allocation factory context description: | Returns the registry's allocation-factory contract for a token and the choice context for exercising AllocationFactory_Allocate on it. Cached, refreshed every 24 hours. CC/Amulet is not served. Read it from the Splice Scan API per submission. operationId: getAllocationFactoryContext tags: - Swaps parameters: - $ref: "#/components/parameters/token" responses: "200": description: Allocation factory context content: application/json: schema: $ref: "#/components/schemas/AllocationFactoryResponse" "400": description: The token is missing, malformed, unknown, or is CC/Amulet content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: No context is available for this token right now. content: application/json: schema: $ref: "#/components/schemas/Error" /swap-ticket: get: summary: Get everything needed to place one swap description: | To swap by transfer: 1. Send a token-standard transfer of `amount_in` of `in.instrument_id` to `pool_party`. 2. Copy `min_out` into the transfer metadata under the key `memo_key`. The ledger refunds the transfer instead of filling it below `min_out`. A transfer without the memo key swaps with no floor. To swap directly, submit against `amm_cid` with the contracts in `disclosures` and `min_out` as the floor. `memo_key` does not apply. `amm_cid`, the quote and `disclosures` come from one read, so they always agree. All three change when the pool settles a batch, so request a new ticket if the swap is delayed. `pool_party` comes from the pool identity. The endpoint returns it even if no magic-address watcher runs for the pair. `disclosures` carries the pool's contracts only. A CC transfer also needs `AmuletRules` and a current `OpenMiningRound`. Read those from the Splice Scan API per submission. Where enabled, a ticket costs an [x402](https://x402.org) payment. A request without one gets a 402 whose `PAYMENT-REQUIRED` header lists the accepted prices. Retry with the signed payment in `PAYMENT-SIGNATURE`. The payment settles only once the ticket is built, so an error costs nothing. If the facilitator cannot be reached, the answer is a 502: retry with the same payment. operationId: getSwapTicket tags: - Swaps parameters: - name: PAYMENT-SIGNATURE in: header required: false description: | Base64 JSON of an x402 v2 payment payload: a signed `TransferFactory_Transfer` paying one entry of the 402's `accepts`. schema: type: string - name: in in: query required: true description: Symbol of the token to sell. schema: type: string example: "CC" - name: out in: query required: true description: Symbol of the token to buy. schema: type: string example: "USDCx" - name: amount in: query required: true description: | Amount of the `in` token to sell. The endpoint cuts this to the ten decimal places a Daml Decimal carries, then quotes the cut amount as `amount_in`. schema: type: number format: double minimum: 0 exclusiveMinimum: true example: 100.0 - name: slippage in: query required: true description: | Slippage tolerance as a fraction, not a percentage. 0.005 is 0.5%. Required: a ticket with no floor can cost the caller money. schema: type: number format: double minimum: 0 maximum: 1 exclusiveMaximum: true example: 0.005 responses: "200": description: Swap ticket headers: PAYMENT-RESPONSE: description: Base64 JSON of the settlement, including the ledger `transaction` id. Sent when a payment settled. schema: type: string content: application/json: schema: $ref: "#/components/schemas/SwapTicketResponse" "400": description: | A parameter is missing or malformed, no pool holds the pair, the floor rounds to zero at Daml's precision, or `PAYMENT-SIGNATURE` cannot be decoded. content: application/json: schema: $ref: "#/components/schemas/Error" "402": description: | Payment required. Either none was sent, it does not match a current price, or the facilitator refused it. `error` and the header both say which. headers: PAYMENT-REQUIRED: required: true description: Base64 JSON of the x402 v2 payment requirements, with the accepted prices in `accepts`. schema: type: string content: application/json: schema: $ref: "#/components/schemas/Error" "502": description: | The payment facilitator gave no usable answer, so no ticket is returned. The payment may have settled: retry with the same `PAYMENT-SIGNATURE`, not a new payment, which could pay twice. content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: | The pool exists, but the endpoint cannot build a ticket for it now, or none of its priced tokens is currently available. content: application/json: schema: $ref: "#/components/schemas/Error" /v7/pools: get: summary: List all V7 liquidity pools description: Returns all active V7 AMM pools with their current state. operationId: listPoolsV7 tags: - Pools responses: "200": description: List of V7 AMM pools content: application/json: schema: type: array items: $ref: "#/components/schemas/V7Pool" "500": description: Internal server error content: application/json: schema: $ref: "#/components/schemas/Error" /v7/pools/{token1}/{token2}/price: get: summary: Get V7 pool price description: | Returns a V7 pool's current price, in token2 per token1, as a scale-10 decimal string. `token1` and `token2` must be in the pool's order. operationId: getPoolPriceV7 tags: - Pools parameters: - name: token1 in: path required: true description: Instrument id of the pool's first instrument. schema: type: string example: "BTC" - name: token2 in: path required: true description: Instrument id of the pool's second instrument. schema: type: string example: "USDC" responses: "200": description: Pool price content: application/json: schema: $ref: "#/components/schemas/PoolPriceV7Response" "400": description: Wrong token order or price math error content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: No V7 pool found for the given token pair content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal error computing the price content: application/json: schema: $ref: "#/components/schemas/Error" /v7/swap/quote/{inputToken}/{outputToken}: get: summary: Get V7 concentrated-liquidity swap quote description: | Computes an exact-input swap quote for a V7 concentrated-liquidity pool. Given an input token, an output token, and an input amount, returns how much output the caller would receive at the current pool state. The quote runs the full tick-traversal math against a live snapshot of the pool fetched from Apollo, so the result reflects the current sqrt price, active liquidity, and all initialized tick shards. `amount` is a scale-10 decimal string. Whole numbers ("100") and decimals ("100.5") are both accepted; the engine pads to ten decimal places internally. `partial` is true when the pool ran out of liquidity before the full input was consumed. In that case `remaining` reports the unconsumed portion and `input` reflects what was actually swapped. operationId: getSwapQuoteV7 tags: - Quotes parameters: - name: inputToken in: path required: true description: Instrument id of the token being sold (e.g. "USDC", "BTC"). schema: type: string example: "USDC" - name: outputToken in: path required: true description: Instrument id of the token being bought (e.g. "BTC", "ETH"). schema: type: string example: "BTC" - name: amount in: query required: true description: | Amount of the input token to sell, as a scale-10 decimal string. Examples: "100", "100.5", "0.0001". schema: type: string example: "100" responses: "200": description: Swap quote result content: application/json: schema: $ref: "#/components/schemas/SwapQuoteV7Response" "400": description: Invalid parameters, pool not found, or quote math error content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: No V7 pool found for the given token pair content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal error fetching pool state or computing the quote content: application/json: schema: $ref: "#/components/schemas/Error" /v7/swap/history/{actor}: get: summary: Get one page of a party's V7 swap history description: | Lists the V7 swap orders of one party from Apollo, newest first. Each entry has the order's current status. The amounts exist only for a settled or settling swap. Without `after`, the page starts at the newest swap. With `after`, it starts after the named order. `next` names the last order of the page when an older page exists. operationId: getSwapHistoryV7 tags: - Swaps parameters: - name: actor in: path required: true description: The party that placed the orders. schema: type: string example: "trader::1220abcd" - name: limit in: query required: false description: Page size, from 1 to 100. The default is 20. schema: type: integer minimum: 1 maximum: 100 default: 20 - name: after in: query required: false description: Contract id of the last order of the previous page. schema: type: string responses: "200": description: One page of swaps content: application/json: schema: $ref: "#/components/schemas/SwapHistoryV7Response" "400": description: Invalid limit, or an after value that names no swap order of the party content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal error reading the swap history content: application/json: schema: $ref: "#/components/schemas/Error" /v7/deposit/quote/{token1}/{token2}: get: summary: Get V7 concentrated-liquidity deposit quote description: | Quotes the largest deposit into a V7 pool whose fixed amount does not exceed the request, at the current pool state. The returned ticks are the narrowest range aligned to the pool's tick spacing that contains both prices. Both amounts are rounded up, as the pool debits them. `token1` and `token2` must be in the pool's order. Prices are token2 per token1. Give exactly one of `amount1` and `amount2`. All values are scale-10 decimal strings. operationId: getDepositQuoteV7 tags: - Liquidity parameters: - name: token1 in: path required: true description: Instrument id of the pool's first instrument. schema: type: string example: "BTC" - name: token2 in: path required: true description: Instrument id of the pool's second instrument. schema: type: string example: "USDC" - name: minPrice in: query required: true description: Lowest price of the range, in token2 per token1. schema: type: string example: "60000" - name: maxPrice in: query required: true description: Highest price of the range, in token2 per token1. schema: type: string example: "65000" - name: amount1 in: query required: false description: Amount of token1 to deposit. schema: type: string example: "0.5" - name: amount2 in: query required: false description: Amount of token2 to deposit. schema: type: string example: "30000" responses: "200": description: Deposit quote content: application/json: schema: $ref: "#/components/schemas/DepositQuoteV7Response" "400": description: Invalid parameters, wrong token order, or quote math error content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: No V7 pool found for the given token pair content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal error fetching pool state or computing the quote content: application/json: schema: $ref: "#/components/schemas/Error" /v7/positions/{owner}: get: summary: List a party's V7 positions description: | Lists the owner's live V7 positions, by pool then tick range. Each position carries what a full withdrawal pays at the current pool state, and its owed fees. operationId: getPositionsV7 tags: - Liquidity parameters: - name: owner in: path required: true description: The party that owns the positions. schema: type: string example: "lp::1220abcd" responses: "200": description: The owner's positions; empty when there are none content: application/json: schema: $ref: "#/components/schemas/PositionsV7Response" "400": description: Malformed owner content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal error listing or valuing the positions content: application/json: schema: $ref: "#/components/schemas/Error" /v7/disclosures/factories: get: summary: List V7 order factories description: | Returns the venue's V7 order factories, one per pool. An order submission discloses the factory of its pool. operationId: listFactoriesV7 tags: - Liquidity responses: "200": description: V7 order factories with their disclosures content: application/json: schema: type: array items: $ref: "#/components/schemas/V7FactoryDisclosure" /v7/tape: get: summary: Get the regulated trading tape description: | Transactions and daily pool data of the last 30 days, for pools that pair a configured stablecoin (quote) with a configured regulated token (base). Data may be up to ten minutes behind the current time. `from` defaults to `to - 30 days` and `to` to now; the window is half-open and `window` reports what was served. Pool and daily arrays cover every qualifying pool of the window. Trades are ordered by ascending ledger offset and order contract id; a response with `nextCursor` has more. The cursor defines its window and never expires; if the pool and token list changed it is refused with 409. operationId: getV7Tape tags: - Trades parameters: - name: from in: query required: false description: Start of the window, inclusive, RFC3339 UTC. schema: type: string format: date-time - name: to in: query required: false description: End of the window, exclusive, RFC3339 UTC, at most 30 days after `from`. schema: type: string format: date-time - name: limit in: query required: false description: Number of trades on this page. schema: type: integer minimum: 1 maximum: 1000 default: 500 - name: cursor in: query required: false description: The `nextCursor` of the previous page. schema: type: string responses: "200": description: One page of the tape content: application/json: schema: $ref: "#/components/schemas/V7TapeResponse" "400": description: Invalid window, limit or cursor content: application/json: schema: $ref: "#/components/schemas/Error" "409": description: The pool and token list changed since the cursor was issued content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: The ledger index cannot answer this request content: application/json: schema: $ref: "#/components/schemas/Error" /v7/transfer-instructions/{cid}/accept-context: get: summary: Get the accept choice context for a transfer instruction description: | Fetches the instrument registry's choice context for exercising TransferInstruction_Accept on a pending CIP-56 transfer instruction, and returns it unchanged. Pass `choiceContextData` as `ExtraArgs.context` and submit with `disclosedContracts`. The context is not cached, so request it just before submitting. operationId: getTransferInstructionAcceptContext tags: - Wallet parameters: - name: cid in: path required: true description: Contract ID of the pending transfer instruction (hex). schema: type: string pattern: "^[0-9a-fA-F]+$" - name: admin in: query required: true description: The instrument's admin party. schema: type: string example: "party::admin123" - name: id in: query required: true description: The instrument's id. schema: type: string example: "USDCx" responses: "200": description: The registry's accept choice context content: application/json: schema: $ref: "#/components/schemas/TransferInstructionAcceptContext" "400": description: The contract id, admin or id is missing or malformed, or the instrument is unknown content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: The registry no longer has the transfer instruction, because it was accepted or withdrawn content: application/json: schema: $ref: "#/components/schemas/Error" "502": description: The registry did not return a context content: application/json: schema: $ref: "#/components/schemas/Error" /v7/orders/holdings: post: summary: Record the funding holdings of newly placed V7 orders description: | After a wallet submission creates V7 orders funded with FundingHoldings, post the submission's update id with the created event of every funding holding. The API waits up to 30 seconds for the orders to appear in Apollo, checks that one of them names each holding, and stores the holdings. The venue discloses them when it executes the orders: a holding issued on another participant is otherwise invisible to the venue. The reply lists every order of the update. An order that no holding funds, such as a withdraw, posts an empty list to get its order id. Posting the same holdings again replaces the stored rows. operationId: postOrderHoldingsV7 tags: - Orders requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/OrderHoldingsRequest" responses: "200": description: The holdings were stored. Every order of the update is listed with its holdings. content: application/json: schema: $ref: "#/components/schemas/OrderHoldingsResponse" "400": description: Malformed body, a duplicated holding, or a holding no order of the update names content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: No live order created by the update appeared within the wait content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Reading the orders from Apollo failed content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: The holding tracker or Apollo is not configured or not reachable content: application/json: schema: $ref: "#/components/schemas/Error" components: parameters: tokenA: name: tokenA in: path required: true description: The name/symbol of the first token (URL encoded). schema: type: string enum: ["CC", "USDCx", "CBTC", "cETH", "HANDL", "EDELx", "SBC"] example: "CC" tokenB: name: tokenB in: path required: true description: The name/symbol of the second token (URL encoded). schema: type: string enum: ["CC", "USDCx", "CBTC", "cETH", "HANDL", "EDELx", "SBC"] example: "USDCx" token: name: token in: path required: true description: The name/symbol of the token (URL encoded). schema: type: string example: "USDCx" schemas: V7TapeResponse: type: object required: [window, readOffset, selectionHash, pools, daily, trades] properties: window: type: object required: [from, to] properties: from: type: string format: date-time to: type: string format: date-time description: The exclusive data cutoff of this traversal. readOffset: type: string nullable: true description: Greatest committed ledger offset at or before the window end; null when nothing is public yet. selectionHash: type: string description: The pool and token list this response was built with. pools: type: array items: $ref: "#/components/schemas/V7TapePool" daily: type: array items: $ref: "#/components/schemas/V7TapeDaily" trades: type: array items: $ref: "#/components/schemas/V7TapeTrade" nextCursor: type: string description: Continuation handle for the next page of trades. V7TapeInstrument: type: object required: [admin, id, symbol] properties: admin: type: string id: type: string symbol: type: string V7TapePoolRef: type: object required: [venue, vault, ammId] properties: venue: type: string vault: type: string ammId: type: string V7TapeSize: type: object required: [ammContractId, baseAmount, quoteAmount, usdValue, transactionId, ledgerOffset, time] properties: ammContractId: type: string baseAmount: type: string quoteAmount: type: string usdValue: type: string description: The reserves marked at the pool's state price. transactionId: type: string ledgerOffset: type: string time: type: string format: date-time V7TapePool: type: object required: [pool, baseInstrument, quoteInstrument, securityId, displayLabel, sharesPerToken, asOfSize] properties: pool: $ref: "#/components/schemas/V7TapePoolRef" baseInstrument: $ref: "#/components/schemas/V7TapeInstrument" quoteInstrument: $ref: "#/components/schemas/V7TapeInstrument" securityId: type: string displayLabel: type: string sharesPerToken: type: string asOfSize: allOf: - $ref: "#/components/schemas/V7TapeSize" nullable: true description: Null before the pool existed and after it closed. V7TapeDaily: type: object required: [pool, day, windowStart, windowEnd, inProgress, tradeCount, tokenVolume, shareVolume, usdVolume, eodSize] properties: pool: $ref: "#/components/schemas/V7TapePoolRef" day: type: string description: The UTC day, as YYYY-MM-DD. windowStart: type: string format: date-time windowEnd: type: string format: date-time inProgress: type: boolean description: True when the interval ends before the UTC day does. tradeCount: type: integer tokenVolume: type: string shareVolume: type: string usdVolume: type: string eodSize: allOf: - $ref: "#/components/schemas/V7TapeSize" nullable: true description: Null while the day end is not public yet or the pool had closed. V7TapeTrade: type: object required: [pool, transactionId, ledgerOffset, time, orderContractId, resultContractId, ammContractId, baseSymbol, quoteSymbol, direction, price, size, sizeShares, usdValue] properties: pool: $ref: "#/components/schemas/V7TapePoolRef" transactionId: type: string ledgerOffset: type: string time: type: string format: date-time orderContractId: type: string resultContractId: type: string ammContractId: type: string baseSymbol: type: string quoteSymbol: type: string direction: type: string enum: [buy, sell] description: Buy when the actor received the regulated token; sell for the reverse. price: type: string description: Effective price of the recorded legs, USD per base token. size: type: string description: Executed base-token quantity. sizeShares: type: string usdValue: type: string Error: type: object required: - error properties: error: type: string description: Error message example: "No AMM with id TC CC/USDC LP" InstrumentId: type: object description: Unique identifier for a financial instrument. required: - admin - id properties: admin: type: string description: The party administering the instrument example: "party::admin123" id: type: string description: The instrument identifier example: "Amulet" InstrumentInfo: type: object description: Extended information about a financial instrument. required: - instrument_id - registry_url properties: instrument_id: $ref: "#/components/schemas/InstrumentId" registry_url: type: string format: uri description: URL of the token registry example: "https://registry.example.com" TokenResponse: type: object description: Token information response. required: - instrument_id - instrument_info properties: instrument_id: $ref: "#/components/schemas/InstrumentId" instrument_info: $ref: "#/components/schemas/InstrumentInfo" AmmIdResponse: type: object required: - amm_id properties: amm_id: type: string description: The AMM pool identifier example: "TC CC/USDCx LP" AmmInspectResponse: type: object description: Detailed AMM pool state (V4 contract format). required: - total_lp_token_supply - token_a_id - token_a_holdings - token_b_id - token_b_holdings - k - unclaimed_operator_fees - updated_at properties: total_lp_token_supply: type: number format: double description: Total supply of LP tokens. example: 1000.0 token_a_id: type: string description: Identifier for token A. example: "CC" token_a_holdings: type: number format: double description: Amount of token A in the pool. example: 5000.0 token_b_id: type: string description: Identifier for token B. example: "USDCx" token_b_holdings: type: number format: double description: Amount of token B in the pool. example: 10000.0 k: type: number format: double description: The constant product (token_a_holdings * token_b_holdings). example: 50000000.0 unclaimed_operator_fees: type: number format: double description: Accumulated operator fees awaiting claim (V4). example: 0.5 updated_at: type: string format: date-time description: Timestamp of the last pool operation (V4). example: "2026-01-20T14:35:00Z" PoolInfo: type: object required: - token1 - token2 - lp_token_name - token1_holdings - token2_holdings - total_lp_tokens - lp_fee_percent - operator_fee_percent properties: token1: type: string description: The symbol/code of the first token in the pool. example: "CC" token2: type: string description: The symbol/code of the second token in the pool. example: "USDCx" lp_token_name: type: string description: The liquidity pool token name/identifier. example: "TC CC/USDCx LP" token1_holdings: type: number format: double description: Amount of token1 held in the pool. example: 5000.0 token2_holdings: type: number format: double description: Amount of token2 held in the pool. example: 10000.0 total_lp_tokens: type: number format: double description: Total supply of LP tokens for this pool. example: 1000.0 lp_fee_percent: type: number format: double description: Liquidity provider fee as a percentage (e.g., 0.3 means 0.3%). example: 0.3 operator_fee_percent: type: number format: double description: Operator fee as a percentage (e.g., 0.1 means 0.1%). example: 0.1 yield24h: type: number format: double nullable: true description: 24-hour annualized yield (APY) for the pool. Null if unavailable. example: 0.052 ListPoolsResponse: type: object required: - pools properties: pools: type: array items: $ref: "#/components/schemas/PoolInfo" description: Array of pool information objects. example: - token1: "CC" token2: "USDCx" lp_token_name: "TC CC/USDCx LP" token1_holdings: 5000.0 token2_holdings: 10000.0 total_lp_tokens: 1000.0 lp_fee_percent: 0.3 operator_fee_percent: 0.1 yield24h: 0.052 RatioResponse: type: object required: - price_of_b_in_a properties: price_of_b_in_a: type: number format: double description: The price of token B expressed in token A (tokenB_holdings / tokenA_holdings). example: 2.0 FeeAmountResponse: type: object required: - fee_amount - operator_fee_amount properties: fee_amount: type: number format: double description: Liquidity provider fee percentage. example: 0.003 operator_fee_amount: type: number format: double description: Operator fee percentage. example: 0.001 TradeDiscountCapResponse: type: object required: - trade_discount_cap_usd properties: trade_discount_cap_usd: type: number format: double description: | Maximum trade size, in USD, that still qualifies for the fee discount. Trades at or below this size receive the reduced swap fee. example: 1000.0 PhysicalSettlementWhitelistResponse: type: object required: - physical_settlement_whitelist properties: physical_settlement_whitelist: type: array description: | Token symbols the venue settles into a holding. Swap output in any other token goes to the actor's trading balance. items: type: string example: ["CBTC", "HANDL", "USDM1"] QuoteTradeFixedInputResponse: type: object required: - user_gets properties: user_gets: type: number format: double description: The amount of output token the user will receive. example: 49.5 QuoteTradeFixedOutputResponse: type: object required: - user_gives properties: user_gives: type: number format: double description: The amount of input token the user must provide. example: 101.0 QuoteLPWithdrawalResponse: type: object required: - amount_instrument_1 - amount_instrument_2 properties: amount_instrument_1: type: number format: double description: Amount of instrument 1 to receive. example: 50.0 amount_instrument_2: type: number format: double description: Amount of instrument 2 to receive. example: 100.0 QuoteLPDepositResponse: type: object required: - lp_tokens_to_mint - instrument_1_to_deposit - instrument_2_to_deposit properties: lp_tokens_to_mint: type: number format: double description: Amount of LP tokens that will be minted. example: 10.0 instrument_1_to_deposit: type: number format: double description: Amount of instrument 1 required for deposit. example: 100.0 instrument_2_to_deposit: type: number format: double description: Amount of instrument 2 required for deposit. example: 200.0 PoolYieldResponse: type: object required: - pool_id - yield properties: pool_id: type: string description: The AMM pool identifier example: "TC CC/USDC LP" yield: type: object additionalProperties: type: number format: double description: | Map of time period labels to annualized percentage yield (APY) values. Keys are time periods (1h, 4h, 12h, 1d, 2d, 3d, 7d, 14d, 30d). Values are APY as decimals (e.g., 0.05 = 5% APY). A value of 0 indicates insufficient data for that period. example: "1h": 0.0 "4h": 0.0 "12h": 0.0 "1d": 0.052 "7d": 0.048 PoolVolumeResponse: type: object required: - pool_id - volume_usd properties: pool_id: type: string description: The AMM pool identifier example: "TC CC/USDCx LP" volume_usd: type: object additionalProperties: type: number format: double description: | Map of time period labels to USD-denominated trading volume. Keys are time periods (1h, 4h, 12h, 1d, 2d, 3d, 7d, 14d, 30d). Values are the total swap volume in USD for that period. USD conversion uses stablecoin rates (1:1) or CC exchange rate from Scan API. example: "1h": 150.0 "1d": 1500.0 "7d": 10000.0 PoolVolumeHistoryResponse: type: object required: - pool_id - window - history properties: pool_id: type: string description: The AMM pool identifier example: "TC CC/USDCx LP" window: type: string description: The requested time window enum: ["hour", "day", "week"] example: "day" history: type: array description: Array of timestamped volume data points, ordered from oldest to newest items: $ref: "#/components/schemas/VolumeHistoryDataPoint" VolumeHistoryDataPoint: type: object required: - timestamp - volume_usd properties: timestamp: type: string format: date-time description: The start of the time interval (RFC3339 format) example: "2026-01-20T14:35:00Z" volume_usd: type: number format: double description: Trading volume in USD during this interval example: 150.0 PoolYieldHistoryResponse: type: object required: - pool_id - window - history properties: pool_id: type: string description: The AMM pool identifier example: "TC CC/USDCx LP" window: type: string description: The requested time window enum: ["hour", "day", "week"] example: "day" history: type: array description: Array of timestamped APY data points, ordered from oldest to newest items: $ref: "#/components/schemas/YieldHistoryDataPoint" YieldHistoryDataPoint: type: object required: - timestamp - apy properties: timestamp: type: string format: date-time description: The start of the time interval (RFC3339 format) example: "2026-01-20T14:35:00Z" apy: type: number format: double description: Annualized percentage yield during this interval (e.g., 0.05 = 5% APY) example: 0.05 DisclosedContract: type: object description: A disclosed contract blob from the Canton ledger, required for submitting transactions. required: - templateId - contractId - createdEventBlob - synchronizerId properties: templateId: type: string description: Fully qualified template identifier (packageId:moduleName:entityName) contractId: type: string description: The contract ID on the ledger createdEventBlob: type: string format: byte description: Base64-encoded created event blob synchronizerId: type: string description: The synchronizer (domain) ID where this contract lives OrderHoldingsRequest: type: object required: - updateId - holdings properties: updateId: type: string description: The update id the wallet returned for the submission example: "1220f0e1d2c3b4a5968778695a4b3c2d1e0f1122334455667788990011223344" holdings: type: array items: $ref: "#/components/schemas/FundingHolding" FundingHolding: type: object description: One holding a V7 order is funded with, as the ledger reported its creation. required: - contractId - templateId - createdEventBlob - instrumentId properties: contractId: type: string templateId: type: string description: Template id in package-id form (64-hex packageId:moduleName:entityName) createdEventBlob: type: string format: byte description: Base64-encoded created event blob synchronizerId: type: string description: The synchronizer the holding was created on, when the wallet reports it instrumentId: $ref: "#/components/schemas/InstrumentId" OrderHoldingsResponse: type: object required: - orders properties: orders: type: array items: $ref: "#/components/schemas/OrderHoldings" OrderHoldings: type: object description: One order of the update and the holdings stored for it. required: - orderCid - holdingCids properties: orderCid: type: string holdingCids: type: array items: type: string PoolDisclosuresResponse: type: object description: | Disclosed contracts needed to submit transactions against this pool. Includes the AMM, fees, rules, LP instrument config, allocation factory, and optionally the featured app right contract. required: - amm - amm_fees - instrument_config - allocation_factory - amm_data - amm_fees_data properties: amm: $ref: "#/components/schemas/DisclosedContract" amm_fees: $ref: "#/components/schemas/DisclosedContract" amm_rules: $ref: "#/components/schemas/DisclosedContract" instrument_config: $ref: "#/components/schemas/DisclosedContract" allocation_factory: $ref: "#/components/schemas/DisclosedContract" featured_app_right: $ref: "#/components/schemas/DisclosedContract" amm_data: type: object description: Parsed V4 AMM contract data amm_fees_data: type: object description: Parsed V4 AMMFees contract data amm_rules_data: type: object description: Parsed AMMRules contract data (if present) featured_app_right_id: type: string nullable: true description: Contract ID of the FeaturedAppRight (if present) TransferInstructionAcceptContext: type: object description: The registry's choice-context envelope, not a Daml ChoiceContext. required: - disclosedContracts - choiceContext properties: disclosedContracts: type: array description: Disclosures for the submission, not for ExtraArgs items: $ref: "#/components/schemas/DisclosedContract" choiceContext: type: object nullable: true description: The Daml ChoiceContext to pass as ExtraArgs.context AllocationFactoryResponse: type: object description: The registry's allocation-factory contract and the context for exercising it. required: - factoryId - choiceContext - cachedAt properties: factoryId: type: string description: Contract ID to exercise AllocationFactory_Allocate on choiceContext: type: object description: The registry's choice-context envelope, not a Daml ChoiceContext. required: - disclosedContracts - choiceContextData properties: disclosedContracts: type: array description: Disclosures for the submission, not for ExtraArgs items: $ref: "#/components/schemas/DisclosedContract" choiceContextData: type: object description: The Daml ChoiceContext to pass as ExtraArgs.context cachedAt: type: string format: date-time description: When this context was last fetched from the registry example: "2026-01-20T14:35:00Z" SwapTicketToken: type: object description: | The identity of one token in the swap. `in` is the token you send. `out` is the token the pool pays. required: - code - instrument_id - registry_url properties: code: type: string description: The token symbol, as requested example: "CC" instrument_id: $ref: "#/components/schemas/InstrumentId" registry_url: type: string format: uri description: URL of the token registry example: "https://registry.example.com" SwapTicketResponse: type: object description: Everything needed to place one swap against a pool. required: - in - out - amount_in - amm_id - amm_cid - pool_party - expected_out - price_impact - slippage - min_out - memo_key - disclosures properties: in: $ref: "#/components/schemas/SwapTicketToken" out: $ref: "#/components/schemas/SwapTicketToken" amount_in: type: number format: double description: | Amount of the `in` token to transfer, cut to Daml Decimal precision. Transfer this value, not the `amount` you requested. example: 100.0 amm_id: type: string description: The pool identifier example: "TC CC/USDCx LP" amm_cid: type: string description: Contract id of the AMM that produced this quote and that `disclosures` is valid for example: "00a1b2c3..." pool_party: type: string description: Send the input transfer to this magic address example: "tc-swp_CC-USDCx::1220abcd..." expected_out: type: number format: double description: Amount of the `out` token the pool pays at its current state example: 12.93 price_impact: type: number format: double description: The fraction by which this swap moves the pool price example: 0.0002 slippage: type: number format: double description: The slippage tolerance used for the floor, as requested example: 0.005 min_out: type: string description: | The slippage floor. Copy this string into the transfer memo without change. It is a string, not a number, because a JSON number can re-encode as scientific notation, which the on-ledger parser rejects. example: "12.86535" memo_key: type: string description: Metadata key that carries the floor example: "splice.lfdecentralizedtrust.org/reason" disclosures: $ref: "#/components/schemas/PoolDisclosuresResponse" SwapQuoteV7Response: type: object required: - input - output - feeAmount - remaining - partial - state - tickUpdates - debit - credit - fee properties: input: type: string description: Settled input amount including fees, as a scale-10 decimal string. example: "100.0000000000" output: type: string description: Settled output amount, as a scale-10 decimal string. example: "99.7012345678" feeAmount: type: string description: Total LP and protocol fee charged, as a scale-20 raw decimal string. example: "0.30000000000000000000" remaining: type: string description: | Unconsumed input, as a scale-20 raw decimal string. Non-zero only when the pool ran out of liquidity before the full input was swapped. example: "0.00000000000000000000" partial: type: boolean description: True when remaining > 0, meaning the swap was only partially filled. example: false state: $ref: "#/components/schemas/V7PoolState" tickUpdates: type: array description: Tick states that changed during the swap (crossed ticks with updated fee growth). items: $ref: "#/components/schemas/V7TickUpdate" debit: type: string description: Total the trader pays, including an operator fee on the input leg, as a scale-10 decimal string. example: "100.0000000000" credit: type: string description: Net the trader receives, after an operator fee on the output leg, as a scale-10 decimal string. example: "99.6015333333" fee: type: string description: Operator fee charged, as a scale-10 decimal string. Zero when the pool has no single-instrument fee source. example: "0.0997012345" SwapHistoryV7Response: type: object required: - swaps - next properties: swaps: type: array description: The page's swaps, newest first. items: $ref: "#/components/schemas/SwapHistoryV7Entry" next: type: string nullable: true description: Contract id of the page's last order when an older page exists. SwapHistoryV7Entry: type: object required: - orderCid - placedAt - executedAt - tokenIn - tokenOut - amountIn - amountOut - status - reason - updateId properties: orderCid: type: string description: Contract id of the order. placedAt: type: string format: date-time executedAt: type: string format: date-time nullable: true tokenIn: $ref: "#/components/schemas/InstrumentId" tokenOut: $ref: "#/components/schemas/InstrumentId" amountIn: type: string nullable: true example: "10.0" amountOut: type: string nullable: true example: "1.52" status: type: string enum: - pending - completed - failed - cancelled reason: type: string nullable: true description: The rejection text of a failed swap. updateId: type: string description: The update that set the current status. V7Pool: type: object description: An active V7 AMM pool and its current state. required: - ammId - instrument1 - instrument2 - tickSpacing - sqrtPrice - currentTick - liquidity - fee - feeProtocol - feeGrowthGlobal1 - feeGrowthGlobal2 - protocolFees1 - protocolFees2 - operatorFeeSource properties: ammId: type: string instrument1: $ref: "#/components/schemas/InstrumentId" instrument2: $ref: "#/components/schemas/InstrumentId" tickSpacing: type: integer sqrtPrice: type: string description: Square root of the pool price, scale-20. currentTick: type: integer liquidity: type: string description: Active liquidity, scale-10. fee: type: string description: LP fee rate, scale-10. feeProtocol: type: string description: Protocol share of the fee, scale-10. feeGrowthGlobal1: type: string description: Fee growth per unit of liquidity for instrument 1, scale-20. feeGrowthGlobal2: type: string description: Fee growth per unit of liquidity for instrument 2, scale-20. protocolFees1: type: string description: Accrued protocol fees for instrument 1, scale-20. protocolFees2: type: string description: Accrued protocol fees for instrument 2, scale-20. operatorFeeSource: type: object nullable: true description: The pool's Daml operator fee source. Null when the pool has none. required: - tag properties: tag: type: string enum: [OperatorFeeInputCarve, OperatorFeeSingleInstrument] value: type: object nullable: true description: Present for OperatorFeeSingleInstrument. required: - instrument - rate properties: instrument: $ref: "#/components/schemas/InstrumentId" rate: type: string description: Fee rate, scale-10. V7PoolState: type: object description: Pool state after the hypothetical swap. required: - sqrtPrice - currentTick - liquidity - feeGrowthGlobal1 - feeGrowthGlobal2 - protocolFees1 - protocolFees2 properties: sqrtPrice: type: string description: Square root of the new pool price, as a scale-20 decimal string. example: "1.00004999875006249218" currentTick: type: integer format: int64 description: Tick index corresponding to the new sqrt price. example: -5 liquidity: type: string description: Active liquidity after the swap, as a scale-10 decimal string. example: "1000000.0000000000" feeGrowthGlobal1: type: string description: Cumulative fee growth per unit of liquidity for instrument 1, scale-20. example: "0.00030000000000000000" feeGrowthGlobal2: type: string description: Cumulative fee growth per unit of liquidity for instrument 2, scale-20. example: "0.00000000000000000000" protocolFees1: type: string description: Accrued protocol fees for instrument 1, scale-20. example: "0.00000000000000000000" protocolFees2: type: string description: Accrued protocol fees for instrument 2, scale-20. example: "0.00000000000000000000" V7TickUpdate: type: object description: Updated state of one tick crossed during the swap. required: - shardKey - tick properties: shardKey: type: integer format: int64 description: Shard key of the tick's containing shard. example: 0 tick: type: object required: - index - liquidityGross - liquidityNet - feeGrowthOutside1 - feeGrowthOutside2 properties: index: type: integer format: int64 description: Tick index. example: -10 liquidityGross: type: string description: Total liquidity referencing this tick, scale-10. example: "500000.0000000000" liquidityNet: type: string description: Liquidity delta when crossing this tick upward, scale-10. example: "500000.0000000000" feeGrowthOutside1: type: string description: Fee growth outside this tick for instrument 1, scale-20. example: "0.00015000000000000000" feeGrowthOutside2: type: string description: Fee growth outside this tick for instrument 2, scale-20. example: "0.00000000000000000000" PoolPriceV7Response: type: object description: A V7 pool's current price. required: - currentPrice properties: currentPrice: type: string description: Current pool price in token2 per token1, scale-10. example: "62500.0000000000" DepositQuoteV7Response: type: object description: A V7 deposit quote at the current pool state. required: - currentPrice - tickLower - tickUpper - liquidity - amount1 - amount2 properties: currentPrice: type: string description: Current pool price in token2 per token1, scale-10. example: "62500.0000000000" tickLower: type: integer format: int64 description: Inclusive lower tick, aligned to the tick spacing. example: 110400 tickUpper: type: integer format: int64 description: Exclusive upper tick, aligned to the tick spacing. example: 111000 liquidity: type: string description: Liquidity to request in the deposit order, scale-10. example: "1250.0000000000" amount1: type: string description: Amount of token1 the pool debits, scale-10. example: "0.5000000000" amount2: type: string description: Amount of token2 the pool debits, scale-10. example: "31000.0000000000" PositionsV7Response: type: object required: - positions properties: positions: type: array items: $ref: "#/components/schemas/PositionV7" PositionV7: type: object description: | One live V7 position, valued at its pool's current state. A pool, owner and tick range identify it. Prices are instrument2 per instrument1. All decimals are scale-10 strings. required: - ammId - instrument1 - instrument2 - tickLower - tickUpper - liquidity - priceLower - priceUpper - inRange - amount1 - amount2 - fees1 - fees2 properties: ammId: type: string example: "TC CNTN/OBUSD #883eb79f70af32b5823f585db8df4d8b-5 CL7" instrument1: $ref: "#/components/schemas/InstrumentId" instrument2: $ref: "#/components/schemas/InstrumentId" tickLower: type: integer format: int64 description: Inclusive lower tick. example: 110400 tickUpper: type: integer format: int64 description: Exclusive upper tick. example: 111000 liquidity: type: string description: The position's liquidity, which a full withdrawal order names. example: "1250.0000000000" priceLower: type: string example: "62000.0000000000" priceUpper: type: string example: "65000.0000000000" inRange: type: boolean description: Whether the current tick is inside the range. amount1: type: string description: Amount of instrument1 a full withdrawal pays, rounded down. example: "0.2500000000" amount2: type: string description: Amount of instrument2 a full withdrawal pays, rounded down. example: "15500.0000000000" fees1: type: string description: | Owed instrument1 fees, including those accrued since the position last changed, rounded down. A withdrawal does not pay them. A collect after any withdrawal, even of zero liquidity, pays all of them. A collect alone pays only the fees stored on the position. example: "0.0001000000" fees2: type: string description: Owed instrument2 fees, as for fees1. example: "6.2000000000" V7FactoryDisclosure: type: object description: One pool's order factory, with the disclosure that an order submission needs. required: - pool - tickSpacing - contractId - disclosure properties: pool: $ref: "#/components/schemas/V7PoolRef" tickSpacing: type: integer format: int64 example: 60 contractId: type: string description: The factory's contract ID. disclosure: $ref: "#/components/schemas/DisclosedContract" V7PoolRef: type: object description: The pool reference of a V7 order. required: - venue - vault - ammId - instrument1 - instrument2 properties: venue: type: string vault: type: string ammId: type: string instrument1: $ref: "#/components/schemas/InstrumentId" instrument2: $ref: "#/components/schemas/InstrumentId" tags: - name: Health description: Health check endpoints. - name: Pools description: Liquidity Pool information and listing. - name: Tokens description: Token and instrument information. - name: Prices description: Price and ratio queries. - name: Fees description: Fee information. - name: Quotes description: Trade quote calculations. - name: Liquidity description: Liquidity provider operations. - name: Swaps description: Everything needed to place a swap. - name: Orders description: Records about placed V7 orders. - name: Trades description: The public record of executed trades.