All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
get_swap_historytool:order_byandorder_directionparams — sort swap history asc (oldest first) or desc (newest first, default)- SDK
SwapHistoryQuerytype: addedorderBy/orderDirectionfields passed through to the API - Deep health endpoint
GET /health?deep=1— checks Casper RPC connectivity and CSPR.trade API reachability (delivered in v0.6.0 review commit, documented here)
0.6.0 - 2026-04-27
- Token address annotations in tool descriptions —
token_in,token_out,token_a,token_bparameters across all trading, market data, liquidity, and analysis tools now embed mainnet contract hashes for CSPR (native), WCSPR (hash-8df5d2…), and sCSPR (hash-a4f6d5…). Agents can build common swap patterns without aget_tokensround-trip. - Updated
llms.txt— reflects 24 tools, adds Token Identification section with mainnet hashes, adds Input Validation section documenting pre-call validation behavior, updated portfolio workflow to includeget_native_cspr_balance.
0.5.0 - 2026-04-27
get_native_cspr_balanceMCP tool +getNativeCsprBalanceSDK method — query native CSPR balance (motes and human-readable) for any account via Casper node RPC. Distinct from CEP-18 token balances returned byget_token_balance.- MCP tool input validation — shared
validation.tsmodule with validators for amounts, public keys, slippage, and same-token swap checks. All tool handlers validate inputs before RPC calls and return structuredisErrorresponses with actionable hints. - Actionable error messages —
withActionableErrorswrapper classifies 7 error types (token-not-found, no-liquidity-pool, rate limit, server error, network failure, invalid public key, Casper RPC) and surfaces fix suggestions to AI agents. - TypeScript types export for SDK consumers —
PairQuery,PaginatedResult,QuoteApiParamsnow exported from package root for external TypeScript consumers. - Tool count: 24 (was 23)
get_pair_price_historyMCP tool +getPairPriceHistorySDK method — OHLCV (open/high/low/close/volume) candlestick price history for any trading pair. Aggregates swap events from CSPR.trade/swapsAPI into time-bucketed candles. Supports1h,4h, and1dintervals; returns up to 200 candles in chronological order.get_token_price_historyMCP tool +getTokenPriceHistorySDK method — resolves a token (by symbol, name, or contract hash) to its primary trading pair and returns OHLCV history denominated in the paired token.- New types exported from SDK:
OHLCVCandle,PriceHistoryInterval,PriceHistoryQuery aggregateOHLCV(swaps, interval, limit)utility exported from SDK for custom aggregation- Tool count: 23 (was 21)
- 9 new unit tests across SDK (
price-history.test.ts) and MCP (market-data.test.ts)
- Hardened deploy handoff defaults for hosted and remote MCP use: deploy file-path input is now disabled unless explicitly enabled for a local same-machine workflow.
- Build/sign/submit flows now return and accept inline deploy JSON by default instead of relying on arbitrary file-path handoff between tools.
/healthnow exposes whether deploy file-path input is enabled so deployments can verify the server is running in the intended mode.
- Resolved the remaining
casper-js-sdkimport paths that still failed under Node 20 / ESM, restoring green build-and-test CI on both Node 20 and Node 22.
- Pure-ESM consumers crashed at module load with
SyntaxError: The requested module 'casper-js-sdk' does not provide an export named 'default'. casper-js-sdk shipped a real ESM build in 5.0.10+ via theexportsfield, and the new ESM module has no default export — so the SDK'simport casperSdk from 'casper-js-sdk'pattern (introduced in 0.1.x for CJS-interop) no longer worked. Switched all 7 import sites to named imports (import { PublicKey, SessionBuilder, ... } from 'casper-js-sdk'). Verified end-to-end against a pure.mjsconsumer: import,getTokens,getSwapHistory,getTokenBalance, andbuildSwap(full SessionBuilder/PublicKey path) all work.
- Bumped
casper-js-sdkfloor from^5.0.6to^5.0.11(first version with the proper ESM build that named imports require).
get_token_balanceMCP tool +getTokenBalanceSDK method — query CEP-18 fungible token balances for any Casper account. Returns all held tokens, or filters to a specific token by symbol, name, or contract package hash. Backed by the CSPR.trade/accounts/{id}/ft-token-ownershipendpoint (proxies CSPR.cloud). Returns balance with metadata (symbol, decimals, formatted amount, icon URL). Native CSPR balance is not included — CEP-18 only.- New types exported from SDK:
TokenBalance,FTTokenOwnershipApiResponse - Tool count: 21 (was 20)
0.3.2 - 2026-04-21
- Renamed
get_pnlMCP tool toget_position_status— accurately reflects that the tool returns current IL and token amounts, not cost-basis PnL - Renamed
getUnrealizedPnLSDK method togetPositionStatus(old name kept as@deprecatedalias) - Added
PositionStatustype (replacesUnrealizedPnL, kept as deprecated alias)
getPositionStatusnow fetches impermanent loss for all positions in parallel withPromise.allinstead of sequentially
getPortfolioValue: non-WCSPR LP positions (e.g. USDT/USDC) are now returned in a separateunpricedPositionslist instead of being silently excluded from portfolio totals- Removed misleading
* 2ncomment that incorrectly stated all pools are 50/50 - Added
PortfolioPositionnamed interface exported from SDK types
- 2 new unit tests covering WCSPR vs non-WCSPR pool separation and empty-portfolio edge case (93 tests total)
0.3.0 - 2026-04-20
- Portfolio Value SDK —
getPortfolioValue(publicKey, currency?)aggregates all LP positions and returns CSPR + USD estimates - Unrealized PnL SDK —
getUnrealizedPnL(publicKey, pairHash?)returns per-position impermanent loss and current token amounts get_portfolio_valueMCP tool — wrapsgetPortfolioValue, acceptsaccount_public_key+ optionalcurrencyget_pnlMCP tool — wrapsgetUnrealizedPnL, acceptsaccount_public_key+ optionalpair_contract_package_hashfilter- New types exported:
PortfolioValue,UnrealizedPnL - SDK version bumped to 0.3.0
0.2.0 - 2026-03-29
- Trade Analysis SDK (v0.2.0) — 4 new pre-trade intelligence functions:
estimatePriceImpact()— AMM constant-product formula, severity classification (low/medium/high/very_high)estimateSlippage()— expected output vs spot, minimum output, recommended tolerancecomputeOptimalLiquidityAmounts()— calculate paired token amount for LP depositsanalyzeTrade()— comprehensive analysis with recommendation engine (proceed/caution/high_risk/not_recommended)
- 4 new MCP tools —
estimate_price_impact,estimate_slippage,analyze_trade,optimal_liquidity_amounts - Health monitoring endpoint — enhanced
/healthwith uptime, memory, active sessions;?deep=1for Casper RPC + CSPR.trade API connectivity checks - Scotty monitoring script —
scripts/health-check.shfor external monitoring (human-readable + JSON output, exit codes 0/1/2) - 13 new unit tests (91 total, 0 failures)
- MCP server version bumped to 0.3.0
- SDK version bumped to 0.2.0
0.1.0 - 2026-03-08
masterbranch established as the primary branch of this repository- Full SDK and MCP implementation merged into
masterfromfeat/sdk-and-mcp
- TypeScript SDK (
@make-software/cspr-trade-mcp-sdk) — market data, quotes, transaction building - MCP server (
@make-software/cspr-trade-mcp) — AI agent tools for CSPR.trade DEX - Local proxy WASM transaction building with unified RPC submission
- Integration tests for SDK and MCP
- Claude Code SKILL.md for guided DEX interactions
llms.txtfor LLM-readable documentation