CCXT Read Adapter#
@seesaw/ccxt-read-adapter is a dependency-free, read-only, CCXT-shaped adapter
over the Seesaw exchange facade. It is for terminals and bots that already know
CCXT-style market-data methods but still want Seesaw order entry to stay
trustless through the SDK and Solana transaction flow.
The adapter does not implement hosted order entry, hosted WebSockets, outbound webhooks, or historical data export jobs.
Install And Create#
import { createSeesawCcxtReadAdapter } from '@seesaw/ccxt-read-adapter';
const exchange = createSeesawCcxtReadAdapter({
baseUrl: 'https://api.seesaw.markets',
});
Test harnesses or custom transports can pass request(path) instead of
baseUrl. The path is the canonical /api/v1/exchange/... path. The adapter
accepts either the standard REST { data: ... } envelope or the unwrapped
payload from custom test transports.
Supported Methods#
| Method | Exchange facade route |
|---|---|
fetchMarkets | /api/v1/exchange/markets |
loadMarkets | /api/v1/exchange/markets |
fetchTicker | /api/v1/exchange/ticker/{symbol} |
fetchOrderBook | /api/v1/exchange/orderbook/{symbol} |
fetchTrades | /api/v1/exchange/trades/{symbol} |
fetchOHLCV | /api/v1/exchange/candles/{symbol} |
createOrder | rejected with SeesawCcxtReadOnlyError |
cancelOrder | rejected with SeesawCcxtReadOnlyError |
fetchMarkets() uses the exchange facade's maximum page size of 100 by
default. loadMarkets() paginates through all available market pages before
caching.
since is rejected for fetchTrades() and fetchOHLCV() because the hosted
facade does not support server-side historical cursor queries.
Data Normalization#
Seesaw probabilities are exposed by the REST API as integer basis points. The adapter converts them to CCXT-style decimal probabilities:
probabilityFromBps(6125); // 0.6125
Integer token quantities and volumes are converted to JavaScript numbers for
CCXT compatibility. The original REST payload remains available on each
returned object as info.
Timeframes#
fetchOHLCV supports:
| Timeframe | Seconds |
|---|---|
1m | 60 |
5m | 300 |
15m | 900 |
1h | 3600 |
1d | 86400 |
Trust Boundary#
This adapter is a market-data convenience surface. Trading integrations should use Seesaw's trustless SDK helpers to build and sign Solana transactions, and user-owned RPC or stream providers for replayable activity streams.