Liquidity
Liquidity provider operations.
Calculate how much of each token the user will receive when redeeming LP tokens.
The name/symbol of the first token (URL encoded).
CCPossible values: The name/symbol of the second token (URL encoded).
USDCxPossible values: The amount of LP tokens to redeem
10Liquidity withdrawal quote
Amount of instrument 1 to receive.
50Amount of instrument 2 to receive.
100Invalid parameters or liquidity pool not found
GET /v1/quoteLPWithdrawal/{tokenA}/{tokenB}?lpTokenAmount=10 HTTP/1.1
Host: api.tradecraft.fi
Accept: */*
{
"amount_instrument_1": 50,
"amount_instrument_2": 100
}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.
The name/symbol of the first token (URL encoded).
CCPossible values: The name/symbol of the second token (URL encoded).
USDCxPossible values: The amount of instrument 1 available for deposit
100The available amount of instrument 2 available for deposit
200Liquidity deposit quote
Amount of LP tokens that will be minted.
10Amount of instrument 1 required for deposit.
100Amount of instrument 2 required for deposit.
200Invalid parameters or liquidity pool not found
GET /v1/quoteLPDeposit/{tokenA}/{tokenB}?instrument1Amount=100&instrument2Amount=200 HTTP/1.1
Host: api.tradecraft.fi
Accept: */*
{
"lp_tokens_to_mint": 10,
"instrument_1_to_deposit": 100,
"instrument_2_to_deposit": 200
}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.
The name/symbol of the first token (URL encoded).
CCPossible values: The name/symbol of the second token (URL encoded).
USDCxPossible values: Pool yield data
The AMM pool identifier
TC CC/USDC LPAMM not found
GET /v1/yield/{tokenA}/{tokenB} HTTP/1.1
Host: api.tradecraft.fi
Accept: */*
{
"pool_id": "TC CC/USDC LP",
"yield": {
"1h": 0,
"4h": 0,
"12h": 0,
"1d": 0.052,
"7d": 0.048
}
}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.
The name/symbol of the first token (URL encoded).
CCPossible values: The name/symbol of the second token (URL encoded).
USDCxPossible values: The time window for the yield history
dayPossible values: Historical yield data
The AMM pool identifier
TC CC/USDCx LPThe requested time window
dayPossible values: AMM not found or invalid window
GET /v1/yield_history/{tokenA}/{tokenB}?window=day HTTP/1.1
Host: api.tradecraft.fi
Accept: */*
{
"pool_id": "TC CC/USDCx LP",
"window": "day",
"history": [
{
"timestamp": "2026-01-20T14:35:00Z",
"apy": 0.05
}
]
}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.
The name/symbol of the first token (URL encoded).
CCPossible values: The name/symbol of the second token (URL encoded).
USDCxPossible values: Pool volume data in USD
The AMM pool identifier
TC CC/USDCx LPAMM not found or cannot calculate USD volume
GET /v1/volume/{tokenA}/{tokenB} HTTP/1.1
Host: api.tradecraft.fi
Accept: */*
{
"pool_id": "TC CC/USDCx LP",
"volume_usd": {
"1h": 150,
"1d": 1500,
"7d": 10000
}
}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.
The name/symbol of the first token (URL encoded).
CCPossible values: The name/symbol of the second token (URL encoded).
USDCxPossible values: The time window for the volume history
dayPossible values: Historical volume data
The AMM pool identifier
TC CC/USDCx LPThe requested time window
dayPossible values: AMM not found, invalid window, or cannot calculate USD volume
GET /v1/volume_history/{tokenA}/{tokenB}?window=day HTTP/1.1
Host: api.tradecraft.fi
Accept: */*
{
"pool_id": "TC CC/USDCx LP",
"window": "day",
"history": [
{
"timestamp": "2026-01-20T14:35:00Z",
"volume_usd": 150
}
]
}Last updated
Was this helpful?
