Tidepooltestnet

Quickstart

List tokens, price a swap and create a live quote with plain curl.

Tidepool speaks the 1Click Swap API (OpenAPI v0.1.10) shape on NEAR testnet. If you already have a 1Click client, change its base URL to https://www.usetidepool.tech and use the testnet asset ids from /v0/tokens.

List tokens

curl https://www.usetidepool.tech/v0/tokens

Each token has an assetId such as nep141:usdc.tidepool-sandbox.testnet, a decimals value and a live USD price. Use those ids in quotes.

Ask for a dry quote

A dry quote prices the swap without creating a deposit address or committing the maker.

curl -X POST https://www.usetidepool.tech/v0/quote \
  -H 'content-type: application/json' \
  -d '{
    "dry": true,
    "swapType": "EXACT_INPUT",
    "slippageTolerance": 100,
    "originAsset": "nep141:usdc.tidepool-sandbox.testnet",
    "depositType": "INTENTS",
    "destinationAsset": "nep141:wnear.tidepool-sandbox.testnet",
    "amount": "10000000",
    "refundTo": "alice.testnet",
    "refundType": "INTENTS",
    "recipient": "alice.testnet",
    "recipientType": "DESTINATION_CHAIN",
    "deadline": "2030-01-01T00:00:00.000Z"
  }'

amount is in base units (USDC has 6 decimals, so 10000000 is 10 USDC). slippageTolerance is in basis points (100 = 1%).

Go live

Send the same request with "dry": false and a deadline a few minutes ahead. The response's quote.depositAddress is a fresh NEAR account used by this quote only. Deposit quote.amountIn of the origin token to it (how), then poll:

curl "https://www.usetidepool.tech/v0/status?depositAddress=<depositAddress>"

Try it here (dry quote, nothing is committed):

POST

Auth and fees

Auth is optional. Any X-API-Key header or Authorization: Bearer <token> value is accepted, so a dummy JWT works. A key selects the lower fee tier, as it does on mainnet 1Click:

PairNo keyAny key
Most pairs45 bps20 bps
Stable to stable (USDC/USDT)26 bps1 bp

Differences from mainnet 1Click

  • Tokens are Tidepool test tokens on NEAR testnet, not bridged assets. Only blockchain: "near" exists.
  • Supported: EXACT_INPUT, EXACT_OUTPUT, FLEX_INPUT; deposit and refund types ORIGIN_CHAIN and INTENTS; recipient types DESTINATION_CHAIN and INTENTS.
  • ANY_INPUT, CONFIDENTIAL_INTENTS, appFees, depositMode: MEMO and /v0/auth/* return 400 or 404.
  • One maker (Tidepool's) fills every quote. There is no solver competition.
  • The quote signature is Tidepool's maker key over the quote body, not 1Click's.

Next: First swap in 5 minutes.

On this page